mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 20:16:38 +09:00
Fixed Existing Lua Check Errors
This commit is contained in:
@@ -17,31 +17,31 @@ Event.add(defines.events.on_player_created, function(event)
|
||||
player.force.chart(player.surface, {{p.x-r, p.y-r}, {p.x+r, p.y+r}})
|
||||
end
|
||||
-- spawn items
|
||||
for item,callback in pairs(items) do
|
||||
for item, callback in pairs(items) do
|
||||
if type(callback) == 'function' then
|
||||
local stats = player.force.item_production_statistics
|
||||
local made = stats.get_input_count(item)
|
||||
local success,count = pcall(callback,made,stats.get_input_count,player)
|
||||
local success, count = pcall(callback, made, stats.get_input_count, player)
|
||||
count = math.floor(count)
|
||||
if success and count > 0 then
|
||||
player.insert{name=item,count=count}
|
||||
player.insert{name=item, count=count}
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Event.on_init(function()
|
||||
remote.call('freeplay','set_created_items',{})
|
||||
remote.call('freeplay','set_chart_distance',0)
|
||||
remote.call('freeplay','set_skip_intro',config.skip_intro)
|
||||
remote.call('freeplay', 'set_created_items', {})
|
||||
remote.call('freeplay', 'set_chart_distance', 0)
|
||||
remote.call('freeplay', 'set_skip_intro', config.skip_intro)
|
||||
if config.research_queue_from_start then
|
||||
for _,force in pairs(game.forces) do
|
||||
for _, force in pairs(game.forces) do
|
||||
force.research_queue_enabled = true
|
||||
end
|
||||
end
|
||||
if not config.disable_base_game_silo_script then
|
||||
if config.skip_victory then
|
||||
remote.call('silo_script','set_no_victory',true)
|
||||
remote.call('silo_script', 'set_no_victory', true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user