Localize store categories (#12453)

This commit is contained in:
Morb 2022-11-09 02:36:48 +03:00 committed by GitHub
parent 6775648cc9
commit 8be499df5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 14 deletions

View File

@ -10,12 +10,18 @@ namespace Content.Shared.Store;
[Serializable, NetSerializable, DataDefinition]
public sealed class StoreCategoryPrototype : IPrototype
{
private string _name = string.Empty;
[ViewVariables]
[IdDataField]
public string ID { get; } = default!;
[DataField("name")]
public string Name { get; } = string.Empty;
public string Name
{
get => _name;
private set => _name = Loc.GetString(value);
}
[DataField("priority")]
public int Priority { get; } = 0;

View File

@ -0,0 +1,16 @@
# Uplink
store-category-debug = debug category
store-category-debug2 = debug category 2
store-category-weapons = Weapons
store-category-ammo = Ammo
store-category-explosives = Explosives
store-category-misc = Misc
store-category-bundles = Bundles
store-category-tools = Tools
store-category-utility = Utility
store-category-job = Job
store-category-armor = Armor
store-category-pointless = Pointless
# Revenant
store-category-abilities = Abilities

View File

@ -1,65 +1,65 @@
#debug
- type: storeCategory
id: Debug
name: debug category
name: store-category-debug
- type: storeCategory
id: Debug2
name: debug category 2
name: store-category-debug2
#uplink categoires
- type: storeCategory
id: UplinkWeapons
name: Weapons
name: store-category-weapons
priority: 0
- type: storeCategory
id: UplinkAmmo
name: Ammo
name: store-category-ammo
priority: 1
- type: storeCategory
id: UplinkExplosives
name: Explosives
name: store-category-explosives
priority: 2
- type: storeCategory
id: UplinkMisc
name: Misc
name: store-category-misc
priority: 3
- type: storeCategory
id: UplinkBundles
name: Bundles
name: store-category-bundles
priority: 4
- type: storeCategory
id: UplinkTools
name: Tools
name: store-category-tools
priority: 5
- type: storeCategory
id: UplinkUtility
name: Utility
name: store-category-utility
priority: 6
- type: storeCategory
id: UplinkJob
name: Job
name: store-category-job
priority: 7
- type: storeCategory
id: UplinkArmor
name: Armor
name: store-category-armor
priority: 8
- type: storeCategory
id: UplinkPointless
name: Pointless
name: store-category-pointless
priority: 9
#revenant
- type: storeCategory
id: RevenantAbilities
name: Abilities
name: store-category-abilities