Show inventory alert when equipping/unequipping/augmenting items
This commit is contained in:
@@ -100,8 +100,7 @@ _followSpeed = 150.0
|
||||
|
||||
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("5_drfkj")]
|
||||
unique_name_in_owner = true
|
||||
_minimumAttackTime = 1.0
|
||||
_maximumAttackTime = 3.0
|
||||
_maximumAttackTime = 4.0
|
||||
_acquireTargetTime = 2.0
|
||||
|
||||
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
|
||||
|
||||
@@ -13,7 +13,6 @@ using System.Threading.Tasks;
|
||||
using Zennysoft.Game.Implementation;
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
using System.Linq;
|
||||
using Chickensoft.Collections;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class Game : Node3D, IGame
|
||||
@@ -810,6 +809,8 @@ public partial class Game : Node3D, IGame
|
||||
_player.Activate();
|
||||
}
|
||||
|
||||
public void NotifyInventory(string message) => InventoryEventNotification?.Invoke(message);
|
||||
|
||||
private void OnQuit() => GameExitRequested?.Invoke();
|
||||
|
||||
public void OnExitTree()
|
||||
|
||||
@@ -37,6 +37,8 @@ public interface IGame : IProvide<IGame>, IProvide<IGameRepo>, IProvide<IPlayer>
|
||||
|
||||
public void DoubleExp();
|
||||
|
||||
public void NotifyInventory(string message);
|
||||
|
||||
public ItemRescueMenu ItemRescueMenu { get; }
|
||||
|
||||
public QuestData QuestData { get; }
|
||||
|
||||
@@ -361,6 +361,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
if (accessory.AccessoryTag == AccessoryTag.BoostEXPGainRate)
|
||||
ExperiencePointsComponent.ModifyExpGainRate(ExperiencePointsComponent.ExpGainRate.Value + 0.2f);
|
||||
}
|
||||
_game.NotifyInventory($"{equipable.ItemName} equipped.");
|
||||
}
|
||||
|
||||
public void Unequip(IEquipableItem equipable)
|
||||
@@ -384,6 +385,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
if (accessory.AccessoryTag == AccessoryTag.BoostEXPGainRate)
|
||||
ExperiencePointsComponent.ModifyExpGainRate(ExperiencePointsComponent.ExpGainRate.Value - 0.2f);
|
||||
}
|
||||
_game.NotifyInventory($"{equipable.ItemName} unequipped.");
|
||||
}
|
||||
|
||||
public void ApplyNewAugment(IAugmentItem jewel, IAugmentableItem augmentableItem)
|
||||
@@ -394,6 +396,8 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
|
||||
if (augmentableItem.Augment != null && augmentableItem is IEquipableItem equipable && EquipmentComponent.IsItemEquipped(equipable))
|
||||
augmentableItem.Augment.AugmentType.Apply();
|
||||
|
||||
_game.NotifyInventory($"{((IBaseInventoryItem)augmentableItem).ItemName} augmented with {jewel.ItemName}.");
|
||||
}
|
||||
|
||||
private void ApplyNewAugment(Weapon weapon, Jewel jewel)
|
||||
|
||||
@@ -450,20 +450,34 @@ focus_mode = 2
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_cq2sk")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer"]
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer/ItemActionResultPanel"]
|
||||
layout_mode = 2
|
||||
offset_right = 574.0
|
||||
offset_bottom = 250.0
|
||||
theme_override_constants/margin_left = 5
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer/MarginContainer"]
|
||||
[node name="ReferenceRect" type="ReferenceRect" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer/ItemActionResultPanel/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
border_color = Color(1, 1, 1, 1)
|
||||
border_width = 2.0
|
||||
editor_only = false
|
||||
|
||||
[node name="ItemActionResultLabel" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer/MarginContainer"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer/ItemActionResultPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 20
|
||||
|
||||
[node name="ItemActionResultLabel" type="Label" parent="Panel/MarginContainer/PanelContainer/MenuPanel/ItemActionResultContainer/ItemActionResultPanel/MarginContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(275, 125)
|
||||
layout_mode = 2
|
||||
|
||||
Reference in New Issue
Block a user