fix robot dupe when unloaded on a station other than the main link
This commit is contained in:
parent
d77aa4e9fa
commit
6b3409736d
1 changed files with 2 additions and 2 deletions
|
@ -188,7 +188,7 @@ public class RobotRegistry extends WorldSavedData implements IRobotRegistry {
|
|||
releaseResources(robot, forceAll, false);
|
||||
}
|
||||
|
||||
private synchronized void releaseResources(EntityRobotBase robot, boolean forceAll, boolean resetMainLink) {
|
||||
private synchronized void releaseResources(EntityRobotBase robot, boolean forceAll, boolean resetEntities) {
|
||||
markDirty();
|
||||
|
||||
if (resourcesTakenByRobot.containsKey(robot.getRobotId())) {
|
||||
|
@ -213,7 +213,7 @@ public class RobotRegistry extends WorldSavedData implements IRobotRegistry {
|
|||
if (!d.canRelease()) {
|
||||
if (forceAll) {
|
||||
d.unsafeRelease(robot);
|
||||
} else if (resetMainLink && d.isMainStation() && d.robotIdTaking() == robot.getRobotId()) {
|
||||
} else if (resetEntities && d.robotIdTaking() == robot.getRobotId()) {
|
||||
d.invalidateRobotTakingEntity();
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue