Skip to content

Commit 6529109

Browse files
committed
Update for 2.15.5-beta.dev.20260526.1
1 parent bbff0f3 commit 6529109

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"watch": "npx tsc --build --watch --pretty --preserveWatchOutput"
1111
},
1212
"devDependencies": {
13-
"@wayward/types": "^2.15.5-beta.dev.20260525.1",
13+
"@wayward/types": "^2.15.5-beta.dev.20260526.1",
1414
"typescript": "^6.0.0-beta"
1515
}
1616
}

‎src/action/SetDecay.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Action } from "@wayward/game/game/entity/action/Action";
44
import type { IActionHandlerApi } from "@wayward/game/game/entity/action/IAction";
55
import { ActionArgument, ActionUsability } from "@wayward/game/game/entity/action/IAction";
66
import type Item from "@wayward/game/game/item/Item";
7+
import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
78
import { defaultCanUseHandler } from "../Actions";
89
import Mod from "@wayward/game/mod/Mod";
910
import type DebugTools from "../DebugTools";
@@ -31,8 +32,10 @@ export function setDecay(action: IActionHandlerApi<Human>, decay: number, ...ite
3132
owner ??= item.getCurrentOwner();
3233
if (item.canDecay()) {
3334
item.setDecayTime(Number.isInteger(decay) || decay > 1 ? decay : Math.ceil((item.startingDecay ?? 1) * decay));
34-
if (!item.startingDecay || item.getDecayTime()! > item.startingDecay) {
35-
item.startingDecay = item.getDecayTime();
35+
const magicalBonus = Math.ceil((item.magic?.get(MagicalPropertyType.Hoarding_MaxDecay) ?? 0) * item.island.getGameOptions().items.decayMultiplier);
36+
const startingDecayWithoutBonus = (item.getDecayTime() ?? 0) - magicalBonus;
37+
if (!item.startingDecay || startingDecayWithoutBonus > item.startingDecay) {
38+
item.startingDecay = startingDecayWithoutBonus;
3639
}
3740
}
3841
}

‎src/ui/component/Container.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export class ContainerItemDetails extends Details {
374374
new RangeRow()
375375
.setLabel(label => label.setText(translation(DebugToolsTranslation.LabelDecay)))
376376
.editRange(range => range
377-
.setMax(this.item.startingDecay ? unscale(this.item.startingDecay) : 60)
377+
.setMax(unscale(this.item.getDecayAtStartWithMagical() || 60))
378378
.setStep(0.01)
379379
.setRefreshMethod(() => unscale(this.item.getDecayTime() ?? 0)))
380380
.setDisplayValue(value => [{ content: `${scale(value)}` }])

0 commit comments

Comments
 (0)