diff --git a/assets/common/entity/wild/aggressive/cyclops.ron b/assets/common/entity/wild/aggressive/cyclops.ron new file mode 100644 index 0000000000..1aba05a14d --- /dev/null +++ b/assets/common/entity/wild/aggressive/cyclops.ron @@ -0,0 +1,11 @@ +#![enable(implicit_some)] +( + name: Automatic, + body: RandomWith("cyclops"), + alignment: Alignment(Enemy), + loot: LootTable("common.loot_tables.creature.biped_large.default"), + inventory: ( + loadout: FromBody, + ), + meta: [], +) diff --git a/assets/common/entity/wild/aggressive/werewolf.ron b/assets/common/entity/wild/aggressive/werewolf.ron new file mode 100644 index 0000000000..5dfd15d609 --- /dev/null +++ b/assets/common/entity/wild/aggressive/werewolf.ron @@ -0,0 +1,11 @@ +#![enable(implicit_some)] +( + name: Automatic, + body: RandomWith("werewolf"), + alignment: Alignment(Enemy), + loot: LootTable("common.loot_tables.creature.biped_large.default"), + inventory: ( + loadout: FromBody, + ), + meta: [], +) diff --git a/assets/voxygen/i18n/en/body.ftl b/assets/voxygen/i18n/en/body.ftl new file mode 100644 index 0000000000..8f712a55f2 --- /dev/null +++ b/assets/voxygen/i18n/en/body.ftl @@ -0,0 +1,4 @@ +body-generic = creature +body-biped_large-cyclops = cyclops +body-biped_large-wendigo = wendigo +body-biped_large-werewolf = werewolf diff --git a/assets/voxygen/i18n/en/npc.ftl b/assets/voxygen/i18n/en/npc.ftl index 071f93a284..5805282a45 100644 --- a/assets/voxygen/i18n/en/npc.ftl +++ b/assets/voxygen/i18n/en/npc.ftl @@ -253,7 +253,11 @@ npc-speech-merchant_sell_directed = npc-speech-tell_site = .a0 = Have you visited { $site }? It's just { $dir } of here! .a1 = You should visit { $site } some time. - .a2 = If you travel { $dir }, you can get to { $site }. + .a2 = If you travel { $dist } to the { $dir }, you can get to { $site }. + .a3 = To the { $dir } you'll find { $site }, it's { $dist }. +npc-speech-tell_monster = + .a0 = They say there's a { $body } to the { $dir }, { $dist }... + .a1 = You think you're tough? To the { $dir } there's a { $body }. npc-speech-witness_murder = .a0 = Murderer! .a1 = How could you do this? @@ -273,4 +277,10 @@ npc-speech-dir_south_east = south-east npc-speech-dir_south = south npc-speech-dir_south_west = south-west npc-speech-dir_west = west -npc-speech-dir_north_west = north-west +npc-speech-dir_north_west = very far away + +npc-speech-dist_very_far = very far away +npc-speech-dist_far = far away +npc-speech-dist_ahead = some way away +npc-speech-dist_near = nearby +npc-speech-dist_near_to = very close diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index 470b747242..7308abd268 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -18,6 +18,7 @@ pub mod theropod; use crate::{ assets::{self, Asset}, + comp::Content, consts::{HUMAN_DENSITY, WATER_DENSITY}, make_case_elim, npc::NpcKind, @@ -1076,6 +1077,13 @@ impl Body { } .into() } + + pub fn localize(&self) -> Content { + match self { + Self::BipedLarge(biped_large) => biped_large.localize(), + _ => Content::localized("body-generic"), + } + } } impl Component for Body { diff --git a/common/src/comp/body/biped_large.rs b/common/src/comp/body/biped_large.rs index 51db673f99..5cda9e3685 100644 --- a/common/src/comp/body/biped_large.rs +++ b/common/src/comp/body/biped_large.rs @@ -1,4 +1,4 @@ -use crate::{make_case_elim, make_proj_elim}; +use crate::{comp::Content, make_case_elim, make_proj_elim}; use rand::{seq::SliceRandom, thread_rng}; use serde::{Deserialize, Serialize}; @@ -23,6 +23,15 @@ impl Body { let body_type = *ALL_BODY_TYPES.choose(rng).unwrap(); Self { species, body_type } } + + pub fn localize(&self) -> Content { + Content::localized(match &self.species { + Species::Cyclops => "body-biped_large-cyclops", + Species::Wendigo => "body-biped_large-wendigo", + Species::Werewolf => "body-biped_large-werewolf", + _ => "body-generic", + }) + } } impl From
for super::Body { diff --git a/common/src/comp/compass.rs b/common/src/comp/compass.rs index f5e2ad1a1b..7809347dbc 100644 --- a/common/src/comp/compass.rs +++ b/common/src/comp/compass.rs @@ -102,4 +102,14 @@ impl Distance { Distance::NextTo => "just around", } } + + pub fn localize_npc(&self) -> Content { + Content::localized(match self { + Self::VeryFar => "npc-speech-dist_very_far", + Self::Far => "npc-speech-dist_far", + Self::Ahead => "npc-speech-dist_ahead", + Self::Near => "npc-speech-dist_near", + Self::NextTo => "npc-speech-dist_near_to", + }) + } } diff --git a/common/src/rtsim.rs b/common/src/rtsim.rs index 9dc0dfa728..16964fedd1 100644 --- a/common/src/rtsim.rs +++ b/common/src/rtsim.rs @@ -286,6 +286,15 @@ pub enum ChunkResource { Ore, // Iron, copper, etc. } +// Note: the `serde(name = "...")` is to minimise the length of field +// identifiers for the sake of rtsim persistence +#[derive(Clone, Debug, Serialize, Deserialize)] +pub enum Role { + Civilised(Option