Compare commits

..

4 commits

8 changed files with 240 additions and 139 deletions

BIN
src/blender/pizzasign.blend Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -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,13 +1010,195 @@ fn spawn_scenes(
// command: density 5000
state.density = 5000.0;
}
"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;
}
"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
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());
} 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());
}
}
"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());
}
ew_spawn.send(SpawnEvent(state));
}
_ => {
error!("Can't find template named `{template}' in cmd::spawn_scenes!");
do_spawn = false;
}
}
if do_spawn {
ew_spawn.send(SpawnEvent(state));
}
}
}
if !found {

View file

@ -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
@ -472,128 +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 -120 0 50 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 -133 5 58 suitv2
template person
relativeto pizzeria
wants matchvelocitywith pizzeria
name "Rynyk"
chatid Rynyk
armodel suit_ar_dress
rotationy 54
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 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

View file

@ -1,7 +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!
[
("test", "cruiser", [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [5.0, 5.0, 5.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]),
("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]),
@ -22,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]),