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)]
(
name: Name("Mogway"),
name: Name("Mogwai"),
body: RandomWith("mogwai"),
alignment: Alignment(Enemy),
loot: LootTable("common.loot_tables.dungeon.terracotta.enemy"),

View File

@ -6414,7 +6414,15 @@ impl<'a> AgentData<'a> {
read_data: &ReadData,
) {
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) {
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 {
match body {
Body::Object(object) => match object {
object::Body::Crossbow | object::Body::Flamethrower | object::Body::HaniwaSentry => {
100.0
},
object::Body::Crossbow
| object::Body::Flamethrower
| object::Body::HaniwaSentry
| object::Body::TerracottaStatue => 100.0,
_ => 10.0,
},
_ => 10.0,

View File

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

View File

@ -620,12 +620,12 @@ impl Structure for TerracottaPalace {
// floor decor in chamber rooms
painter
.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)),
})
.clear();
// 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
.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());
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);