1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-08 00:39:30 +02:00
ComfyFactorio/maps/custom_start.lua

36 lines
1.3 KiB
Lua
Raw Normal View History

2018-12-23 10:46:10 +02:00
local event = require 'utils.event'
local function on_player_joined_game(event)
local player = game.players[event.player_index]
2019-01-02 19:52:27 +02:00
if not global.new_player_equipped then global.new_player_equipped = {} end
2018-12-23 10:46:10 +02:00
2019-01-02 19:52:27 +02:00
if not global.new_player_equipped[player.name] then
2018-12-23 10:46:10 +02:00
player.insert({name = "raw-fish", count = 3})
player.insert({name = "iron-plate", count = 128})
player.insert({name = "iron-gear-wheel", count = 64})
player.insert({name = "copper-plate", count = 128})
player.insert({name = "copper-cable", count = 64})
player.insert({name = "pistol", count = 1})
2019-03-24 06:21:55 +02:00
player.insert({name = "firearm-magazine", count = 64})
2018-12-23 10:46:10 +02:00
player.insert({name = "shotgun", count = 1})
2019-03-24 06:21:55 +02:00
player.insert({name = "shotgun-shell", count = 16})
2018-12-23 10:46:10 +02:00
player.insert({name = "light-armor", count = 1})
2019-01-02 19:52:27 +02:00
global.new_player_equipped[player.name] = true
2019-01-06 20:41:58 +02:00
local radius = 320
game.forces.player.chart(game.surfaces[1], {{x = -1 * radius, y = -1 * radius}, {x = radius, y = radius}})
2018-12-23 10:46:10 +02:00
end
end
2019-01-02 19:52:27 +02:00
local function on_player_created(event)
local player = game.players[event.player_index]
end
2018-12-23 10:46:10 +02:00
local function on_research_finished(event)
end
event.add(defines.events.on_research_finished, on_research_finished)
event.add(defines.events.on_player_joined_game, on_player_joined_game)
event.add(defines.events.on_player_created, on_player_created)