# base actions

# base prototype for all action entities
- type: entity
  abstract: true
  id: BaseAction
  components:
  - type: Action

# base proto for an action that requires a DoAfter
- type: entity
  abstract: true
  parent: BaseAction
  id: BaseDoAfterAction
  components:
  - type: DoAfterArgs

# an action that is done all in le head and cant be prevented by any means
- type: entity
  abstract: true
  parent: BaseAction
  id: BaseMentalAction
  components:
  - type: Action
    checkCanInteract: false
    checkConsciousness: false

- type: entity
  abstract: true
  parent: BaseMentalAction
  id: BaseSuicideAction
  components:
  - type: ConfirmableAction
    popup: suicide-action-popup

- type: entity
  abstract: true
  parent: BaseAction
  id: BaseImplantAction
  components:
  - type: InstantAction
    event: !type:ActivateImplantEvent

- type: entity
  abstract: true
  parent: BaseAction
  id: BaseToggleAction
  components:
  - type: InstantAction
    event: !type:ToggleActionEvent

# actions

- type: entity
  parent: BaseAction
  id: ActionScream
  name: Scream
  description: AAAAAAAAAAAAAAAAAAAAAAAAA
  components:
  - type: Action
    useDelay: 10
    icon: Interface/Actions/scream.png
    checkCanInteract: false
  - type: InstantAction
    event: !type:ScreamActionEvent

- type: entity
  parent: BaseMentalAction
  id: ActionTurnUndead
  name: Turn Undead
  description: Succumb to your infection and become a zombie.
  components:
  - type: Action
    icon: Interface/Actions/zombie-turn.png
  - type: InstantAction
    event: !type:ZombifySelfActionEvent

- type: entity
  parent: BaseToggleAction
  id: ActionToggleLight
  name: Toggle Light
  description: Turn the light on and off.
  components:
  - type: Action
    useDelay: 1
    icon: { sprite: Objects/Tools/flashlight.rsi, state: flashlight }
    iconOn: { sprite: Objects/Tools/flashlight.rsi, state: flashlight-on }

- type: entity
  parent: BaseAction
  id: ActionOpenStorageImplant
  name: Toggle Storage Implant
  description: Opens or closes the storage implant embedded under your skin
  components:
  - type: Action
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Clothing/Back/Backpacks/backpack.rsi
      state: icon
    useDelay: 1
  - type: InstantAction
    event: !type:OpenStorageImplantEvent

- type: entity
  parent: [BaseSuicideAction, BaseImplantAction]
  id: ActionActivateMicroBomb
  name: Activate Microbomb
  description: Activates your internal microbomb, completely destroying you and your equipment
  components:
  - type: Action
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Actions/Implants/implants.rsi
      state: explosive

- type: entity
  parent: [BaseSuicideAction, BaseImplantAction]
  id: ActionActivateDeathAcidifier
  name: Activate Death-Acidifier
  description: Activates your death-acidifier, completely melting you and your equipment
  components:
  - type: Action
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Objects/Magic/magicactions.rsi
      state: gib

- type: entity
  parent: BaseImplantAction
  id: ActionActivateFreedomImplant
  name: Break Free
  description: Activating your freedom implant will free you from any hand restraints
  components:
  - type: LimitedCharges
    maxCharges: 3
  - type: Action
    checkCanInteract: false
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Actions/Implants/implants.rsi
      state: freedom

- type: entity
  parent: BaseAction
  id: ActionOpenUplinkImplant
  name: Open Uplink
  description: Opens the syndicate uplink embedded under your skin
  components:
  - type: Action
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Objects/Devices/communication.rsi
      state: old-radio
  - type: InstantAction
    event: !type:OpenUplinkImplantEvent

- type: entity
  parent: BaseImplantAction
  id: ActionActivateEmpImplant
  name: Activate EMP
  description: Triggers a small EMP pulse around you
  components:
  - type: LimitedCharges
    maxCharges: 3
  - type: Action
    checkCanInteract: false
    useDelay: 5
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Objects/Weapons/Grenades/empgrenade.rsi
      state: icon

- type: entity
  parent: BaseImplantAction
  id: ActionActivateScramImplant
  name: SCRAM!
  description: Randomly teleports you within a large distance.
  components:
  - type: LimitedCharges
    maxCharges: 2
  - type: Action
    checkCanInteract: false
    useDelay: 5
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Structures/Specific/anomaly.rsi
      state: anom4

- type: entity
  parent: BaseImplantAction
  id: ActionActivateDnaScramblerImplant
  name: Scramble DNA
  description:  Randomly changes your name and appearance.
  components:
  - type: ConfirmableAction
    popup: dna-scrambler-action-popup
  - type: LimitedCharges
    maxCharges: 1
  - type: Action
    itemIconStyle: BigAction
    priority: -20
    icon:
      sprite: Clothing/OuterClothing/Hardsuits/lingspacesuit.rsi
      state: icon

- type: entity
  parent: BaseAction
  id: ActionToggleSuitPiece
  name: Toggle Suit Piece
  description: Remember to equip the important pieces of your suit before going into action.
  components:
  - type: Action
    itemIconStyle: BigItem
    useDelay: 1 # equip noise spam.
  - type: InstantAction
    event: !type:ToggleClothingEvent

- type: entity
  parent: BaseMentalAction
  id: ActionCombatModeToggle
  name: "[color=red]Combat Mode[/color]"
  description: Enter combat mode
  components:
  - type: Action
    icon: Interface/Actions/harmOff.png
    iconOn: Interface/Actions/harm.png
    priority: -100
  - type: InstantAction
    event: !type:ToggleCombatActionEvent

- type: entity
  parent: ActionCombatModeToggle
  id: ActionCombatModeToggleOff
  components:
  - type: Action
    enabled: false
    autoPopulate: false

- type: entity
  parent: BaseAction
  id: ActionChangeVoiceMask
  name: Set name
  description: Change the name others hear to something else.
  components:
  - type: Action
    icon: { sprite: Interface/Actions/voice-mask.rsi, state: icon }
  - type: InstantAction
    event: !type:VoiceMaskSetNameEvent

- type: entity
  parent: BaseAction
  id: ActionVendingThrow
  name: Dispense Item
  description: Randomly dispense an item from your stock.
  components:
  - type: Action
    useDelay: 30
  - type: InstantAction
    event: !type:VendingMachineSelfDispenseEvent

- type: entity
  parent: BaseToggleAction
  id: ActionToggleBlock
  name: Block
  description: Raise or lower your shield.
  components:
  - type: Action
    icon: { sprite: Objects/Weapons/Melee/shields.rsi, state: teleriot-icon }
    iconOn: { sprite: Objects/Weapons/Melee/shields.rsi, state: teleriot-on }

- type: entity
  parent: BaseMentalAction
  id: ActionClearNetworkLinkOverlays
  name: Clear network link overlays
  description: Clear network link overlays.
  components:
  - type: Action
    clientExclusive: true
    temporary: true
    icon: { sprite: Objects/Tools/multitool.rsi, state: icon }
  - type: InstantAction
    event: !type:ClearAllOverlaysEvent

- type: entity
  parent: BaseAction
  id: ActionAnimalLayEgg
  name: Lay egg
  description: Uses hunger to lay an egg.
  components:
  - type: Action
    icon: { sprite: Objects/Consumable/Food/egg.rsi, state: icon }
    useDelay: 60
  - type: InstantAction
    event: !type:EggLayInstantActionEvent

- type: entity
  parent: BaseMentalAction
  id: ActionSleep
  name: Sleep
  description: Go to sleep.
  components:
  - type: Action
    icon: { sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi, state: icon }
  - type: InstantAction
    event: !type:SleepActionEvent

- type: entity
  parent: BaseMentalAction
  id: ActionWake
  name: Wake up
  description: Stop sleeping.
  components:
  - type: Action
    startDelay: true
    useDelay: 2
    icon: { sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi, state: icon }
  - type: InstantAction
    event: !type:WakeActionEvent

- type: entity
  parent: BaseImplantAction
  id: ActionActivateHonkImplant
  name: Honk
  description: Activates your honking implant, which will produce the signature sound of the clown.
  components:
  - type: Action
    icon: { sprite: Objects/Fun/bikehorn.rsi, state: icon }
    useDelay: 1

- type: entity
  parent: BaseAction
  id: ActionFireStarter
  name: Ignite
  description: Ignites enemies in a radius around you.
  components:
  - type: Action
    priority: -1
    useDelay: 30
    icon: Interface/Actions/firestarter.png
  - type: InstantAction
    event: !type:FireStarterActionEvent

- type: entity
  parent: BaseMentalAction
  id: ActionToggleEyes
  name: Open/Close eyes
  description: Close your eyes to protect your peepers, or open your eyes to enjoy the pretty lights.
  components:
  - type: Action
    icon: Interface/Actions/eyeopen.png
    iconOn: Interface/Actions/eyeclose.png
    useDelay: 1 # so u cant give yourself and observers eyestrain by rapidly spamming the action
  - type: InstantAction
    event: !type:ToggleEyesActionEvent

- type: entity
  parent: BaseToggleAction
  id: ActionToggleWagging
  name: Wagging Tail
  description: Start or stop wagging your tail.
  components:
  - type: Action
    icon: { sprite: Mobs/Customization/reptilian_parts.rsi, state: tail_smooth_behind }
    iconOn: { sprite: Mobs/Customization/reptilian_parts.rsi, state: tail_smooth_behind }
    itemIconStyle: NoItem
    useDelay: 1 # emote spam
    checkCanInteract: false

- type: entity
  parent: BaseAction
  id: FakeMindShieldToggleAction
  name: '[color=green]Toggle Fake Mindshield[/color]'
  description: Turn the Fake Mindshield implant's transmission on/off
  components:
  - type: Action
    icon: { sprite: Interface/Actions/actions_fakemindshield.rsi, state: icon }
    iconOn: { sprite: Interface/Actions/actions_fakemindshield.rsi, state: icon-on }
    itemIconStyle: NoItem
    useDelay: 1
    raiseOnUser: true
  - type: InstantAction
    event: !type:FakeMindShieldToggleEvent
  - type: Tag
    tags:
    - FakeMindShieldImplant

- type: entity
  parent: BaseToggleAction
  id: ActionToggleParamedicSiren
  name: Toggle Paramedic Siren
  description: Toggles the paramedic siren on and off.
  components:
  - type: Action
    icon:
      sprite: Clothing/OuterClothing/Hardsuits/paramed.rsi
      state: icon-siren
    useDelay: 1
    itemIconStyle: BigAction

#  TODO: Add back once we have animated tails again. Were removed due to the sprite rework, causing all of them to not fit anymore.
# - type: entity
#   parent: ActionToggleWagging
#   id: ActionToggleWaggingVulpkanin
#   components:
#   - type: Action
#     icon: { sprite: Mobs/Customization/Vulpkanin/tail_markings.rsi, state: tail-wag-icon }
#     iconOn: { sprite: Mobs/Customization/Vulpkanin/tail_markings.rsi, state: tail-wag-icon }
#     itemIconStyle: NoItem
#     useDelay: 1 # Prevents Emote Spam

- type: entity
  parent: BaseAction
  id: ActionGravityJump
  name: Jump
  description: Activating the advanced propulsion system, you propel yourself a short distance in the direction of your gaze.
  components:
  - type: Action
    useDelay: 8
    icon:
      sprite: Interface/Actions/jump.rsi
      state: icon
  - type: InstantAction
    event: !type:GravityJumpEvent {}

- type: entity
  parent: BaseAction
  id: ActionVulpkaninGravityJump
  name: Leap
  description: Use your agile legs to leap a short distance. Be careful not to bump into anything!
  components:
  - type: Action
    useDelay: 12
    icon:
      sprite: Interface/Actions/jump.rsi
      state: icon
  - type: InstantAction
    event: !type:GravityJumpEvent {}

- type: entity
  parent: BaseToggleAction
  id: ActionToggleRootable
  name: Rootable
  description: Begin or stop being rooted to the floor.
  components:
  - type: Action
    icon: Interface/Actions/rooting.png
    iconOn: Interface/Actions/rooting.png
    itemIconStyle: NoItem
    useDelay: 1

- type: entity
  id: ActionChameleonController
  name: Control clothing
  description: Change your entire outfit fast!
  components:
  - type: Action
    priority: -20
    icon: { sprite: Actions/Implants/implants.rsi, state: chameleon }
    itemIconStyle: BigAction
  - type: InstantAction
    event: !type:ChameleonControllerOpenMenuEvent

- type: entity
  parent: BaseMentalAction
  id: ActionIntrinsicStore
  name: Store
  description: Opens the store
  components:
  - type: Action
    icon: Interface/Actions/shop.png
  - type: InstantAction
    event: !type:IntrinsicStoreActionEvent
