From fca95ef250c3ffbbf139d732df3c4e104efa6801 Mon Sep 17 00:00:00 2001 From: Ilya246 <57039557+Ilya246@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:42:13 +0400 Subject: [PATCH] ghost locator maints loot (#32323) * 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> --- Content.Shared/Ghost/SpectralComponent.cs | 9 +++ .../Markers/Spawners/Random/maintenance.yml | 1 + .../Entities/Mobs/NPCs/revenant.yml | 1 + .../Entities/Mobs/Player/admin_ghost.yml | 2 +- .../Entities/Mobs/Player/observer.yml | 11 +++- .../Entities/Mobs/Player/replay_observer.yml | 2 +- .../Entities/Objects/Fun/spectral_locator.yml | 58 ++++++++++++++++++ .../Objects/Fun/spectrallocator.rsi/icon.png | Bin 0 -> 600 bytes .../Fun/spectrallocator.rsi/inhand-left.png | Bin 0 -> 384 bytes .../Fun/spectrallocator.rsi/inhand-right.png | Bin 0 -> 359 bytes .../Objects/Fun/spectrallocator.rsi/meta.json | 33 ++++++++++ .../Fun/spectrallocator.rsi/screen.png | Bin 0 -> 274 bytes 12 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 Content.Shared/Ghost/SpectralComponent.cs create mode 100644 Resources/Prototypes/Entities/Objects/Fun/spectral_locator.yml create mode 100644 Resources/Textures/Objects/Fun/spectrallocator.rsi/icon.png create mode 100644 Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Fun/spectrallocator.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Fun/spectrallocator.rsi/meta.json create mode 100644 Resources/Textures/Objects/Fun/spectrallocator.rsi/screen.png diff --git a/Content.Shared/Ghost/SpectralComponent.cs b/Content.Shared/Ghost/SpectralComponent.cs new file mode 100644 index 0000000000..3799951152 --- /dev/null +++ b/Content.Shared/Ghost/SpectralComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Ghost; + +/// +/// Marker component to identify "ghostly" entities. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class SpectralComponent : Component { } diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml index 3f735cf98b..6a22da58eb 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml @@ -289,6 +289,7 @@ - id: ResearchDisk5000 - id: PetCarrier - id: DrinkMopwataBottleRandom + - id: SpectralLocator - id: LidSalami weight: 0.05 diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml b/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml index cf964822f1..888011a5b5 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml @@ -8,6 +8,7 @@ components: - type: Input context: "ghost" + - type: Spectral - type: MovementSpeedModifier baseWalkSpeed: 6 baseSprintSpeed: 6 diff --git a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml index 209d4244b9..0f1c77e262 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml @@ -1,5 +1,5 @@ - type: entity - parent: [MobObserver, InventoryBase] + parent: [MobObserverBase, InventoryBase] id: AdminObserver name: admin observer categories: [ HideSpawnMenu ] diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index c02629c4d6..397061defe 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -28,11 +28,13 @@ 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 ] @@ -61,6 +63,13 @@ tags: - BypassInteractionRangeChecks +# proto for player ghosts specifically +- type: entity + parent: MobObserverBase + id: MobObserver + components: + - type: Spectral + - type: entity id: ActionGhostBoo name: Boo! diff --git a/Resources/Prototypes/Entities/Mobs/Player/replay_observer.yml b/Resources/Prototypes/Entities/Mobs/Player/replay_observer.yml index ffbc46e94c..8a01de4080 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/replay_observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/replay_observer.yml @@ -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 index 0000000000..930b9c4926 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Fun/spectral_locator.yml @@ -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 index 0000000000000000000000000000000000000000..b18dfd1c29475a51be2464c9c566caa7b16f2a98 GIT binary patch literal 600 zcmV-e0;m0nP)H|whZJgJGK?yg)x|KX(lMm3;=zypIJsqY$rj~8Nqvq13Yz9WxPKeZ zJ3Ud&XV3ZKx~b#Mv;`vh(vtK#W&;p9K2G%uFn@qqG!uZT%9nmF0P~RaF$DPVKK`SW mR5R7EplRdolR1J50sI981J7-C^#@b{0000Eakt zG3V{Ajeds$M2>x2f6U<0(g|%GJa5;`_CIiKpQHF=W`=J6gNy7M3LDHDIOiQYx-@o% z&zpu=pOh8Ng1r|He!F(z$A8-c<^JdPTAsEQ0@}gAppk4L_w?{bjrGCXQmq22w9Pt$ zx89Pyd(Ve!zFy{z&pIs0Dx`m}0N6#ps?-$x-;6_-waoOte>KG)qS0k@wC1*?wl zu1<|ST+(UX9?JTCSMAzm-Y2(mr>|M&{dHHZt@N7L+K=@g{C#%qcJGs0pK6u|^gXwp zl%2iz?vyIedM%E{`RrHo+pqgehMF9F!5wiXJxpl1nsWIh3tiIyMz8~cM8hnuLnlte zC#wEt4E?>wI$#^;)|`ef8?6Jvbfq`UIIk1Dn|bU1JibF3-)r0>ul?A6|GA^Y+yCD< cfLgzu(e4(@yj*hTVjajdPgg&ebxsLQ04=YmO8@`> literal 0 HcmV?d00001 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 index 0000000000000000000000000000000000000000..7c34512cb66680b381a3b12614cb7b020530b886 GIT binary patch literal 359 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=EX7WqAsj$Z!;#X#z`!Wy>Eakt zG3V{gy@iJiB#wP-*Kv5<#HR5^a>jwVTN=wZ*m_NpOkiG-AaXe%a7V)|ClQ&QG3Uhk zJ~!5U|G)Lp%ecMU?me3bG#6;i>^(X$aboXomj3v%vhYc?iCOU^5%r1p;_vUNcAhl7 z^>+AHmCVg?m9OhEqYcc8Gj~nsOTWu6-BlaveSGt!l8+w+Z*MVkm{fLpZQA9Z@58?P zr(NDzcKYq%+O@nLlRakjl{t9GX^3JkmMV0x3 zY(Dv_qC3mNFCI(N^IPQT@~l2>MZO$R)SrZVS*F?rFF8hkEUE$n>)ebp7Y)- zcIWxs-_DwE<4^B6+rMvPP