## Capture scenario for the chart (A11): an island's full chart and minimap over the ## menu backdrop, with a player marked. Stages: "first" (the first tide is forecast) and ## "later" (the first tide has risen and the second is forecast, so taken land shows ## washed with the sea and the next is hatched). extends Control @export var stage: String = "first" @export var match_seed: int = 2 func _ready() -> void: set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) var backdrop: ColorRect = ColorRect.new() backdrop.color = Palette.SEA_INK.darkened(0.4) backdrop.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) add_child(backdrop) var sim: Simulation = Simulation.new(match_seed) sim.start_tide() if stage == "later": var first: Dictionary = Tuning.TIDE_PHASES[0] var into: int = roundi((float(first["hold"]) + float(first["rise"])) * Tuning.TICK_RATE_HZ) + 5 * Tuning.TICK_RATE_HZ sim.tide = Tide.new(sim.tick - into, sim.tide.levels) sim.set_sea_level(sim.tide.level_at(sim.tick)) var drop: Drop = Drop.plan(sim.ground, SimRng.new(match_seed), 0) var top: Vector3 = sim.island.summits[0] var me: Vector3 = top + Vector3(-30.0, 0.0, 40.0) var chart: ChartMap = ChartMap.new(ChartMap.Mode.FULL) chart.position = Vector2(560.0, 50.0) chart.size = Vector2(620.0, 620.0) add_child(chart) chart.setup(sim, match_seed, drop) chart.refresh(me, deg_to_rad(40.0), true, 10.0) var mini: ChartMap = ChartMap.new(ChartMap.Mode.MINI) mini.position = Vector2(60.0, 60.0) mini.size = Vector2(170.0, 170.0) add_child(mini) mini.setup(sim, match_seed, drop, chart) mini.refresh(me, deg_to_rad(40.0), true, 10.0)