summaryrefslogtreecommitdiff
path: root/scripts/entities/actions/PickUpAction.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
commitc6bbb834f7758027c0df338f1520f34fad3befea (patch)
tree1818cd23c24be16fbe19b16dd0a510874d440d83 /scripts/entities/actions/PickUpAction.cs
parentf1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c (diff)
Organização
Diffstat (limited to 'scripts/entities/actions/PickUpAction.cs')
-rw-r--r--scripts/entities/actions/PickUpAction.cs34
1 files changed, 0 insertions, 34 deletions
diff --git a/scripts/entities/actions/PickUpAction.cs b/scripts/entities/actions/PickUpAction.cs
deleted file mode 100644
index b772bb7..0000000
--- a/scripts/entities/actions/PickUpAction.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using Godot;
-
-public partial class PickupAction : DirectionalAction
-{
- protected Player player;
-
- public PickupAction(Player player, Vector2I offset) : base(player, offset)
- {
- this.player = player;
- // Pegar itens requer um tempo menor.
- cost = 2;
- }
-
- public override bool Perform()
- {
- ConsumableItem item = Map_Data.GetFirstItemAtPosition(Destination);
-
- if (item == null) {
- MessageLogData.Instance.AddMessage("Não tem item aqui.");
- return false;
- }
-
- if (player.inventory.Items.Count >= player.inventory.Capacity) {
- MessageLogData.Instance.AddMessage("Seu inventário está cheio");
- return false;
- }
-
- Map_Data.RemoveEntity(item);
- player.inventory.Add(item);
-
- player.Energy -= cost;
- return true;
- }
-} \ No newline at end of file