1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-01 13:08:05 +02:00

chrono pollution fix, biter command disabling nests

This commit is contained in:
hanakocz 2020-04-30 15:36:56 +02:00
parent 632dde2062
commit 3003f99aa2
3 changed files with 15 additions and 12 deletions

View File

@ -232,7 +232,7 @@ function Public.chronojump(choice)
objective.lab_cells = {}
objective.active_surface_index = game.create_surface("chronosphere" .. objective.chronojumps, Chrono.get_map_gen_settings()).index
local surface = game.surfaces[objective.active_surface_index]
log("seed of new surface: " .. surface.map_gen_settings.seed)
--log("seed of new surface: " .. surface.map_gen_settings.seed)
local planet = objective.planet
if choice then
Planets.determine_planet(choice)
@ -247,7 +247,7 @@ function Public.chronojump(choice)
game.delete_surface(oldsurface)
Chrono.post_jump()
Event_functions.flamer_nerfs()
surface.pollute(objective.locomotive.position, 150 * (4 / (objective.upgrades[2] / 2 + 1)) * (1 + objective.chronojumps) * global.difficulty_vote_value)
surface.pollute(objective.locomotive.position, 150 * (3 / (objective.upgrades[2] / 3 + 1)) * (1 + objective.chronojumps) * global.difficulty_vote_value)
::continue::
end
@ -312,7 +312,7 @@ local function tick()
game.surfaces[objective.active_surface_index].pollute(
pos,
(0.5 * objective.chronojumps) *
(4 / (objective.upgrades[2] / 2 + 1)) *
(3 / (objective.upgrades[2] / 3 + 1)) *
global.difficulty_vote_value)
end
end

View File

@ -47,7 +47,7 @@ function Public_tick.charge_chronosphere()
if energy > 3010000 and objective.chronotimer < objective.chrononeeds - 182 and objective.chronotimer > 130 then
acus[i].energy = acus[i].energy - 3000000
objective.chronotimer = objective.chronotimer + 1
game.surfaces[objective.active_surface_index].pollute(objective.locomotive.position, (10 + 2 * objective.chronojumps) * (4 / (objective.upgrades[2] / 2 + 1)) * global.difficulty_vote_value)
game.surfaces[objective.active_surface_index].pollute(objective.locomotive.position, (10 + 2 * objective.chronojumps) * (3 / (objective.upgrades[2] / 3 + 1)) * global.difficulty_vote_value)
end
end
end

View File

@ -7,6 +7,7 @@ global.biter_command.enabled = true
global.biter_command.whitelist = {}
global.biter_command.admin_mode = true --if only admins can see and use the panel
global.biter_command.teleporting = false --if teleporting is allowed for non-admins
global.biter_command.buildings = true ---if player can trigger building nests and worms
local worm_raffle = {
"small-worm-turret", "small-worm-turret", "medium-worm-turret", "small-worm-turret",
@ -45,6 +46,7 @@ local function get_evo(force)
end
local function place_nest_near_unit_group(group)
if not global.biter_command.buildings then return false end
if not group.members then return false end
if #group.members < 5 then return false end
local units = group.members
@ -66,6 +68,7 @@ local function place_nest_near_unit_group(group)
end
local function build_worm(group)
if not global.biter_command.buildings then return false end
if not group.members then return false end
if #group.members < 5 then return false end
local units = group.members
@ -227,7 +230,7 @@ local function settle(group, source_player)
flying_text(nil, 1, group.position, source_player)
else
flying_text(nil, 2, group.position, source_player)
source_player.print("Settling new nest failed. Check if group has enough members(5+) and there is empty space.")
source_player.print("Settling new nest failed. Check if group has enough members(5+) and there is empty space (or nests are disabled).")
end
end
@ -237,7 +240,7 @@ local function siege(group, source_player)
flying_text(nil, 1, group.position, source_player)
else
flying_text(nil, 2, group.position, source_player)
source_player.print("Making worm failed. Check if group has enough members(5+) and there is empty space.")
source_player.print("Making worm failed. Check if group has enough members(5+) and there is empty space (or worms are disabled).")
end
end