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

fix for empty interval

This commit is contained in:
Aaron Veden 2018-01-26 18:51:48 -08:00
parent 5849a165bc
commit 4ebff567e1
5 changed files with 13 additions and 7 deletions

View File

@ -184,10 +184,10 @@ function upgrade.attempt(natives)
game.surfaces[1].print("Rampant - Version 0.16.6")
global.version = constants.VERSION_41
end
if (global.version < constants.VERSION_42) then
if (global.version < constants.VERSION_43) then
game.surfaces[1].print("Rampant - Version 0.16.7")
global.version = constants.VERSION_42
game.surfaces[1].print("Rampant - Version 0.16.8")
global.version = constants.VERSION_43
end
return starting ~= global.version, natives

View File

@ -1,3 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.16.8
Date: 1. 26. 2018
Bugfixes:
- Added a check for 0 elements on_tick empty interval (https://forums.factorio.com/viewtopic.php?f=94&t=31445&start=220#p338531)
---------------------------------------------------------------------------------------------------
Version: 0.16.7
Date: 1. 26. 2018

View File

@ -236,7 +236,7 @@ end
function baseUtils.upgradeBase(base)
local paths = BASE_ALIGNMENT_PATHS[base.alignment]
if paths then
if paths and (#paths > 0) then
base.alignment = paths[mRandom(#paths)]
return true
end

View File

@ -18,7 +18,7 @@ constants.VERSION_28 = 28
constants.VERSION_33 = 33
constants.VERSION_38 = 38
constants.VERSION_41 = 41
constants.VERSION_42 = 42
constants.VERSION_43 = 43
-- misc