add Luna's workshop with a couple of shipping containers

This commit is contained in:
yuni 2024-07-31 04:49:11 +02:00
parent 097c7c0c84
commit a6c88e1344
9 changed files with 62 additions and 0 deletions

Binary file not shown.

View file

@ -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(())

Binary file not shown.

Binary file not shown.

View file

@ -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
---

View file

@ -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));
}
_ => {}
}
}

View file

@ -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

View file

@ -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]),
]

View file

@ -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",