Skip to content

Commit 536d8e9

Browse files
committed
feat: register item_on_world_item for firemaking
1 parent abc8351 commit 536d8e9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/engine/task/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,3 @@ The following areas will make interesting use of the task system and would serve
136136

137137
- Health regen
138138
- NPC movement
139-
- Firemaking

src/plugins/skills/firemaking/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { itemOnItemActionHandler } from '@engine/action';
1+
import { itemOnItemActionHandler, ItemOnItemActionHook, ItemOnWorldItemActionHook } from '@engine/action';
22
import { itemIds } from '@engine/world/config';
33
import { FIREMAKING_LOGS } from './data';
44
import { canChain } from './chance';
@@ -44,6 +44,13 @@ export default {
4444
type: 'item_on_item',
4545
items: FIREMAKING_LOGS.map(log => ({ item1: itemIds.tinderbox, item2: log.logItem.gameId })),
4646
handler: action
47-
}
47+
} as ItemOnItemActionHook,
48+
{
49+
type: 'item_on_world_item',
50+
items: FIREMAKING_LOGS.map(log => ({ item: itemIds.tinderbox, worldItem: log.logItem.gameId })),
51+
handler: ({ player, usedWithItem }) => {
52+
runFiremakingTask(player, usedWithItem);
53+
}
54+
} as ItemOnWorldItemActionHook
4855
]
4956
};

0 commit comments

Comments
 (0)