Added basic symbols for most of the resources and changed map to be revealed whilst robots are exploring.

This commit is contained in:
=
2026-04-29 19:19:13 +02:00
parent c54ff3088e
commit 95455597da
25 changed files with 350 additions and 24 deletions
+13
View File
@@ -56,4 +56,17 @@ public partial class ResourceLoader
};
return nodes;
}
public static Dictionary<string, Texture2D> LoadResourceSymbols()
{
Dictionary<string, Texture2D> symbols = new()
{
{ "Iron ore", GD.Load<Texture2D>($"res://Assets/IronSymbol.png") },
{ "Tin ore", GD.Load<Texture2D>($"res://Assets/TinSymbol.png") },
{ "Copper ore", GD.Load<Texture2D>($"res://Assets/CopperSymbol.png") },
{ "Mushroom", GD.Load<Texture2D>($"res://Assets/MushroomSymbol.png") },
{ "Spiderweb", GD.Load<Texture2D>($"res://Assets/SpiderwebSymbol.png") },
};
return symbols;
}
}
+10
View File
@@ -8,6 +8,7 @@ public partial class UIHandler : Control
[Export] RobotList robotList;
[Export] Information information;
[Export] Camera3D mainCam;
[Export] Map map;
public override void _Ready()
{
GetNode<ColorPickerButton>("./MainUI/HeaderContainer/Header/LightColor").Color = GameData.lightColor;
@@ -21,6 +22,15 @@ public partial class UIHandler : Control
mainCam.Position = new Vector3(robot.Position.X, mainCam.Position.Y, robot.Position.Z + 3f);
ShowCodingWindow(robot);
};
if (Input.IsActionJustPressed("map"))
{
map.Visible = !map.Visible;
if (map.Visible)
{
map.ShowMap();
}
}
}
public void ChangeColor(Color color)