mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-24 17:31:47 +00:00
Show name of tool over forge when dragging resource
This commit is contained in:
parent
69c4ff9d1b
commit
4421cfe8bd
1 changed files with 27 additions and 0 deletions
|
@ -328,6 +328,33 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
||||||
: "Forge - Drag a material to me!"
|
: "Forge - Drag a material to me!"
|
||||||
: `Forge - ${tools[node.state as Resources].name} selected`
|
: `Forge - ${tools[node.state as Resources].name} selected`
|
||||||
}
|
}
|
||||||
|
: (board as GenericBoard).draggingNode.value?.type === "resource"
|
||||||
|
? {
|
||||||
|
text: tools[
|
||||||
|
(
|
||||||
|
(board as GenericBoard).draggingNode.value
|
||||||
|
?.state as unknown as ResourceState
|
||||||
|
).type
|
||||||
|
].name,
|
||||||
|
color:
|
||||||
|
Decimal.gte(
|
||||||
|
energy.value,
|
||||||
|
tools[
|
||||||
|
(
|
||||||
|
(board as GenericBoard).draggingNode.value
|
||||||
|
?.state as unknown as ResourceState
|
||||||
|
).type
|
||||||
|
].cost
|
||||||
|
) &&
|
||||||
|
!(
|
||||||
|
(
|
||||||
|
(board as GenericBoard).draggingNode.value
|
||||||
|
?.state as unknown as ResourceState
|
||||||
|
).type in toolNodes.value
|
||||||
|
)
|
||||||
|
? "var(--accent2)"
|
||||||
|
: "var(--danger)"
|
||||||
|
}
|
||||||
: null,
|
: null,
|
||||||
actionDistance: 100,
|
actionDistance: 100,
|
||||||
actions: [
|
actions: [
|
||||||
|
|
Loading…
Reference in a new issue