Compare commits

...

2 Commits

Author SHA1 Message Date
e58a476d39 multiple wormhole 2024-02-15 00:49:15 -08:00
ece055db6f allow replace existing stage 2024-02-15 00:47:09 -08:00

View File

@ -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));
@ -220,7 +220,7 @@ fn get_attributes(object:&rbx_dom_weak::Instance,can_collide:bool,velocity:Plana
//the PhysicsModelId has to exist for it to be teleported to!
force_intersecting=true;
//this object is not special in strafe client, but the roblox mapping needs to be converted to model id
assert!(wormhole_id_to_out_model.insert(captures[2].parse::<u32>().unwrap(),model_id).is_none(),"Cannot have multiple WormholeOut with same id");
wormhole_id_to_out_model.insert(captures[2].parse::<u32>().unwrap(),model_id);//assert!(.is_none(),"Cannot have multiple WormholeOut with same id");
},
_=>(),
}