increased suck and drop delays on robot; taking into account the tick that's "lost" by requiring the server thread to resume the robot in the delays to get the effective delay right (was one tick more than set in the config)

This commit is contained in:
Florian Nücke 2013-12-10 00:03:52 +01:00
parent 193c8cf035
commit 3f40e58929
2 changed files with 11 additions and 9 deletions

View File

@ -70,13 +70,15 @@ class Settings(config: Config) {
// ----------------------------------------------------------------------- //
// robot.delays
val turnDelay = config.getDouble("robot.delays.turn") max 0.05
val moveDelay = config.getDouble("robot.delays.move") max 0.05
val swingDelay = config.getDouble("robot.delays.swing") max 0
val useDelay = config.getDouble("robot.delays.use") max 0
val placeDelay = config.getDouble("robot.delays.place") max 0
val dropDelay = config.getDouble("robot.delays.drop") max 0
val suckDelay = config.getDouble("robot.delays.suck") max 0
// Note: all delays are reduced by one tick to account for the tick they are
// performed in (since all actions are delegated to the server thread).
val turnDelay = (config.getDouble("robot.delays.turn") - 0.06) max 0.05
val moveDelay = (config.getDouble("robot.delays.move") - 0.06) max 0.05
val swingDelay = (config.getDouble("robot.delays.swing") - 0.06) max 0
val useDelay = (config.getDouble("robot.delays.use") - 0.06) max 0
val placeDelay = (config.getDouble("robot.delays.place") - 0.06) max 0
val dropDelay = (config.getDouble("robot.delays.drop") - 0.06) max 0
val suckDelay = (config.getDouble("robot.delays.suck") - 0.06) max 0
val harvestRatio = config.getDouble("robot.delays.harvestRatio") max 0
// ----------------------------------------------------------------------- //

View File

@ -291,11 +291,11 @@ opencomputers {
# The time in seconds to pause execution after an item was
# successfully dropped from a robot's inventory.
drop: 0.3
drop: 0.5
# The time in seconds to pause execution after a robot successfully
# picked up an item after triggering a suck command.
suck: 0.3
suck: 0.5
# This is the *ratio* of the time a player would require to harvest a
# block. Note that robots cannot break blocks they cannot harvest. So