decouple ItemToggle from PowerCellDraw (#31392)

* remove ItemToggle from PowerCellDraw query

* add EntityQuery for resolves, make them all optional

* move integration to ToggleCellDraw

* add ToggleCellDraw to almost every PowerCellDraw prototype

* :trollface:

* :trollface:

* :trollface:

* let it disable on mapinit

* set update time on mapinit, make borg power logic consistent now

* :trollface:

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-08-25 12:17:03 +00:00
committed by GitHub
parent 42865ae705
commit e1df251cbc
15 changed files with 99 additions and 28 deletions

View File

@@ -160,6 +160,7 @@
lastVisibility: 0.1
- type: PowerCellDraw
drawRate: 1.8 # 200 seconds on the default cell
- type: ToggleCellDraw
# throwing star ability
- type: ItemCreator
action: ActionCreateThrowingStar

View File

@@ -116,6 +116,7 @@
price: 500
- type: PowerCellDraw
drawRate: 4
- type: ToggleCellDraw
- type: ItemSlots
slots:
cell_slot:

View File

@@ -126,6 +126,7 @@
# TODO: or just have sentient speedboots be fast idk
- type: PowerCellDraw
drawRate: 0.6
# no ToggleCellDraw since dont want to lose access when power is gone
- type: ItemSlots
slots:
cell_slot:

View File

@@ -9,3 +9,4 @@
- type: PowerCellDraw
drawRate: 0
useRate: 20
- type: ToggleCellDraw

View File

@@ -47,6 +47,7 @@
components:
- type: PowerCellDraw
drawRate: 1.2 #Calculated for 5 minutes on a small cell
- type: ToggleCellDraw
- type: ActivatableUIRequiresPowerCell
- type: entity

View File

@@ -68,6 +68,7 @@
- type: PowerCellDraw
drawRate: 1
useRate: 0
- type: ToggleCellDraw
- type: entity
id: AnomalyLocatorEmpty
@@ -101,6 +102,7 @@
- type: PowerCellDraw
drawRate: 1
useRate: 0
- type: ToggleCellDraw
- type: entity
id: AnomalyLocatorWideEmpty

View File

@@ -26,6 +26,7 @@
False: { visible: false }
- type: PowerCellDraw
drawRate: 1.5
- type: ToggleCellDraw
- type: ActivatableUI
key: enum.RadarConsoleUiKey.Key
inHandsOnly: true

View File

@@ -169,6 +169,7 @@
- type: ItemToggle
onUse: false
- type: PowerCellDraw
- type: ToggleCellDraw
- type: Sprite
sprite: Objects/Weapons/Guns/Launchers/tether_gun.rsi
layers:
@@ -216,6 +217,7 @@
- type: ItemToggle
onUse: false
- type: PowerCellDraw
- type: ToggleCellDraw
- type: Sprite
sprite: Objects/Weapons/Guns/Launchers/force_gun.rsi
layers: