- type: entity
  abstract: true  # Sunrise-Nuke
  parent: [BaseStructure, StructureWheeled, BaseMajorContraband]
  id: BaseNuclearBomb
  name: nuclear fission explosive
  components:
  - type: Transform
    anchored: true
  - type: Sprite
    sprite: Objects/Devices/nuke.rsi
    noRot: true
    layers:
    - state: nuclearbomb_base
      map: ["enum.NukeVisualLayers.Base"]
    - state: nuclearbomb_deployed_unlit
      map: ["enum.NukeVisualLayers.Unlit"]
      shader: unshaded
      visible: false
    - state: nuclearbomb_gay
      map: ["pride"]
      visible: false
    - state: nukefestive
      map: ["christmas"]
      visible: false
  - type: Appearance
  - type: HolidayVisuals
    holidays:
      festive:
      - FestiveSeason
      pride:
      - PrideMonth
  - type: GenericVisualizer
    visuals:
      enum.HolidayVisuals.Holiday:
        christmas:
          festive: { visible: true }
        pride:
          pride: { visible: true }
      enum.NukeVisuals.Deployed:
        enum.NukeVisualLayers.Base:
          False: { state: nuclearbomb_base }
          True:  { state: nuclearbomb_deployed }
        enum.NukeVisualLayers.Unlit:
          True:  { visible: true }
          False: { visible: false }
      enum.NukeVisuals.State:
        enum.NukeVisualLayers.Unlit:
          Idle:        { state: nuclearbomb_deployed_unlit }
          Armed:       { state: nuclearbomb_timing }
          YoureFucked: { state: nuclearbomb_exploding }
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.45
        density: 255 # Has "bluespace technology" to make it lighter, whatever that means. Don't mind the fact that this is lighter then a high capacity fuel tank.
        mask:
        - MachineMask
        layer:
        - HalfWallLayer
  - type: InteractionOutline
  - type: CargoSellBlacklist
  - type: ArrivalsBlacklist
  - type: StealTarget
    stealGroup: NuclearBomb
  - type: Tag
    tags:
    - GhostOnlyWarp
  - type: WarpPoint
    follow: true
    location: nuclear bomb
    blacklist:
      tags:
      - GhostOnlyWarp
  - type: Construction
    graph: NuclearBomb
    deconstructionTarget: disarmed

- type: entity
  parent: BaseNuclearBomb
  id: NuclearBomb
  description: You probably shouldn't stick around to see if this is armed.
  components:
  - type: PointLight
    enabled: false
    radius: 4
    energy: 2.0
    color: "#FF4020"
    mask: /Textures/Effects/LightMasks/double_cone.png
  - type: RotatingLight
    speed: 120
  - type: NavMapBeacon
    color: "#ff0000"
    text: nuclear fission explosive
    enabled: false
  - type: NukeLabel
  - type: Nuke
    explosionType: DefaultStandardEffect # Sunrise edit
    maxIntensity: 100
    intensitySlope: 5
    totalIntensity: 5000000
    diskSlot:
      name: nuke-slot-component-slot-name-disk
      insertSound:
        path: /Audio/Machines/terminal_insert_disc.ogg
      ejectSound:
        path: /Audio/Machines/terminal_insert_disc.ogg
      whitelist:
        components:
        - NukeDisk
    alertLevelOnActivate: delta
    alertLevelOnDeactivate: green
  - type: ActivatableUI
    key: enum.NukeUiKey.Key
  - type: UserInterface
    interfaces:
      enum.NukeUiKey.Key:
        type: NukeBoundUserInterface
  - type: StaticPrice
    price: 50000 # YOU STOLE A NUCLEAR FISSION EXPLOSIVE?!
  - type: ItemSlots
  - type: ContainerContainer
    containers:
      Nuke: !type:ContainerSlot
  - type: Construction
    node: nuke
  - type: FTLSmashImmune

- type: entity
  parent: NuclearBomb
  id: NuclearBombUnanchored
  suffix: unanchored
  components:
  - type: Transform
    anchored: false
  - type: Physics
    bodyType: Dynamic

- type: entity
  parent: BaseNuclearBomb
  id: NuclearBombDisarmed
  suffix: Disarmed
  description: "You can clearly see that this can't be armed, given its lack of nuclear material."
  components:
  - type: StaticPrice
    price: 1000 # fancy paperweight
  - type: Construction
    node: disarmed

- type: entity
  parent: StorageTank
  id: NuclearBombKeg
  name: nuclear fission explosive
  suffix: keg
  description: You probably shouldn't stick around to see if this is armed. It has a tap on the side.
  components:
  - type: Transform
    anchored: false
  - type: NukeLabel
  - type: Sprite
    sprite: Objects/Devices/nuke.rsi
    layers:
    - state: nuclearbomb_base
    - state: nukefestive
      map: ["christmas"]
      visible: false
    - state: nuclearbomb_gay
      map: [ "pride" ]
      visible: false
  - type: Appearance
  - type: HolidayVisuals
    holidays:
      festive:
      - FestiveSeason
      pride:
      - PrideMonth
  - type: GenericVisualizer
    visuals:
      enum.HolidayVisuals.Holiday:
        christmas:
          festive: { visible: true }
        pride:
          pride: { visible: true }
  - type: Physics
    bodyType: Dynamic
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.45
        density: 255
        mask:
        - MachineMask
        layer:
        - WallLayer
  - type: SolutionContainerManager
    solutions:
      tank:
        reagents:
        - ReagentId: NuclearCola
          Quantity: 3000
  - type: ReagentTank
    transferAmount: 100
  - type: StaticPrice
    price: 5000 # That's a pretty fancy keg you got there.
