This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,25 @@
function update(store)
store.celestialLog.unlockedSectors = {}
for key, value in pairs(store.celestialLog.sectorUnlocks) do
if (value) then
table.insert(store.celestialLog.unlockedSectors, key)
end
end
if store.celestialLog.currentWorld then
store.celestialLog.currentWorld.sector = store.celestialLog.currentWorld.parentSystem.sector
store.celestialLog.currentWorld.location = store.celestialLog.currentWorld.parentSystem.location
store.celestialLog.currentWorld.planet = store.celestialLog.currentWorld.planetaryOrbitNumber
store.celestialLog.currentWorld.satellite = store.celestialLog.currentWorld.satelliteOrbitNumber
end
if store.celestialLog.homeWorld then
store.celestialLog.homeWorld.sector = store.celestialLog.homeWorld.parentSystem.sector
store.celestialLog.homeWorld.location = store.celestialLog.homeWorld.parentSystem.location
store.celestialLog.homeWorld.planet = store.celestialLog.homeWorld.planetaryOrbitNumber
store.celestialLog.homeWorld.satellite = store.celestialLog.homeWorld.satelliteOrbitNumber
end
return store
end

View file

@ -0,0 +1,11 @@
function update(store)
if store.data then
if store.data.recoil then
if not store.data.recoilTime then
store.data.recoilTime = store.data.recoil
end
vremove(store.data, "recoil")
end
end
return store
end

View file

@ -0,0 +1,11 @@
function update(store)
local npcConfig = root.npcConfig(store.npcVariant.typeName)
-- 20140126 Didn't store leveled baseMaxHealth and baseMaxEnergy
store.npcVariant.baseMaxEnergy = npcConfig.statusParameters.baseMaxEnergy * root.evalFunction("npcLevelHealthMultiplier", store.npcVariant.level)
store.npcVariant.baseMaxHealth = npcConfig.statusParameters.baseMaxHealth * root.evalFunction("npcLevelEnergyMultiplier", store.npcVariant.level)
store.status.healthSchema.max = store.npcVariant.baseMaxHealth
store.status.energySchema.max = store.npcVariant.baseMaxEnergy
return store
end

View file

@ -0,0 +1,7 @@
function update(store)
if store.type == "loungeable" then
store.interactive = true
end
return store
end

View file

@ -0,0 +1,35 @@
function update(store)
store.worldTemplate = store.planet
store.worldTemplate.templateData = store.planet.config
local coord = store.planet.config.skyParameters.coordinate
if coord then
-- If our world has a valid coordinate, completely rebuild the
-- celestialParameters field from the database
store.worldTemplate.celestialParameters = celestial.parameters({sector=coord.parentSystem.sector, location=coord.parentSystem.location, planet=coord.planetaryOrbitNumber, satellite=coord.satelliteOrbitNumber})
-- Then, use this data to fill in missing fields in templateData (as it stores a world local copy anyway)
local scanData = store.worldTemplate.celestialParameters.scanData
store.worldTemplate.templateData.primaryBiomeName = scanData.primaryBiomeName
store.worldTemplate.templateData.primaryBiomeHueShift = scanData.primaryBiomeHueShift
store.worldTemplate.templateData.primarySurfaceLiquid = scanData.primarySurfaceLiquid
store.worldTemplate.templateData.skyColoring = scanData.skyColoring
store.worldTemplate.templateData.isBarren = scanData.isBarren
store.worldTemplate.templateData.dayLength = scanData.dayLength
else
-- Otherwise, probably a ship world so it barely matters anyway
store.worldTemplate.templateData.primaryBiomeName = ""
store.worldTemplate.templateData.primaryBiomeHueShift = 0
store.worldTemplate.templateData.primarySurfaceLiquid = 0
store.worldTemplate.templateData.skyColoring = store.planet.config.skyParameters.skyColoring
store.worldTemplate.templateData.isBarren = store.planet.config.skyParameters.skyType == "barren"
store.worldTemplate.templateData.dayLength = store.planet.config.skyParameters.dayLength
end
return store
end

View file

@ -0,0 +1,13 @@
function update(store)
if store.worldTemplate.celestialParameters then
-- Old initialization bugs can cause garbage planet / satellite numbers
if store.worldTemplate.celestialParameters.coordinate.planet > 100 then
store.worldTemplate.celestialParameters.coordinate.planet = 0
end
if store.worldTemplate.celestialParameters.coordinate.satellite > 100 then
store.worldTemplate.celestialParameters.coordinate.satellite = 0
end
end
return store
end

View file

@ -0,0 +1,14 @@
function update(store)
if store.worldTemplate.celestialParameters then
if store.worldTemplate.celestialParameters.scanData then
-- added detached Biome information to world metadata
-- if it's not there... just fake it
if not store.worldTemplate.celestialParameters.scanData.detachedBiome then
store.worldTemplate.celestialParameters.scanData.detachedBiome = ""
-- close enough!
end
end
end
return store
end

View file

@ -0,0 +1,14 @@
function update(store)
if store.worldTemplate.celestialParameters then
if store.worldTemplate.celestialParameters.scanData then
-- added weather pool information to world metadata
-- if it's not there... just fake it
if not store.worldTemplate.celestialParameters.scanData.weatherPool then
store.worldTemplate.celestialParameters.scanData.weatherPool = vlist()
-- close enough!
end
end
end
return store
end