Editing Module:WeaponData

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 11: Line 11:
 
end
 
end
 
index = index + 1
 
index = index + 1
return index
 
 
end
 
end
  
Line 30: Line 29:
 
if type(entry) == 'table' then
 
if type(entry) == 'table' then
 
if entry.type == 'shielddrain' then
 
if entry.type == 'shielddrain' then
num = addCustomLabel(templateArgs, "Shield drain (HP/shot)", entry.drain, num)
+
addCustomLabel(templateArgs, "Shield drain (HP/shot)", entry.drain, num)
 
elseif entry.type == 'needs_link' then
 
elseif entry.type == 'needs_link' then
num = addCustomLabel(templateArgs, "Grid needed", entry.power, num)
+
addCustomLabel(templateArgs, "Grid needed", entry.power, num)
 
elseif entry.type == 'spawn' then
 
elseif entry.type == 'spawn' then
num = addCustomLabel(templateArgs, "Spawns Unit", "[[" .. entry.name .. "]]", num)
+
addCustomLabel(templateArgs, "Spawns Unit", "[[" .. entry.name .. "]]", num)
num = addCustomLabel(templateArgs, "Spawn Life (s)", entry.expire, num)
+
addCustomLabel(templateArgs, "Spawn Life (s)", entry.expire, num)
 
elseif entry.type == 'areadamage' then
 
elseif entry.type == 'areadamage' then
 
local typeName = entry.grav and "Gravity Well" or "Ground Burn"
 
local typeName = entry.grav and "Gravity Well" or "Ground Burn"
 
if not grav then
 
if not grav then
num = addCustomLabel(templateArgs, typeName .. " DPS", entry.dps, num)
+
addCustomLabel(templateArgs, typeName .. " DPS", entry.dps, num)
 
end
 
end
num = addCustomLabel(templateArgs, typeName .. " radius (elmo)", entry.radius, num)
+
addCustomLabel(templateArgs, typeName .. " radius (elmo)", entry.radius, num)
num = addCustomLabel(templateArgs, typeName .. " duration (s)", entry.duration, num)
+
addCustomLabel(templateArgs, typeName .. " duration (s)", entry.duration, num)
  
 
elseif entry.type == 'stockpile' then
 
elseif entry.type == 'stockpile' then
num = addCustomLabel(templateArgs, "Stockpile time (s)", entry.time, num)
+
addCustomLabel(templateArgs, "Stockpile time (s)", entry.time, num)
 
if (entry.cost) then
 
if (entry.cost) then
num = addCustomLabel(templateArgs, "Stockpile cost (M)", entry.cost, num)
+
addCustomLabel(templateArgs, "Stockpile cost (M)", entry.cost, num)
 
end
 
end
 
end
 
end
 
else
 
else
 
if entry == 'hitscan' then
 
if entry == 'hitscan' then
num = addCustomLabel(templateArgs, nil, "Instantly hits", num)
+
addCustomLabel(templateArgs, nil, "Instantly hits", num)
 
elseif entry == 'ignoreshield' then
 
elseif entry == 'ignoreshield' then
num = addCustomLabel(templateArgs, nil, "Ignores shields", num)
+
addCustomLabel(templateArgs, nil, "Ignores shields", num)
 
elseif entry == 'smoothsground' then
 
elseif entry == 'smoothsground' then
num = addCustomLabel(templateArgs, nil, "Smooths ground", num)
+
addCustomLabel(templateArgs, nil, "Smooths ground", num)
 
elseif entry == 'hightraj' then
 
elseif entry == 'hightraj' then
num = addCustomLabel(templateArgs, nil, "High trajectory", num)
+
addCustomLabel(templateArgs, nil, "High trajectory", num)
 
elseif entry == 'trajtoggle' then
 
elseif entry == 'trajtoggle' then
num = addCustomLabel(templateArgs, nil, "Trajectory toggle", num)
+
addCustomLabel(templateArgs, nil, "Trajectory toggle", num)
 
elseif entry == 'watercapable' then
 
elseif entry == 'watercapable' then
num = addCustomLabel(templateArgs, nil, "Water capable", num)
+
addCustomLabel(templateArgs, nil, "Water capable", num)
 
elseif entry == 'friendlyfire' then
 
elseif entry == 'friendlyfire' then
num = addCustomLabel(templateArgs, nil, "Potential friendly fire", num)
+
addCustomLabel(templateArgs, nil, "Potential friendly fire", num)
 
elseif entry == 'nofriendlyfire' then
 
elseif entry == 'nofriendlyfire' then
num = addCustomLabel(templateArgs, nil, "No friendly fire", num)
+
addCustomLabel(templateArgs, nil, "No friendly fire", num)
 
elseif entry == 'nogroundcollide' then
 
elseif entry == 'nogroundcollide' then
num = addCustomLabel(templateArgs, nil, "Passes through ground", num)
+
addCustomLabel(templateArgs, nil, "Passes through ground", num)
 
elseif entry == 'piercing' then
 
elseif entry == 'piercing' then
num = addCustomLabel(templateArgs, nil, "Damage increase vs large units", num)
+
addCustomLabel(templateArgs, nil, "Damage increase vs large units", num)
 
elseif entry == 'damagefalloff' then
 
elseif entry == 'damagefalloff' then
num = addCustomLabel(templateArgs, nil, "Damage falls off with range", num)
+
addCustomLabel(templateArgs, nil, "Damage falls off with range", num)
 
elseif entry == 'inaccuratevsmoving' then
 
elseif entry == 'inaccuratevsmoving' then
num = addCustomLabel(templateArgs, nil, "Inaccuracy vs moving targets", num)
+
addCustomLabel(templateArgs, nil, "Inaccuracy vs moving targets", num)
 
elseif entry == 'interceptedbyantinuke' then
 
elseif entry == 'interceptedbyantinuke' then
num = addCustomLabel(templateArgs, nil, "Can be shot down by antinukes", num)
+
addCustomLabel(templateArgs, nil, "Can be shot down by antinukes", num)
 
end
 
end
 
end
 
end

Please note that all contributions to Zero-K are considered to be released under the Creative Commons Attribution-ShareAlike (see Zero-K:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page: