Fixed robot naming on spawn

This commit is contained in:
2026-05-14 20:23:19 +02:00
parent 6591dfe637
commit c6cb2cc00e
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -98,10 +98,10 @@ public partial class RobotList : PanelContainer
GameData.inventory.RemoveItem(spawnId, 1);
Robot robot = ResourceLoader.LoadRobotPrefab().Instantiate<Robot>();
robot.Name = $"Robot #{GameData.robots.Count}";
robot.Position = GameData.map[0].tiles[0, 0].Position;
robot.robotType = spawnId;
GetNode("/root/Main/World").AddChild(robot);
robot.Name = $"Robot #{GameData.robots.Count}";
GameData.robots.Add(robot);
spawnId = "";