Module:Stats/REQ/H5G/STRINGS: Difference between revisions

From Halopedia, the Halo wiki

(Created page with "return { -- DATA FIELD LABELS [ 'fields' ] = { [ 'category' ] = 'Category', [ 'desc' ] = 'Description', [ 'energy' ] = 'Energy cost', [ 'mythic' ] = 'Mythic', [ 'r...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
return {
local STRINGS = {
-- DATA FIELD LABELS
-- DATA FIELD LABELS
[ 'fields' ] = {
[ 'fields' ] = {
Line 8: Line 8:
[ 'rarity' ] = 'Rarity',
[ 'rarity' ] = 'Rarity',
[ 'rp' ] = 'Sale price'
[ 'rp' ] = 'Sale price'
},
-- CATEGORIES
[ 'categories' ] = {
[ 'announcer' ] = 'Announcer',
[ 'armor' ] = 'Armor',
[ 'assassination' ] = 'Assassination',
[ 'boost' ] = 'Boost',
[ 'certpowerup' ] = 'Power up certification',
[ 'certpowerwep' ] = 'Power weapon certification',
[ 'certvehicle' ] = 'Vehicle certification',
[ 'emblem' ] = 'Emblem',
[ 'helmet' ] = 'Helmet',
[ 'loadout' ] = 'Loadout',
[ 'powerup' ] = 'Power up',
[ 'powerwep' ] = 'Power weapon',
[ 'skin' ] = 'Weapon skin',
[ 'stance' ] = 'Stance',
[ 'vehicle' ] = 'Vehicle',
[ 'visor' ] = 'Visor'
},
},
-- RARITY TIERS
-- RARITY TIERS
Line 15: Line 34:
[ 'rare' ] = 'Rare',
[ 'rare' ] = 'Rare',
[ 'ultrarare' ] = 'Ultra-Rare',
[ 'ultrarare' ] = 'Ultra-Rare',
[ 'legendary' ] = 'Legendary'
[ 'legendary' ] = 'Legendary',
[ 'mythic' ] = 'Mythic'
},
},
-- CURRENCIES
-- CURRENCIES
Line 23: Line 43:
}
}
}
}
local p = {}
function p.field( id )
return STRINGS[ 'fields' ][ id ] or 'Unknown field'
end
function p.category( id )
return STRINGS[ 'categories' ][ id ] or 'Unknown category'
end
function p.rarity( id )
return STRINGS[ 'rarities' ][ id ] or 'Unknown rarity'
end
function p.currency( id )
return STRINGS[ 'currencies' ][ id ] or 'Unknown currency'
end
return p

Latest revision as of 09:35, September 24, 2022

Documentation for this module may be created at ModuleDoc:Stats/REQ/H5G/STRINGS

local STRINGS = {
	-- DATA FIELD LABELS
	[ 'fields' ] = {
		[ 'category' ] = 'Category',
		[ 'desc' ] = 'Description',
		[ 'energy' ] = 'Energy cost',
		[ 'mythic' ] = 'Mythic',
		[ 'rarity' ] = 'Rarity',
		[ 'rp' ] = 'Sale price'
	},
	-- CATEGORIES
	[ 'categories' ] = {
		[ 'announcer' ] = 'Announcer',
		[ 'armor' ] = 'Armor',
		[ 'assassination' ] = 'Assassination',
		[ 'boost' ] = 'Boost',
		[ 'certpowerup' ] = 'Power up certification',
		[ 'certpowerwep' ] = 'Power weapon certification',
		[ 'certvehicle' ] = 'Vehicle certification',
		[ 'emblem' ] = 'Emblem',
		[ 'helmet' ] = 'Helmet',
		[ 'loadout' ] = 'Loadout',
		[ 'powerup' ] = 'Power up',
		[ 'powerwep' ] = 'Power weapon',
		[ 'skin' ] = 'Weapon skin',
		[ 'stance' ] = 'Stance',
		[ 'vehicle' ] = 'Vehicle',
		[ 'visor' ] = 'Visor'
	},
	-- RARITY TIERS
	[ 'rarities' ] = {
		[ 'common' ] = 'Common',
		[ 'uncommon' ] = 'Uncommon',
		[ 'rare' ] = 'Rare',
		[ 'ultrarare' ] = 'Ultra-Rare',
		[ 'legendary' ] = 'Legendary',
		[ 'mythic' ] = 'Mythic'
	},
	-- CURRENCIES
	[ 'currencies' ] = {
		[ 'energy' ] = 'REQ energy',
		[ 'rp' ] = 'REQ points'
	}
}

local p = {}

function p.field( id )
	return STRINGS[ 'fields' ][ id ] or 'Unknown field'
end

function p.category( id )
	return STRINGS[ 'categories' ][ id ] or 'Unknown category'
end

function p.rarity( id )
	return STRINGS[ 'rarities' ][ id ] or 'Unknown rarity'
end

function p.currency( id )
	return STRINGS[ 'currencies' ][ id ] or 'Unknown currency'
end

return p