Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
FaDeOkno committed Jun 24, 2024
1 parent 76dd6b5 commit 066f294
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 19 deletions.
40 changes: 39 additions & 1 deletion Content.Server/ADT/Phantom/EntitySystems/PhantomSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ private void OnStatusEnded(EntityUid uid, PhantomComponent component, StatusEffe
}

#region Radial Menu
/// <summary>
/// Requests radial menu for the styles
/// </summary>
/// <param name="uid">Phantom uid</param>
/// <param name="component">Phantom component</param>
/// <param name="args">Event</param>
private void OnRequestStyleMenu(EntityUid uid, PhantomComponent component, OpenPhantomStylesMenuActionEvent args)
{
if (args.Handled)
Expand All @@ -312,6 +318,10 @@ private void OnRequestStyleMenu(EntityUid uid, PhantomComponent component, OpenP
args.Handled = true;
}

/// <summary>
/// Raised when style selected
/// </summary>
/// <param name="args">Event</param>
private void OnSelectStyle(SelectPhantomStyleEvent args)
{
var uid = GetEntity(args.Target);
Expand All @@ -330,6 +340,12 @@ private void OnSelectStyle(SelectPhantomStyleEvent args)
args.Handled = true;
}

/// <summary>
/// Requests radial menu for freedom finale
/// </summary>
/// <param name="uid">Phantom uid</param>
/// <param name="component">Phantom component</param>
/// <param name="args">Event</param>
private void OnRequestFreedomMenu(EntityUid uid, PhantomComponent component, FreedomFinaleActionEvent args)
{
if (args.Handled)
Expand Down Expand Up @@ -367,6 +383,10 @@ private void OnRequestFreedomMenu(EntityUid uid, PhantomComponent component, Fre
args.Handled = true;
}

/// <summary>
/// Raised when freedom type selected
/// </summary>
/// <param name="args">Event</param>
private void OnSelectFreedom(SelectPhantomFreedomEvent args)
{
var uid = GetEntity(args.Target);
Expand Down Expand Up @@ -396,6 +416,12 @@ private void OnSelectFreedom(SelectPhantomFreedomEvent args)
}
}

/// <summary>
/// Requests radial menu for vessel haunting
/// </summary>
/// <param name="uid">Phantom uid</param>
/// <param name="component">Phantom component</param>
/// <param name="args">Event</param>
private void OnRequestVesselMenu(EntityUid uid, PhantomComponent component, HauntVesselActionEvent args)
{
if (args.Handled)
Expand Down Expand Up @@ -467,6 +493,10 @@ private void OnRequestVesselMenu(EntityUid uid, PhantomComponent component, Haun
args.Handled = true;
}

/// <summary>
/// Raised when vessel selected
/// </summary>
/// <param name="args">Event</param>
private void OnSelectVessel(SelectPhantomVesselEvent args)
{
var uid = GetEntity(args.Uid);
Expand Down Expand Up @@ -535,7 +565,14 @@ private void OnMakeVessel(EntityUid uid, PhantomComponent component, MakeVesselA
if (args.Handled)
return;

var target = args.Target;
if (!component.HasHaunted)
{
var selfMessage = Loc.GetString("phantom-no-holder");
_popup.PopupEntity(selfMessage, uid, uid);
return;
}

var target = component.Holder;

if (!TryUseAbility(uid, target))
return;
Expand Down Expand Up @@ -1015,6 +1052,7 @@ private void OnGhostHeal(EntityUid uid, PhantomComponent component, GhostHealAct
_damageableSystem.TryChangeDamage(target, damage_burn);
}

// Oath but im too lazy to rename it
private void OnPuppeter(EntityUid uid, PhantomComponent component, PuppeterActionEvent args)
{
if (args.Handled)
Expand Down
17 changes: 9 additions & 8 deletions Content.Shared/ADT/Phantom/SharedPhantom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ public sealed partial class MakeHolderActionEvent : EntityTargetActionEvent
{
}

public sealed partial class MakeVesselActionEvent : EntityTargetActionEvent
{
}

public sealed partial class ParalysisActionEvent : EntityTargetActionEvent
{
}
Expand All @@ -34,17 +30,18 @@ public sealed partial class RepairActionEvent : EntityTargetActionEvent
public sealed partial class BloodBlindingActionEvent : EntityTargetActionEvent
{
}

public sealed partial class PsychoEpidemicActionEvent : EntityTargetActionEvent
{
}
#endregion

#region Instant Actions
public sealed partial class StopHauntingActionEvent : InstantActionEvent
{
}

public sealed partial class MakeVesselActionEvent : InstantActionEvent
{
}


public sealed partial class CycleVesselActionEvent : InstantActionEvent
{
}
Expand Down Expand Up @@ -92,6 +89,10 @@ public sealed partial class PhantomHelpingHelpActionEvent : InstantActionEvent
public sealed partial class PhantomControlActionEvent : InstantActionEvent
{
}

public sealed partial class PsychoEpidemicActionEvent : InstantActionEvent
{
}
#endregion

#region Finale
Expand Down
15 changes: 5 additions & 10 deletions Resources/Prototypes/ADT/Phantom/Abilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,14 @@
description: action-phantom-make-vessel-desc
noSpawn: true
components:
- type: EntityTargetAction
- type: InstantAction
checkCanInteract: false
icon:
sprite: ADT/Interface/Actions/actions_phantom.rsi
state: ghost_kiss
itemIconStyle: BigAction
whitelist:
components:
- Body
event: !type:MakeVesselActionEvent
#useDelay: 1
canTargetSelf: false
range: 3
priority: -88

- type: entity
Expand Down Expand Up @@ -318,15 +314,14 @@
description: action-phantom-psycho-desc
noSpawn: true
components:
- type: EntityTargetAction
- type: InstantAction
checkCanInteract: false
icon:
sprite: ADT/Interface/Actions/actions_phantom.rsi
state: psycho-epedemic
itemIconStyle: BigAction
event: !type:PsychoEpidemicActionEvent
#useDelay: 120
canTargetSelf: false
range: 3
#useDelay: 1
priority: -77

- type: entity
Expand Down

0 comments on commit 066f294

Please sign in to comment.