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

Merge pull request #174 from danielmartin0/master

scary bug =o_o=
This commit is contained in:
Gerkiz 2020-05-19 07:31:54 +02:00 committed by GitHub
commit e83d0a3689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -228,6 +228,7 @@ end
Public.send_near_biters_to_objective = function()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
if not objective.locomotive then return end
if not objective.locomotive_cargo[1] then return end
if not objective.locomotive_cargo[2] then return end
@ -510,6 +511,7 @@ end
Public.pre_main_attack = function()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
local surface = game.surfaces[objective.active_surface_index]
set_biter_raffle_table(surface)
end
@ -517,6 +519,7 @@ end
Public.perform_main_attack = function()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
local surface = game.surfaces[objective.active_surface_index]
create_attack_group(surface)
end
@ -524,6 +527,7 @@ end
Public.wake_up_sleepy_groups = function()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
local entity
local unit_group
for _, biter in pairs(objective.active_biters) do

View File

@ -26,7 +26,7 @@ end
local function difficulty_exp(difficulty,exponent)
return math_floor(math_pow(difficulty,exponent))
return math_pow(difficulty,exponent)
end
-- EXPONENT GUIDE
-- exponent 1 -> {0.25, 0.50, 0.75, 1.00, 1.50, 3.00, 5.00}
@ -115,7 +115,7 @@ function Public.post_jump_initial_pollution(jumps, difficulty)
end
function Public.pollution_spent_per_attack(difficulty) return 60 * difficulty_exp(difficulty, -1.4) end
function Public.pollution_spent_per_attack(difficulty) return math_ceil(60 * difficulty_exp(difficulty, -1.4)) end
function Public.defaultai_attack_pollution_consumption_modifier(difficulty) return 0.8 * difficulty_exp(difficulty, -1.4) end