572
edits
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
p.Township = Township | p.Township = Township | ||
-- Returns the recipe for the item of a desired skill. | -- Returns the recipe for the item of a desired skill. | ||
Line 128: | Line 119: | ||
end | end | ||
local function matchClothing(item) | local function matchClothing(item) | ||
return item.id == 'melvorD:Green_Dragonhide' or item.id == 'melvorD:Blue_Dragonhide' or item.id == 'melvorD:Red_Dragonhide' or item.id == 'melvorD:Black_Dragonhide' or item.id == 'melvorF:Elder_Dragonhide' | |||
end | end | ||
Line 163: | Line 148: | ||
for _, item in ipairs(resource.itemConversions) do | for _, item in ipairs(resource.itemConversions) do | ||
item.toTownship = math.max(math.floor(1000/(item.healsFor*10)), 2) | item.toTownship = math.max(math.floor(1000/(item.healsFor*10)), 2) | ||
item.fromTownship = item.healsFor*5*6 | item.fromTownship = item.healsFor*5*6*5 | ||
end | end | ||
elseif resource.id == 'melvorF:Planks' then | elseif resource.id == 'melvorF:Planks' then | ||
Line 207: | Line 192: | ||
table.insert(ret_resource, '\r\n!Item') | table.insert(ret_resource, '\r\n!Item') | ||
table.insert(ret_resource, '\r\n!Name') | table.insert(ret_resource, '\r\n!Name') | ||
table.insert(ret_resource, '\r\n!Level') | table.insert(ret_resource, '\r\n!Level') | ||
table.insert(ret_resource, '\r\n!Give To') | table.insert(ret_resource, '\r\n!Give To') | ||
Line 251: | Line 235: | ||
table.insert(ret_resource, '\r\n|style="text-align:center"|'..Icons.Icon({item.name, type='item', size='50', notext=true})) | table.insert(ret_resource, '\r\n|style="text-align:center"|'..Icons.Icon({item.name, type='item', size='50', notext=true})) | ||
-- Name | -- Name | ||
table.insert(ret_resource, '\r\n|style="text-align:left"|'..Icons.Icon({item.name, type='item', noicon=true} | table.insert(ret_resource, '\r\n|style="text-align:left"|'..Icons.getExpansionIcon(item.id)..Icons.Icon({item.name, type='item', noicon=true})) | ||
-- Level | -- Level | ||
if required_level == nil then | if required_level == nil then | ||
Line 300: | Line 281: | ||
['melvorF:Potions'] = {skill = 'melvorD:Herblore'}, | ['melvorF:Potions'] = {skill = 'melvorD:Herblore'}, | ||
['melvorF:Planks'] = {skill = 'melvorD:Woodcutting'}, | ['melvorF:Planks'] = {skill = 'melvorD:Woodcutting'}, | ||
['melvorF:Clothing'] = {skill = | ['melvorF:Clothing'] = {skill = nil} | ||
} | } | ||
function p._GetResourceSkill(id) | function p._GetResourceSkill(id) | ||
Line 405: | Line 386: | ||
-- Biomes | -- Biomes | ||
table.insert(ret, '\r\n|-\r\n| <b>Biomes:</b><br | table.insert(ret, '\r\n|-\r\n| <b>Biomes:</b><br>') | ||
for _, biomeid in ipairs(building.biomes) do | for _, biomeid in ipairs(building.biomes) do | ||
local biomename = GameData.getEntityByID(Township.biomes, biomeid).name | local biomename = GameData.getEntityByID(Township.biomes, biomeid).name | ||
Line 416: | Line 397: | ||
local color = modifier.value < 0 and 'red' or 'green' | local color = modifier.value < 0 and 'red' or 'green' | ||
local modifier_value = Shared.numStrWithSign(modifier.value) | local modifier_value = Shared.numStrWithSign(modifier.value) | ||
table.insert(ret, '< | table.insert(ret, Icons.Icon({biomename, type='biome', notext=true, nolink=true})..' <span style="color:'..color..'"><b>'..biomename..' ('..modifier_value..'%)</b></span>') | ||
else | else | ||
table.insert(ret, '< | table.insert(ret, Icons.Icon({biomename, type='biome', notext=true, nolink=true})..' <span>'..biomename..'</span>') | ||
end | end | ||
end | end | ||
Line 536: | Line 517: | ||
local color = biome.value < 0 and 'red' or 'green' | local color = biome.value < 0 and 'red' or 'green' | ||
local biome_value = Shared.numStrWithSign(biome.value) | local biome_value = Shared.numStrWithSign(biome.value) | ||
table.insert(biomeRet, '< | table.insert(biomeRet, Icons.Icon({biomename, type='biome', notext=true, nolink=true})..' <span style="color:'..color..'">'..biomename..' ('..biome_value..'%)</span>') | ||
end | end | ||
if #biomeRet == 0 then | if #biomeRet == 0 then | ||
return nil | return nil | ||
end | end | ||
return | return table.concat(biomeRet, '<br>') | ||
end | end | ||
Line 687: | Line 668: | ||
biomeModifiersMaster[biome.id] = false | biomeModifiersMaster[biome.id] = false | ||
end | end | ||
-- Put the icons in the second row | |||
table.insert(ret, '\r\n|-') | |||
table.insert(ret, '\r\n!') | |||
for _, biome in ipairs(Township.biomes) do | |||
table.insert(ret, '\r\n!'..Icons.Icon({biome.name, type='biome', notext=true, nolink=true})) | |||
end | |||
for _, _building in ipairs(p._SortedBuildings()) do | for _, _building in ipairs(p._SortedBuildings()) do | ||
-- Fix melvorF:Statues | -- Fix melvorF:Statues |
edits