Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -157,6 +157,10 @@ all_initial_objects = []
|
|
157 |
for plot in plots_metadata:
|
158 |
all_initial_objects.extend(load_plot_objects(plot['filename'], plot['x_offset'], plot['z_offset']))
|
159 |
|
|
|
|
|
|
|
|
|
160 |
# --- Sidebar ---
|
161 |
with st.sidebar:
|
162 |
st.title("🏗️ World Controls")
|
|
|
157 |
for plot in plots_metadata:
|
158 |
all_initial_objects.extend(load_plot_objects(plot['filename'], plot['x_offset'], plot['z_offset']))
|
159 |
|
160 |
+
# --- Update GameState with initial objects if empty ---
|
161 |
+
if not game_state.get_state():
|
162 |
+
game_state.update_state(all_initial_objects)
|
163 |
+
|
164 |
# --- Sidebar ---
|
165 |
with st.sidebar:
|
166 |
st.title("🏗️ World Controls")
|