migrate tutorial area from defs.txt to blender scene

This commit is contained in:
yuni 2024-11-17 20:33:59 +01:00
parent db0d51b438
commit 5bb2984fab
5 changed files with 121 additions and 40 deletions

Binary file not shown.

Binary file not shown.

View file

@ -989,6 +989,116 @@ fn spawn_scenes(
ew_spawn.send(SpawnEvent(state)); ew_spawn.send(SpawnEvent(state));
} }
"pizzeria" => {
state.model = Some("pizzeria".to_string());
// command: name "Uncharted Asteroid"
state.name = Some("Pizzeria Asteroid".to_string());
// command: id pizzeria
state.id = "pizzeria".to_string();
// command: collider handcrafted
state.collider_is_one_mesh_of_scene = true;
// command: pointofinterest yes
state.is_point_of_interest = true;
// command: density 5000
state.density = 5000.0;
// command: angularmomentum 0 0 0
state.angular_momentum = DVec3::ZERO;
ew_spawn.send(SpawnEvent(state));
}
"tutorialnpc" | "chef" | "tourist" => {
state.model = Some("suitv2".to_string());
// command: collider handcrafted
state.collider_is_one_mesh_of_scene = true;
// command: alive yes
state.is_alive = true;
state.is_lifeform = true;
state.is_suited = true;
// command: oxygen 0.864
state.is_lifeform = true;
state.is_suited = true;
state.oxygen = nature::OXY_D;
// command: engine monopropellant
state.engine_type = actor::EngineType::Monopropellant;
// command: thrust 1.2 1 1 14 1.5
state.thrust_forward = 1.2;
state.thrust_back = 1.0;
state.thrust_sideways = 1.0;
state.reaction_wheels = 14.0;
state.warmup_seconds = 1.5;
// command: wants maxrotation 0
state.wants_maxrotation = Some(0.0);
// command: wants maxvelocity 0
state.wants_maxvelocity = Some(0.0);
// command: pointofinterest yes
state.is_point_of_interest = true;
// command: density 200
state.density = 200.0;
// command: angularmomentum 0 0 0
state.angular_momentum = DVec3::ZERO;
if template == "tutorialnpc" {
state.id = "Icarus".to_string();
state.name = Some(state.id.clone());
state.chat = state.id.clone();
// command: angularmomentum 0.4 0.2 0.1
state.angular_momentum = DVec3::new(0.4, 0.2, 0.1);
// command: pronoun it
state.pronoun = Some("it".to_string());
// command: armodel suit_ar_wings
state.ar_models.push("suit_ar_wings".to_string());
// Icarus don't care
// command: wants maxrotation 0.5
state.wants_maxrotation = Some(0.5);
} else if template == "chef" {
state.name = Some("Nox".to_string());
state.chat = "PizzaChef".to_string();
// command: wants matchvelocitywith pizzeria
state.wants_matchvelocity_id = Some("pizzeria".to_string());
// command: armodel suit_ar_chefhat
state.ar_models.push("suit_ar_chefhat".to_string());
// command: wants lookat PLAYERCAMERA
state.wants_tolookat_id = Some("PLAYERCAMERA".to_string());
// command: pronoun he
state.pronoun = Some("he".to_string());
} else if template == "tourist" {
state.name = Some("Rynyk".to_string());
state.chat = "Rynyk".to_string();
// command: wants matchvelocitywith pizzeria
state.wants_matchvelocity_id = Some("pizzeria".to_string());
// command: armodel suit_ar_dress
state.ar_models.push("suit_ar_dress".to_string());
// command: pronoun she
state.pronoun = Some("she".to_string());
}
ew_spawn.send(SpawnEvent(state));
}
_ => { _ => {
error!("Can't find template named `{template}' in cmd::spawn_scenes!"); error!("Can't find template named `{template}' in cmd::spawn_scenes!");
} }

View file

@ -325,7 +325,7 @@ actor 0 59305 0 suitv2
health 0.9 health 0.9
rotationy 135 rotationy 135
scene 10 -30 20 test scene 0 0 0 tutorial
relativeto player relativeto player
actor 700 -100 -1100 suitv2 actor 700 -100 -1100 suitv2
@ -557,44 +557,6 @@ actor -3300 10 0 pizzeria
rotationy -90 rotationy -90
pronoun he pronoun he
actor 30 0 -40 suitv2
template person
relativeto player
name Icarus
id Icarus
chatid Icarus
armodel suit_ar_wings
angularmomentum 0.4 0.2 0.1
wants maxrotation 0.5
wants matchvelocitywith pizzeria
rotationy 108
rotationx 180
pronoun it
actor 12 -35 -27 lightorb
name "Light Orb"
relativeto Icarus
collider mesh
scale 0.25
light FF8F4A 5000000
actor -2 -11 -9 lightorb
name "Light Orb"
relativeto Icarus
collider mesh
scale 0.25
light FF8F4A 5000000
actor 26 -39 4 lightorb
name "Light Orb"
relativeto Icarus
collider mesh
scale 0.25
light FF8F4A 5000000
actor 1.8 -15.5 16 lightorb
name "Light Orb"
relativeto Icarus
collider mesh
scale 0.25
light FF8F4A 5000000
actor -300 0 40 suitv2 actor -300 0 40 suitv2
template person template person
relativeto player relativeto player

View file

@ -1,7 +1,16 @@
// THIS FILE IS AUTOGENERATED BY build.rs BASED ON DATA IN src/blender/scene_*.blend FILES! // THIS FILE IS AUTOGENERATED BY build.rs BASED ON DATA IN src/blender/scene_*.blend FILES!
// DO NOT MODIFY MANUALLY, CHANGES WILL BE OVERWRITTEN! // DO NOT MODIFY MANUALLY, CHANGES WILL BE OVERWRITTEN!
[ [
("test", "cruiser", [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [5.0, 5.0, 5.0]), ("spawnpoint", "cruiser", [10.0, -20.0, -30.0], [0.0, 0.0, 0.0], [5.0, 5.0, 5.0]),
("spawnpoint", "tutorialnpc", [30.0, 40.0, 0.0], [0.0, 0.0, 0.0], [2.0, 2.0, 2.0]),
("tutorial", "cruiser", [10.0, -20.0, -30.0], [0.0, 0.0, 0.0], [5.0, 5.0, 5.0]),
("tutorial", "lightorb", [42.0, 67.0, -40.0], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]),
("tutorial", "lightorb", [28.0, 49.0, -16.0], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]),
("tutorial", "lightorb", [56.0, 36.0, -44.0], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]),
("tutorial", "lightorb", [31.8, 24.0, -20.5], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]),
("tutorial", "tutorialnpc", [30.0, 40.0, -5.0], [0.0, 0.0, 0.0], [2.0, 2.0, 2.0]),
("test", "cruiser", [10.0, -20.0, -30.0], [0.0, 0.0, 0.0], [5.0, 5.0, 5.0]),
("test", "tutorialnpc", [30.0, 40.0, 0.0], [0.0, 0.0, 0.0], [2.0, 2.0, 2.0]),
("greenhouse", "fueltank", [74.5485, 54.473938, 23.183126], [1.1660392, -0.0, -0.48993048], [8.0, 8.0, 8.0]), ("greenhouse", "fueltank", [74.5485, 54.473938, 23.183126], [1.1660392, -0.0, -0.48993048], [8.0, 8.0, 8.0]),
("greenhouse", "greenhouse", [56.82031, 0.0, 0.0], [0.0, -1.5707964, 0.0], [10.0, 10.0, 10.0]), ("greenhouse", "greenhouse", [56.82031, 0.0, 0.0], [0.0, -1.5707964, 0.0], [10.0, 10.0, 10.0]),
("greenhouse", "mirror", [0.0, -17.0, -10.0], [-0.07591219, 0.0049197352, 1.7143301], [10.0, 10.0, 10.0]), ("greenhouse", "mirror", [0.0, -17.0, -10.0], [-0.07591219, 0.0049197352, 1.7143301], [10.0, 10.0, 10.0]),