summaryrefslogtreecommitdiff
path: root/client/menu/menu_background.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-27 14:18:54 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-27 14:18:54 +0200
commit3d9398b552bee7615987cc177e14a21aba29689e (patch)
treeb963142c13016c86fa5e2304e1b10ce97c34a16a /client/menu/menu_background.gd
parentec6377cb004ae564a8ad2fd895f8aad09b0153c6 (diff)
downloadhurrycurry-3d9398b552bee7615987cc177e14a21aba29689e.tar
hurrycurry-3d9398b552bee7615987cc177e14a21aba29689e.tar.bz2
hurrycurry-3d9398b552bee7615987cc177e14a21aba29689e.tar.zst
move map code to Map scene
Diffstat (limited to 'client/menu/menu_background.gd')
-rw-r--r--client/menu/menu_background.gd6
1 files changed, 2 insertions, 4 deletions
diff --git a/client/menu/menu_background.gd b/client/menu/menu_background.gd
index 1d9322f3..4304cdbf 100644
--- a/client/menu/menu_background.gd
+++ b/client/menu/menu_background.gd
@@ -20,6 +20,7 @@ const NULLS = [null,null,null,null]
const BUCKETS = [[], ["floor","floor","floor","floor","tomato-crate", "raw-steak-crate"], ["table", "chair", "counter"], ["sink", "stove"]]
@onready var environment: WorldEnvironment = $Environment
+@onready var map: Map = $Map
func _ready():
if !Global.on_vulkan():
@@ -32,7 +33,4 @@ func _ready():
var bucket = BUCKETS[int(floor(k * BUCKETS.size())) % BUCKETS.size()]
if bucket.size() == 0: continue
var tile_name = bucket[randi() % bucket.size()]
- var tile = TileFactory.produce(tile_name, tile_name, NULLS)
-
- add_child(tile)
- tile.position = Vector3(x, 0, y)
+ map.set_tile(Vector2i(x,y), tile_name)