From ece055db6f39d0da3c55f32183008326ce268a5e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 15 Feb 2024 00:47:09 -0800 Subject: [PATCH] allow replace existing stage --- src/rbx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rbx.rs b/src/rbx.rs index 00c0714..845cd36 100644 --- a/src/rbx.rs +++ b/src/rbx.rs @@ -125,7 +125,7 @@ impl ModesBuilder{ assert!(self.modes.insert(mode_id,mode).is_none(),"Cannot replace existing mode"); } fn insert_stage(&mut self,mode_id:gameplay_modes::ModeId,stage_id:gameplay_modes::StageId,stage:gameplay_modes::Stage){ - assert!(self.stages.entry(mode_id).or_insert(HashMap::new()).insert(stage_id,stage).is_none(),"Cannot replace existing stage"); + self.stages.entry(mode_id).or_insert(HashMap::new()).insert(stage_id,stage);//assert!(.is_none(),"Cannot replace existing stage"); } fn push_mode_update(&mut self,mode_id:gameplay_modes::ModeId,mode_update:gameplay_modes::ModeUpdate){ self.mode_updates.push((mode_id,mode_update));