Skip to content

Commit

Permalink
indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kherae committed Sep 4, 2024
1 parent 7e509d5 commit 87e3ce2
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions bees/apiary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ specialFrameFunctions = {
end
end,
copperFrame = function(data)
self.randAmount = math.random(1,2)
self.randAmount = math.random(1,2)
if isHiveQueenActive(true) and areDronesActive() then
if not ironFrameTimer then
ironFrameTimer = data[1]
Expand All @@ -105,7 +105,7 @@ specialFrameFunctions = {
end
end,
ironFrame = function(data)
self.randAmount = math.random(1,2)
self.randAmount = math.random(1,2)
if isHiveQueenActive(true) and areDronesActive() then
if not ironFrameTimer then
ironFrameTimer = data[1]
Expand All @@ -118,7 +118,7 @@ specialFrameFunctions = {
end
end,
tungstenFrame = function(data)
self.randAmount = math.random(1,2)
self.randAmount = math.random(1,2)
if isHiveQueenActive(true) and areDronesActive() then
if not ironFrameTimer then
ironFrameTimer = data[1]
Expand All @@ -131,7 +131,7 @@ specialFrameFunctions = {
end
end,
titaniumFrame = function(data)
self.randAmount = math.random(1,2)
self.randAmount = math.random(1,2)
if isHiveQueenActive(true) and areDronesActive() then
if not ironFrameTimer then
ironFrameTimer = data[1]
Expand All @@ -144,7 +144,7 @@ specialFrameFunctions = {
end
end,
durasteelFrame = function(data)
self.randAmount = math.random(1,2)
self.randAmount = math.random(1,2)
if isHiveQueenActive(true) and areDronesActive() then
if not ironFrameTimer then
ironFrameTimer = data[1]
Expand Down Expand Up @@ -172,7 +172,7 @@ function init()
biome = world.type()

-- Disabled on ship and player space stations
if biome == "unknown" then --or biome == "playerstation" then
if biome == "unknown" then --or biome == "playerstation" then
script.setUpdateDelta(-1)
return
end
Expand Down Expand Up @@ -527,7 +527,7 @@ function getFrames(dt)
frameBonuses[stat] = true
end
elseif cfg.config[stat] then
-- the total frame count influences the overall stats. Take the current frame bonus and add the amount in the stack to the provided bonus
-- the total frame count influences the overall stats. Take the current frame bonus and add the amount in the stack to the provided bonus
frameBonuses[stat] = (frameBonuses[stat] + cfg.config[stat]) * (1 + ((contents[frameSlot].count/100) * 0.5 )) --add total frames to total
end
end
Expand Down Expand Up @@ -655,7 +655,7 @@ function queenProduction()
--youngQueenProgress = youngQueenProgress + productionQueen * (math.random(beeData.productionRandomModifierRange[1],beeData.productionRandomModifierRange[2]) * 0.01) * 0.25
youngQueenProgress = youngQueenProgress + productionQueen * (math.random(beeData.productionRandomModifierRange[1],beeData.productionRandomModifierRange[2]) * 0.01) * 0.5
--sb.logInfo(youngQueenProgress)
droneProgress = droneProgress + productionDrone * (math.random(beeData.productionRandomModifierRange[1],beeData.productionRandomModifierRange[2]) * 0.01) * 0.25
droneProgress = droneProgress + productionDrone * (math.random(beeData.productionRandomModifierRange[1],beeData.productionRandomModifierRange[2]) * 0.01) * 0.25

if youngQueenProgress >= beeData.youngQueenProductionRequirement then
local produced = math.floor(youngQueenProgress / beeData.youngQueenProductionRequirement)
Expand Down Expand Up @@ -736,11 +736,11 @@ end
-- Can be called from other places (Like the frame scripts)
function ageQueen(amount)
--if changing this, make sure it matches in beeBuilder.lua
local fullLifespan = genelib.statFromGenomeToValue(queen.parameters.genome, "queenLifespan") * ((frameBonuses.queenLifespan or 0 / 8) + 1)
--sb.logInfo(fullLifespan)
local fullLifespan = genelib.statFromGenomeToValue(queen.parameters.genome, "queenLifespan") * ((frameBonuses.queenLifespan or 0 / 8) + 1)
--sb.logInfo(fullLifespan)

if not queen.parameters.lifespan or queen.parameters.lifespan < 0 then
queen.parameters.lifespan = fullLifespan
queen.parameters.lifespan = fullLifespan
end


Expand Down Expand Up @@ -993,21 +993,21 @@ function miteGrowth()
--sb.logInfo("%s",sDBG)

--display an infested hive image over the normal hive appearance if its infested enough
if storage.mites > 20 then --if mites pass 20, display a really rotten looking apiary
animator.setAnimationState("base", "infested2", true)
animator.setAnimationState("warning", "on", true)
elseif storage.mites > 6 then --if mites pass 6, display a rotten looking apiary
animator.setAnimationState("base", "infested", true)
animator.setAnimationState("warning", "on", true)
if storage.mites > 20 then --if mites pass 20, display a really rotten looking apiary
animator.setAnimationState("base", "infested2", true)
animator.setAnimationState("warning", "on", true)
elseif storage.mites > 6 then --if mites pass 6, display a rotten looking apiary
animator.setAnimationState("base", "infested", true)
animator.setAnimationState("warning", "on", true)
elseif storage.mites > 0.98 then
animator.setAnimationState("warning", "on", true) --show symbol for mite infestation, but dont change apiary look
animator.setAnimationState("warning", "on", true) --show symbol for mite infestation, but dont change apiary look
else
animator.setAnimationState("base", "default", true)
animator.setAnimationState("warning", "off", true)
animator.setAnimationState("base", "default", true)
animator.setAnimationState("warning", "off", true)
end
-- elseif fartstick <= beeData.mites.infestationChance then
elseif math.random() <= beeData.mites.infestationChance then
storage.mites = beeData.mites.growthStatic --storage.mites = storage.mites + (storage.mites*mult) - (hiveMiteResistance)
storage.mites = beeData.mites.growthStatic --storage.mites = storage.mites + (storage.mites*mult) - (hiveMiteResistance)
end
end

Expand Down Expand Up @@ -1120,27 +1120,27 @@ function getBiomeFavor(name)
--frame immunity to biomes
if frameBonuses.radResistance then
if (biome == "alien") or (biome == "jungle") or (biome == "barren") or (biome == "barren2") or (biome == "barren3") or (biome == "chromatic") or (biome == "irradiated") or (biome == "metallicmoon") then
if (favor < 2) then
favor = 2
end
if (favor < 2) then
favor = 2
end
end
elseif frameBonuses.coldResistance then
if (biome == "snow") or (biome == "arctic") or (biome == "snowdark") or (biome == "arcticdark") or (biome == "tundra") or (biome == "tundradark") or (biome == "crystalmoon") or (biome == "frozenvolcanic") or (biome == "icemoon") or (biome == "icewaste") or (biome == "icewastedark") or (biome == "nitrogensea") then
if (favor < 2) then
favor = 2
end
if (favor < 2) then
favor = 2
end
end
elseif frameBonuses.heatResistance then
if (biome == "desert") or (biome == "volcanic") or (biome == "volcanicdark") or (biome == "magma") or (biome == "magmadark") or (biome == "desertwastes") or (biome == "desertwastesdark") or (biome == "infernus") or (biome == "infernusdark") or (biome == "frozenvolcanic") then
if (favor < 2) then
favor = 2
end
if (favor < 2) then
favor = 2
end
end
elseif frameBonuses.physicalResistance then
if (biome == "toxic") or (biome == "moon") or (biome == "scorched") or (biome == "scorchedcity") or (biome == "volcanic") or (biome == "volcanicdark") or (biome == "savannah") or (biome == "jungle") or (biome == "thickjungle") or (biome == "sulphuric") or (biome == "sulphuricdark") or (biome == "tidewater") then
if (favor < 2) then
favor = 2
end
if (biome == "toxic") or (biome == "moon") or (biome == "scorched") or (biome == "scorchedcity") or (biome == "volcanic") or (biome == "volcanicdark") or (biome == "savannah") or (biome == "jungle") or (biome == "thickjungle") or (biome == "sulphuric") or (biome == "sulphuricdark") or (biome == "tidewater") then
if (favor < 2) then
favor = 2
end
end
end

Expand Down

0 comments on commit 87e3ce2

Please sign in to comment.