1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Stupid lua checks

This commit is contained in:
Jayefuu 2021-02-09 18:14:59 +00:00
parent 5254a2ccf7
commit f86ff01b31

View File

@ -181,11 +181,9 @@ end
local function robot_built_entity(event)
change_for_global(built_by_robots_name, 1)
local robot = event.robot
local entity = event.created_entity
-- When item gets built, add to the total entities built for the player whose robot built the entity NOT for the player who placed the ghost
local robot_owner = robot.logistic_network.cells[1].owner
local robot_owner = event.robot.logistic_network.cells[1].owner
if robot_owner.player then -- nil if the robot owner is a roboport
change_for_player(robot_owner.player.index, player_entities_built_name, 1)
end