Module:Icon

From SWGoH Wiki
Jump to navigationJump to search

Documentation for this module may be created at Module:Icon/doc

--[[
This Module is used to keep naming conventions consistent throughout the wiki by converting keywords into the full name of:
 - Icons
--]]

local p = {}

--Global variables go here--

-- Global Functions --
function trim(s)
   return s:gsub("[%c%p%s]", "")
end


--Functions--
--[[-------
  ICON
--]]-------
function p.icon(id)
 id = id.args[1]
 
 if (id=="Mk I" or id=="Mk II" or id=="Mk III") then
  id = trim(id)
 end 

iconArray = {
MkI='Ability Material Mk I',
MkII='Ability Material Mk II',
MkIII='Ability Material Mk III',
Omega='Ability Material Omega',
Zeta='Ability Material Zeta',
Omicron='Ability Material Omicron',
CanToken='Cantina Battle Token',
ChamToken='Championship Token',
Credit='Credit',
Credits='Credits',
Crystal='Crystal',
Energy='Energy',
CanEnergy='Energy-Cantina',
ModEnergy='Energy-Mod',
ShipEnergy='Energy-Ship',
XP='Experience Points',
FleetToken='Fleet Arena Token',
GWToken='Galactic War Token',
GEToken='Mk I Guild Event Token',
GEToken2='Mk II Guild Event Token',
GEToken3='Mk III Guild Event Token',
GuildToken='Guild Token',
Mk2PulseMod='Mk 2 Pulse Modulator',
Mk1BondPin='Mk 1 Bonding Pin',
Mk1PFCChip='Mk 1 Power Flow Control Chip',
Mk1FusDisk='Mk 1 Fusion Disk',
Mk1FusCoil='Mk 1 Fusion Coil',
Mk1Amp='Mk 1 Amplifier',
Mk1Cap='Mk 1 Capacitor',
Star='Star',
Lock='Lock',
Prestige='Prestige',
AATTicket='Raid Ticket AAT',
PitTicket='Raid Ticket Pit',
STRTicket='Raid Ticket STR',
DSTicket='Dark Side Currency',
LSTicket='Light Side Currency',
RIMat='Reinforcement Materials',
ShardToken='Shard Store Token',
ShipMkI='Ship Ability Material Mk I',
ShipMkII='Ship Ability Material Mk II',
ShipMkIII='Ship Ability Material Mk III',
ShipOmega='Ship Ability Material Omega',
SBMat='Ship Building Materials',
Sim='Sim Tickets',
SquadToken='Squad Arena Token',
AllyPts='Ally Points',
T1EnDroid='T1 Enhancement Droid',
T2EnDroid='T2 Enhancement Droid',
T3EnDroid='T3 Enhancement Droid',
T4EnDroid='T4 Enhancement Droid',
T5EnDroid='T5 Enhancement Droid',
T6EnDroid='T6 Enhancement Droid',
T7EnDroid='T7 Enhancement Droid',
T1TrDroid='T1 Training Droid',
T2TrDroid='T2 Training Droid',
T3TrDroid='T3 Training Droid',
T4TrDroid='T4 Training Droid',
T5TrDroid='T5 Training Droid',
T6TrDroid='T6 Training Droid',
T7TrDroid='T7 Training Droid',
Carbonite='Carbonite Circuit Board',
Bronzium='Bronzium Wiring',
Chromium='Chromium Transistor',
Aurodium='Aurodium Heatsink',
Electrium='Electrium Conductor',
Zinbiddle='Zinbiddle Card',
FlData='Flawed Signal Data',
FrData='Fragmented Signal Data',
InData='Incomplete Signal Data',
TMBoxRed='Territory Mystery Box-Red',
TMBoxOra='Territory Mystery Box-Orange',
TMBoxYel='Territory Mystery Box-Yellow',
TMBoxBlu='Territory Mystery Box-Blue',
TMBoxPur='Territory Mystery Box-Purple',
TMBoxGrn='Territory Mystery Box-Green',
RMBoxGry='Raid Mystery Box-Gray',
RMBoxGrn='Raid Mystery Box-Green',
RMBoxBlu='Raid Mystery Box-Blue',
RMBoxPur='Raid Mystery Box-Purple',
RMBoxYel='Raid Mystery Box-Yellow',
RMBoxRed='Raid Mystery Box-Red'
}--END iconArray

 
  if (iconArray[id]==nil) then
    return id
  else
    return iconArray[id]
  end
end --END Function units

return p