diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-20 18:52:46 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-20 18:52:46 -0400 |
commit | 743c526b46a1d1c6e0b7ef8b9b0f10b22ee43ab3 (patch) | |
tree | d7e1a2f2c0182664b7fe0e5b40d8b35a7433f8fa /world/monuments/DockMonument.gd | |
parent | 02cbcb1a7f09c2b4d9ca89bb25cfc0a8a4354b63 (diff) | |
download | game_jam49-743c526b46a1d1c6e0b7ef8b9b0f10b22ee43ab3.tar.gz game_jam49-743c526b46a1d1c6e0b7ef8b9b0f10b22ee43ab3.zip |
Simplify and Fix Monument Code
Simplify the monument chunks to just be a bounding box with the scene origin at the center.
This allows us to automatically calculate the chunks with only the bounds provided.
It also fixes the issues with scaling and rotation.
Diffstat (limited to '')
-rw-r--r-- | world/monuments/DockMonument.gd | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/world/monuments/DockMonument.gd b/world/monuments/DockMonument.gd index 2ac0c71..6aa1495 100644 --- a/world/monuments/DockMonument.gd +++ b/world/monuments/DockMonument.gd @@ -3,17 +3,5 @@ class_name DockMonument var packed_scene = preload("res://world/monuments/Dock.tscn") -func _init(xform:Transform).(xform,packed_scene,_chunks(),_origin()): +func _init(xform:Transform).(xform,Vector2(300.0,300.0),packed_scene): 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) |