This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script.on_event(defines.events.on_player_created, function(event) | |
local player = game.players[event.player_index] | |
player.insert{name="iron-plate", count=8} | |
player.insert{name="pistol", count=1} | |
player.insert{name="firearm-magazine", count=10} | |
player.insert{name="burner-mining-drill", count = 1} | |
player.insert{name="stone-furnace", count = 1} | |
if (#game.players <= 1) then | |
game.show_message_dialog{text = {"msg-intro"}} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Position = {} | |
function Position.to_table(pos_arr) | |
--fail_if_missing(pos_arr, "missing position argument") | |
if #pos_arr == 2 then | |
return { x = pos_arr[1], y = pos_arr[2] } | |
end | |
return pos_arr | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------PROFILER DUMP---------- | |
2420x "__index" at "=[C]", line -1. Total Duration: 13.214977ms | |
907x "for iterator" at "=[C]", line -1. Total Duration: 2.936141ms | |
604x "productivity_allowed" at "@__ModuleInserter__/control.lua", line 15. Total Duration: 2.979765ms | |
22x "for iterator" at "=[C]", line -1. Total Duration: 0.255175ms | |
1x "pairs" at "=[C]", line -1. Total Duration: 0.013563ms | |
1x "__index" at "=[C]", line -1. Total Duration: 0.071194ms | |
152x "pairs" at "=[C]", line -1. Total Duration: 0.556930ms | |
151x "create_request_proxy" at "@__ModuleInserter__/control.lua", line 152. Total Duration: 32.037480ms |