]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
ghost locator maints loot (#32323)
authorIlya246 <57039557+Ilya246@users.noreply.github.com>
Fri, 18 Oct 2024 13:42:13 +0000 (17:42 +0400)
committerGitHub <noreply@github.com>
Fri, 18 Oct 2024 13:42:13 +0000 (15:42 +0200)
* implement

* react to revenants/AI eye

* rare maints loot

* sprite

* description

* review

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* do changes

* stats

* networked

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
12 files changed:
Content.Shared/Ghost/SpectralComponent.cs [new file with mode: 0644]
Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml
Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml
Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml
Resources/Prototypes/Entities/Mobs/Player/observer.yml
Resources/Prototypes/Entities/Mobs/Player/replay_observer.yml
Resources/Prototypes/Entities/Objects/Fun/spectral_locator.yml [new file with mode: 0644]
Resources/Textures/Objects/Fun/spectrallocator.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-left.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-right.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/spectrallocator.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Fun/spectrallocator.rsi/screen.png [new file with mode: 0644]

diff --git a/Content.Shared/Ghost/SpectralComponent.cs b/Content.Shared/Ghost/SpectralComponent.cs
new file mode 100644 (file)
index 0000000..3799951
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Ghost;
+
+/// <summary>
+/// Marker component to identify "ghostly" entities.
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+public sealed partial class SpectralComponent : Component { }
index 3f735cf98ba8ee5b1a6b0c2e8b092353136575e4..6a22da58eb952cab8d2e977686daab988fd443c3 100644 (file)
       - id: ResearchDisk5000
       - id: PetCarrier
       - id: DrinkMopwataBottleRandom
+      - id: SpectralLocator
       - id: LidSalami
         weight: 0.05
 
index cf964822f1fa28bf928e3a60aff36f8a749c6518..888011a5b5f83856a7d438f8ef16a8e0fcbe3068 100644 (file)
@@ -8,6 +8,7 @@
   components:
   - type: Input
     context: "ghost"
+  - type: Spectral
   - type: MovementSpeedModifier
     baseWalkSpeed: 6
     baseSprintSpeed: 6
index 209d4244b9940308796987bfb9fcf4ffae8f84ae..0f1c77e2624dc7dd31d104b0c929adc09f627304 100644 (file)
@@ -1,5 +1,5 @@
 - type: entity
-  parent: [MobObserver, InventoryBase]
+  parent: [MobObserverBase, InventoryBase]
   id: AdminObserver
   name: admin observer
   categories: [ HideSpawnMenu ]
index c02629c4d6fd81f50eb99d0d7723e08f3d8ec432..397061defe8105e540efa7351558e90fd7dea28d 100644 (file)
         layer:
         - GhostImpassable
 
+# shared parent between aghosts, replay spectators and normal observers
 - type: entity
   parent:
   - Incorporeal
   - BaseMob
-  id: MobObserver
+  id: MobObserverBase
+  abstract: true
   name: observer
   description: Boo!
   categories: [ HideSpawnMenu ]
     tags:
     - BypassInteractionRangeChecks
 
+# proto for player ghosts specifically
+- type: entity
+  parent: MobObserverBase
+  id: MobObserver
+  components:
+  - type: Spectral
+
 - type: entity
   id: ActionGhostBoo
   name: Boo!
index ffbc46e94c3380f7e4da8ff3ed78f10e1056cf16..8a01de40809c1186af7ad724fbfb3b5843b6c2f3 100644 (file)
@@ -1,5 +1,5 @@
 - type: entity
-  parent: MobObserver
+  parent: MobObserverBase
   id: ReplayObserver
   categories: [ HideSpawnMenu ]
   save: false
diff --git a/Resources/Prototypes/Entities/Objects/Fun/spectral_locator.yml b/Resources/Prototypes/Entities/Objects/Fun/spectral_locator.yml
new file mode 100644 (file)
index 0000000..930b9c4
--- /dev/null
@@ -0,0 +1,58 @@
+- type: entity
+  id: SpectralLocatorUnpowered
+  parent: BaseItem
+  name: spectral locator
+  description: Appears to be a modified anomaly locator. Seems very old.
+  suffix: Unpowered
+  components:
+  - type: Sprite
+    sprite: Objects/Fun/spectrallocator.rsi
+    layers:
+      - state: icon
+      - state: screen
+        shader: unshaded
+        visible: false
+        map: ["enum.ToggleVisuals.Layer"]
+  - type: Appearance
+  - type: GenericVisualizer
+    visuals:
+      enum.ToggleVisuals.Toggled:
+        enum.ToggleVisuals.Layer:
+          True: { visible: true }
+          False: { visible: false }
+  - type: ItemToggle
+  - type: ProximityBeeper
+  - type: ProximityDetector
+    range: 12
+    criteria:
+      components:
+      - Spectral # reacts to AI eye, intentional
+  - type: Beeper
+    isMuted: true
+    minBeepInterval: 0.25
+    maxBeepInterval: 0.5
+    beepSound:
+      path: "/Audio/Items/locator_beep.ogg"
+      params:
+        maxDistance: 1
+        volume: -8
+
+- type: entity
+  id: SpectralLocator
+  parent: [ SpectralLocatorUnpowered, PowerCellSlotSmallItem ]
+  suffix: Powered
+  components:
+  - type: PowerCellDraw
+    drawRate: 1
+    useRate: 0
+  - type: ToggleCellDraw
+
+- type: entity
+  id: SpectralLocatorEmpty
+  parent: SpectralLocator
+  suffix: Empty
+  components:
+  - type: ItemSlots
+    slots:
+      cell_slot:
+        name: power-cell-slot-component-slot-name-default
diff --git a/Resources/Textures/Objects/Fun/spectrallocator.rsi/icon.png b/Resources/Textures/Objects/Fun/spectrallocator.rsi/icon.png
new file mode 100644 (file)
index 0000000..b18dfd1
Binary files /dev/null and b/Resources/Textures/Objects/Fun/spectrallocator.rsi/icon.png differ
diff --git a/Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-left.png b/Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-left.png
new file mode 100644 (file)
index 0000000..cb25c6e
Binary files /dev/null and b/Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-left.png differ
diff --git a/Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-right.png b/Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-right.png
new file mode 100644 (file)
index 0000000..7c34512
Binary files /dev/null and b/Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-right.png differ
diff --git a/Resources/Textures/Objects/Fun/spectrallocator.rsi/meta.json b/Resources/Textures/Objects/Fun/spectrallocator.rsi/meta.json
new file mode 100644 (file)
index 0000000..1556cd4
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "version": 1,
+  "license": "CC0-1.0",
+  "copyright": "Originally created by EmoGarbage404 (github) for Space Station 14, modified by Ilya246 (github) for Space Station 14.",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "icon"
+    },
+    {
+      "name": "inhand-left",
+      "directions": 4
+    },
+    {
+      "name": "inhand-right",
+      "directions": 4
+    },
+    {
+      "name": "screen",
+      "delays": [
+        [
+          0.2,
+          0.2,
+          0.2,
+          0.2
+        ]
+      ]
+    }
+  ]
+}
diff --git a/Resources/Textures/Objects/Fun/spectrallocator.rsi/screen.png b/Resources/Textures/Objects/Fun/spectrallocator.rsi/screen.png
new file mode 100644 (file)
index 0000000..eb4ab6b
Binary files /dev/null and b/Resources/Textures/Objects/Fun/spectrallocator.rsi/screen.png differ