mirror of
https://github.com/veden/Rampant.git
synced 2025-02-07 13:31:36 +02:00
fixed neutral death and cliff processing
This commit is contained in:
parent
2f59f71371
commit
d207dba5df
@ -21,6 +21,7 @@ Date: 23. 11. 2021
|
||||
- Spawners covered by pollution are now processed regardless of current active surface
|
||||
- Optimized processing spawners covered by pollution
|
||||
- Newly generated chunks are now processed regardless of current active surface
|
||||
- Neutral death events that aren't cliffs are no longer processed
|
||||
Tweaks:
|
||||
- Increase chance to upgrade an enemy structure from 5% to 30%
|
||||
- New enemy regional bases that have two factions now do 75% on one faction and 25% on the faction for building and upgrading enemy structures
|
||||
|
14
control.lua
14
control.lua
@ -349,6 +349,13 @@ local function onDeath(event)
|
||||
if not map then
|
||||
return
|
||||
end
|
||||
if (entity.force.name == "neutral") then
|
||||
if (entity.name == "cliff") then
|
||||
entityForPassScan(map, entity)
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
local entityPosition = entity.position
|
||||
local chunk = getChunkByPosition(map, entityPosition)
|
||||
local cause = event.cause
|
||||
@ -455,8 +462,7 @@ local function onDeath(event)
|
||||
unregisterEnemyBaseStructure(map, entity, event.damage_type)
|
||||
end
|
||||
end
|
||||
|
||||
elseif (entity.force.name ~= "enemy") then
|
||||
else
|
||||
local creditNatives = false
|
||||
if (event.force ~= nil) and (event.force.name == "enemy") then
|
||||
creditNatives = true
|
||||
@ -515,10 +521,6 @@ local function onDeath(event)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif (entity.type == "resource") and (entity.force.name == "neutral") then
|
||||
if (entity.amount == 0) then
|
||||
unregisterResource(entity, map)
|
||||
end
|
||||
end
|
||||
if creditNatives and (universe.safeEntities[entityType] or universe.safeEntities[entity.name])
|
||||
then
|
||||
|
Loading…
x
Reference in New Issue
Block a user