- type: entity
  id: CMGuidebookActionXenoBase
  abstract: true
  components:
  - type: Sprite
    sprite: _RMC14/Actions/xeno_actions.rsi

- type: entity
  id: ActionXenoPlantWeeds
  parent: ActionXenoBase
  name: Plant Weeds (75) # TODO RMC14 proper plasma costs
  description: Plant a weed node that will spread more weeds.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: plant_weeds
    useDelay: 1
  - type: InstantAction
    event: !type:XenoPlantWeedsActionEvent
  - type: SwappableAction
    swappedEventTemplate: !type:XenoExpandWeedsActionEvent
    originalEventTemplate: !type:XenoPlantWeedsActionEvent

- type: entity
  id: ActionXenoChooseStructure
  parent: ActionXenoBase
  name: Choose Resin Structure
  description: "Choose a structure to secrete with the 'Secrete Resin' action."
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: place_resin
  - type: InstantAction
    event: !type:XenoChooseStructureActionEvent
  - type: XenoChooseConstructionAction
  - type: RMCDazeableAction

- type: entity
  parent: CMGuidebookActionXenoBase
  id: RMCGuidebookActionXenoChooseResinStructure
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      state: place_resin

- type: entity
  id: ActionXenoSecreteStructure
  parent: ActionXenoBase
  name: Secrete Resin
  description: "Builds the structure chosen with the 'Choose Resin Structure' action."
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: secrete_resin
  - type: TargetAction
    deselectOnMiss: false
    range: 0
    repeat: true
    checkCanAccess: false
  - type: WorldTargetAction
    event: !type:XenoSecreteStructureActionEvent
  - type: XenoConstructionAction
    checkStructureSelected: true
    checkWeeds: true
    canUpgrade: true
  - type: XenoHiveInstantBuildAction
  - type: RMCDazeableAction

- type: entity
  parent: CMGuidebookActionXenoBase
  id: RMCGuidebookActionXenoSecreteResin
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      state: secrete_resin

- type: entity
  id: ActionXenoCoerceResin
  parent: ActionXenoBase
  name: Coerce Resin
  description: "Builds the structure chosen with the 'Choose Resin Structure' action. You may also build within line of sight if you are on weeds."
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: secrete_resin
  - type: TargetAction
    deselectOnMiss: false
    range: 0
    repeat: true
    checkCanAccess: false
  - type: WorldTargetAction
    event: !type:XenoSecreteStructureActionEvent
  - type: XenoConstructionAction
    checkStructureSelected: true
    checkWeeds: true
    canUpgrade: false
  - type: XenoHiveInstantBuildAction
  - type: RMCDazeableAction

- type: entity
  id: ActionXenoOrderConstruction
  parent: ActionXenoBase
  name: Order Construction
  description: Starts construction of an important hive structure.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: morph_resin
  - type: InstantAction
    event: !type:XenoOrderConstructionActionEvent
  - type: RMCDazeableAction

- type: entity
  parent: CMGuidebookActionXenoBase
  id: RMCGuidebookActionXenoOrderConstruction
  name: Order Construction
  description: Starts construction of an important hive structure.
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      state: morph_resin

- type: entity
  id: ActionXenoResinHole
  parent: ActionXenoBase
  name: Plant Resin Hole (200)
  description: Places a resin hole on weeds. It can be filled with boiler gas, acid, or parasites.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: place_trap
    useDelay: 1
  - type: InstantAction
    event: !type:XenoPlaceResinHoleActionEvent
  - type: RMCDazeableAction

- type: entity
  parent: CMGuidebookActionXenoBase
  id: RMCGuidebookActionXenoPlantResinHole
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      state: place_trap

# For gardener drone
- type: entity
  id: ActionXenoFruitChoose
  parent: ActionXenoBase
  name: Change Fruit
  description: Choose a fruit to be planted with 'Plant Resin Fruit' action.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: gardener_plant_pick
  - type: InstantAction
    event: !type:XenoFruitChooseActionEvent
  - type: XenoFruitChooseAction

- type: entity
  id: ActionXenoFruitPlant
  parent: ActionXenoBase
  name: Plant Resin Fruit (100)
  description: Plant chosen resin fruit on weeds at the cost of health and plasma. Xenos can pick these fruits once they're mature, you can also pick a plant early to get rid of it. Xenos can use them in hand or eat them on the ground to gain their effects. They can also be used on other xenos to feed them. You can only have 6 fruits planted and picked at a time.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: gardener_plant
    useDelay: 5
  - type: InstantAction
    event: !type:XenoFruitPlantActionEvent

- type: entity
  id: ActionXenoPlantWeedsHardy
  parent: ActionXenoBase
  name: Plant Hardy Weeds (125) # TODO RMC14 proper plasma costs
  description: Plant a weed node that will spread hardier weeds, which grow fruit 25% faster, have slightly more health, and can be spread on some surfaces where normal weeds won't grow.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: plant_gardener_weeds
    useDelay: 120
  - type: InstantAction
    event: !type:XenoPlantWeedsActionEvent
      plasmaCost: 125
      prototype: XenoHardyWeedsSource

# For healer drone
- type: entity
  id: ActionXenoFruitPlantLesser
  parent: ActionXenoFruitPlant
  name: Plant Resin Fruit (50)
  description: Plant resin fruit on weeds at the cost of health and plasma.
  components:
  - type: InstantAction
    event: !type:XenoFruitPlantActionEvent
      plasmaCost: 50

- type: entity
  id: ActionXenoDigTunnel
  parent: ActionXenoBase
  name: Dig Tunnel (200)
  description: Dig a tunnel for speedy transportation across the hive.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: build_tunnel
    useDelay: 300
  - type: InstantAction
    event: !type:XenoDigTunnelActionEvent

- type: entity
  parent: CMGuidebookActionXenoBase
  id: RMCGuidebookActionXenoDigTunnel
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      state: build_tunnel

# For lesser drone
- type: entity
  parent: ActionXenoPlantWeeds
  id: ActionLesserDronePlantWeeds
  components:
  - type: InstantAction
    event: !type:XenoPlantWeedsActionEvent
      limitDistance: true

- type: entity
  parent: CMGuidebookActionXenoBase
  id: RMCGuidebookActionXenoPlantWeeds
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      state: plant_weeds

- type: entity
  parent: ActionXenoBase
  id: ActionXenoExpandWeeds
  name: Expand Weeds (50) # TODO RMC14 proper plasma costs
  description: Expand existing weeds or turn a weed tile into a node.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon:
      sprite: _RMC14/Actions/xeno_actions.rsi
      state: plant_weeds
    useDelay: 0.5
  - type: TargetAction
    checkCanAccess: false
    range: -1
    deselectOnMiss: false
  - type: WorldTargetAction
    event: !type:XenoExpandWeedsActionEvent

- type: entity
  id: ActionXenoDesignerSelectedDesign
  parent: ActionXenoBase
  name: Selected Design
  description: Toggle whether newly placed design nodes are wall or door nodes.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon: { sprite: _RMC14/Actions/designer_actions.rsi, state: design_mark_wall }
    iconOn: { sprite: _RMC14/Actions/designer_actions.rsi, state: design_mark_door }
    useDelay: 0.2
  - type: InstantAction
    event: !type:Content.Shared._RMC14.Xenonids.Designer.DesignerSelectedDesignToggleActionEvent
  - type: RMCDazeableAction

- type: entity
  id: ActionXenoDesignerGreaterResinSurge
  parent: ActionXenoBase
  name: Greater Resin Surge (250)
  description: Consumes nearby design nodes to create temporary reflective resin walls.
  components:
  - type: Action
    itemIconStyle: NoItem
    icon: { sprite: _RMC14/Actions/designer_actions.rsi, state: greater_resin_surge }
    useDelay: 30
  - type: InstantAction
    event: !type:Content.Shared._RMC14.Xenonids.Designer.DesignerGreaterResinSurgeActionEvent
  - type: RMCDazeableAction
