1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

fixed kastorio creep spawn on failed upgrade

This commit is contained in:
Aaron Veden 2021-12-04 16:23:42 -08:00
parent 8bbcca3dc4
commit 88d5c1f65d
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 4 additions and 3 deletions

View File

@ -41,6 +41,7 @@ Date: 23. 11. 2021
- Fixed enemy structures destroyed by the enemy were not being unregistered from Rampants map
- Fixed regional bases would not be corrected distributed or cleaned up on spawners
- Fixed chunks that became impassable would not return an impassable chunk flag when pass scanned
- Fixed kastorio creep code be spawned when the building failed to upgrade
Framework:
- Fixed Rampant in-memory map visualization tool for debugging
- Added debug mod settings for showing enemy structures being upgraded in place

View File

@ -149,12 +149,12 @@ function chunkProcessor.processPendingUpgrades(map, tick)
local surface = entity.surface
unregisterEnemyBaseStructure(map, entity)
entity.destroy()
if remote.interfaces["kr-creep"] then
remote.call("kr-creep", "spawn_creep_at_position", surface, query.position)
end
local createdEntity = surface.create_entity(query)
if createdEntity and createdEntity.valid then
registerEnemyBaseStructure(map, createdEntity, tick, entityData.base)
if remote.interfaces["kr-creep"] then
remote.call("kr-creep", "spawn_creep_at_position", surface, query.position)
end
end
else
map.pendingUpgradeIterator = next(pendingUpgrades, entity)