- type: markingsGroup
  parent: Undergarments
  id: IPC
  onlyGroupWhitelisted: true
  limits:
    enum.HumanoidVisualLayers.Hair:
      limit: 2
      onlyGroupWhitelisted: false
      required: false
    enum.HumanoidVisualLayers.FacialHair:
      limit: 1
      onlyGroupWhitelisted: false
      required: false
    enum.HumanoidVisualLayers.Head:
      limit: 1
      required: true
      default: [ MobIPCHeadDefault ]
    enum.HumanoidVisualLayers.HeadTop:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.Chest:
      limit: 1
      required: true
      default: [ MobIPCTorsoDefault ]
    enum.HumanoidVisualLayers.Overlay:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.HeadSide:
      limit: 1
      required: false
    enum.HumanoidVisualLayers.LArm:
      limit: 1
      required: true
      default: [ MobIPCLArmDefault ]
    enum.HumanoidVisualLayers.RArm:
      limit: 1
      required: true
      default: [ MobIPCRArmDefault ]
    enum.HumanoidVisualLayers.LHand:
      limit: 1
      required: true
      default: [ MobIPCLHandDefault ]
    enum.HumanoidVisualLayers.RHand:
      limit: 1
      required: true
      default: [ MobIPCRHandDefault ]
    enum.HumanoidVisualLayers.LLeg:
      limit: 1
      required: true
      default: [ MobIPCLLegDefault ]
    enum.HumanoidVisualLayers.RLeg:
      limit: 1
      required: true
      default: [ MobIPCRLegDefault ]
    enum.HumanoidVisualLayers.LFoot:
      limit: 1
      required: true
      default: [ MobIPCLFootDefault ]
    enum.HumanoidVisualLayers.RFoot:
      limit: 1
      required: true
      default: [ MobIPCRFootDefault ]

- type: entity
  parent: BaseSpeciesAppearance
  id: AppearanceIPC
  name: IPC appearance
  components:
  - type: Inventory
    templateId: ipc
  - type: InitialBody
    organs:
      Torso: OrganIPCTorso
      Head: OrganIPCHead
      ArmLeft: OrganIPCArmLeft
      ArmRight: OrganIPCArmRight
      HandRight: OrganIPCHandRight
      HandLeft: OrganIPCHandLeft
      LegLeft: OrganIPCLegLeft
      LegRight: OrganIPCLegRight
      FootLeft: OrganIPCFootLeft
      FootRight: OrganIPCFootRight
      Brain: PositronicBrain
      Eyes: OrganIPCEyes
      Tongue: OrganIPCTongue
      Ears: OrganIPCEars
      Heart: OrganIPCPump
  - type: HumanoidProfile
    species: IPC
  - type: Sprite
    noRot: true
    drawdepth: Mobs
    layers:
    - map: [ "enum.HumanoidVisualLayers.Chest" ]
    - map: [ "enum.HumanoidVisualLayers.Head" ]
    - map: [ "enum.HumanoidVisualLayers.Snout" ]
    - map: [ "enum.HumanoidVisualLayers.Eyes" ]
    - map: [ "enum.HumanoidVisualLayers.RArm" ]
    - map: [ "enum.HumanoidVisualLayers.LArm" ]
    - map: [ "enum.HumanoidVisualLayers.RLeg" ]
    - map: [ "enum.HumanoidVisualLayers.LLeg" ]
    - shader: StencilClear
      sprite: Mobs/Species/Human/parts.rsi
      state: l_leg
    - shader: StencilMask
      map: [ "enum.HumanoidVisualLayers.StencilMask" ]
      sprite: Mobs/Customization/masking_helpers.rsi
      state: female_full
      visible: false
    - map: [ "enum.HumanoidVisualLayers.UndergarmentBottom" ]  # starcup
    - map: [ "enum.HumanoidVisualLayers.UndergarmentTop" ]  # starcup
    - map: [ "enum.HumanoidVisualLayers.LFoot" ]
    - map: [ "enum.HumanoidVisualLayers.RFoot" ]
    - map: [ "socks" ]
    - map: [ "underpants" ]
    - map: [ "undershirt" ]
    - map: [ "jumpsuit" ]
    - map: [ "enum.HumanoidVisualLayers.LHand" ]
    - map: [ "enum.HumanoidVisualLayers.RHand" ]
    - map: [ "enum.HumanoidVisualLayers.Handcuffs" ]
      color: "#ffffff"
      sprite: Objects/Misc/handcuffs.rsi
      state: body-overlay-2
      visible: false
    - map: [ "id" ]
    - map: [ "gloves" ]
    - map: [ "shoes" ]
    - map: [ "ears" ]
    - map: [ "outerClothing" ]
    - map: [ "eyes" ]
    - map: [ "belt" ]
    - map: [ "neck" ]
    - map: [ "back" ]
    - map: [ "enum.HumanoidVisualLayers.HeadSide" ] # starcup: moved beneath hair
    - map: [ "enum.HumanoidVisualLayers.FacialHair" ]
    - map: [ "enum.HumanoidVisualLayers.Hair" ]
    - map: [ "enum.HumanoidVisualLayers.HeadTop" ]
    - map: [ "mask" ]
    - map: [ "head" ]
    - map: [ "pocket1" ]
    - map: [ "pocket2" ]
    - map: [ "enum.HumanoidVisualLayers.Tail" ]
    - map: [ "clownedon" ] # Dynamically generated
      sprite: "Effects/creampie.rsi"
      state: "creampie_human"
      visible: false

- type: entity
  parent:
  - AppearanceIPC
  - PlayerSiliconHumanoidBase
  id: MobIPC
  name: Urist McPositronic
  description: A positronic brain in a metal body.
  components:
  - type: PowerCellSlot
    cellSlotId: cell_slot
    fitsInCharger: true
  - type: ItemSlots
    slots:
      cell_slot:
        locked: true
        name: power-cell-slot-component-slot-name-default
        startingItem: PowerCellMedium
  - type: BatterySlotRequiresLock
    itemSlot: cell_slot
  # - type: EncryptionHolderRequiresLock # starcup: removed
  - type: SiliconEmitSoundOnDrained
    sound: "/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg" # SOMEONE PLEASE FIND A BETTER SOUND FOR THIS.
    minInterval: 15
    maxInterval: 30
    popUp: "silicon-power-low"
  - type: Lock
    locked: true
    lockOnClick: false
    unlockOnClick: false
    lockTime: 5
    unlockTime: 5
    breakOnAccessBreaker: false # DeltaV - cant be emagged
  - type: InteractionPopup
    successChance: 1
    interactSuccessString: hugging-success-generic
    interactSuccessSound: /Audio/Effects/thudswoosh.ogg
    messagePerceivedByOthers: hugging-success-generic-others
  - type: NpcFactionMember
    factions:
      - NanoTrasen
  - type: StandingState
  - type: MobState
    allowedStates:
      - Alive
      - Critical
      - Dead
  - type: MobThresholds
    thresholds:
      0: Alive
      119.999: Critical # TO make it almost impossible
      120: Dead
    stateAlertDict:
      Alive: BorgHealth
      Critical: BorgCrit
      Dead: BorgDead
  - type: TypingIndicator
    proto: robot
  - type: Destructible
    thresholds:
      - trigger:
          !type:DamageTypeTrigger
          damageType: Blunt
          damage: 400
        behaviors:
          - !type:GibBehavior { }
  - type: SlowOnDamage
    speedModifierThresholds:
      60: 0.7
      80: 0.5 # DeltaV - was 90
      100: 0.3 # DeltaV - was 120, which is irrelvant?
  - type: SiliconDownOnDead
  - type: Speech
  - type: Deathgasp
    prototype: SiliconDeathgasp
  - type: GuideHelp
    guides:
      - IPC
  - type: Silicon
    entityType: enum.SiliconType.Player
    batteryPowered: true
    drainPerSecond: 1.3 # DeltaV change from 1.5
    idleDrainReduction: 0.6 # TheDen - 60% less power usage while idling, for IPC Dynamic Power Draw
    chargeThresholdMid: 0.80
    chargeThresholdLow: 0.35
    chargeThresholdCritical: 0.10
    speedModifierThresholds:
      4: 1
      3: 1
      2: 0.80
      1: 0.45
      0: 0.00
  - type: BatteryDrinker
  # begin starcup: removed
  # - type: EncryptionKeyHolder
  #   keySlots: 4
  #   examineWhileLocked: false
  #   keysExtractionMethod: Cutting
  #   keysUnlocked: false
  # end starcup
  - type: ActiveRadio
  - type: IntrinsicRadioReceiver
  - type: IntrinsicRadioTransmitter
  - type: DeadStartupButton
    sound:
      path: /Audio/_EE/Effects/Silicon/startup.ogg
# Erro de linter
#   - type: Wires
#     layoutId: IPC
  - type: EmitBuzzWhileDamaged
  - type: CanHostGuardian
  - type: WeldingHealable
  - type: CombatMode # DeltaV - let IPCs disarm
    canDisarm: true
  - type: Fingerprint # starcup: give ipcs fingerprints
  - type: Uncloneable # starcup

- type: entity
  parent: OrganBase
  id: OrganIPC
  abstract: true
  suffix: MKC # starcup
  components:
  - type: SolutionContainerManager
    solutions:
      organ:
        reagents:
        - ReagentId: Oil
          Quantity: 10

- type: entity
  parent: OrganIPC
  id: OrganIPCInternal
  abstract: true
  components:
  - type: Sprite
    sprite: _EE/Mobs/Species/IPC/organs.rsi

- type: entity
  id: OrganIPCVisual
  abstract: true
  components:
  - type: VisualOrgan
    data:
      sprite: _EE/Mobs/Species/IPC/parts.rsi
  - type: VisualOrganMarkings
    markingData:
      group: IPC

- type: entity
  parent: [ OrganIPC, OrganIPCVisual ]
  id: OrganIPCExternal
  abstract: true
  components:
  - type: Sprite
    sprite: _EE/Mobs/Species/IPC/parts.rsi
  - type: VisualOrgan
    data:
      sprite: null
      state: null
    sexStateOverrides:
      Male: null
      Female: null

- type: entity
  parent: [ OrganIPCExternal, OrganBaseTorsoSexed, OrganBaseTorso ]
  id: OrganIPCTorso

- type: entity
  parent: [ OrganIPCExternal, OrganBaseHeadSexed, OrganBaseHead ]
  id: OrganIPCHead

- type: entity
  parent: [ OrganIPCExternal, OrganBaseArmLeft ]
  id: OrganIPCArmLeft

- type: entity
  parent: [ OrganIPCExternal, OrganBaseArmRight ]
  id: OrganIPCArmRight

- type: entity
  parent: [ OrganIPCExternal, OrganBaseHandLeft ]
  id: OrganIPCHandLeft

- type: entity
  parent: [ OrganIPCExternal, OrganBaseHandRight ]
  id: OrganIPCHandRight

- type: entity
  parent: [ OrganIPCExternal, OrganBaseLegLeft ]
  id: OrganIPCLegLeft

- type: entity
  parent: [ OrganIPCExternal, OrganBaseLegRight ]
  id: OrganIPCLegRight

- type: entity
  parent: [ OrganIPCExternal, OrganBaseFootLeft ]
  id: OrganIPCFootLeft

- type: entity
  parent: [ OrganIPCExternal, OrganBaseFootRight ]
  id: OrganIPCFootRight

- type: entity
  parent: [ OrganIPCVisual, OrganBaseEyes, OrganIPCInternal ]
  id: OrganIPCEyes
  name: robotic eyes
  description: "01001001 00100000 01110011 01100101 01100101 00100000 01111001 01101111 01110101 00100001"
  components:
  - type: VisualOrgan
    layer: enum.HumanoidVisualLayers.Eyes
    data:
      sprite: Mobs/Customization/eyes.rsi
      state: no_eyes

- type: entity
  parent: [ OrganBaseTongue, OrganIPCInternal ]
  id: OrganIPCTongue
  name: vocal modulator
  description: "A vocal modulator, used to produce speech."

- type: entity
  parent: [ OrganBaseEars, OrganIPCInternal ]
  id: OrganIPCEars
  name: "sonic receptors"
  description: "A set of highly attuned membranes, capable of sensing anything an organic ear can sense" # DeltaV

- type: entity
  parent: [ OrganIPCInternal ]
  id: OrganIPCPump
  name: micro pump
  description: "A micro pump, used to circulate coolant."
  components:
  - type: Sprite
    state: heart-on
  - type: Organ
