diff --git a/Data/Buildings.json b/Data/Buildings.json index 139ceb4..cdce126 100644 --- a/Data/Buildings.json +++ b/Data/Buildings.json @@ -19,5 +19,29 @@ "buildTime": 3.0, "allowedRotations": [0], "layer": 1 + }, + "ground": { + "scene": "res://Scenes/Tiles/GroundTile.tscn", + "cost": {}, + "durability": 200, + "buildTime": 0.0, + "allowedRotations": [0], + "layer": 0 + }, + "stone": { + "scene": "res://Scenes/Tiles/StoneTile.tscn", + "cost": {}, + "durability": 200, + "buildTime": 0.0, + "allowedRotations": [0], + "layer": 0 + }, + "stone_iron": { + "scene": "res://Scenes/Tiles/StoneIronTile.tscn", + "cost": {}, + "durability": 200, + "buildTime": 0.0, + "allowedRotations": [0], + "layer": 0 } } diff --git a/Scenes/Root.tscn b/Scenes/Root.tscn index 1a1828a..dc4d054 100644 --- a/Scenes/Root.tscn +++ b/Scenes/Root.tscn @@ -19,5 +19,4 @@ Grid = NodePath("../GridSystem") Registry = NodePath("../BuildingRegistry") [node name="Player" parent="." instance=ExtResource("3_oss8w")] -position = Vector2(602, 324) scale = Vector2(0.35, 0.35) diff --git a/Scenes/Tiles/GroundTile.png b/Scenes/Tiles/GroundTile.png new file mode 100644 index 0000000..fc6c626 Binary files /dev/null and b/Scenes/Tiles/GroundTile.png differ diff --git a/Scenes/Tiles/GroundTile.png.import b/Scenes/Tiles/GroundTile.png.import new file mode 100644 index 0000000..e3c06df --- /dev/null +++ b/Scenes/Tiles/GroundTile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cww1edmqcmb8b" +path="res://.godot/imported/GroundTile.png-b193d222fbf869e7606f01318fb918f7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Scenes/Tiles/GroundTile.png" +dest_files=["res://.godot/imported/GroundTile.png-b193d222fbf869e7606f01318fb918f7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Scenes/Tiles/GroundTile.tscn b/Scenes/Tiles/GroundTile.tscn new file mode 100644 index 0000000..bc82be9 --- /dev/null +++ b/Scenes/Tiles/GroundTile.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=3 uid="uid://7735luf8htft"] + +[ext_resource type="Script" uid="uid://dh0jdeplrigxu" path="res://Scripts/Tiles/GroundTile.cs" id="1_mqsaf"] +[ext_resource type="Texture2D" uid="uid://cww1edmqcmb8b" path="res://Scenes/Tiles/GroundTile.png" id="2_tow7r"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"] +size = Vector2(54, 54) + +[node name="GroundTile" type="StaticBody2D"] +script = ExtResource("1_mqsaf") + +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(0.1, 0.1) +texture = ExtResource("2_tow7r") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_8o613") + +[node name="ProgressOverlay" type="ColorRect" parent="."] +offset_left = -27.0 +offset_top = -27.0 +offset_right = 27.0 +offset_bottom = 27.0 diff --git a/Scenes/Tiles/StoneIronTile.png b/Scenes/Tiles/StoneIronTile.png new file mode 100644 index 0000000..8af9e68 Binary files /dev/null and b/Scenes/Tiles/StoneIronTile.png differ diff --git a/Scenes/Tiles/StoneIronTile.png.import b/Scenes/Tiles/StoneIronTile.png.import new file mode 100644 index 0000000..946df76 --- /dev/null +++ b/Scenes/Tiles/StoneIronTile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c3qdue55e6blv" +path="res://.godot/imported/StoneIronTile.png-a3d6be6bb8b8b8a0f32242e23f1c00ca.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Scenes/Tiles/StoneIronTile.png" +dest_files=["res://.godot/imported/StoneIronTile.png-a3d6be6bb8b8b8a0f32242e23f1c00ca.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Scenes/Tiles/StoneIronTile.tscn b/Scenes/Tiles/StoneIronTile.tscn new file mode 100644 index 0000000..6098b1d --- /dev/null +++ b/Scenes/Tiles/StoneIronTile.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=3 uid="uid://dnkcl5ucmip40"] + +[ext_resource type="Script" uid="uid://dh0jdeplrigxu" path="res://Scripts/Tiles/GroundTile.cs" id="1_ewklp"] +[ext_resource type="Texture2D" uid="uid://c3qdue55e6blv" path="res://Scenes/Tiles/StoneIronTile.png" id="2_ewklp"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"] +size = Vector2(54, 54) + +[node name="StoneIronTile" type="StaticBody2D"] +script = ExtResource("1_ewklp") + +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(0.1, 0.1) +texture = ExtResource("2_ewklp") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_8o613") + +[node name="ProgressOverlay" type="ColorRect" parent="."] +offset_left = -27.0 +offset_top = -27.0 +offset_right = 27.0 +offset_bottom = 27.0 diff --git a/Scenes/Tiles/StoneTile.png b/Scenes/Tiles/StoneTile.png new file mode 100644 index 0000000..6abfe0c Binary files /dev/null and b/Scenes/Tiles/StoneTile.png differ diff --git a/Scenes/Tiles/StoneTile.png.import b/Scenes/Tiles/StoneTile.png.import new file mode 100644 index 0000000..4fccb43 --- /dev/null +++ b/Scenes/Tiles/StoneTile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ca0qwr6hngho2" +path="res://.godot/imported/StoneTile.png-20e063912018fbf7fd000e734fc2097f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Scenes/Tiles/StoneTile.png" +dest_files=["res://.godot/imported/StoneTile.png-20e063912018fbf7fd000e734fc2097f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Scenes/Tiles/StoneTile.tscn b/Scenes/Tiles/StoneTile.tscn new file mode 100644 index 0000000..4408605 --- /dev/null +++ b/Scenes/Tiles/StoneTile.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=3 uid="uid://bafvcatjix3mx"] + +[ext_resource type="Script" uid="uid://dh0jdeplrigxu" path="res://Scripts/Tiles/GroundTile.cs" id="1_rndy8"] +[ext_resource type="Texture2D" uid="uid://ca0qwr6hngho2" path="res://Scenes/Tiles/StoneTile.png" id="2_rndy8"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"] +size = Vector2(54, 54) + +[node name="StoneTile" type="StaticBody2D"] +script = ExtResource("1_rndy8") + +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(0.1, 0.1) +texture = ExtResource("2_rndy8") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_8o613") + +[node name="ProgressOverlay" type="ColorRect" parent="."] +offset_left = -27.0 +offset_top = -27.0 +offset_right = 27.0 +offset_bottom = 27.0 diff --git a/Scripts/Tiles/GroundTile.cs b/Scripts/Tiles/GroundTile.cs new file mode 100644 index 0000000..10a3013 --- /dev/null +++ b/Scripts/Tiles/GroundTile.cs @@ -0,0 +1,8 @@ +using Godot; + +namespace AceFieldNewHorizon.Scripts.Tiles; + +public partial class GroundTile : BaseTile +{ + +} diff --git a/Scripts/Tiles/GroundTile.cs.uid b/Scripts/Tiles/GroundTile.cs.uid new file mode 100644 index 0000000..409b29a --- /dev/null +++ b/Scripts/Tiles/GroundTile.cs.uid @@ -0,0 +1 @@ +uid://dh0jdeplrigxu