Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for 1.1 (dirty) #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ function On_Init()
global.klaxonTick = global.klaxonTick or 0
global.auto_tick = global.auto_tick or 0
global.readyTick = {}
if remote.interfaces["silo_script"] then
local tracked_items = remote.call("silo_script", "get_tracked_items")
if not tracked_items["orbital-ion-cannon"] then
remote.call("silo_script", "add_tracked_item", "orbital-ion-cannon")
end
end
-- if remote.interfaces["silo_script"] then
-- local tracked_items = remote.call("silo_script", "get_tracked_items")
-- if not tracked_items["orbital-ion-cannon"] then
-- remote.call("silo_script", "add_tracked_item", "orbital-ion-cannon")
-- end
-- end
if not global.permissions then
global.permissions = {}
global.permissions[-2] = settings.global["ion-cannon-auto-targeting"].value
Expand Down Expand Up @@ -333,7 +333,7 @@ script.on_event(defines.events.on_player_cursor_stack_changed, function(event)
if not global.permissions[index] then
player.print({"ion-permission-denied"})
playSoundForPlayer("unable-to-comply", player)
return player.clean_cursor()
return player.clear_cursor()
end
end
if (player.cheat_mode or (#global.forces_ion_cannon_table[player.force.name] > 0 and not isAllIonCannonOnCooldown(player))) and not global.holding_targeter[index] then
Expand Down Expand Up @@ -522,7 +522,7 @@ script.on_event(defines.events.on_trigger_created_entity, function(event)
end
end)

script.on_event(defines.events.on_put_item, function(event)
script.on_event(defines.events.on_pre_build, function(event)
local current_tick = event.tick
if global.tick and global.tick > current_tick then
return
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Orbital Ion Cannon",
"version": "1.8.2",
"factorio_version": "0.18",
"factorio_version": "1.1",
"title": "Orbital Ion Cannon",
"author": "Supercheese",
"homepage": "http://www.factorioforums.com/forum/viewtopic.php?f=93&t=17910",
Expand Down