summaryrefslogtreecommitdiffstats
path: root/world/monuments/DockMonument.gd
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-09-20 02:00:08 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-09-20 02:00:08 -0400
commit7e75beb7b1f3b1121961f8df36f0fee3cd41cb58 (patch)
tree297727d30a8cb5be309b47c1e8bfe41e0792888b /world/monuments/DockMonument.gd
parent51a0664a1c2265adddbf4c42d4eda747c8ea8aaf (diff)
downloadgodot_wildjam_49-7e75beb7b1f3b1121961f8df36f0fee3cd41cb58.tar.gz
godot_wildjam_49-7e75beb7b1f3b1121961f8df36f0fee3cd41cb58.zip
Add ability to add static monuments to the world
Diffstat (limited to 'world/monuments/DockMonument.gd')
-rw-r--r--world/monuments/DockMonument.gd19
1 files changed, 19 insertions, 0 deletions
diff --git a/world/monuments/DockMonument.gd b/world/monuments/DockMonument.gd
new file mode 100644
index 0000000..2ac0c71
--- /dev/null
+++ b/world/monuments/DockMonument.gd
@@ -0,0 +1,19 @@
+extends Monument
+class_name DockMonument
+
+var packed_scene = preload("res://world/monuments/Dock.tscn")
+
+func _init(xform:Transform).(xform,packed_scene,_chunks(),_origin()):
+ pass
+
+func _chunks():
+ var chunk_size = ChunkLoader.world.chunk_size
+ var c = {}
+ var width = stepify(200.0,chunk_size)
+ for x in range(-width,width+chunk_size,chunk_size):
+ for y in range(-width,width+chunk_size,chunk_size):
+ c[Vector2(x,y)] = true
+ return c
+
+func _origin():
+ return Vector2(0.0,0.0)