diff --git a/src/blender/pizzasign.blend b/src/blender/pizzasign.blend new file mode 100644 index 0000000..309cf32 Binary files /dev/null and b/src/blender/pizzasign.blend differ diff --git a/src/blender/scene_pizzeria.blend b/src/blender/scene_pizzeria.blend new file mode 100644 index 0000000..f4450bd Binary files /dev/null and b/src/blender/scene_pizzeria.blend differ diff --git a/src/cmd.rs b/src/cmd.rs index 950cfdf..0bb4985 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -757,6 +757,7 @@ fn spawn_scenes( ); if name == scene_name { found = true; + let mut do_spawn = true; let mut state = ParserState::default(); state.class = DefClass::Actor; state.pos = pos; @@ -806,8 +807,45 @@ fn spawn_scenes( // command: pointofinterest yes state.is_point_of_interest = true; + } + "meteorace" => { + state.model = Some("MeteorAceGT".to_string()); - ew_spawn.send(SpawnEvent(state)); + // command: name "MeteorAceGT™" + state.name = Some("MeteorAceGT™".to_string()); + + // Ensure consistent scale for this vehicle + // command: scale 5 + state.model_scale = 5.0; + + // command: vehicle yes + state.is_vehicle = true; + + // command: angularmomentum 0 0 0.2 + state.angular_momentum = DVec3::new(0.0, 0.0, 0.2); + + // command: collider mesh + state.collider_is_one_mesh_of_scene = true; + state.collider_is_mesh = true; + + // command: thrust 33.5 6.56 4.51 300000 3 + state.thrust_forward = 33.5; + state.thrust_back = 6.56; + state.thrust_sideways = 4.51; + state.reaction_wheels = 300000.0; + state.warmup_seconds = 3.0; + + // command: engine ion + state.engine_type = actor::EngineType::Ion; + + // command: camdistance 50 + state.camdistance = 50.0; + + // command: density 500 + state.density = 500.0; + + // command: pointofinterest yes + state.is_point_of_interest = true; } "whale" => { state.model = Some("whale".to_string()); @@ -846,8 +884,6 @@ fn spawn_scenes( // command: pointofinterest yes state.is_point_of_interest = true; - - ew_spawn.send(SpawnEvent(state)); } "shippingcontainer" => { state.model = Some("shippingcontainer".to_string()); @@ -863,8 +899,6 @@ fn spawn_scenes( // command: density 500 state.density = 500.0; - - ew_spawn.send(SpawnEvent(state)); } "fueltank" => { state.model = Some("fueltank".to_string()); @@ -887,8 +921,6 @@ fn spawn_scenes( // command: chat_achievement no state.chat_counts_towards_achievements = false; - - ew_spawn.send(SpawnEvent(state)); } "frameflat" => { state.model = Some("frameflat".to_string()); @@ -908,8 +940,6 @@ fn spawn_scenes( // command: density 50000 state.density = 50000.0; - - ew_spawn.send(SpawnEvent(state)); } "lightorb" => { state.model = Some("lightorb".to_string()); @@ -924,8 +954,6 @@ fn spawn_scenes( // command: light FF8F4A 4000000 state.light_color = Some(Color::Srgba(Srgba::hex("FF8F4A").unwrap())); state.light_brightness = 4000000.0; - - ew_spawn.send(SpawnEvent(state)); } "mirror" | "mirrorrotating" => { state.model = Some("mirror".to_string()); @@ -947,8 +975,6 @@ fn spawn_scenes( // command: mirror yes state.is_mirror = true; - - ew_spawn.send(SpawnEvent(state)); } "greenhouse" => { state.model = Some("greenhouse".to_string()); @@ -971,8 +997,6 @@ fn spawn_scenes( // command: angularmomentum 0 0 0 state.angular_momentum = DVec3::ZERO; - - ew_spawn.send(SpawnEvent(state)); } "asteroid1" => { state.model = Some("asteroid1".to_string()); @@ -986,8 +1010,6 @@ fn spawn_scenes( // command: density 5000 state.density = 5000.0; - - ew_spawn.send(SpawnEvent(state)); } "pizzeria" => { state.model = Some("pizzeria".to_string()); @@ -1009,10 +1031,22 @@ fn spawn_scenes( // command: angularmomentum 0 0 0 state.angular_momentum = DVec3::ZERO; - - ew_spawn.send(SpawnEvent(state)); } - "tutorialnpc" | "chef" | "tourist" => { + "pizzasign" => { + state.model = Some("pizzasign".to_string()); + state.name = Some("Pizzeria Sign".to_string()); + state.collider_is_one_mesh_of_scene = true; + state.collider_is_mesh = true; + state.density = 200.0; + + // command: light "FF00B3" 30000000 + state.light_color = Some(Color::Srgba(Srgba::hex("FF00B3").unwrap())); + state.light_brightness = 30000000.0; + + // command: angularmomentum 0 0.1 0 + state.angular_momentum = DVec3::new(0.0, 0.1, 0.0); + } + "tutorialnpc" | "chef" | "tourist" | "pig" => { state.model = Some("suitv2".to_string()); // command: collider handcrafted @@ -1096,13 +1130,75 @@ fn spawn_scenes( // command: pronoun she state.pronoun = Some("she".to_string()); + } else if template == "pig" { + state.name = Some("Mudley".to_string()); + state.id = "Mudley".to_string(); + state.chat = "pig".to_string(); + state.model = Some("sus".to_string()); + + // command: angularmomentum 0.4 0.2 0.1 + state.angular_momentum = DVec3::new(0.4, 0.2, 0.1); + + // command: wants maxrotation 0.2 + state.wants_maxrotation = Some(0.2); + + // command: wants matchvelocitywith pizzeria + state.wants_matchvelocity_id = Some("pizzeria".to_string()); + + // command: pronoun he + state.pronoun = Some("he".to_string()); } - ew_spawn.send(SpawnEvent(state)); + } + "clippy_pizza" => { + state.model = Some("clippy".to_string()); + + // command: angularmomentum 0 0 0 + state.angular_momentum = DVec3::ZERO; + + // command: wants maxrotation 0 + state.wants_maxrotation = Some(0.0); + // command: wants maxvelocity 0 + state.wants_maxvelocity = Some(0.0); + + // command: thrust 15 6 3 400 0.5 + state.thrust_forward = 15.0; + state.thrust_back = 6.0; + state.thrust_sideways = 3.0; + state.reaction_wheels = 400.0; + state.warmup_seconds = 0.5; + + // command: scale 3 + state.model_scale = 3.0; + + // command: pronoun it + state.pronoun = Some("it".to_string()); + + // command: pointofinterest yes + state.is_point_of_interest = true; + + // command: collider handcrafted + state.collider_is_one_mesh_of_scene = true; + + if template == "clippy_pizza" { + state.name = Some("Clippy™ Convenience Companion".to_string()); + state.chat = "SubduedClippy".to_string(); + + // command: wants matchvelocitywith pizzeria + state.wants_matchvelocity_id = Some("pizzeria".to_string()); + + // command: armodel clippy_ar + state.ar_models.push("clippy_ar".to_string()); + } + } _ => { error!("Can't find template named `{template}' in cmd::spawn_scenes!"); + do_spawn = false; } } + if do_spawn { + ew_spawn.send(SpawnEvent(state)); + } } } if !found { diff --git a/src/data/defs.txt b/src/data/defs.txt index a7f098c..f6fe462 100644 --- a/src/data/defs.txt +++ b/src/data/defs.txt @@ -472,90 +472,8 @@ actor -8000 -1000 -100 monolith scene -3100 -200 -660 greenhouse relativeto player -actor -3300 10 0 pizzeria - name "Pizzeria Asteroid" +scene -3300 10 0 pizzeria relativeto player - id pizzeria - scale 40 - pointofinterest yes - collider handcrafted - angularmomentum 0 0 0 - actor -30 -8 40 MeteorAceGT - name "MeteorAceGT™" - relativeto pizzeria - scale 5 - vehicle yes - collider mesh - thrust 33.5 6.56 4.51 300000 3 - engine ion - camdistance 50 - density 500 - angularmomentum 0 0 0.2 - pointofinterest yes - actor -44 0 18 suitv2 - template person - relativeto pizzeria - wants matchvelocitywith pizzeria - name "Rynyk" - chatid Rynyk - armodel suit_ar_dress - rotationz 90 - pronoun she - actor 60 60 -23 pizzasign - name "Pizzeria Sign" - relativeto pizzeria - id pizzeriasign - scale 20 - collider mesh - density 200 - rotationy 81 - angularmomentum 0 0 0 - light "FF00B3" 30000000 - actor 18 22 -15 sus - template person - relativeto pizzeriasign - name Mudley - id Mudley - chatid pig - angularmomentum 0.4 0.2 0.1 - wants maxrotation 0.2 - wants matchvelocitywith pizzeria - rotationy 108 - rotationx 180 - pronoun he - actor -52 -10 0 lightorb - name "Light Orb" - relativeto pizzeria - collider mesh - scale 0.25 - light FF8F4A 5000000 - actor -50 -3 -2 lightorb - name "Light Orb" - relativeto pizzeria - collider mesh - scale 0.25 - light FF8F4A 5000000 - actor -33 0 4 clippy - template clippy - name "Clippy™ Convenience Companion" - relativeto pizzeria - armodel clippy_ar - wants lookat PLAYERCAMERA - wants matchvelocitywith pizzeria - rotationy -126 - chatid SubduedClippy - collider handcrafted - - actor -45 -4 -4 suitv2 - template person - relativeto pizzeria - name "Nox" - chatid PizzaChef - armodel suit_ar_chefhat - wants lookat PLAYERCAMERA - wants matchvelocitywith pizzeria - rotationy -90 - pronoun he actor -300 0 40 suitv2 template person diff --git a/src/data/scenes.in b/src/data/scenes.in index 0dd25f3..4fcc1fe 100644 --- a/src/data/scenes.in +++ b/src/data/scenes.in @@ -1,16 +1,12 @@ // THIS FILE IS AUTOGENERATED BY build.rs BASED ON DATA IN src/blender/scene_*.blend FILES! // DO NOT MODIFY MANUALLY, CHANGES WILL BE OVERWRITTEN! [ -("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]), @@ -31,6 +27,16 @@ ("greenhouse", "mirror", [3.0, 0.0, -40.0], [-0.33143952, -7.651644e-10, 1.5707964], [10.0, 10.0, 10.0]), ("greenhouse", "mirror", [3.0, 0.0, 40.0], [0.34906584, -3.5681582e-9, 1.5707964], [10.0, 10.0, 10.0]), ("greenhouse", "mirrorrotating", [0.0, 17.0, 10.0], [0.0073764813, -0.009006099, 1.2773504], [10.0, 10.0, 10.0]), +("pizzeria", "chef", [-46.73846, 2.4681277, -2.8273444], [0.0, -0.0, -1.5707964], [2.0, 2.0, 2.0]), +("pizzeria", "clippy_pizza", [-51.33497, 20.947536, -9.836457], [0.0, -1.3247921, -0.66126215], [3.0, 3.0, 3.0]), +("pizzeria", "lightorb", [-48.202663, 11.565462, 12.844695], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]), +("pizzeria", "lightorb", [-76.467766, 22.7103, -19.412819], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]), +("pizzeria", "lightorb", [-53.672974, -3.9464226, -8.112427], [0.0, 0.0, 0.0], [0.25, 0.25, 0.25]), +("pizzeria", "meteorace", [-59.40527, -72.77868, -3.183051], [-1.8154689, -1.4067714, 2.0654335], [5.0, 5.0, 5.0]), +("pizzeria", "pig", [-28.6099, 15.553667, 52.62393], [0.0, 0.0, 0.0], [2.0, 2.0, 2.0]), +("pizzeria", "pizzasign", [60.0, 23.0, 60.0], [0.0, 0.0, 1.5116348], [20.0, 20.0, 20.0]), +("pizzeria", "pizzeria", [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [40.0, 40.0, 40.0]), +("pizzeria", "tourist", [-52.542408, -28.831345, -15.676428], [-1.2671136, -1.0185516, 1.1156243], [2.0, 2.0, 2.0]), ("whale", "asteroid1", [963.7498, 317.89063, -427.3262], [0.0, 0.0, 0.0], [97.1964, 97.1964, 97.1964]), ("whale", "asteroid1", [563.7502, 566.54156, 199.60223], [2.9385161, -0.41958678, 0.31158477], [113.32049, 113.3205, 113.32049]), ("whale", "asteroid1", [-913.92633, -1697.3405, -265.4468], [2.9385161, -0.41958678, 0.31158477], [55.766037, 55.76604, 55.76603]),