Commit Graph

7 Commits

Author SHA1 Message Date
chexit 02f99c31f6 Fire P1-SUN on network fire plots, make S-400/S-500 launchers only, give radars own models
build / mod (push) Successful in 30m51s
Gameplay fixes and art from the owner's balance review of 2026-12-05.

- The P1-SUN never launched (0 launches in 12 seeds of a 196-target raid): it
  has no radar of its own and only a separate launcher could fire on another
  station's plot. A unit without its own radar now fires like one
  (`why::on_network`), on the fresh own fire plot of an engagement or
  multifunction radar within link reach. Seven P1-SUN then launch 26-42 and
  kill 13-24 per raid; the leak count does not change.
- The С-400 and С-500 exist only as separate launchers (`mode: "launcher"` in
  the catalog). The `s400_launcher`/`s500_launcher` variants and their remotes
  are gone: `deploy s400`/`s500` and their remotes place a launcher. A system
  saved with its own radar loads as a launcher; `battery <n> integrated` is
  refused for these kinds.
- Every radar role has its own model: a wide curved array (search), a
  parabolic dish (engagement), a small head on mast sections (height); the
  multifunction radar keeps its panel, the optical post gets its own post and
  a turning head with a lens. A variant may carry its own `parts` in
  `catalog/content.json`; `Sam::parts()` resolves them.
- The enemy remembers the sides each approach raided from: a raid ordered the
  same way and within 200 blocks of the same distance comes from the same
  sides, so its sites stand where the last ones did. A launch area the radars
  fixed is remembered (up to 32): a site placed there again is known before
  its first launch and can be struck at once. Neither is saved yet.
- `sim/balance.rs` flies several raids over one cluster with stocked depots
  (`supply_raids`). With the 16-block depot reach, depots 30 blocks from the
  batteries leave 10 / 36 / 80 leaks over three raids against 6 / 10 / 17 for
  depots within reach; the reach itself is unchanged by decision of the owner.

The saturation checkpoint is re-recorded (123 kills / 323 launches instead of
129 / 344): that loadout has no fire radar, so its С-400/С-500 fire less as
launchers.

Verified: airdef-core release 363 passed and 8 scenarios; airdef-mod 135 passed,
1 boundary, 2 saturation, 5 scenarios; gen_catalog/gen_models/gen_sounds --check;
test_gen_assets, test_model_bounds, test_web_panel; git diff --check. Not run:
the actual WASM contract, the models in game, CI.
Co-Authored-By: ZCode <zcode@localhost>
2026-12-05 23:38:14 +03:00
chexit 7612d15963 Finish AirDef catalog, route, stock and observation fixes
build / mod (push) Successful in 30m46s
Refs #91, #114, #118, #135. Show the latest recorded unit decision in the native card (#153).
2026-12-02 18:22:22 +03:00
chexit 4d7815834d Give each battery variant its own placeable remote
build / mod (push) Failing after 28s
Every catalog variant now has a `airdef:deploy_<id>` remote in `give` and
in the hotbar: deploy_radar_search, deploy_radar_track, deploy_radar_height,
deploy_s400_launcher and deploy_s500_launcher. The variant rows carry their
remote item in the generated catalog, and the inventory appends them after
the existing remotes so no ordinary remote changes slot.

Placing a remote now resolves the item back to its (kind, mode, role)
configuration and settles the system, the same path `/airdef deploy <key>`
already used. The base remotes keep deploying the ordinary integrated,
multifunction system; the radar remotes place Search/Engagement/Height
profiles, so radar_track gets fire authority and the others do not.

The N menu's battery-deploy page is removed entirely (button, page and its
handlers); variants remain available through `/airdef deploy` and now the
remotes. Items, icons (aliased to the unit silhouettes), lang entries and
generated assets are regenerated from the content catalog.

Checks: gen_catalog.py --check, gen_models.py --check, test_gen_assets (11),
airdef-mod lib 115 + integration suites, airdef-core 327, cargo build.
2026-11-21 16:44:23 +03:00
chexit e5ee15a2ca Add passive optical observation post (#136)
- new Optical unit kind with its own catalog row and deploy item
- bounded one-contact line-of-sight checks against land and blocks
- day/night reach and hold timing; obstacle and unknown geometry block sight
- independent class observation with source, time and uncertainty, never DroneKind
- map/monitor/panel statuses and a line to the selected contact
- tests: day/night, wall/unknown, ageing, no kind leak, bounded work, passivity

Cherry-picked from 3ae21123964a9d3234bb2b3efc9ff926d64fc77d onto the
#132/#133/#134 base: the cue test's track literal now carries the shared
class/source/product/quality contract instead of a DroneKind.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 23:33:32 +03:00
chexit 858735a4c6 Implement the first full radar-profile slice (#134)
Give the separate radar three real profiles over SamKind::Radar and the
typed catalog variants:

- radar_search: coarse, slow, long-range search plots; no fire authority.
- radar_height: raised mast, local refinement of low plots; no fire authority.
- radar_track: local search, fast revisit, two refined/fire channels.
- radar_multi remains the compatible universal profile, not best everywhere.

Tracks now carry the measuring station, product (search/refine/fire), and
quality (separate from identification), and keep the station's own plot when a
fresher network relay replaces the published position. A relay never refreshes
the measurement or authorizes a launch. Ordinary launches need the battery's
own confirmed fire plot; launcher-only batteries use a supporting radar's own
plot, and the existing heavy far shot keeps its cue-radar exception.

Per-tick refinement/fire work is bounded by profile channels and local search
radius. Off, damage, network and save/replay behavior are preserved: new saves
write the stable profile ID, old role-only lines migrate, and embedded SAM
radars keep their own fire authority. The deploy menu, status lines, map,
monitor, radar scope and /airdef why explain the profile, source, age, quality,
channels and refusal reason.

Models/textures are untouched: all profiles reuse the existing radar
silhouette (the separate art zone remains for its owner).

Tests: profile single/pair/full scenarios and duplicate station, channels,
relay source/age/quality, Off/damage, save migration, replay, embedded and
Multifunction radars, catalog/generator checks, airdef-mod suites, core lib
(non-balance on one thread; the four active balance tests in release) and core
scenarios.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 23:11:12 +03:00
chexit c59bfe9e54 Catalog typed battery variants (#91)
The battery deploy pieces (s400_launcher, s500_launcher, radar_search/
track/height) were described three times: the menu table and the
configuration match in lib.rs, and a chained id list in commands.rs. One
catalog decision instead: catalog/content.json gains a variants section
(mode/role reuse the existing SamMode/RadarRole save keys), gen_catalog.py
generates catalog::UnitVariant rows, and the loader rejects duplicates,
unknown kinds/modes and id collisions with kinds or items. The battery
menu, its click handler and the deploy completion read the generated
table; the historical row order and labels are unchanged.

No variant carries its own balance: per-variant ammo profiles stay open
pending a confirmed profile and an explicitly labelled game abstraction
(PAC-3 note on #91), so no new specs, no new matches and no save/replay
change - a variant is only a deploy key over the same kind.

Checks: gen_catalog.py --check and gen_models.py --check clean, the
python catalog/asset and sound tests pass, airdef-core 234 unit + 8
scenarios, airdef-mod 69 unit + 1 boundary + 5 scenarios (save/load and
state round trips included), zero failures.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-20 21:34:07 +03:00
chexit eea1b3692e Share aircraft and item catalog with asset generation
build / mod (push) Failing after 20s
Co-Authored-By: Codex <noreply@openai.com>
2026-11-04 15:55:45 +03:00