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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -281,7 +281,8 @@ local register_spacecannon = function(def)
end
register_spacecannon({
spacecannon.cannon_defs = {
{
color = "green",
name = "Ion cannon",
desc = "fast, low damage",
@ -294,9 +295,7 @@ register_spacecannon({
speed = 10,
penetration = 0,
ingredient = "default:mese_block"
})
register_spacecannon({
}, {
color = "yellow",
name = "Plasma cannon",
desc = "medium speed, medium damage",
@ -309,9 +308,7 @@ register_spacecannon({
speed = 5,
penetration = 0,
ingredient = "spacecannon:cannon_green"
})
register_spacecannon({
}, {
color = "red",
name = "Nova cannon",
desc = "slow, heavy damage",
@ -324,12 +321,12 @@ register_spacecannon({
speed = 3,
penetration = 0,
ingredient = "spacecannon:cannon_yellow"
})
},
-- Railguns
-- Regular railgun
register_spacecannon({
{
color = "blue",
name = "Railgun cannon",
desc = "fast, 2x penetrating damage",
@ -350,10 +347,10 @@ register_spacecannon({
speed = 9,
penetration = 2,
ingredient = "technic:copper_coil"
})
},
-- Helical railgun
register_spacecannon({
{
color = "purple",
name = "Helical railgun cannon",
desc = "fast, 4x penetrating damage",
@ -374,4 +371,10 @@ register_spacecannon({
speed = 10,
penetration = 4,
ingredient = "spacecannon:cannon_blue"
})
},
}
for _, def in ipairs(spacecannon.cannon_defs) do
register_spacecannon(def)
end