mirror of
https://github.com/veden/Rampant.git
synced 2025-03-29 21:46:54 +02:00
FACTO-20: Added expanded collision box on enemy structure placement
This commit is contained in:
parent
a8e57be54c
commit
176ea6c6ec
@ -5,6 +5,7 @@ Date: 29. 12. 2021
|
|||||||
- Added integration with schallAlienLoot (Thank you garrotte for the code snippet)
|
- Added integration with schallAlienLoot (Thank you garrotte for the code snippet)
|
||||||
Tweaks:
|
Tweaks:
|
||||||
- Set maximum value on enemy seed to 4294967295
|
- Set maximum value on enemy seed to 4294967295
|
||||||
|
- Slightly increased spacing between enemy structures
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Fixed chunkPack nil in processNests (Thanks Skallywaggz for the report)
|
- Fixed chunkPack nil in processNests (Thanks Skallywaggz for the report)
|
||||||
- Fixed random generator seed overflow (Thanks NeveHanter for the report)
|
- Fixed random generator seed overflow (Thanks NeveHanter for the report)
|
||||||
|
@ -610,7 +610,7 @@ function baseUtils.rebuildNativeTables(universe, rg)
|
|||||||
for v=1,universe.ENEMY_VARIATIONS do
|
for v=1,universe.ENEMY_VARIATIONS do
|
||||||
local entry = faction.type .. "-" .. building.name .. "-v" .. v .. "-t" .. t .. "-rampant"
|
local entry = faction.type .. "-" .. building.name .. "-v" .. v .. "-t" .. t .. "-rampant"
|
||||||
enemyAlignmentLookup[entry] = faction.type
|
enemyAlignmentLookup[entry] = faction.type
|
||||||
local proxyEntity = "entity-proxy-" .. building.type .. "-t" .. t .. "-rampant"
|
local proxyEntity = "entity-proxy-" .. building.type .. "-t" .. (t+2) .. "-rampant"
|
||||||
buildingSpaceLookup[entry] = proxyEntity
|
buildingSpaceLookup[entry] = proxyEntity
|
||||||
costLookup[entry] = HIVE_BUILDINGS_COST[building.type]
|
costLookup[entry] = HIVE_BUILDINGS_COST[building.type]
|
||||||
buildingHiveTypeLookup[entry] = building.type
|
buildingHiveTypeLookup[entry] = building.type
|
||||||
|
@ -163,7 +163,20 @@ function chunkProcessor.processPendingUpgrades(universe, tick)
|
|||||||
local query = universe.ppuUpgradeEntityQuery
|
local query = universe.ppuUpgradeEntityQuery
|
||||||
local position = entityData.position or entity.position
|
local position = entityData.position or entity.position
|
||||||
query.name = entityData.name
|
query.name = entityData.name
|
||||||
local foundPosition = surface.find_non_colliding_position(entityData.name, position, CHUNK_SIZE, 1, true)
|
local foundPosition
|
||||||
|
if universe.NEW_ENEMIES then
|
||||||
|
foundPosition = surface.find_non_colliding_position(universe.buildingSpaceLookup[entityData.name],
|
||||||
|
position,
|
||||||
|
CHUNK_SIZE,
|
||||||
|
1,
|
||||||
|
true)
|
||||||
|
else
|
||||||
|
foundPosition = surface.find_non_colliding_position(entityData.name,
|
||||||
|
position,
|
||||||
|
CHUNK_SIZE,
|
||||||
|
1,
|
||||||
|
true)
|
||||||
|
end
|
||||||
setPositionInQuery(query, foundPosition or position)
|
setPositionInQuery(query, foundPosition or position)
|
||||||
unregisterEnemyBaseStructure(entityData.map, entity, nil, true)
|
unregisterEnemyBaseStructure(entityData.map, entity, nil, true)
|
||||||
entity.destroy()
|
entity.destroy()
|
||||||
|
@ -45,7 +45,8 @@ local scales = {
|
|||||||
[8] = 1.8,
|
[8] = 1.8,
|
||||||
[9] = 2.0,
|
[9] = 2.0,
|
||||||
[10] = 2.1,
|
[10] = 2.1,
|
||||||
[11] = 2.2
|
[11] = 2.2,
|
||||||
|
[12] = 2.3
|
||||||
}
|
}
|
||||||
|
|
||||||
local subTypes = constants.HIVE_BUILDINGS_TYPES
|
local subTypes = constants.HIVE_BUILDINGS_TYPES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user