feat(simulation): thread world seed from StartupMessage into economy (#826)
Replaces the hardcoded seed=0 with the seed received in StartupMessage,
threading it through SimulationPlugin -> EconomyPlugin / SimRng. Integration
test fixtures updated for the new SimulationPlugin { seed } signature.
This commit is contained in:
+4
-3
@@ -147,7 +147,7 @@ fn main() {
|
||||
|
||||
let mut app = App::new();
|
||||
settled_reach_server::tick_phases::TickPhase::configure(&mut app);
|
||||
app.add_plugins(SimulationPlugin);
|
||||
app.add_plugins(SimulationPlugin { seed });
|
||||
app.add_plugins(BridgePlugin);
|
||||
app.add_plugins(settled_reach_server::knowledge::KnowledgePlugin);
|
||||
app.add_plugins(settled_reach_server::npc::NpcPlugin);
|
||||
@@ -176,7 +176,8 @@ fn main() {
|
||||
app.insert_resource(BridgeResource::new(bridge));
|
||||
app.insert_resource(HandshakeState::Complete);
|
||||
|
||||
// Override SimRng with the chosen seed (SimulationPlugin defaults to seed 0)
|
||||
// SimulationPlugin { seed } already inserts SimRng with the correct seed.
|
||||
// Re-insert here as a defensive override in case plugin ordering shifts.
|
||||
app.insert_resource(settled_reach_server::simulation::rng::SimRng::new(seed));
|
||||
|
||||
// Initialize empty line pool index (populated by generator pipeline in v0.2).
|
||||
@@ -359,7 +360,7 @@ fn dump_schedule_graph() {
|
||||
|
||||
let mut app = App::new();
|
||||
settled_reach_server::tick_phases::TickPhase::configure(&mut app);
|
||||
app.add_plugins(SimulationPlugin);
|
||||
app.add_plugins(SimulationPlugin { seed: 0 });
|
||||
app.add_plugins(BridgePlugin);
|
||||
app.add_plugins(settled_reach_server::knowledge::KnowledgePlugin);
|
||||
app.add_plugins(settled_reach_server::npc::NpcPlugin);
|
||||
|
||||
Reference in New Issue
Block a user