forked from space-wizards/space-station-14
-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1037 from Saeko-44/master
The juice that lets you see ghosts
- Loading branch information
Showing
11 changed files
with
231 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Content.Client/_Impstation/Construction/ConstructionMediumComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Content.Shared.Construction.Prototypes; | ||
using Robust.Shared.GameObjects; | ||
using Robust.Shared.ViewVariables; | ||
|
||
namespace Content.Client.Construction | ||
{ | ||
[RegisterComponent] | ||
public sealed partial class ConstructionMediumComponent : Component | ||
{ | ||
[ViewVariables] public ConstructionPrototype? Prototype { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Content.Server/_Impstation/EntityEffects/Effects/Medium.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Content.Shared._Impstation.Ghost; | ||
using Content.Shared.EntityEffects; | ||
using Content.Shared.Polymorph; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Server._Impstation.EntityEffects.Effects; | ||
|
||
public sealed partial class Medium : EntityEffect | ||
{ | ||
/// <summary> | ||
/// What Medium prototype is used on effect | ||
/// </summary> | ||
//[DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<MediumPrototype>))] | ||
//public string MediumPrototype { get; set; } | ||
|
||
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) | ||
{ | ||
return "Grants whoever drinks this the ability to see ghosts for a while"; | ||
} | ||
|
||
public override void Effect(EntityEffectBaseArgs args) | ||
{ | ||
var entityManager = args.EntityManager; | ||
var uid = args.TargetEntity; | ||
|
||
entityManager.EnsureComponent<MediumComponent>(uid); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Content.Shared.Actions; | ||
using Content.Shared.Ghost; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared._Impstation.Ghost; | ||
|
||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGhostSystem))] | ||
[AutoGenerateComponentState(true)] | ||
public sealed partial class MediumComponent : Component | ||
{ | ||
[DataField] | ||
public EntProtoId ToggleGhostsMediumAction = "ActionToggleGhostsMedium"; | ||
|
||
[DataField, AutoNetworkedField] | ||
public EntityUid? ToggleGhostsMediumActionEntity; | ||
|
||
//Time in seconds passed since medium vision activated | ||
[DataField, AutoNetworkedField] | ||
public float CurrentMediumTime = 0; | ||
|
||
//Time after how many seconds the medium effect stops | ||
//Im just gonna put it here as a constant instead of making a whole prototype to set it from the yaml | ||
//Because Im not expected for other reagents to reuse that effect and even less so with a different time limit | ||
[DataField, AutoNetworkedField] | ||
public float MediumTime = 300; // 5 minutes | ||
} | ||
|
||
public sealed partial class ToggleGhostsMediumActionEvent : InstantActionEvent { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Resources/Prototypes/_Impstation/Entities/Mobs/Player/medium.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- type: entity | ||
id: ActionToggleGhostsMedium | ||
name: Toggle Ghosts | ||
description: Toggle the visibility of ghosts. | ||
components: | ||
- type: InstantAction | ||
icon: { sprite: Mobs/Ghosts/ghost_human.rsi, state: icon } | ||
clientExclusive: true | ||
checkCanInteract: false | ||
event: !type:ToggleGhostsMediumActionEvent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters