add fuel tank to Luna's workshop
This commit is contained in:
parent
1f11957429
commit
f4c25352b4
BIN
assets/models/fueltank.glb
Normal file
BIN
assets/models/fueltank.glb
Normal file
Binary file not shown.
BIN
src/blender/fueltank.blend
Normal file
BIN
src/blender/fueltank.blend
Normal file
Binary file not shown.
Binary file not shown.
47
src/cmd.rs
47
src/cmd.rs
|
@ -723,16 +723,17 @@ fn spawn_scenes(
|
|||
|
||||
let scene_defs = include!("data/scenes.in");
|
||||
for (name, template, pos, rot) in scene_defs {
|
||||
let pos = DVec3::new(
|
||||
root_state.pos[0] + pos[0],
|
||||
root_state.pos[1] - pos[2],
|
||||
root_state.pos[2] + pos[1],
|
||||
);
|
||||
if Some(name.to_string()) == root_state.name {
|
||||
match template {
|
||||
"cruiser" => {
|
||||
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.pos = pos;
|
||||
state.model = Some("cruiser".to_string());
|
||||
|
||||
state.rotation = Quat::from_euler(EulerRot::XYZ, rot[0], rot[1], rot[2]);
|
||||
|
@ -778,11 +779,7 @@ fn spawn_scenes(
|
|||
"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.pos = pos;
|
||||
state.model = Some("shippingcontainer".to_string());
|
||||
|
||||
state.rotation = Quat::from_euler(EulerRot::XYZ, rot[0], rot[1], rot[2]);
|
||||
|
@ -808,6 +805,36 @@ fn spawn_scenes(
|
|||
// command: pointofinterest yes
|
||||
ew_spawn.send(SpawnEvent(state));
|
||||
}
|
||||
"fueltank" => {
|
||||
let mut state = ParserState::default();
|
||||
state.class = DefClass::Actor;
|
||||
state.pos = pos;
|
||||
state.model = Some("fueltank".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 "Fuel Tank"
|
||||
state.name = Some("Fuel Tank".to_string());
|
||||
|
||||
// command: scale 8
|
||||
state.model_scale = 8.0;
|
||||
|
||||
// command: angularmomentum 0 0 0
|
||||
state.angular_momentum = DVec3::ZERO;
|
||||
|
||||
// command: collider mesh
|
||||
state.collider_is_one_mesh_of_scene = true;
|
||||
state.collider_is_mesh = true;
|
||||
|
||||
// command: density 2000
|
||||
state.density = 2000.0;
|
||||
|
||||
// command: pointofinterest yes
|
||||
ew_spawn.send(SpawnEvent(state));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// DO NOT MODIFY MANUALLY, CHANGES WILL BE OVERWRITTEN!
|
||||
[
|
||||
("test", "cruiser", [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]),
|
||||
("workshop", "fueltank", [21.132, -24.376015, 0.0], [1.1160387, -1.308411, -0.9967722]),
|
||||
("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]),
|
||||
|
|
|
@ -44,6 +44,7 @@ pub fn asset_name_to_path(name: &str) -> &'static str {
|
|||
"MeteorAceGT" => "models/MeteorAceGT.glb#Scene0",
|
||||
"cruiser" => "models/cruiser.glb#Scene0",
|
||||
"shippingcontainer" => "models/shippingcontainer.glb#Scene0",
|
||||
"fueltank" => "models/fueltank.glb#Scene0",
|
||||
"satellite" => "models/satellite.gltf#Scene0",
|
||||
"pizzeria" => "models/pizzeria3.gltf#Scene0",
|
||||
"pizzasign" => "models/pizzasign.glb#Scene0",
|
||||
|
|
Loading…
Reference in a new issue