# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2024 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: BaseAction
  id: ActionCreateBlobFactory
  name: Place Factory Blob (80)
  description: Turns selected normal blob into a factory blob, which will produce up to 3 spores and a blobbernaut if placed next to a core or a node.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobFactory
    itemIconStyle: BigAction
    useDelay: 0.5
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobTransformTileActionEvent
      transformFrom: Normal
      tileType: Factory

- type: entity
  parent: BaseAction
  id: ActionCreateBlobResource
  name: Place Resource Blob (60)
  description: Turns selected normal blob into a resource blob which will generates resources if placed next to a core or a node.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobResource
    itemIconStyle: BigAction
    useDelay: 0.5
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobTransformTileActionEvent
      transformFrom: Normal
      tileType: Resource

- type: entity
  parent: BaseAction
  id: ActionCreateBlobNode
  name: Place Node Blob (50)
  description: Turns selected normal blob into a node blob. A node blob will activate effects of factory and resource blobs, heal other blobs and slowly expand, destroying walls and creating normal blobs.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobNode
    itemIconStyle: BigAction
    useDelay: 0.5
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobTransformTileActionEvent
      transformFrom: Normal
      tileType: Node

- type: entity
  parent: BaseAction
  id: ActionCreateBlobbernaut
  name: Produce a Blobbernaut (60)
  description: Creates a blobbernaut on the selected factory. Each factory can only do this once. The blobbernaut will take damage outside of blob tiles and heal when close to nodes.
  components:
  - type: Action
    itemIconStyle: BigAction
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobBlobbernaut
    useDelay: 0.5
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobCreateBlobbernautActionEvent    

- type: entity
  parent: BaseAction
  id: ActionSplitBlobCore
  name: Split Core (400)
  description: You can only do this once. Turns selected node into an independent core that will act on its own.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobSplit
    itemIconStyle: BigAction
    useDelay: 0.5
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobSplitCoreActionEvent

- type: entity
  parent: BaseAction
  id: ActionSwapBlobCore
  name: Relocate core (200)
  description: Swaps the location of your core and the selected node.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobSwap
    itemIconStyle: BigAction
    useDelay: 0.5
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobSwapCoreActionEvent

- type: entity
  parent: BaseAction
  id: ActionTeleportBlobToCore
  name: Jump to Core
  description: Teleports you to your Blob Core.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobToCore
    itemIconStyle: BigAction
    useDelay: 0.5
  - type: InstantAction
    event: !type:BlobToCoreActionEvent

- type: entity
  parent: BaseAction
  id: ActionSwapBlobChem
  name: Swap chemicals (70)
  description: Lets you swap your current chemical.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobChemSwap
    useDelay: 0.5
  - type: InstantAction
    event: !type:BlobSwapChemActionEvent

- type: entity
  parent: BaseAction
  id: ActionTransformToBlob
  name: Transform into a blob
  description: Instantly destoys your body and creates a blob core. Make sure to stand on a floor tile, otherwise you will simply disappear.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobToCore
  - type: InstantAction
    event: !type:TransformToBlobActionEvent

- type: entity
  parent: BaseAction
  id: ActionDowngradeBlob
  name: Downgrade blob
  description: Turns the selected tile back into a normal blob to install other types of cages.
  components:
  - type: Action
    icon:
      sprite: _Goobstation/Blob/Actions/blob.rsi
      state: blobDowngrade
    useDelay: 0.5
    itemIconStyle: BigAction
  - type: TargetAction
    range: 200
  - type: WorldTargetAction
    event: !type:BlobTransformTileActionEvent
      transformFrom: Invalid
      tileType: Normal
