Merge branch 'terracotta_tweaks' into 'master'

terracotta_small_tweaks

See merge request veloren/veloren!4332
This commit is contained in:
flo 2024-02-21 21:52:09 +00:00
commit ab89750a9a
5 changed files with 18 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#![enable(implicit_some)] #![enable(implicit_some)]
( (
name: Name("Mogway"), name: Name("Mogwai"),
body: RandomWith("mogwai"), body: RandomWith("mogwai"),
alignment: Alignment(Enemy), alignment: Alignment(Enemy),
loot: LootTable("common.loot_tables.dungeon.terracotta.enemy"), loot: LootTable("common.loot_tables.dungeon.terracotta.enemy"),

View File

@ -6414,7 +6414,15 @@ impl<'a> AgentData<'a> {
read_data: &ReadData, read_data: &ReadData,
) { ) {
if tgt_data.pos.0.z - self.pos.0.z > 5.0 { if tgt_data.pos.0.z - self.pos.0.z > 5.0 {
controller.push_basic_input(InputKind::Secondary); controller.push_action(ControlAction::StartInput {
input: InputKind::Secondary,
target_entity: agent
.target
.as_ref()
.and_then(|t| read_data.uids.get(t.target))
.copied(),
select_pos: None,
});
} else if attack_data.dist_sqrd < 12.0f32.powi(2) { } else if attack_data.dist_sqrd < 12.0f32.powi(2) {
controller.push_basic_input(InputKind::Primary); controller.push_basic_input(InputKind::Primary);
} }

View File

@ -93,9 +93,10 @@ impl<'a> System<'a> for Sys {
fn base_ori_interp(body: &Body) -> f32 { fn base_ori_interp(body: &Body) -> f32 {
match body { match body {
Body::Object(object) => match object { Body::Object(object) => match object {
object::Body::Crossbow | object::Body::Flamethrower | object::Body::HaniwaSentry => { object::Body::Crossbow
100.0 | object::Body::Flamethrower
}, | object::Body::HaniwaSentry
| object::Body::TerracottaStatue => 100.0,
_ => 10.0, _ => 10.0,
}, },
_ => 10.0, _ => 10.0,

View File

@ -562,6 +562,7 @@ impl Site {
"Burial Grounds", "Burial Grounds",
"Remains", "Remains",
"Temples", "Temples",
"Gardens",
] ]
.choose(&mut rng) .choose(&mut rng)
.unwrap(); .unwrap();

View File

@ -620,12 +620,12 @@ impl Structure for TerracottaPalace {
// floor decor in chamber rooms // floor decor in chamber rooms
painter painter
.cylinder(Aabb { .cylinder(Aabb {
min: (room_center - 3).with_z(base - 16 - (room_size / 2) - (room_size / 16)), min: (room_center - 3).with_z(base - 24 - (room_size / 2) - (room_size / 16)),
max: (room_center + 3).with_z(base - 6 - (room_size / 2) - (room_size / 16)), max: (room_center + 3).with_z(base - 6 - (room_size / 2) - (room_size / 16)),
}) })
.clear(); .clear();
// npcs in chamber rooms // npcs in chamber rooms
let npc_pos = room_center.with_z(base - 16 - (room_size / 2) - (room_size / 16)); let npc_pos = room_center.with_z(base - 24 - (room_size / 2) - (room_size / 16));
let npc = chamber_npcs let npc = chamber_npcs
.swap_remove(RandomField::new(0).get(npc_pos) as usize % chamber_npcs.len()); .swap_remove(RandomField::new(0).get(npc_pos) as usize % chamber_npcs.len());
@ -876,7 +876,7 @@ impl Structure for TerracottaPalace {
.fill(clay_broken.clone()); .fill(clay_broken.clone());
let pillar_npc_pos = (center + dir * ((size / 2) + 9)).with_z(base + 6); let pillar_npc_pos = (center + dir * ((size / 2) + 9)).with_z(base + 6);
let statue_pos = (center + dir * ((size / 2) + 8)).with_z(base + 6); let statue_pos = (center + dir * ((size / 2) + 5)).with_z(base + 6);
spawn_random_entity(pillar_npc_pos, painter, 1..=1); spawn_random_entity(pillar_npc_pos, painter, 1..=1);