mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-18 03:21:47 +02:00
Updated with suggested corrections
This commit is contained in:
parent
917c21da6a
commit
c2f2bf49e1
@ -171,7 +171,7 @@ end
|
||||
|
||||
local function player_built_entity(event)
|
||||
local player_index = event.player_index
|
||||
if player_index and (event.created_entity.is_registered_for_construction() == false)then -- only register it as built once a robot builds it
|
||||
if event.created_entity.is_registered_for_construction() == false then -- When is_registered_for_construction() is true we only register the entity as built once a robot builds it
|
||||
change_for_global(built_by_players_name, 1)
|
||||
change_for_player(player_index, player_entities_built_name, 1)
|
||||
end
|
||||
@ -181,6 +181,10 @@ local function robot_built_entity(event)
|
||||
change_for_global(built_by_robots_name, 1)
|
||||
local robot = event.robot
|
||||
|
||||
if not robot then
|
||||
return
|
||||
end
|
||||
|
||||
-- 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
|
||||
if robot_owner.player then -- nil if the robot owner is a roboport
|
||||
|
@ -224,7 +224,7 @@ function Public.control(config)
|
||||
.. 'Players: '..statistics.total_players..'\\n'
|
||||
)
|
||||
end
|
||||
Server.to_discord_named_raw(map_promotion_channel, crash_site_role_mention .. ' **'..scenario_display_name[next_scenario]..' has just restarted!!**')
|
||||
Server.to_discord_named_raw(map_promotion_channel, crash_site_role_mention .. ' **'..config.scenario_name..' has just restarted!!**')
|
||||
|
||||
Server.set_data('crash_site_data', tostring(end_epoch), statistics) -- Store the table, with end_epoch as the key
|
||||
Popup.all('\nServer restarting!\nInitiated by ' .. data.name .. '\n')
|
||||
|
Loading…
x
Reference in New Issue
Block a user