Commit Graph

44 Commits

Author SHA1 Message Date
77bbd58d02 resolve keyboard shortcuts through one action table instead of a switch
The controls panel needs to say what each key does right now, and a panel that
keeps its own list of that is a list that goes stale. So the list moves into
lib/core/ControlAction.h: which actions exist, what each is bound to, and when
each does something. InputMapper stops deciding that and switches on the
resolved action instead, so the panel and the key handling cannot disagree
about what Q means -- there is only one place that says.

The table declares; it never performs. It holds no simulation access, fires no
events, and names nothing: display strings live in the ui target, which formats
the bindings this hands it, so a badge is rendered from the real binding rather
than typed beside it. What an action *does* stays exactly where it was.

ControlContext is the snapshot the rules read, which is what keeps this
testable without a world. Two of its facts come from BlueprintLibrary, which is
built after the world view and so arrives by setter; one comes from the new
hovered-transfer flag on BuildModeController, resolved once on mouse-move
through the same classifier the click and the ghost colour already use.

Behaviour is unchanged, deliberately. Ctrl still separates the chords and every
other modifier is still ignored, so Shift+A pans as before; matching modifiers
exactly would have silently swallowed those presses. Build hotkeys and F3/F4
stay outside the table -- the first are advertised on the build buttons and
already derive their badges from the handler's own table, the second are
development controls the panel must never offer.

The tests are the point of putting this in lib: every row's bindings must
resolve back to that row's action in that same context, which fails the moment
a shown row and its handler part ways.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YHcUerKAZKWNvSKJxYKbnG
2026-08-07 17:20:44 +02:00
08d8b0dd90 re-cover copy-settings through single-building blueprints 2026-08-06 19:44:55 +02:00
e5dcb9de5f extract WorldRenderer 2026-08-05 22:14:55 +02:00
26d7448492 extract BuildModeController, fixing a silent blueprint exit 2026-08-05 22:14:54 +02:00
202f583067 extract SelectionController 2026-08-05 22:14:54 +02:00
f6df95abb2 extract the scroll position into WorldCamera 2026-08-05 22:14:52 +02:00
fa9dbd62ad use WorldCoordinates in ArenaView too 2026-08-05 22:14:52 +02:00
2af09d9eb1 extract the world<->widget transform into WorldCoordinates 2026-08-05 22:14:52 +02:00
d87d063b10 move the placement rules and the config-dependent queries off BuildingSystem 2026-08-05 06:49:49 +02:00
0408336cf9 depend on factory data instead of BuildingSystem in the AI path 2026-08-05 06:44:49 +02:00
3990351a16 share BuildingSystem's free functions instead of copying them 2026-08-04 18:24:38 +02:00
a8e933b7f2 drop EntityAdmin::add in favour of addComponent 2026-08-03 21:09:18 +02:00
8b71fe1a03 Rename ship/station scrap drop entities to "debris" 2026-07-23 20:51:05 +02:00
a9082c57f3 Implement config-driven unlock groups so that multiple things can be unlocked at once (including buildings) 2026-07-22 21:34:59 +02:00
a8a6a04f1e Highlight tunnel connections in green when selected 2026-07-21 21:16:21 +02:00
9b63af6ccb Unify tunnel build mode into a single Tunnel button 2026-07-21 21:12:06 +02:00
b2c1ea34fd Implement deferred L-shaped belt drag placement 2026-07-21 21:05:31 +02:00
6274b5ce60 List unlocked recipes with tooltips in schematic choice dialog instead of unlocked item names 2026-07-09 20:22:17 +02:00
18e732ae99 Remove schematic upgrades and module and ship levels 2026-07-02 21:32:36 +02:00
0a7e9a34ef Add artifact win condition (#3)
Reviewed-on: #3
Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com>
Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>
2026-07-01 20:27:29 +00:00
577927ef70 fix bug where splitter filters were not taken over to blueprint 2026-06-23 21:08:46 +02:00
9573b9789a change repair_tool application and add beams for salvager and repair_tool 2026-06-19 21:15:47 +02:00
3716c2b734 show implicitly unlocked items in schematic unlock dialog 2026-06-13 18:19:25 +02:00
5317f35198 switch to using own event system 2026-06-13 17:52:22 +02:00
49f7129bd5 schematic selection dialog 2026-06-13 14:19:51 +02:00
af96b95f61 allow to unlock modules when destroying defence stations 2026-06-10 22:37:38 +02:00
7669245229 use meters in config 2026-06-05 20:09:20 +02:00
3e19e44f24 store ship module layout in shipyard blueprint 2026-06-04 21:48:45 +02:00
9d0a60a93b define ship roles via added modules and allow multiple weapons 2026-06-01 23:05:21 +02:00
25ff3c56c5 move ecs related code to own folder 2026-05-25 09:10:54 +02:00
fa714335dc don't touch velocity in other systems and don't use snapTarget 2026-05-25 07:50:33 +02:00
0cd0529468 split MovementSystem to MovementIntentSystem and DynamicBodySystem 2026-05-25 07:25:54 +02:00
f5f4453e2c rename behavior components 2026-05-23 08:26:10 +02:00
b57299fd2a rename EntityId to BuildingId 2026-05-23 07:53:56 +02:00
ea79d76953 unify Weapon and StationWeapon components 2026-05-22 22:06:30 +02:00
9d20048705 cleanup 2026-05-22 20:45:10 +02:00
ca07cbaf0e switch to ECS architecture 2026-05-22 20:31:39 +02:00
c18c4e4804 implement claude feedback for EntityAdmin 2026-05-22 07:55:43 +02:00
cc2cca2442 add EntityAdmin wrapper 2026-05-22 06:34:57 +02:00
541b8fdaee implement storing recipes in blueprint 2026-04-27 12:58:44 +02:00
1e2135dc5b add blueprint tests 2026-04-26 22:19:46 +02:00
fb83db98ab rename blueprint to schematic 2026-04-26 21:00:55 +02:00
89005d6bb7 implement tunnels 2026-04-26 17:15:50 +02:00
41fd2a83ee add basic types and fix cmake 2026-04-19 15:35:21 +02:00