Localize material names (#11059)
This commit is contained in:
@@ -13,6 +13,8 @@ namespace Content.Shared.Materials
|
|||||||
[Prototype("material")]
|
[Prototype("material")]
|
||||||
public sealed class MaterialPrototype : IPrototype, IInheritingPrototype
|
public sealed class MaterialPrototype : IPrototype, IInheritingPrototype
|
||||||
{
|
{
|
||||||
|
private string _name = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<MaterialPrototype>))]
|
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<MaterialPrototype>))]
|
||||||
public string[]? Parents { get; }
|
public string[]? Parents { get; }
|
||||||
@@ -31,7 +33,11 @@ namespace Content.Shared.Materials
|
|||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
public string Name { get; } = "unobtanium";
|
public string Name
|
||||||
|
{
|
||||||
|
get => _name;
|
||||||
|
private set => _name = Loc.GetString(value);
|
||||||
|
}
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("color")]
|
[DataField("color")]
|
||||||
|
|||||||
20
Resources/Locale/en-US/materials/materials.ftl
Normal file
20
Resources/Locale/en-US/materials/materials.ftl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Glass
|
||||||
|
materials-glass = glass
|
||||||
|
materials-reinforced-glass = reinforced glass
|
||||||
|
materials-plasma-glass = plasma glass
|
||||||
|
materials-reinforced-plasma-glass = reinforced plasma glass
|
||||||
|
|
||||||
|
# Metals
|
||||||
|
materials-steel = steel
|
||||||
|
materials-gold = gold
|
||||||
|
materials-silver = silver
|
||||||
|
materials-plasteel = plasteel
|
||||||
|
|
||||||
|
# Other
|
||||||
|
materials-biomass = biomass
|
||||||
|
materials-cloth = cloth
|
||||||
|
materials-durathread = durathread
|
||||||
|
materials-plasma = plasma
|
||||||
|
materials-plastic = plastic
|
||||||
|
materials-wood = wood
|
||||||
|
materials-uranium = uranium
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Glass
|
id: Glass
|
||||||
stack: Glass
|
stack: Glass
|
||||||
name: glass
|
name: materials-glass
|
||||||
icon: Objects/Materials/Sheets/glass.rsi/glass.png
|
icon: Objects/Materials/Sheets/glass.rsi/glass.png
|
||||||
color: "#a8ccd7"
|
color: "#a8ccd7"
|
||||||
price: 0.0025
|
price: 0.0025
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: ReinforcedGlass
|
id: ReinforcedGlass
|
||||||
stack: ReinforcedGlass
|
stack: ReinforcedGlass
|
||||||
name: reinforced glass
|
name: materials-reinforced-glass
|
||||||
icon: Objects/Materials/Sheets/glass.rsi/rglass.png
|
icon: Objects/Materials/Sheets/glass.rsi/rglass.png
|
||||||
color: "#549bb0"
|
color: "#549bb0"
|
||||||
price: 0.00375 # 2-1 mix of glass and metal.
|
price: 0.00375 # 2-1 mix of glass and metal.
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: PlasmaGlass
|
id: PlasmaGlass
|
||||||
stack: PlasmaGlass
|
stack: PlasmaGlass
|
||||||
name: plasma glass
|
name: materials-plasma-glass
|
||||||
icon: Objects/Materials/Sheets/glass.rsi/pglass.png
|
icon: Objects/Materials/Sheets/glass.rsi/pglass.png
|
||||||
color: "#b35989"
|
color: "#b35989"
|
||||||
price: 0.1025 # 1-1 mix of plasma and glass.
|
price: 0.1025 # 1-1 mix of plasma and glass.
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: ReinforcedPlasmaGlass
|
id: ReinforcedPlasmaGlass
|
||||||
stack: ReinforcedPlasmaGlass
|
stack: ReinforcedPlasmaGlass
|
||||||
name: reinforced plasma glass
|
name: materials-reinforced-plasma-glass
|
||||||
icon: Objects/Materials/Sheets/glass.rsi/rpglass.png
|
icon: Objects/Materials/Sheets/glass.rsi/rpglass.png
|
||||||
color: "#8c4069"
|
color: "#8c4069"
|
||||||
price: 0.10375 # 2-2-1 mix of plasma, glass, and metal.
|
price: 0.10375 # 2-2-1 mix of plasma, glass, and metal.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Biomass
|
id: Biomass
|
||||||
stack: Biomass
|
stack: Biomass
|
||||||
name: biomass
|
name: materials-biomass
|
||||||
icon: /Textures/Objects/Misc/monkeycube.rsi/cube.png
|
icon: /Textures/Objects/Misc/monkeycube.rsi/cube.png
|
||||||
color: "#8A9A5B"
|
color: "#8A9A5B"
|
||||||
price: 0.05
|
price: 0.05
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Cloth
|
id: Cloth
|
||||||
stack: Cloth
|
stack: Cloth
|
||||||
name: cloth
|
name: materials-cloth
|
||||||
icon: /Textures/Objects/Materials/materials.rsi/cloth.png
|
icon: /Textures/Objects/Materials/materials.rsi/cloth.png
|
||||||
color: "#e7e7de"
|
color: "#e7e7de"
|
||||||
price: 0.005
|
price: 0.005
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Durathread
|
id: Durathread
|
||||||
stack: Durathread
|
stack: Durathread
|
||||||
name: durathread
|
name: materials-durathread
|
||||||
icon: /Textures/Objects/Materials/materials.rsi/durathread.png
|
icon: /Textures/Objects/Materials/materials.rsi/durathread.png
|
||||||
color: "#8291a1"
|
color: "#8291a1"
|
||||||
price: 0.0175 # 1-1 mix of plastic and cloth.
|
price: 0.0175 # 1-1 mix of plastic and cloth.
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Plasma
|
id: Plasma
|
||||||
stack: Plasma
|
stack: Plasma
|
||||||
name: plasma
|
name: materials-plasma
|
||||||
icon: Objects/Materials/Sheets/other.rsi/plasma.png
|
icon: Objects/Materials/Sheets/other.rsi/plasma.png
|
||||||
color: "#7e009e"
|
color: "#7e009e"
|
||||||
price: 0.1
|
price: 0.1
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Plastic
|
id: Plastic
|
||||||
stack: Plastic
|
stack: Plastic
|
||||||
name: plastic
|
name: materials-plastic
|
||||||
icon: Objects/Materials/Sheets/other.rsi/plastic.png
|
icon: Objects/Materials/Sheets/other.rsi/plastic.png
|
||||||
color: "#d9d9d9"
|
color: "#d9d9d9"
|
||||||
price: 0.0125
|
price: 0.0125
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Wood
|
id: Wood
|
||||||
stack: WoodPlank
|
stack: WoodPlank
|
||||||
name: wood
|
name: materials-wood
|
||||||
icon: Objects/Materials/materials.rsi/wood.png
|
icon: Objects/Materials/materials.rsi/wood.png
|
||||||
color: "#966F33"
|
color: "#966F33"
|
||||||
price: 0.01
|
price: 0.01
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Uranium
|
id: Uranium
|
||||||
stack: Uranium
|
stack: Uranium
|
||||||
name: uranium
|
name: materials-uranium
|
||||||
icon: Objects/Materials/Sheets/other.rsi/uranium.png
|
icon: Objects/Materials/Sheets/other.rsi/uranium.png
|
||||||
color: "#32a852"
|
color: "#32a852"
|
||||||
price: 0.05
|
price: 0.05
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Steel
|
id: Steel
|
||||||
stack: Steel
|
stack: Steel
|
||||||
name: steel
|
name: materials-steel
|
||||||
icon: Objects/Materials/Sheets/metal.rsi/steel.png
|
icon: Objects/Materials/Sheets/metal.rsi/steel.png
|
||||||
price: 0.0025
|
price: 0.0025
|
||||||
|
|
||||||
- type: material
|
- type: material
|
||||||
id: Gold
|
id: Gold
|
||||||
stack: Gold
|
stack: Gold
|
||||||
name: gold
|
name: materials-gold
|
||||||
icon: Objects/Materials/ingots.rsi/gold.png
|
icon: Objects/Materials/ingots.rsi/gold.png
|
||||||
color: "#FFD700"
|
color: "#FFD700"
|
||||||
price: 0.0625
|
price: 0.0625
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Silver
|
id: Silver
|
||||||
stack: Silver
|
stack: Silver
|
||||||
name: silver
|
name: materials-silver
|
||||||
icon: Objects/Materials/ingots.rsi/silver.png
|
icon: Objects/Materials/ingots.rsi/silver.png
|
||||||
color: "#C0C0C0"
|
color: "#C0C0C0"
|
||||||
price: 0.025
|
price: 0.025
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
- type: material
|
- type: material
|
||||||
id: Plasteel
|
id: Plasteel
|
||||||
stack: Plasteel
|
stack: Plasteel
|
||||||
name: plasteel
|
name: materials-plasteel
|
||||||
icon: Objects/Materials/Sheets/metal.rsi/plasteel.png
|
icon: Objects/Materials/Sheets/metal.rsi/plasteel.png
|
||||||
color: "#696969" #Okay, this is epic
|
color: "#696969" #Okay, this is epic
|
||||||
price: 0.1025 # 1-1 mix of plasma and steel.
|
price: 0.1025 # 1-1 mix of plasma and steel.
|
||||||
|
|||||||
Reference in New Issue
Block a user