diff --git a/assets/models/shippingcontainer.glb b/assets/models/shippingcontainer.glb new file mode 100644 index 0000000..27db9dd Binary files /dev/null and b/assets/models/shippingcontainer.glb differ diff --git a/build.rs b/build.rs index 394695e..c8671f8 100644 --- a/build.rs +++ b/build.rs @@ -23,6 +23,7 @@ fn main() -> std::io::Result<()> { if let Ok(mut file) = file { write!(&file, "[\n")?; extract_scene(&mut file, "test", "src/blender/scene_test.blend")?; + extract_scene(&mut file, "workshop", "src/blender/scene_workshop.blend")?; write!(&file, "]\n")?; } Ok(()) diff --git a/src/blender/scene_workshop.blend b/src/blender/scene_workshop.blend new file mode 100644 index 0000000..45720bc Binary files /dev/null and b/src/blender/scene_workshop.blend differ diff --git a/src/blender/shippingcontainer.blend b/src/blender/shippingcontainer.blend new file mode 100644 index 0000000..c0a014d Binary files /dev/null and b/src/blender/shippingcontainer.blend differ diff --git a/src/chats/serenity.yaml b/src/chats/serenity.yaml index 6b03cad..63100e0 100644 --- a/src/chats/serenity.yaml +++ b/src/chats/serenity.yaml @@ -340,6 +340,16 @@ - goto: eat - goto: reservation + +--- + + +- chat: Luna +- Oh hey you! +- include: generic_help_oxygen_entrypoint +- goto: EXIT +- include: generic_help_oxygen_handler + --- diff --git a/src/cmd.rs b/src/cmd.rs index 88ffc2c..5b23684 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -768,6 +768,39 @@ fn spawn_scenes( state.is_point_of_interest = true; ew_spawn.send(SpawnEvent(state)); } + "shippingcontainer" => { + let mut state = ParserState::default(); + state.class = DefClass::Actor; + state.pos = DVec3::new( + root_state.pos[0] + pos[0], + root_state.pos[1] - pos[2], + root_state.pos[2] + pos[1], + ); + state.model = Some("shippingcontainer".to_string()); + + state.rotation = Quat::from_euler(EulerRot::XYZ, rot[0], rot[1], rot[2]); + + // command: relativeto ? + state.relative_to = root_state.relative_to.clone(); + + // command: name Cruiser + state.name = Some("Shipping Container".to_string()); + + // command: scale 8 + state.model_scale = 8.0; + + // command: angularmomentum 0 0 0 + state.angular_momentum = DVec3::ZERO; + + // command: collider handcrafted + state.collider_is_one_mesh_of_scene = true; + + // command: density 500 + state.density = 500.0; + + // command: pointofinterest yes + ew_spawn.send(SpawnEvent(state)); + } _ => {} } } diff --git a/src/data/defs.txt b/src/data/defs.txt index 3de7918..50733d2 100644 --- a/src/data/defs.txt +++ b/src/data/defs.txt @@ -271,6 +271,20 @@ actor 0 59305 0 suitv2 scene 10 -30 20 test relativeto player +actor 700 -100 -1100 suitv2 + relativeto player + name Luna + id Luna + chatid Luna + angularmomentum 0 0 0 + wants maxrotation 0 + wants matchvelocitywith pizzeria + rotationy 108 + rotationx 180 + pronoun he + scene 22 0 0 workshop + relativeto Luna + actor -55e3 44e3 0 suitv2 template person relativeto thebe diff --git a/src/data/scenes.in b/src/data/scenes.in index 6fb42ab..a347f2a 100644 --- a/src/data/scenes.in +++ b/src/data/scenes.in @@ -1,3 +1,6 @@ [ ("test", "cruiser", [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]), +("workshop", "shippingcontainer", [0.0, 0.0, 0.0], [-0.026294278, 0.000376441, 0.014312184]), +("workshop", "shippingcontainer", [0.0, 12.0, 0.0], [-0.053937975, -0.013098141, 0.0]), +("workshop", "shippingcontainer", [0.0, -12.0, 0.0], [0.061487854, 0.08236491, -0.051188234]), ] diff --git a/src/load.rs b/src/load.rs index d648c88..992c777 100644 --- a/src/load.rs +++ b/src/load.rs @@ -44,6 +44,7 @@ pub fn asset_name_to_path(name: &str) -> &'static str { "crate" => "models/crate.glb#Scene0", "MeteorAceGT" => "models/MeteorAceGT.glb#Scene0", "cruiser" => "models/cruiser.glb#Scene0", + "shippingcontainer" => "models/shippingcontainer.glb#Scene0", "satellite" => "models/satellite.glb#Scene0", "pizzeria" => "models/pizzeria2.glb#Scene0", "pizzasign" => "models/pizzasign.glb#Scene0",