1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-28 21:08:22 +02:00

fix for bad kamikaze roll invocation

This commit is contained in:
Aaron Veden 2018-01-24 20:25:30 -08:00
parent 7cbbd20b93
commit 50465719c3
5 changed files with 12 additions and 6 deletions

View File

@ -174,10 +174,10 @@ function upgrade.attempt(natives)
game.surfaces[1].print("Rampant - Version 0.16.3")
global.version = constants.VERSION_38
end
if (global.version < constants.VERSION_39) then
if (global.version < constants.VERSION_40) then
game.surfaces[1].print("Rampant - Version 0.16.4")
global.version = constants.VERSION_39
game.surfaces[1].print("Rampant - Version 0.16.5")
global.version = constants.VERSION_40
end
return starting ~= global.version, natives
end

View File

@ -1,3 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.16.5
Date: 1. 24. 2018
Bugfixes:
- Fix for calculatekamikazethreshold passing table instead of a number
---------------------------------------------------------------------------------------------------
Version: 0.16.4
Date: 1. 23. 2018

View File

@ -1,7 +1,7 @@
{
"name" : "Rampant",
"factorio_version" : "0.16",
"version" : "0.16.4",
"version" : "0.16.5",
"title" : "Rampant",
"author" : "Veden",
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",

View File

@ -17,7 +17,7 @@ constants.VERSION_27 = 27
constants.VERSION_28 = 28
constants.VERSION_33 = 33
constants.VERSION_38 = 38
constants.VERSION_39 = 39
constants.VERSION_40 = 40
-- misc

View File

@ -277,7 +277,7 @@ function unitGroupUtils.regroupSquads(natives, map)
end
if mergedSquads and not squad.kamikaze then
local kamikazeThreshold = unitGroupUtils.calculateKamikazeThreshold(squad, natives)
local kamikazeThreshold = unitGroupUtils.calculateKamikazeThreshold(#squad.group.members, natives)
if (mRandom() < kamikazeThreshold) then
squad.kamikaze = true
end