mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-16 02:47:48 +02:00
Merge branch 'develop' into stylua-ignore
This commit is contained in:
commit
6bc82801b1
@ -105,12 +105,15 @@ Commands.new('mtn_set_queue_speed', 'Usable only for admins - sets the queue spe
|
||||
Commands.new('mtn_complete_quests', 'Usable only for admins - sets the queue speed of this map!')
|
||||
:require_admin()
|
||||
:require_validation()
|
||||
:add_parameter('no_grace', true, 'boolean')
|
||||
:callback(
|
||||
function (player)
|
||||
function (player, args)
|
||||
Discord.send_notification_raw(Public.discord_name, player.name .. ' completed all the quest via command.')
|
||||
local stateful = Public.get_stateful()
|
||||
stateful.objectives_completed_count = 6
|
||||
Task.set_timeout_in_ticks(50, gather_time_token, {})
|
||||
if args then
|
||||
Task.set_timeout_in_ticks(50, gather_time_token, {})
|
||||
end
|
||||
game.print(mapkeeper .. player.name .. ', has forced completed all quests!', { r = 0.98, g = 0.66, b = 0.22 })
|
||||
player.print('Quests completed.')
|
||||
end
|
||||
|
@ -1168,6 +1168,7 @@ local function get_mvps(force)
|
||||
end
|
||||
end
|
||||
local mvp = {}
|
||||
if not score_list[1] or not score_list[1].name then return mvp end
|
||||
score_list = get_sorted_list('killscore', score_list)
|
||||
mvp.killscore = { name = score_list[1].name, score = score_list[1].killscore }
|
||||
score_list = get_sorted_list('mined_entities', score_list)
|
||||
|
@ -511,6 +511,7 @@ function Public.move_players(current_task)
|
||||
else
|
||||
player.teleport({ x = 0, y = 0 }, surface)
|
||||
end
|
||||
player.clear_items_inside()
|
||||
end
|
||||
current_task.message = 'Moved players to initial surface!'
|
||||
current_task.delay = game.tick + 200
|
||||
|
@ -86,6 +86,10 @@ Event.on_nth_tick(
|
||||
return
|
||||
end
|
||||
|
||||
if collection.game_won_notified then
|
||||
return
|
||||
end
|
||||
|
||||
if collection.gather_time and collection.gather_time <= 0 and collection.survive_for and collection.survive_for > 0 then
|
||||
local spawn_positions = table.deepcopy(Public.get_stateful('stateful_spawn_points'))
|
||||
|
||||
@ -199,8 +203,6 @@ Event.add(
|
||||
launch_item.actual = launch_item.actual + 1
|
||||
end
|
||||
end
|
||||
rocket_inventory.clear()
|
||||
rocket_inventory.insert({ name = 'space-science-pack', count = 200 })
|
||||
end
|
||||
)
|
||||
|
||||
|
@ -2277,7 +2277,7 @@ local function zone_forest_1(x, y, data, void_or_lab, adjusted_zones)
|
||||
--Water Ponds
|
||||
if noise_cave_ponds > 0.670 then
|
||||
if noise_cave_ponds > 0.750 then
|
||||
tiles[#tiles + 1] = { name = 'landfill', position = p }
|
||||
tiles[#tiles + 1] = { name = 'nuclear-ground', position = p }
|
||||
if random(1, 4) == 1 then
|
||||
markets[#markets + 1] = p
|
||||
end
|
||||
@ -2306,7 +2306,7 @@ local function zone_forest_1(x, y, data, void_or_lab, adjusted_zones)
|
||||
end
|
||||
|
||||
if noise_cave_ponds > 0.74 then
|
||||
tiles[#tiles + 1] = { name = 'landfill', position = p }
|
||||
tiles[#tiles + 1] = { name = 'nuclear-ground', position = p }
|
||||
if cave_rivers < -0.502 then
|
||||
tiles[#tiles + 1] = { name = 'refined-hazard-concrete-right', position = p }
|
||||
end
|
||||
@ -2367,7 +2367,7 @@ local function zone_forest_1(x, y, data, void_or_lab, adjusted_zones)
|
||||
if random(1, 2048) == 1 then
|
||||
treasure[#treasure + 1] = { position = p, chest = 'iron-chest' }
|
||||
end
|
||||
tiles[#tiles + 1] = { name = 'landfill', position = p }
|
||||
tiles[#tiles + 1] = { name = 'nuclear-ground', position = p }
|
||||
local noise_forest_location = Public.get_noise('forest_location', p, seed)
|
||||
if noise_forest_location > 0.095 then
|
||||
if random(1, 256) == 1 then
|
||||
|
@ -146,15 +146,16 @@ local function set_collapse_tiles(surface)
|
||||
game.forces.player.chart(surface, this.area)
|
||||
this.tiles = surface.find_tiles_filtered({ area = this.area, name = 'out-of-map', invert = true })
|
||||
|
||||
if not this.tiles then
|
||||
if not this.tiles or not next(this.tiles) then
|
||||
return
|
||||
end
|
||||
this.size_of_tiles = #this.tiles
|
||||
if this.size_of_tiles > 0 then
|
||||
if this.size_of_tiles and this.size_of_tiles > 0 then
|
||||
table_shuffle_table(this.tiles)
|
||||
end
|
||||
this.position = { x = this.position.x + this.vector[1], y = this.position.y + this.vector[2] }
|
||||
local v = this.vector
|
||||
if not v then return end
|
||||
local area = this.area
|
||||
this.area = { { area[1][1] + v[1], area[1][2] + v[2] }, { area[2][1] + v[1], area[2][2] + v[2] } }
|
||||
local chart_area = { { area[1][1] + v[1] - 4, area[1][2] + v[2] - 4 }, { area[2][1] + v[1] + 4, area[2][2] + v[2] + 4 } }
|
||||
@ -168,15 +169,17 @@ local function set_reverse_collapse_tiles(surface)
|
||||
end
|
||||
this.reverse_tiles = surface.find_tiles_filtered({ area = this.reverse_area, name = 'out-of-map', invert = true })
|
||||
|
||||
if not this.reverse_tiles then
|
||||
if not this.reverse_tiles or not next(this.reverse_tiles) then
|
||||
return
|
||||
end
|
||||
|
||||
this.reverse_size_of_tiles = #this.reverse_tiles
|
||||
if this.reverse_size_of_tiles > 0 then
|
||||
if this.reverse_size_of_tiles and this.reverse_size_of_tiles > 0 then
|
||||
table_shuffle_table(this.reverse_tiles)
|
||||
end
|
||||
this.reverse_position = { x = this.reverse_position.x + this.reverse_vector[1], y = this.reverse_position.y + this.reverse_vector[2] }
|
||||
local v = this.reverse_vector
|
||||
if not v then return end
|
||||
local area = this.reverse_area
|
||||
this.reverse_area = { { area[1][1] + v[1], area[1][2] + v[2] }, { area[2][1] + v[1], area[2][2] + v[2] } }
|
||||
local chart_area = { { area[1][1] + v[1] - 4, area[1][2] + v[2] - 10 }, { area[2][1] + v[1] + 4, area[2][2] + v[2] + 10 } }
|
||||
|
@ -225,7 +225,7 @@ local function damage_area(cell)
|
||||
this.explosives.tiles[key] = nil
|
||||
if math_abs(tile.position.y) < surface.map_gen_settings.height * 0.5 and math_abs(tile.position.x) < surface.map_gen_settings.width * 0.5 then
|
||||
if not check_y_pos(tile.position) then
|
||||
surface.set_tiles({ { name = 'landfill', position = tile.position } }, true)
|
||||
surface.set_tiles({ { name = 'nuclear-ground', position = tile.position } }, true)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user