- type: entity
  name: stun baton
  parent: BaseItem
  id: Stunbaton
  description: A stun baton for incapacitating people with. Actively harming with this is considered bad tone.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/stunbaton.rsi
    layers:
    - state: stunbaton_off
      map: [ "enum.ToggleVisuals.Layer" ]
  - type: Stunbaton
    energyPerUse: 50
  - type: ItemToggle
    predictable: false
    soundActivate:
      collection: sparks
      params:
        variation: 0.250
    soundDeactivate:
      collection: sparks
      params:
        variation: 0.250
    soundFailToActivate:
      path: /Audio/Machines/button.ogg
      params:
        variation: 0.250
  - type: ItemToggleMeleeWeapon
    activatedDamage:
      types:
        Blunt: 0
  - type: MeleeWeapon # goob edited
    angle: 0
    wideAnimationRotation: -135
    damage:
      types:
        Blunt: 7
    bluntStaminaDamageFactor: 2.0
    animation: WeaponArcSlash
  - type: StaminaDamageOnHit # goob edited
    damage: 15
    overtime: 40
    sound: /Audio/Weapons/egloves.ogg
  - type: StaminaDamageOnCollide
    damage: 15
    overtime: 40
    sound: /Audio/Weapons/egloves.ogg
  - type: LandAtCursor # it deals stamina damage when thrown
  - type: Battery
    maxCharge: 1000
    startingCharge: 1000
  - type: UseDelay
  - type: Item
    heldPrefix: off
    size: Normal
  - type: Clothing
    sprite: Objects/Weapons/Melee/stunbaton.rsi
    quickEquip: false
    slots:
    - Belt
  - type: DisarmMalus
    malus: 0.225
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleVisuals.Toggled:
        enum.ToggleVisuals.Layer:
          True: {state: stunbaton_on}
          False: {state: stunbaton_off}
  - type: StaticPrice
    price: 80
  - type: Riggable
  - type: SolutionContainerManager
    solutions:
      battery:
        maxVol: 5
  - type: InjectableSolution
    solution: battery
  - type: DrawableSolution
    solution: battery
  - type: Explosive
    explosionType: Default
    intensitySlope: 1.5
    maxIntensity: 200
  - type: PhysicalComposition
    materialComposition:
      Steel: 100
      Plastic: 100
  - type: GuideHelp
    guides:
    - Security
    # - Antagonists # Frontier: guidebook entry removed

- type: entity
  name: cyborg stun baton
  parent: BaseItem
  id: CyborgStunbaton
  description: A stun baton for incapacitating people with, designed for cyborgs. Actively harming with this is considered bad tone.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/stunbaton.rsi
    layers:
    - state: stunbaton_off
      map: [ "enum.ToggleVisuals.Layer" ]
  - type: Stunbaton
    energyPerUse: 0
  - type: ItemToggle
    predictable: false
    soundActivate:
      collection: sparks
      params:
        variation: 0.250
    soundDeactivate:
      collection: sparks
      params:
        variation: 0.250
    soundFailToActivate:
      path: /Audio/Machines/button.ogg
      params:
        variation: 0.250
  - type: ItemToggleMeleeWeapon
    activatedDamage:
      types:
        Blunt: 0
  - type: MeleeWeapon
    wideAnimationRotation: -135
    damage:
      types:
        Blunt: 7
    bluntStaminaDamageFactor: 2.0
    angle: 60
    animation: WeaponArcThrust
  - type: StaminaDamageOnHit
    damage: 35
    sound: /Audio/Weapons/egloves.ogg
  - type: StaminaDamageOnCollide
    damage: 35
    sound: /Audio/Weapons/egloves.ogg
  - type: LandAtCursor
  - type: Battery
    maxCharge: 1
    startingCharge: 1
  - type: UseDelay
  - type: Item
    heldPrefix: off
    size: Normal
  - type: Clothing
    sprite: Objects/Weapons/Melee/stunbaton.rsi
    quickEquip: false
    slots:
    - Belt
  - type: DisarmMalus
    malus: 0.225
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleVisuals.Toggled:
        enum.ToggleVisuals.Layer:
          True: {state: stunbaton_on}
          False: {state: stunbaton_off}
  - type: StaticPrice
    price: 80
  - type: Riggable
  - type: SolutionContainerManager
    solutions:
      battery:
        maxVol: 5
  - type: InjectableSolution
    solution: battery
  - type: DrawableSolution
    solution: battery
  - type: Explosive
    explosionType: Default
    intensitySlope: 1.5
    maxIntensity: 200
  - type: PhysicalComposition
    materialComposition:
      Steel: 100
      Plastic: 100
  - type: GuideHelp
    guides:
    - Security

- type: entity
  name: truncheon
  parent: BaseItem
  id: Truncheon
  description: A rigid, steel-studded baton, meant to harm. On the handle is a label that says 'for authorized use only.'
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/truncheon.rsi
    state: icon
  - type: MeleeWeapon
    wideAnimationRotation: -135
    damage:
      types:
        Blunt: 20
    soundHit:
      collection: MetalThud
    bluntStaminaDamageFactor: 1.5
  - type: Item
    size: Normal
  - type: Tag
    tags:
    - Truncheon
  - type: Clothing
    sprite: Objects/Weapons/Melee/truncheon.rsi
    quickEquip: false
    slots:
    - Belt
  - type: DisarmMalus
    malus: 0.225
  - type: Appearance
  - type: StaticPrice
    price: 80
  - type: GuideHelp
    guides:
    - Security
    # - Antagonists # Frontier: guidebook entry removed

- type: entity
  name: flash
  parent: BaseItem
  id: Flash
  description: An ultrabright flashbulb with a trigger, which causes the victim to be dazed and lose their eyesight for a moment. Useless when burnt out.
  components:
  # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/handling/component_pickup.ogg
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/_Goobstation/Items/handling/component_drop.ogg
  - type: EmitSoundOnLand
    sound:
      path: /Audio/_Goobstation/Items/handling/component_drop.ogg
  # Goobstation edit end
  - type: Sprite
    sprite: Objects/Weapons/Melee/flash.rsi
    layers:
    - state: flash
      map: [ "enum.FlashVisuals.BaseLayer" ]
    - state: flashing
      map: [ "enum.FlashVisuals.LightLayer" ]
      visible: false
      shader: unshaded
  - type: Flash
  - type: LimitedCharges
    maxCharges: 5
    charges: 5
  - type: MeleeWeapon
    wideAnimationRotation: 180
    damage:
      types:
        Blunt: 0 # melee weapon to allow flashing individual targets
    angle: 10
  - type: Item
    size: Small
    sprite: Objects/Weapons/Melee/flash.rsi
  - type: UseDelay
  - type: StaticPrice
    price: 40
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.FlashVisuals.Burnt:
        enum.FlashVisuals.BaseLayer:
          True: {state: burnt}
      enum.FlashVisuals.Flashing:
        enum.FlashVisuals.LightLayer:
          True: {visible: true}
          False: {visible: false}
  - type: GuideHelp
    guides:
    - Security
  # - Antagonists # Frontier: guidebook entry removed

- type: entity
  name: flash
  parent: Flash
  suffix: 2 charges
  id: SciFlash
  components:
  - type: LimitedCharges
    maxCharges: 2
    charges: 2

- type: entity
  name: portable flasher
  parent: BaseMachine
  id: PortableFlasher
  description: An ultrabright flashbulb with a proximity trigger, useful for making an area security-only.
  components:
  - type: EmitSoundOnTrigger
    sound:
      path: /Audio/Weapons/flash.ogg
  - type: FlashOnTrigger
    range: 3
  - type: TriggerOnProximity
    enabled: true
    cooldown: 5
    shape:
      !type:PhysShapeCircle
      radius: 2
    repeating: true
  - type: Sprite
    sprite: Objects/Weapons/pflash.rsi
    layers:
    - state: "off"
      map: ["enum.ProximityTriggerVisualLayers.Base"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        mask:
        - MachineMask
        layer:
        - MachineLayer
        density: 380
  - type: Appearance
  - type: AnimationPlayer
  - type: PointLight
    energy: 2.0
    radius: 0
    softness: 0
    enabled: true
  - type: GuideHelp
    guides:
    - Security
  # - Antagonists # Frontier: guidebook entry removed
