Skip to content
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
.idea/httpRequests
.idea/httpRequests
*.zip
19 changes: 2 additions & 17 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
*Bot Reacaller*

Original mod was made by [cpeosphoros](https://forums.factorio.com/memberlist.php?mode=viewprofile&u=33391) and can be found [here](https://mods.factorio.com/mods/cpeosphoros/CpeBotRecaller)

All i did was updating the config. :) i Even copied the Readme.

Bots are collect from roboports to the Robot Recaller Chest. Good for upgrading bots.

Should work with all modded bots and roboports, as long as their modder didn't change the internal name of those entities.

Just build a Robot Recaller Chest and set one of its request slots to any kind of logistic bot.

It will pull 1 bot of that kind per second from roboports in the same logistic network into the chest.

If you set more than one kind to be requested, it will only pull the second kind if none of the first is available in the network.

Both limits were set with balancing in mind. If you want a higher output, or to pull more than one kind at a time, just build more chests.
# Purpose
This is a fork of the "Bot Recaller" mod meant to add a configurable option to control how fast the bots are recalled.
8 changes: 8 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
rmdir /s /q "BotRecaller_0.17.3"
del /s /q "BotRecaller*.zip"
mkdir "BotRecaller_0.17.3"
robocopy /s /e . BotRecaller_0.17.3 /mt /xd "BotRecaller_0.17.3" ".git" ".idea" /xf ".gitignore" "build.sh" "build.bat"
7z a BotRecaller_0.17.3.zip "BotRecaller_0.17.3"
rmdir /s /q "BotRecaller_0.17.3"
pause
4 changes: 1 addition & 3 deletions control.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "config"

function checkRecallers()
local recallers = {}
for i, force in pairs(game.forces) do
Expand Down Expand Up @@ -83,7 +81,7 @@ end


script.on_event(defines.events.on_tick, function(event)
if event.tick % (seconds * 60) == 0 then
if event.tick % (settings.startup["recall-delay-per-robot"].value * 60) == 0 then
checkRecallers()
end
end)
6 changes: 6 additions & 0 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[entity-name]
logistic-chest-botRecaller=Robot Recaller Chest

[mod-setting-name]
recall-delay-per-robot=Recall delay per robot

[mod-setting-description]
recall-delay-per-robot=Must result in a whole number when multiplied by 60
8 changes: 8 additions & 0 deletions settings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
data:extend({
{
type = "double-setting",
name = "recall-delay-per-robot",
setting_type = "startup",
default_value = 0.5
}
})