@@ -113,16 +113,46 @@ foreach (itemType in ::Const.Items.ItemType)
113113// Translators should push strings to the relevant weaponType here.
114114// Key = WeaponType
115115// Value = array of strings from weapon.m.Categories that should match to this weapon type
116- ::Const. Items . WeaponTypeCategoriesStrings <- {};
117- foreach (w in ::Const. Items . WeaponType )
116+
117+ // Translators Note: DO NOT OVERWRITE THIS TABLE, instead push your strings to each array e.g.
118+ // ::Const.Items.WeaponTypesCategoriesStrings.Axe.push("TranslatedAxe");
119+ ::Const. Items . WeaponTypeCategoriesStrings <- {
120+ [::Const. Items . WeaponType . None ] = [" None" , " No Weapon Type" ]
121+ [::Const. Items . WeaponType . Axe ] = [" Axe" ],
122+ [::Const. Items . WeaponType . Bow ] = [" Bow" ],
123+ [::Const. Items . WeaponType . Cleaver ] = [" Cleaver" ],
124+ [::Const. Items . WeaponType . Crossbow ] = [" Crossbow" ],
125+ [::Const. Items . WeaponType . Dagger ] = [" Dagger" ],
126+ [::Const. Items . WeaponType . Firearm ] = [" Firearm" ],
127+ [::Const. Items . WeaponType . Flail ] = [" Flail" ],
128+ [::Const. Items . WeaponType . Hammer ] = [" Hammer" ],
129+ [::Const. Items . WeaponType . Mace ] = [" Mace" ],
130+ [::Const. Items . WeaponType . Polearm ] = [" Polearm" ],
131+ [::Const. Items . WeaponType . Sling ] = [" Sling" ],
132+ [::Const. Items . WeaponType . Spear ] = [" Spear" ],
133+ [::Const. Items . WeaponType . Sword ] = [" Sword" ],
134+ [::Const. Items . WeaponType . Staff ] = [" Staff" ],
135+ [::Const. Items . WeaponType . Throwing ] = [" Throwing" , " Throwing Weapon" ],
136+ [::Const. Items . WeaponType . Musical ] = [" Musical" , " Musical Instrument" ]
137+ };
138+ local arr = ::Const. Items . WeaponTypeCategoriesStrings ;
139+ foreach (k, w in ::Const. Items . WeaponType )
118140{
119- ::Const. Items . WeaponTypeCategoriesStrings [w] <- [::Const. Items . getWeaponTypeName (w)];
141+ if (arr. find (k) == null )
142+ arr. push (k);
143+
144+ local name = ::Const. Items . getWeaponTypeName (w);
145+ if (arr. find (name) == null )
146+ arr. push (name)
120147}
121148
122149// Map OneHanded and TwoHanded to relevant strings from weapon.m.Categories
123150// Is used during weapon.buildCategoriesFromWeaponType.
124151// Translators should push strings to the relevant handed-ness here.
125152// The last index string is always used to build the categories string.
153+
154+ // Translators Note: DO NOT OVERWRITE THIS TABLE, instead push your strings to each array e.g.
155+ // ::Const.Items.WeaponHandedCategoriesStrings.OneHanded.push("One-HandedTranslation");
126156::Const. Items . WeaponHandedCategoriesStrings <- {
127157 OneHanded = [" One-Handed" ],
128158 TwoHanded = [" Two-Handed" ]
0 commit comments