Skip to content

Commit

Permalink
Bobs Metal and Chem Furnaces added.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexela committed Jul 21, 2016
1 parent 33ca6d1 commit 603465a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CurrentAlpha
-Need better prioritization on ammo selection
-Hotkey Filling will fill trunk space if vehicle is full
-Bobs batteries load into tank 3 correctly, oops typo
-Added bobs metal mixer and chem mixer
-Angelrefining burner crusher
-Existing autofill users will have to run /c remote.call("af", "resetMod") to add in all of the changes. This will erase any sets you have manually added so use with caution.

Expand Down
6 changes: 3 additions & 3 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,17 @@ local order = {
--

script.on_configuration_changed(function()
initMod()
initMod() --Should fail and only update fuels
end)

script.on_init(function()
initMod()
initMod(true)
end)

script.on_event(defines.events.on_built_entity, function(event)
local player = game.players[event.player_index]
local global = global
if global.personalsets[player.name] and global.personalsets[player.name].active then
--globalPrint(global.defaultsets[event.created_entity.name])
local fillset = global.personalsets[player.name][event.created_entity.name] or global.defaultsets[event.created_entity.name]
if fillset ~= 0 and fillset ~= nil then
autoFill(event.created_entity, player, fillset)
Expand All @@ -58,6 +57,7 @@ script.on_event(defines.events.on_player_created, function(event)
if global.personalsets[username] == nil then
global.personalsets[username] = { active = true }
end
log("AutoFill: user ".. username .. " Created")
end)

script.on_event("autofill-entity", function(event)
Expand Down
5 changes: 3 additions & 2 deletions loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ loader = {
addItemArray = function(path)
local tbl = require(path)
for name, array in pairs(tbl) do
backup_log[#backup_log + 1] = "ADDING '" .. name .. " "..serpent.dump(line, {name="array", comment=false, sparse=false, sortkeys=true}) .."' in '" .. path .. "'"
backup_log[#backup_log + 1] = "ADDING '" .. name .. "' in '" .. path .. "'"
if item_arrays_backup[name] == nil then
item_arrays_backup[name] = array
else
Expand Down Expand Up @@ -79,7 +79,7 @@ loader = {
for i=1, #array do
if game.item_prototypes[array[i]] == nil then
backup_log[#backup_log + 1] = "Item array '" .. name .. "' removed"
item_arrays[name] = nil
item_arrays[name] = nil
break
end
end
Expand Down Expand Up @@ -216,5 +216,6 @@ loader = {
end
table.sort(all, fuelHighToLow)
table.sort(high, fuelHighToLow)
backup_log[#backup_log + 1] = "Updating Fuel Arrays"
end
}
5 changes: 4 additions & 1 deletion settings/bob-sets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ return {
["boiler-3"] = boilerFillSet,
["boiler-2"] = boilerFillSet,
["boiler-4"] = boilerFillSet,

["mixing-furnace"] = boilerFillSet,
["chemical-boiler"] = boilerFillSet,

-- bobwarfare
["bob-gun-turret-2"] = turretFillSet,
Expand All @@ -20,7 +23,7 @@ return {
["tank-3"] ={priority=2, slots={4,1,1,1}, "fuels-all", "ammo-bullets", "ammo-battery", "ammo-shells", "ammo-artillery" },

-- boblogistics
["long-handed-burner-inserter"] = {group="burners", limits={1}, "fuels-high"},
["long-handed-burner-inserter"] = {group="burners", limits={1}, "fuels-high"}, --possibly not needed with next bob/log update
["diesel-locomotive-2"] = locomotiveFillSet,
["diesel-locomotive-3"] = locomotiveFillSet,
["armoured-diesel-locomotive"] = locomotiveFillSet
Expand Down

0 comments on commit 603465a

Please sign in to comment.