From c3fef4dc35303b092ba862ec00cc3ac33007c884 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 12 Feb 2024 21:42:35 -0800 Subject: [PATCH] update common --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/rbx.rs | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f26bb8f..c93f824 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -420,7 +420,7 @@ dependencies = [ [[package]] name = "strafesnet_common" version = "0.1.0" -source = "git+https://git.itzana.me/StrafesNET/common?rev=f155dd6a5015e4494c233888cb570a5014f86208#f155dd6a5015e4494c233888cb570a5014f86208" +source = "git+https://git.itzana.me/StrafesNET/common?rev=43f771fb0f19a3751875df1f25bf9cb5874f75f4#43f771fb0f19a3751875df1f25bf9cb5874f75f4" dependencies = [ "glam", "id", diff --git a/Cargo.toml b/Cargo.toml index 9cfe3a1..398a157 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,4 +12,4 @@ rbx_binary = "0.7.4" rbx_dom_weak = "2.7.0" rbx_reflection_database = "0.2.10" rbx_xml = "0.13.3" -strafesnet_common = { git = "https://git.itzana.me/StrafesNET/common", rev = "f155dd6a5015e4494c233888cb570a5014f86208" } +strafesnet_common = { git = "https://git.itzana.me/StrafesNET/common", rev = "43f771fb0f19a3751875df1f25bf9cb5874f75f4" } diff --git a/src/rbx.rs b/src/rbx.rs index 3c0ce9e..06a6bc6 100644 --- a/src/rbx.rs +++ b/src/rbx.rs @@ -198,7 +198,7 @@ fn get_attributes(object:&rbx_dom_weak::Instance,can_collide:bool,velocity:Plana gameplay_modes::ModeId::MAIN, gameplay_modes::ModeUpdate::element( model_id, - gameplay_modes::StageElement::new(0,false,gameplay_modes::StageElementBehaviour::Platform),//roblox does not know which stage the platform belongs to + gameplay_modes::StageElement::new(gameplay_modes::StageId::FIRST,false,gameplay_modes::StageElementBehaviour::Platform),//roblox does not know which stage the platform belongs to ), ); }, @@ -226,9 +226,10 @@ fn get_attributes(object:&rbx_dom_weak::Instance,can_collide:bool,velocity:Plana }else if let Some(captures)=lazy_regex::regex!(r"^(Force)?(Spawn|SpawnAt|Trigger|Teleport|Platform)(\d+)$") .captures(other){ force_intersecting=true; + let stage_id=gameplay_modes::StageId::new(captures[3].parse::().unwrap()); let stage_element=gameplay_modes::StageElement::new( //stage_id: - captures[3].parse::().unwrap(), + stage_id, //force: match captures.get(1){ Some(m)=>m.as_str()=="Force", @@ -239,7 +240,7 @@ fn get_attributes(object:&rbx_dom_weak::Instance,can_collide:bool,velocity:Plana "Spawn"=>{ modes_builder.insert_stage( gameplay_modes::ModeId::MAIN, - gameplay_modes::StageId::new(captures[2].parse::().unwrap()), + stage_id, gameplay_modes::Stage::new(model_id), ); gameplay_modes::StageElementBehaviour::SpawnAt