Documentation for this module may be created at Module:ItemSources/doc
local p = {}
p.resources = {
abandoned_car = {
icon = 'Abandoned_Car.png',
name = 'Abandoned Car',
color = '#f8f7aa',
},
abandoned_squire = {
icon = 'Abandoned_Squire.png',
name = 'Abandoned Squire',
color = '#f8f7aa',
},
arda_fuel_tanker = {
icon = 'ARDA_Fuel_Tanker.png',
name = 'ARDA Fuel Tanker',
color = '#821c8d',
},
arda_investigator = {
icon = 'ARDA Investigator.png',
name = 'ARDA_Investigator',
color = '#821c8d',
},
box_truck = {
icon = 'Box_Truck.png',
name = 'Box Truck',
color = '#821c8d',
},
car_frame = {
icon = 'Car_Frame.png',
name = 'Car Frame',
color = '#821c8d',
},
remnant_ghost = {
icon = 'Logbook-Tombstone-Test.png',
name = 'Remnant Ghost',
color = '#821c8d',
},
tow_truck = {
icon = 'Tow_Truck.png',
name = 'Tow Truck',
color = '#821c8d',
},
wrecked_car = {
icon = 'Wrecked_Car.png',
name = 'Wrecked Car',
color = '#f8f7aa',
},
anchor_plug = {
icon = 'Anchor_Plug.png',
name = 'Anchor Plug',
color = '#ffff00',
},
charge_stop = {
icon = 'Charge_Stop.png',
name = 'Charge Stop',
color = '#ffffff',
},
full_service_stop = {
icon = 'Full_Service_Stop.png',
name = 'Full Service Stop',
color = '#ffffff',
},
gas_station = {
icon = 'Gas_Station.png',
name = 'Gas Station',
color = '#ffffff',
},
repair_stop = {
icon = 'Repair_Stop.png',
name = 'Repair Stop',
color = '#ffffff',
},
consumer_electronics = {
icon = 'Consumer_Electronics.png',
name = 'Consumer Electronics',
color = '#df0d20',
},
explosives_crate = {
icon = 'Explosives_Crate.png',
name = 'Explosives Crate',
color = '#821c8d',
},
friendly_dumpster = {
icon = 'PLACEHOLDER_PROTOTYPE.png',
name = 'Friendly Dumpster',
color = '#821c8d',
},
hazmat_cabinet = {
icon = 'Hazmat_Cabinet.png',
name = 'Hazmat Cabinet',
color = '#f5bb00',
},
lab_computer = {
icon = 'Lab_Computer.png',
name = 'Lab Computer',
color = '#df0d20',
},
lead_shielding = {
icon = 'Lead_Shielding.png',
name = 'Lead Shielding',
color = '#75951b',
},
lim_magnetizer = {
icon = 'MAGNET.png',
name = 'LIM Magnetizer',
color = '#df0d20',
},
plasma_generator = {
icon = 'Plasma_Generator.png',
name = 'Plasma Generator',
color = '#39868e',
},
pneumatic_deposit_box = {
icon = 'Pneumatic_Deposit_Box.png',
name = 'Pneumatic Deposit Box',
color = '#821c8d',
},
sodium_vapor_light = {
icon = 'Sodium_Vapor_Light.png',
name = 'Sodium Vapor Light',
color = '#f8f7aa',
},
supply_containers = {
icon = 'Supply_Containers.png',
name = 'Supply Containers',
color = '#821c8d',
},
transmuter = {
icon = 'Transmuter.png',
name = 'Transmuter',
color = '#00ffff',
},
beach_ball = {
icon = 'Beach_Ball.png',
name = 'Beach Ball',
color = '#B00B1D',
},
honeypot = {
icon = 'HAZARD-WEIRD.png',
name = 'Honeypot',
color = '#8a1924',
},
neon_reef = {
icon = 'BIOLUMINESCENCE.png',
name = 'Neon Reef',
color = '#b00b1d',
},
olympium_vein = {
icon = 'Olympium_Vein.png',
name = 'Olympium Vein',
color = '#7B0B42',
},
salamander_grotto = {
icon = 'Salamander_Grotto.png',
name = 'Salamander Grotto',
color = '#67177A',
},
sap_compressor = {
icon = 'Sap_Compressor.png',
name = 'Sap Compressor',
color = '#C29400',
},
twisted_ember = {
icon = 'Twisted_Ember.png',
name = 'Twisted Ember',
color = '#7B0B42',
},
}
function p.main(frame)
local result = ''
local res_args = frame.args.resources .. ','
for res_name in res_args:gmatch("([%w_]+),") do
local resource = p.resources[res_name]
if not resource then
return string.format("Resource %s not found.", res_name)
end
result = string.format(
'%s<div style="color: #eaecc3; display: flex; align-items: center; width: fit-content; padding: 0; margin: 0; border: solid; border-color: %s; border-width: 2px;"><span style="margin: 0; padding-left: 8px; padding-right: 8px;">[[File:%s|26px|alt=Icon for the %s resource]]</span><span style="border-left: solid; border-color: %s; border-width: 2px; font-size: 24px; width: 8em; padding: 2px 8px 2px 8px; margin: 0;">[[%s]]</div>',
result, resource.color, resource.icon, resource.name, resource.color, resource.name)
end
return result
end
return p