add "template person" command

This commit is contained in:
yuni 2024-06-02 21:29:08 +02:00
parent f7002fd064
commit 0bbca303cb
2 changed files with 50 additions and 42 deletions

View file

@ -215,6 +215,44 @@ pub fn load_defs(mut ew_spawn: EventWriter<SpawnEvent>) {
debug!("Registering name: {}", name);
state.name = Some(name.to_string());
}
["template", "person"] => {
// 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;
}
// Parsing actors
["actor", x, y, z, model] => {
@ -291,6 +329,9 @@ pub fn load_defs(mut ew_spawn: EventWriter<SpawnEvent>) {
state.is_lifeform = true;
state.is_suited = true;
}
["alive", "no"] => {
state.is_alive = false;
}
["vehicle", "yes"] => {
state.is_vehicle = true;
}

View file

@ -257,18 +257,14 @@ actor 0 0 0
actor 0 593051 0 suitv2
template person
relativeto jupiter
orbit 221900e3 0.338
player yes
id player
density 200
collider handcrafted
oxygen 0.008
health 0.3
angularmomentum 0 0 0
thrust 1.2 1 1 14 1.5
rotationy 135
engine monopropellant
actor 10 -30 20 cruiser
name "Cruiser"
@ -284,18 +280,12 @@ actor 10 -30 20 cruiser
pointofinterest yes
actor -55e3 44e3 0 suitv2
template person
relativeto thebe
id yuni
name "Yuni"
chatid Yuni
density 200
collider handcrafted
thrust 1.2 1 1 20 1.5
rotationx 180
engine monopropellant
wants maxrotation 0
wants maxvelocity 0
pointofinterest yes
actor 5000 0 -3000 moonlet
name Moonlet
@ -315,26 +305,16 @@ actor 13200 300 -3000 hollow_asteroid
pointofinterest yes
angularmomentum 0 0.015 0
actor 0 0 0 suitv2
template person
relativeto cultasteroid
name "Ash"
chatid Ash
alive yes
collider handcrafted
thrust 1.2 1 1 20 1.5
wants maxrotation 0
wants maxvelocity 0
angularmomentum 0 0 0
pronoun they
actor -8 8 0 suitv2
template person
relativeto cultasteroid
name "River"
chatid River
alive yes
collider handcrafted
thrust 1.2 1 1 20 1.5
wants maxrotation 0
wants maxvelocity 0
angularmomentum 0 0 0
rotationy 54
rotationx -90
pronoun she
@ -470,35 +450,25 @@ actor -3300 10 0 pizzeria
pronoun it
actor -45 -4 -4 suitv2
template person
relativeto pizzeria
name "Nox"
chatid PizzaChef
armodel suit_ar_chefhat
alive yes
collider handcrafted
thrust 1.2 1 1 20 1.5
wants maxrotation 0
wants maxvelocity 0
wants lookat PLAYERCAMERA
rotationy -90
angularmomentum 0 0 0
pronoun he
actor 30 -12 -40 suitv2
template person
relativeto player
name Icarus
id Icarus
chatid Icarus
armodel suit_ar_wings
alive yes
collider handcrafted
angularmomentum 0.4 0.2 0.1
rotationy 108
rotationx 180
pointofinterest yes
thrust 1.2 1 1 20 1.5
wants maxrotation 0.5
wants maxvelocity 0
pronoun it
actor 12 -35 -27 lightorb
name "Light Orb"
@ -522,13 +492,13 @@ actor 30 -12 -40 suitv2
light FF8F4A 5000000
actor -300 0 40 suitv2
template person
relativeto player
id Drifter
name "梓涵"
chatid Drifter
alive no
oxygen 0.08
pointofinterest yes
collider handcrafted
pronoun she
actor 100 -18000 2000 clippy
@ -674,12 +644,9 @@ actor 100 -18000 2000 clippy
scale 5
actor 8 20 0 suitv2
template person
relativeto "busstopclippy"
name "Rudy"
wants maxrotation 0.2
wants maxvelocity 0
thrust 1.2 1 1 20 1.5
collider capsule 1 0.5
chatid NPCinCryoStasis
pronoun he