Stil wählen, merken und fotografieren

F2 wechselt im Spiel den Stil und meldet ihn, --style=NAME wählt ihn
beim Start, und das Spiel merkt sich die Wahl in den Einstellungen.
Das Bildschirmfoto-Werkzeug nimmt Bilder in einem bestimmten Stil und
von der Vitrine auf und zeigt eine zweite Figur mit Namen.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Steven Wroblewski
2026-10-02 12:49:40 +02:00
parent 714d604c58
commit ab81f66ef0
8 changed files with 126 additions and 27 deletions
+8 -1
View File
@@ -83,6 +83,8 @@ func _ready() -> void:
clock = TickClock.new(GwSession.TICKS_PER_SECOND)
art = Art.new()
art.load_overrides(Art.OVERRIDE_DIR)
if not art.select(options.style):
art.select(StringName(store.style()))
map_view = MapView.new()
map_view.art = art
add_child(map_view)
@@ -253,11 +255,13 @@ func _hide_showcase() -> void:
showcase.process_mode = Node.PROCESS_MODE_DISABLED
## Draws the playing field again after the style changed.
## Draws the playing field again after the style changed, and remembers the
## style for the next start.
func _redraw_art() -> void:
map_view.redraw()
for node: Node2D in [marker, figures, avatar]:
node.queue_redraw()
store.set_style(String(art.style.key()))
## Says in the status line how the game is shared, and with how many.
@@ -390,6 +394,9 @@ func _unhandled_input(event: InputEvent) -> void:
_set_paused(not clock.paused)
else:
hud.flash("PAUSE_ONLY_ALONE")
elif event.is_action_pressed("next_style"):
art.select_next()
hud.flash("STYLE_SWITCHED", [tr(art.style.title_key())])
## Goes back to the saved world. Only when playing alone: guests would no