mirror of
https://github.com/veden/Rampant.git
synced 2024-12-26 20:54:12 +02:00
FACTO-216: Fixed alignment table being nil when removing factions
This commit is contained in:
parent
6065e35f1c
commit
d6ba25a32b
@ -10,6 +10,7 @@ Version: 3.2.0
|
||||
- Removed layer-13 from projectiles
|
||||
- script_raised_built now looks for enemy faction and registers as needed
|
||||
- Fixed worm range scaler setting not adjusting prepareRange so worms could shoot without being out of the ground. (Thanks Garrotte)
|
||||
- When a faction is removed during play alignment table will default to the neutral faction to prevent alignment table being nil
|
||||
Optimizations:
|
||||
- Moved most constants out of global
|
||||
- Removed new enemy variations setting
|
||||
|
@ -41,6 +41,8 @@ local ENEMY_ALIGNMENT_LOOKUP = constants.ENEMY_ALIGNMENT_LOOKUP
|
||||
local EVOLUTION_TABLE_ALIGNMENT = constants.EVOLUTION_TABLE_ALIGNMENT
|
||||
local BUILDING_EVOLVE_LOOKUP = constants.BUILDING_EVOLVE_LOOKUP
|
||||
|
||||
local BASE_ALIGNMENT_NEUTRAL = constants.BASE_ALIGNMENT_NEUTRAL
|
||||
|
||||
local MINIMUM_BUILDING_COST = constants.MINIMUM_BUILDING_COST
|
||||
local FACTION_MUTATION_MAPPING = constants.FACTION_MUTATION_MAPPING
|
||||
|
||||
@ -128,9 +130,12 @@ local function initialEntityUpgrade(baseAlignment, tier, maxTier, map, useHiveTy
|
||||
end
|
||||
|
||||
local alignmentTable = BUILDING_EVOLVE_LOOKUP[baseAlignment]
|
||||
if not alignmentTable then
|
||||
alignmentTable = BUILDING_EVOLVE_LOOKUP[BASE_ALIGNMENT_NEUTRAL]
|
||||
end
|
||||
local upgrades = alignmentTable[useTier]
|
||||
|
||||
if upgrades then
|
||||
if alignmentTable and upgrades then
|
||||
if useHiveType then
|
||||
for ui=1,#upgrades do
|
||||
local upgrade = upgrades[ui]
|
||||
|
Loading…
Reference in New Issue
Block a user