diff --git a/src/blender/scene_test.blend b/src/blender/scene_test.blend deleted file mode 100644 index 84b47e2..0000000 Binary files a/src/blender/scene_test.blend and /dev/null differ diff --git a/src/blender/scene_tutorial.blend b/src/blender/scene_tutorial.blend new file mode 100644 index 0000000..e6f9af2 Binary files /dev/null and b/src/blender/scene_tutorial.blend differ diff --git a/src/cmd.rs b/src/cmd.rs index 3fb974c..950cfdf 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -989,6 +989,116 @@ fn spawn_scenes( 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!"); } diff --git a/src/data/defs.txt b/src/data/defs.txt index da3137e..a7f098c 100644 --- a/src/data/defs.txt +++ b/src/data/defs.txt @@ -325,7 +325,7 @@ actor 0 59305 0 suitv2 health 0.9 rotationy 135 -scene 10 -30 20 test +scene 0 0 0 tutorial relativeto player actor 700 -100 -1100 suitv2 @@ -557,44 +557,6 @@ actor -3300 10 0 pizzeria rotationy -90 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 template person relativeto player diff --git a/src/data/scenes.in b/src/data/scenes.in index f440790..0dd25f3 100644 --- a/src/data/scenes.in +++ b/src/data/scenes.in @@ -1,7 +1,16 @@ // THIS FILE IS AUTOGENERATED BY build.rs BASED ON DATA IN src/blender/scene_*.blend FILES! // 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", "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]),