expose cannon definitions for other mods (#27)

This commit is contained in:
Luke aka SwissalpS
2024-12-29 19:31:01 +01:00
committed by GitHub
parent c6f7c02e79
commit 1a86d9a5c6

View File

@ -281,97 +281,100 @@ local register_spacecannon = function(def)
end end
register_spacecannon({ spacecannon.cannon_defs = {
color = "green", {
name = "Ion cannon", color = "green",
desc = "fast, low damage", name = "Ion cannon",
is_th = true, desc = "fast, low damage",
range = 1, is_th = true,
storage_require_mod = 1, range = 1,
damage = 5, storage_require_mod = 1,
intensity = 1, damage = 5,
timeout = 8, intensity = 1,
speed = 10, timeout = 8,
penetration = 0, speed = 10,
ingredient = "default:mese_block" penetration = 0,
}) ingredient = "default:mese_block"
}, {
register_spacecannon({ color = "yellow",
color = "yellow", name = "Plasma cannon",
name = "Plasma cannon", desc = "medium speed, medium damage",
desc = "medium speed, medium damage", is_th = true,
is_th = true, range = 3,
range = 3, storage_require_mod = 3,
storage_require_mod = 3, intensity = 2,
intensity = 2, damage = 8,
damage = 8, timeout = 8,
timeout = 8, speed = 5,
speed = 5, penetration = 0,
penetration = 0, ingredient = "spacecannon:cannon_green"
ingredient = "spacecannon:cannon_green" }, {
}) color = "red",
name = "Nova cannon",
register_spacecannon({ desc = "slow, heavy damage",
color = "red", is_th = true,
name = "Nova cannon", range = 5,
desc = "slow, heavy damage", storage_require_mod = 5,
is_th = true, intensity = 4,
range = 5, damage = 10,
storage_require_mod = 5, timeout = 15,
intensity = 4, speed = 3,
damage = 10, penetration = 0,
timeout = 15, ingredient = "spacecannon:cannon_yellow"
speed = 3, },
penetration = 0,
ingredient = "spacecannon:cannon_yellow"
})
-- Railguns -- Railguns
-- Regular railgun -- Regular railgun
register_spacecannon({ {
color = "blue", color = "blue",
name = "Railgun cannon", name = "Railgun cannon",
desc = "fast, 2x penetrating damage", desc = "fast, 2x penetrating damage",
textures = { textures = {
"railgun_blank.png" .. cable_entry, "railgun_blank.png" .. cable_entry,
"railgun_front.png", "railgun_front.png",
"railgun_blank.png" .. cable_entry, "railgun_blank.png" .. cable_entry,
"railgun_blank.png" .. cable_entry, "railgun_blank.png" .. cable_entry,
"railgun_top_bottom.png", "railgun_top_bottom.png",
"railgun_top_bottom.png", "railgun_top_bottom.png",
},
is_th = false,
range = 0,
storage_require_mod = 1,
intensity = 2,
damage = 6,
timeout = 10,
speed = 9,
penetration = 2,
ingredient = "technic:copper_coil"
}, },
is_th = false,
range = 0,
storage_require_mod = 1,
intensity = 2,
damage = 6,
timeout = 10,
speed = 9,
penetration = 2,
ingredient = "technic:copper_coil"
})
-- Helical railgun -- Helical railgun
register_spacecannon({ {
color = "purple", color = "purple",
name = "Helical railgun cannon", name = "Helical railgun cannon",
desc = "fast, 4x penetrating damage", desc = "fast, 4x penetrating damage",
textures = { textures = {
"railgun_blank.png" .. cable_entry, "railgun_blank.png" .. cable_entry,
"helical_railgun_front.png", "helical_railgun_front.png",
"railgun_blank.png" .. cable_entry, "railgun_blank.png" .. cable_entry,
"railgun_blank.png" .. cable_entry, "railgun_blank.png" .. cable_entry,
"helical_railgun_top_bottom.png", "helical_railgun_top_bottom.png",
"helical_railgun_top_bottom.png", "helical_railgun_top_bottom.png",
},
is_th = false,
range = 0,
storage_require_mod = 1.5,
intensity = 4,
damage = 6,
timeout = 15,
speed = 10,
penetration = 4,
ingredient = "spacecannon:cannon_blue"
}, },
is_th = false, }
range = 0,
storage_require_mod = 1.5, for _, def in ipairs(spacecannon.cannon_defs) do
intensity = 4, register_spacecannon(def)
damage = 6, end
timeout = 15,
speed = 10,
penetration = 4,
ingredient = "spacecannon:cannon_blue"
})