12 Commits

Author SHA1 Message Date
Matthew Richmond 9020833ece Stabilize test state resets and highway debug logging (#88577)
* Stabilize test state resets and highway debug logging

* tests: widen melee damage tolerance

* ci: retry overmap coverage

* ci: retry shader compile
2026-09-08 15:08:34 +02:00
Anton Simakov 53a046abf4 Merge pull request #86901 from akrieger/levellin
Speed up `post_process` tests through a combination of optimizations
2026-05-14 19:27:21 +02:00
Andrew Krieger 2d8816491c Fix postprocess tests regenerating the world for minutes at a time because of a bad earlier test. 2026-05-13 13:59:49 -07:00
Andrew Krieger f4ec2a303e Move post_process_pre_burn_material_immunity SECTIONS to INFO 2026-05-13 13:59:49 -07:00
dumb-kevin 05ab42807e tests/: wrap TU-local test fixture types in anon namespaces
- addiction_test: wrap addict_effect_totals
- battery_density_test: wrap battery_chemistry_family
- comestible_test: wrap all_stats
- encumbrance_test: wrap add_trait
- invlet_test: fuse inventory_location + invlet_state + test_action enums
- throwing_test: fuse throw_test_data + throw_test_pstats, move operator<< inside anon-ns
- vehicle_test: wrap vehicle_preset, damage_preset, folded_item_damage_preset, fuse rack_activation + rack_preset
- vision_test: wrap vision_test_case
- water_movement_test: fuse 6 swimmer/swim structs into one block
- weakpoint_test: wrap weakpoint_test_data, weakpoint_expectation, weakpoint_report
2026-05-12 10:53:28 +04:00
dumb-kevin 4ffb9673e0 Consume persisted PP decisions at mapgen
- Extracted apply_pre_burn_tiles() and pre_burn_percent_chance() helpers
- Added find_decision() and resolve_pp_decision() for lazy gate eval
- execute() maps decision semantics per sub-generator type
- pre_burn: applied runs without gate, skipped is noop, null is fresh roll
- execute_aftershock_ruin() takes decision pointer for applied/skipped mapping
- Dispatch in map::generate fetches decisions and passes to execute()
- Added scope overmap_special on pre_burn in riot_damage and test_pp_riot
- Added test_pp_field_building_upper oter and test_pp_multi_z_special
- Tests for null fallback, skipped noop, applied unconditional apply
- Integration test verifying multi-z OMTs share one decisions slot
2026-04-19 13:34:08 +04:00
dumb-kevin 3f290ea5fe Add plumbing for post-process decision persistence
- New pp_sub_generator_scope enum (omt, overmap_special)
- scope field on pp_sub_generator loaded from JSON
- check() rejects unsupported type/scope/attempts combinations
- check() enforces unique sub_generator_type per overmap_special entry
- New pp_sub_decision + pp_resolved_generator structs with (type, ordinal)
  identity, serialization, unknown-status clamping, full uint32_t seed
- New pp_decision_storage + pp_decisions_index on overmap
- Serialize and deserialize the new storage in savegame
- overmap::pp_decisions() and overmapbuffer::pp_decisions() accessors
- Optional decisions parameter on pp_generator::execute()
- Tests for scope default, sub_decision and resolved_generator roundtrips
2026-04-19 13:34:08 +04:00
dumb-kevin aa7a8909e8 Migrate core OMTs from PP_GENERATE_RIOT_DAMAGE to post_process_generators
- Replaced flag with field on all vanilla overmap terrain JSON
- Removed redundant deletes on sugar_house and speedway_track_abstract
- Added deprecation warning for remaining flag users in check()
- Added real-core smoke tests for inherited and exempt OMTs
- Updated post_process_generators.json comments
2026-04-18 22:14:50 +04:00
dumb-kevin 9c19f8ad46 Add post_process_generators field to oter_type_t
- New vector<pp_generator_id> field on oter_type_t with accessor on oter_t
- JSON loading via string_id_reader with extend/delete support
- Dispatch prefers field over legacy flags, road hack unchanged
- Warn on road OMTs with post_process_generators (silently ignored)
- Validate generator ids in check()
- Tests for field dispatch, field-over-flag precedence, inheritance
2026-04-18 22:14:50 +04:00
dumb-kevin b9e84161cb Make pre_burn respect terrain and furniture combustibility
- Skip non-flammable walls, floors, and doors in pre_burn
- Only convert outdoor ground to dirt if diggable or flammable
- Only destroy furniture with flammable flags
- Preserve items on water tiles
- Add pre_burn material immunity test with isolated pp_generator
- Update stair preservation test for non-flammable furniture
2026-04-17 23:07:17 +04:00
dumb-kevin 870b33372d Create pp_generator JSON type for post-process generators
- Added pp_generator registered via generic_factory
- Sub-generators read params from JSON instead of hardcoded locals
- Three generators: riot_damage, riot_damage_road, aftershock_ruin
- Dispatch in map::generate uses pp_generator_id lookups
- Fixed double-roll bug in add_fire chance evaluation
- Type-specific validation warns on ignored fields
2026-04-17 14:31:22 +04:00
dumb-kevin d1dfa50241 Extract post-process generators from mapgen.cpp
- Moved riot damage and aftershock ruin to mapgen_post_process.cpp/.h
- Added test OMT and characterization tests for post-process behavior
2026-04-16 23:51:58 +04:00