Skip to content

Commit

Permalink
0.1.8
Browse files Browse the repository at this point in the history
Don't deconstruct miners that have fluids, until I have time to make it smarter.
  • Loading branch information
softmix committed Dec 29, 2019
1 parent 31eb4f6 commit 76e3a3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion autodeconstruct.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ end

function autodeconstruct.order_deconstruction(drill)
if drill.to_be_deconstructed(drill.force) then
if global.debug then msg_all({"autodeconstruct-debug", util.positiontostr(drill.position)" already marked"}) end
if global.debug then msg_all({"autodeconstruct-debug", util.positiontostr(drill.position) .. " already marked"}) end
return
end

Expand All @@ -160,6 +160,10 @@ config.lua: autodeconstruct.wait_for_robots = false
--[[ END TODO
--]]
if drill.fluidbox and #drill.fluidbox > 0 then
deconstruct = false
end

if deconstruct == true and drill.minable and drill.has_flag("not-deconstructable") == false then
if drill.order_deconstruction(drill.force) then
if global.debug then msg_all({"autodeconstruct-debug", util.positiontostr(drill.position) .. " " .. drill.name .. " success"}) end
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AutoDeconstruct",
"version": "0.1.7",
"version": "0.1.8",
"factorio_version":"0.15",
"title": "Auto Deconstruct",
"author": "mindmix",
Expand Down

0 comments on commit 76e3a3d

Please sign in to comment.