Skip to content

Commit

Permalink
fix: select
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Oct 30, 2024
1 parent ca14356 commit 1954b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/world-edit/lib/world-edit-multi-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export abstract class WorldEditMultiTool extends WorldEditTool<ToolsDataStorage>
}

private selectToolForm(slot: ContainerSlot, player: Player, toolsData: ToolData[], back: VoidFunction) {
const select = (tool: WorldEditTool) => () => {
const select = (tool: WorldEditTool) => {
const toolData: ToolData = { name: `T#: ${tool.name}`, tpid: tool.id }
toolsData.push(toolData)
this.editOneToolForm(slot, player, toolsData, toolData, tool, back)
Expand All @@ -116,7 +116,7 @@ export abstract class WorldEditMultiTool extends WorldEditTool<ToolsDataStorage>

new ArrayForm('Тип инструмента', this.tools)
.back(back)
.button(tool => [tool.name, select.bind(undefined, tool)])
.button(tool => [tool.name, select.bind(undefined, tool)] as const)
.show(player)
}

Expand Down

0 comments on commit 1954b0f

Please sign in to comment.