[Klonan] [15.20] robots_battery_modifier doesn't increase energy max
Posted: Thu Jun 15, 2017 2:08 am
It seems that LuaForces::worker_robots_battery_modifier is restricted by max_energy and only affects the initial energy for when a robot entity is spawned, which if intended behaviour (seems so, but...) leads to some really weird behaviour. As in (replication steps):
- Start a brand new world (no mods needed, vanilla is enough to replicate)
- Run the following to increase a robot's storage from 1.5MJ to 3MJ (+100%)
Code: Select all
/c game.player.force.worker_robots_battery_modifier = 1
- Spawn a construction-robot (without any roboport around) and select it (notice it'll most likely be at 2.9MJ)
- Run the following to attempt to charge a bot to its initial charge
Code: Select all
/c game.player.selected.energy = 3000000
- Notice that the robot's charge instantly drained to 1.4MJ (1.5MJ with some idle drain)