Skip to content

Commit

Permalink
Check for remote interface existence before calling
Browse files Browse the repository at this point in the history
  • Loading branch information
Suprcheese committed May 17, 2017
1 parent 21082c2 commit e284064
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ function On_Init()
global.forces_ion_cannon_table["player"] = global.ion_cannon_table -- Migrate ion cannon tables from version 1.0.5 and lower
global.ion_cannon_table = nil -- Remove old ion cannon table
end
remote.call("silo_script", "set_show_launched_without_satellite", false) -- FINALLY!
remote.call("silo_script", "add_tracked_item", "orbital-ion-cannon")
remote.call("silo_script", "update_gui")
if remote.interfaces["silo_script"] then
remote.call("silo_script", "set_show_launched_without_satellite", false) -- FINALLY!
remote.call("silo_script", "add_tracked_item", "orbital-ion-cannon")
remote.call("silo_script", "update_gui")
end
for i, player in pairs(game.players) do
global.readyTick[player.index] = 0
if not global.forces_ion_cannon_table[player.force.name] then
Expand Down

0 comments on commit e284064

Please sign in to comment.