mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Revert "Added TR translations for deaths by debuffs."
This reverts commit 0817e45e13
.
This commit is contained in:
parent
1b978402c9
commit
1eb7f78189
@ -2,7 +2,7 @@
|
|||||||
humanoid: (
|
humanoid: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "humanoid",
|
keyword: "humanoid",
|
||||||
names: [
|
names_0: [
|
||||||
"Adon",
|
"Adon",
|
||||||
"Agro",
|
"Agro",
|
||||||
"Arlo",
|
"Arlo",
|
||||||
@ -104,7 +104,98 @@
|
|||||||
"Zaden",
|
"Zaden",
|
||||||
"Zagaroth",
|
"Zagaroth",
|
||||||
"Zenner"
|
"Zenner"
|
||||||
]
|
],
|
||||||
|
names_1: Some([
|
||||||
|
"Acele",
|
||||||
|
"Autumn",
|
||||||
|
"Acholate",
|
||||||
|
"Ada",
|
||||||
|
"Adorra",
|
||||||
|
"Ahanna",
|
||||||
|
"Brana",
|
||||||
|
"Bathelie",
|
||||||
|
"Calene",
|
||||||
|
"Calina",
|
||||||
|
"Celestine",
|
||||||
|
"Caela",
|
||||||
|
"Cassia",
|
||||||
|
"Celoa",
|
||||||
|
"Dalavesta",
|
||||||
|
"Dylena",
|
||||||
|
"Desini",
|
||||||
|
"Diva",
|
||||||
|
"Ebatryne",
|
||||||
|
"Efari",
|
||||||
|
"Enona",
|
||||||
|
"Enaldie",
|
||||||
|
"Ember",
|
||||||
|
"Esdel",
|
||||||
|
"Eune",
|
||||||
|
"Fayne",
|
||||||
|
"Frida",
|
||||||
|
"Ferra",
|
||||||
|
"Flora",
|
||||||
|
"Fintis",
|
||||||
|
"Gatlen",
|
||||||
|
"Gatline",
|
||||||
|
"Gronalyn",
|
||||||
|
"Helenia",
|
||||||
|
"Halete",
|
||||||
|
"Hyza",
|
||||||
|
"Helena",
|
||||||
|
"Halin",
|
||||||
|
"Hera",
|
||||||
|
"Hilda",
|
||||||
|
"Hydra",
|
||||||
|
"Ismeria",
|
||||||
|
"Iris",
|
||||||
|
"Joss",
|
||||||
|
"Kadra",
|
||||||
|
"Kagra",
|
||||||
|
"Kyra",
|
||||||
|
"Konta",
|
||||||
|
"Krinn",
|
||||||
|
"Lydia",
|
||||||
|
"Laelia",
|
||||||
|
"Leda",
|
||||||
|
"Leta",
|
||||||
|
"Lisbeth",
|
||||||
|
"Lyra",
|
||||||
|
"Luna",
|
||||||
|
"Medora",
|
||||||
|
"Mazarine",
|
||||||
|
"Merlyn",
|
||||||
|
"Marina",
|
||||||
|
"Nephele",
|
||||||
|
"Odessa",
|
||||||
|
"Orla",
|
||||||
|
"Perl",
|
||||||
|
"Rhodeia",
|
||||||
|
"Rosella",
|
||||||
|
"Raven",
|
||||||
|
"Rachel",
|
||||||
|
"Ryven",
|
||||||
|
"Solenne",
|
||||||
|
"Seren",
|
||||||
|
"Summer",
|
||||||
|
"Solstice",
|
||||||
|
"Stella",
|
||||||
|
"Sarah",
|
||||||
|
"Syrin",
|
||||||
|
"Tessa",
|
||||||
|
"Thea",
|
||||||
|
"Tez",
|
||||||
|
"Vivien",
|
||||||
|
"Varda",
|
||||||
|
"Veridia",
|
||||||
|
"Victoria",
|
||||||
|
"Vale",
|
||||||
|
"Vega",
|
||||||
|
"Yorja",
|
||||||
|
"Xaviera",
|
||||||
|
"Zorina",
|
||||||
|
"Zephyra"
|
||||||
|
])
|
||||||
),
|
),
|
||||||
/*keyword: "humanoid_f",
|
/*keyword: "humanoid_f",
|
||||||
names: [
|
names: [
|
||||||
@ -229,7 +320,7 @@
|
|||||||
quadruped_medium: (
|
quadruped_medium: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "quadruped_medium",
|
keyword: "quadruped_medium",
|
||||||
names: [
|
names_0: [
|
||||||
"Achak",
|
"Achak",
|
||||||
"Adalwolf",
|
"Adalwolf",
|
||||||
"Akela",
|
"Akela",
|
||||||
@ -421,7 +512,7 @@
|
|||||||
quadruped_small: (
|
quadruped_small: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "quadruped_small",
|
keyword: "quadruped_small",
|
||||||
names: [
|
names_0: [
|
||||||
"Acorn",
|
"Acorn",
|
||||||
"Adeline",
|
"Adeline",
|
||||||
"Ajna",
|
"Ajna",
|
||||||
@ -632,7 +723,7 @@
|
|||||||
bird_medium: (
|
bird_medium: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "bird_medium",
|
keyword: "bird_medium",
|
||||||
names: [
|
names_0: [
|
||||||
"Donald"
|
"Donald"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -674,7 +765,7 @@
|
|||||||
biped_large: (
|
biped_large: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "biped_large",
|
keyword: "biped_large",
|
||||||
names: [
|
names_0: [
|
||||||
"Tobermory"
|
"Tobermory"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -724,7 +815,7 @@
|
|||||||
golem: (
|
golem: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "golem",
|
keyword: "golem",
|
||||||
names: [
|
names_0: [
|
||||||
"phil"
|
"phil"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -742,7 +833,7 @@
|
|||||||
theropod: (
|
theropod: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "theropod",
|
keyword: "theropod",
|
||||||
names: [
|
names_0: [
|
||||||
"Remy"
|
"Remy"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -772,7 +863,7 @@
|
|||||||
dragon: (
|
dragon: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "dragon",
|
keyword: "dragon",
|
||||||
names: [
|
names_0: [
|
||||||
"Smaug"
|
"Smaug"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -786,14 +877,14 @@
|
|||||||
object: (
|
object: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "object",
|
keyword: "object",
|
||||||
names: []
|
names_0: []
|
||||||
),
|
),
|
||||||
species: ()
|
species: ()
|
||||||
),
|
),
|
||||||
fish_small: (
|
fish_small: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "fish_small",
|
keyword: "fish_small",
|
||||||
names: [
|
names_0: [
|
||||||
"Dagon"
|
"Dagon"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -807,7 +898,7 @@
|
|||||||
fish_medium: (
|
fish_medium: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "fish_medium",
|
keyword: "fish_medium",
|
||||||
names: [
|
names_0: [
|
||||||
"Njord"
|
"Njord"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -821,14 +912,14 @@
|
|||||||
bird_small: (
|
bird_small: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "bird_small",
|
keyword: "bird_small",
|
||||||
names: []
|
names_0: []
|
||||||
),
|
),
|
||||||
species: ()
|
species: ()
|
||||||
),
|
),
|
||||||
quadruped_low: (
|
quadruped_low: (
|
||||||
body: (
|
body: (
|
||||||
keyword: "quadruped_low",
|
keyword: "quadruped_low",
|
||||||
names: [
|
names_0: [
|
||||||
"Sobek"
|
"Sobek"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
@ -1,3 +1,31 @@
|
|||||||
|
// Example for calculating a drop rate:
|
||||||
|
//
|
||||||
|
// On every roll an f32 between 0 and 1 is created.
|
||||||
|
// For every loot table a total range is created by the sum of the individual
|
||||||
|
// ranges per item.
|
||||||
|
//
|
||||||
|
// This range is the sum of all single ranges defined per item in a table.
|
||||||
|
// // Individual Range
|
||||||
|
// (3, "common.items.food.cheese"), // 0.0..3.0
|
||||||
|
// (3, "common.items.food.apple"), // 3.0..6.0
|
||||||
|
// (3, "common.items.food.mushroom"), // 6.0..9.0
|
||||||
|
// (1, "common.items.food.coconut"), // 9.0..10.0
|
||||||
|
// (0.05, "common.items.food.apple_mushroom_curry"), // 10.0..10.05
|
||||||
|
// (0.10, "common.items.food.apple_stick"), // 10.05..10.15
|
||||||
|
// (0.10, "common.items.food.mushroom_stick"), // 10.15..10.25
|
||||||
|
//
|
||||||
|
// The f32 is multiplied by the max. value needed to drop an item in this
|
||||||
|
// particular table. X = max. value needed = 10.15
|
||||||
|
//
|
||||||
|
// Example roll
|
||||||
|
// [Random Value 0..1] * X = Number inside the table's total range
|
||||||
|
// 0.45777 * X = 4.65
|
||||||
|
// 4.65 is in the range of 3.0..6.0 => Apple drops
|
||||||
|
//
|
||||||
|
// Example drop chance calculation
|
||||||
|
// Cheese drop rate = 3/X = 29.6%
|
||||||
|
// Coconut drop rate = 1/X = 9.85%
|
||||||
|
|
||||||
use crate::assets;
|
use crate::assets;
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
use serde::{de::DeserializeOwned, Deserialize};
|
use serde::{de::DeserializeOwned, Deserialize};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
assets::{AssetExt, AssetHandle},
|
assets::{AssetExt, AssetHandle},
|
||||||
comp::{self, AllBodies, Body},
|
comp::{self, body, AllBodies, Body},
|
||||||
};
|
};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use rand::seq::SliceRandom;
|
use rand::seq::SliceRandom;
|
||||||
@ -47,7 +47,8 @@ pub struct BodyNames {
|
|||||||
/// A list of canonical names for NPCs with this body types (currently used
|
/// A list of canonical names for NPCs with this body types (currently used
|
||||||
/// when spawning this kind of NPC from the console). Going forward,
|
/// when spawning this kind of NPC from the console). Going forward,
|
||||||
/// these names will likely be split up by species.
|
/// these names will likely be split up by species.
|
||||||
pub names: Vec<String>,
|
pub names_0: Vec<String>,
|
||||||
|
pub names_1: Option<Vec<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Species-specific NPC name metadata.
|
/// Species-specific NPC name metadata.
|
||||||
@ -83,15 +84,33 @@ impl FromStr for NpcKind {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_npc_name(npc_type: NpcKind) -> String {
|
pub fn get_npc_name(npc_type: NpcKind, body_type: Option<BodyType>) -> String {
|
||||||
let npc_names = NPC_NAMES.read();
|
let npc_names = NPC_NAMES.read();
|
||||||
let BodyNames { keyword, names } = &npc_names[npc_type];
|
let BodyNames {
|
||||||
|
keyword,
|
||||||
|
names_0,
|
||||||
|
names_1,
|
||||||
|
} = &npc_names[npc_type];
|
||||||
|
|
||||||
// If no pretty name is found, fall back to the keyword.
|
// If no pretty name is found, fall back to the keyword.
|
||||||
names
|
match body_type {
|
||||||
.choose(&mut rand::thread_rng())
|
Some(BodyType::Male) => names_0
|
||||||
.unwrap_or(keyword)
|
.choose(&mut rand::thread_rng())
|
||||||
.clone()
|
.unwrap_or(keyword)
|
||||||
|
.clone(),
|
||||||
|
Some(BodyType::Female) if names_1.is_some() => {
|
||||||
|
names_1
|
||||||
|
.as_ref()
|
||||||
|
.unwrap() // Unwrap safe since is_some is true
|
||||||
|
.choose(&mut rand::thread_rng())
|
||||||
|
.unwrap_or(keyword)
|
||||||
|
.clone()
|
||||||
|
},
|
||||||
|
_ => names_0
|
||||||
|
.choose(&mut rand::thread_rng())
|
||||||
|
.unwrap_or(keyword)
|
||||||
|
.clone(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Randomly generates a body associated with this NPC kind.
|
/// Randomly generates a body associated with this NPC kind.
|
||||||
@ -265,3 +284,20 @@ impl NpcBody {
|
|||||||
.ok_or(())
|
.ok_or(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub enum BodyType {
|
||||||
|
Male,
|
||||||
|
Female,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl BodyType {
|
||||||
|
pub fn from_body(body: Body) -> Option<BodyType> {
|
||||||
|
match body {
|
||||||
|
Body::Humanoid(humanoid) => match humanoid.body_type {
|
||||||
|
body::humanoid::BodyType::Male => Some(BodyType::Male),
|
||||||
|
body::humanoid::BodyType::Female => Some(BodyType::Female),
|
||||||
|
},
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -820,7 +820,10 @@ fn handle_spawn(
|
|||||||
.state
|
.state
|
||||||
.create_npc(
|
.create_npc(
|
||||||
pos,
|
pos,
|
||||||
comp::Stats::new(get_npc_name(id), body),
|
comp::Stats::new(
|
||||||
|
get_npc_name(id, npc::BodyType::from_body(body)),
|
||||||
|
body,
|
||||||
|
),
|
||||||
comp::Health::new(body, 1),
|
comp::Health::new(body, 1),
|
||||||
inventory,
|
inventory,
|
||||||
body,
|
body,
|
||||||
|
@ -437,7 +437,7 @@ impl<'a> Widget for Group<'a> {
|
|||||||
let indicator_col = cr_color(combat_rating);
|
let indicator_col = cr_color(combat_rating);
|
||||||
Image::new(self.imgs.combat_rating_ico_shadow)
|
Image::new(self.imgs.combat_rating_ico_shadow)
|
||||||
.w_h(18.0, 18.0)
|
.w_h(18.0, 18.0)
|
||||||
.top_left_with_margins_on(state.ids.member_panels_frame[i], 20.0, 2.0)
|
.top_left_with_margins_on(state.ids.member_panels_frame[i], -20.0, 2.0)
|
||||||
.color(Some(indicator_col))
|
.color(Some(indicator_col))
|
||||||
.set(state.ids.combat_rating_indicators[i], ui);
|
.set(state.ids.combat_rating_indicators[i], ui);
|
||||||
// Panel Text
|
// Panel Text
|
||||||
|
@ -391,19 +391,14 @@ impl<'a> Widget for Social<'a> {
|
|||||||
};
|
};
|
||||||
let name_text = match &player_info.character {
|
let name_text = match &player_info.character {
|
||||||
Some(character) => {
|
Some(character) => {
|
||||||
if Some(uid) == my_uid {
|
if hide_username {
|
||||||
format!(
|
character.name.to_string()
|
||||||
"{} ({})",
|
|
||||||
&self.localized_strings.get("hud.common.you"),
|
|
||||||
&character.name
|
|
||||||
)
|
|
||||||
} else if hide_username {
|
|
||||||
format!("{} [{}]", &character.name, zone_name)
|
|
||||||
} else {
|
} else {
|
||||||
format!("[{}] {} [{}]", alias, &character.name, zone_name)
|
format!("[{}] {}", alias, &character.name)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
None => alias.clone(), // character select or spectating
|
None => format!("{} [{}]", alias.clone(), zone_name), /* character select or
|
||||||
|
* spectating */
|
||||||
};
|
};
|
||||||
// Player name widgets
|
// Player name widgets
|
||||||
let button = Button::image(if !selected {
|
let button = Button::image(if !selected {
|
||||||
|
@ -1279,7 +1279,10 @@ impl Controls {
|
|||||||
body.skin = rng.gen_range(0, species.num_skin_colors());
|
body.skin = rng.gen_range(0, species.num_skin_colors());
|
||||||
body.eye_color = rng.gen_range(0, species.num_eye_colors());
|
body.eye_color = rng.gen_range(0, species.num_eye_colors());
|
||||||
body.eyes = rng.gen_range(0, species.num_eyes(body_type));
|
body.eyes = rng.gen_range(0, species.num_eyes(body_type));
|
||||||
*name = npc::get_npc_name(npc::NpcKind::Humanoid);
|
*name = npc::get_npc_name(
|
||||||
|
npc::NpcKind::Humanoid,
|
||||||
|
npc::BodyType::from_body(comp::Body::Humanoid(*body)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Message::ConfirmDeletion => {
|
Message::ConfirmDeletion => {
|
||||||
|
Loading…
Reference in New Issue
Block a user