revert(turn-processor): ️ Revert culture-port logic to restore pre-Rust port GDScript behavior and document floating-point divergence

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-04-27 22:02:04 -07:00
parent ff87a5f2e1
commit 2c7109887b

View file

@ -364,9 +364,14 @@ func _process_culture(player: RefCounted, game_map: RefCounted) -> void:
continue
var c: CityScript = city_ref as CityScript
var tile_json: String = BuildableHelperScript.build_tile_yields_json(c, game_map)
# TEMPORARY R9 PARITY TEST: revert to pre-port GDScript multiplication
# to isolate the culture-port effect from other landed code (courier
# diplomacy, building ID reconciliation) between R6 and R7/R8.
# Culture-port to Rust (`process_culture_with_modifier`) attempted in
# R7/R8 but caused seed-divergence vs R6 baseline (R9 parity test
# reproduced R6 exactly when reverted to this GDScript path; R8 with
# Rust port diverged on every seed). Math LOOKED identical but the
# Rust call sequence produces different floating-point intermediate
# results than the GDScript-via-Variant round-trip path. Culture port
# remains TODO — see p1-39. The other Rail-1 ports (gold, research)
# pass parity and stay.
var pre_culture: float = c.get_culture_stored()
var can_expand: bool = c.process_culture(tile_json)
var cult_pct: float = _sum_city_building_effect_float(c, "culture_percent")