Skip to content

mod.game

A few reads and actions on the running match.

client

Your cash now.

Returns number?

mod.every(5, function()
local c = mod.game.cash()
if c then mod.log("cash", c) end
end)

client

Your best missile tier this run.

Returns number?

mod.on("tier_up", function()
mod.log("best tier", mod.game.best_tier())
end)

client

How many charges of a superweapon you hold. "ion" works.

Parameter Type
weaponId string A superweapon id.

Returns number?

mod.on("weapon_fired", function()
mod.log("ion charges", mod.game.charges("ion"))
end)

server

Gives every player n charges of a superweapon. Negative takes them away.

Parameter Type
weapon string A superweapon id.
n number Whole number, -99 to 99.

Raises

  • unknown superweapon '
  • n must be a whole number
mod.on("silo_broken", function()
mod.game.give_charge("sunlance", 1)
end)

server + client

A banner message. From the server it goes to everyone; from the client, to you.

Parameter Type
text string 60 characters at most.
kind string? Passed to clients; the banner looks the same.

Raises

  • toast text must be 60 characters or fewer
mod.on("island_wiped", function()
mod.game.toast("ISLAND WIPED")
end)