Skip to content

Commit

Permalink
Merge pull request #3524 from edwardspec/fix-waterbreathing
Browse files Browse the repository at this point in the history
Make waterbreating work again
  • Loading branch information
sayterdarkwynd authored Jan 7, 2024
2 parents 14afd70 + 4b11420 commit bbcdd9b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
env:
PRDESC: ${{ github.event.pull_request.body }}
run: |
echo "$PRDESC" | grep -qv '"' || ( echo "::error:: Description of Pull Request shouldn't contain quote symbols [\"], please replace them with single quote [']."; false )
echo "$PRDESC" | grep -qvz '"' || ( echo "::error:: Description of Pull Request shouldn't contain quote symbols [\"], please replace them with single quote [']."; false )
# Check Lua files with "luacheck" tool (Lua static analyzer).
luacheck:
Expand Down
2 changes: 1 addition & 1 deletion items/active/weapons/ranged/unique/burster.activeitem
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"level" : 1,
"tooltipKind" : "gun2",
"weaponType" : "Grenade Launcher",
"itemTags" : ["weapon","ranged","grenadelauncher","bioweapon","blister", "upgradeableWeapon"],
"itemTags" : ["weapon","ranged","grenadelauncher", "upgradeableWeapon"],
"twoHanded" : false,

"animation" : "/items/active/weapons/ranged/gun.animation",
Expand Down
2 changes: 1 addition & 1 deletion recipes/armory/melee/broadsword/aetheriumcleaver.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ "item" : "aetheriumalloy", "count" : 24 },
{ "item" : "precursorfluid", "count" : 25 },
{ "item" : "densiniumbar", "count" : 24 },
{ "item" : "elderrelic3", "count" : 5 }
{ "item" : "elderrelic3", "count" : 1 }
],
"output" : { "item" : "aetheriumcleaver", "count" : 1 },
"groups" : [ "armory3", "melee2", "all" ]
Expand Down
18 changes: 9 additions & 9 deletions scripts/fr_raceEffects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ function update(dt)
self.helper:applyControlModifiers(self.helper.controlModifiers,self.helper.controlParameters)
end
self.helper:runScripts("racialscript", self, dt)
--[[--disabling
-- Breath handling
-- which, as it happens, is already handled by the vanilla script. so this applies TWICE.

-- Waterbreathing: negate the breath loss when submerged in liquid.
if entity.entityType() ~= "npc" then
local mouthPosition = vec2.add(mcontroller.position(), status.statusProperty("mouthPosition"))
if status.statPositive("breathProtection") or world.breathable(mouthPosition)
or status.statPositive("waterbreathProtection") and world.liquidAt(mouthPosition)

-- We don't need to do anything if there is "breathProtection" or location is breathable,
-- because vanilla Lua script already handles this case.
if not status.statPositive("breathProtection") and status.statPositive("waterbreathProtection")
and not world.breathable(mouthPosition) and world.liquidAt(mouthPosition)
then
status.modifyResource("breath", status.stat("breathRegenerationRate") * dt)
else
status.modifyResource("breath", -status.stat("breathDepletionRate") * dt)
end
end]]
end
tagCaching.update()
masteries.update(dt)
end
Expand All @@ -137,4 +137,4 @@ end

--function getLevelByExp(exp)
-- return math.floor((math.sqrt(3) * math.sqrt(243*(exp+1)^2-48600*(exp+1)+3680000)+27 * (exp+1)-2700)^(1/3)/30^(2/3)-(5*10^(2/3))/(3^(1/3)*(math.sqrt(3)*math.sqrt(243*(exp+1)^2-48600*(exp+1)+3680000)+27*(exp+1)-2700)^(1/3))+2)
--end
--end
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ armorBonus={
{stat = "snowslowImmunity", amount = 1},
{stat = "protoImmunity", amount = 1},
{stat = "shadowImmunity", amount = 1},
{stat = "pressureImmunity", amount = 1},
{stat = "extremepressureProtection", amount = 1},
{stat = "darknessImmunity", amount = 1},
{stat = "radiationburnImmunity", amount = 1}
}
Expand All @@ -34,4 +34,4 @@ function update(dt)
if not checkSetWorn(self.setBonusCheck) then
effect.expire()
end
end
end

0 comments on commit bbcdd9b

Please sign in to comment.