Fix lumera actions (#1446)
* ZLevelMover * fix * Update CP14ReligionSystem.cs
This commit is contained in:
@@ -234,8 +234,6 @@ namespace Content.Server.Ghost
|
||||
_actions.AddAction(uid, ref component.ToggleFoVActionEntity, component.ToggleFoVAction);
|
||||
_actions.AddAction(uid, ref component.ToggleGhostsActionEntity, component.ToggleGhostsAction);
|
||||
//CP14
|
||||
_actions.AddAction(uid, ref component.CP14ZLevelUpActionEntity, component.CP14ZLevelUpAction);
|
||||
_actions.AddAction(uid, ref component.CP14ZLevelDownActionEntity, component.CP14ZLevelDownAction);
|
||||
_actions.AddAction(uid, ref component.CP14ToggleRoofActionEntity, component.CP14ToggleRoofAction);
|
||||
//CP14 end
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ using Content.Shared._CP14.Religion.Components;
|
||||
using Content.Shared._CP14.Religion.Prototypes;
|
||||
using Content.Shared._CP14.Religion.Systems;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.Eye;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.GameStates;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
@@ -51,6 +53,12 @@ public sealed partial class CP14ReligionGodSystem : CP14SharedReligionGodSystem
|
||||
SubscribeLocalEvent<ExpandICChatRecipientsEvent>(OnExpandRecipients);
|
||||
|
||||
SubscribeLocalEvent<CP14ReligionAltarComponent, ListenEvent>(OnListen);
|
||||
SubscribeLocalEvent<CP14ReligionEntityComponent, GetVisMaskEvent>(OnGetVis);
|
||||
}
|
||||
|
||||
private void OnGetVis(Entity<CP14ReligionEntityComponent> ent, ref GetVisMaskEvent args)
|
||||
{
|
||||
args.VisibilityMask |= (int)VisibilityFlags.Ghost;
|
||||
}
|
||||
|
||||
private void OnExpandRecipients(ExpandICChatRecipientsEvent ev)
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
using Content.Shared._CP14.ZLevel;
|
||||
using Content.Shared.Ghost;
|
||||
using Content.Shared.Actions;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server._CP14.ZLevels.EntitySystems;
|
||||
|
||||
public sealed partial class CP14StationZLevelsSystem
|
||||
{
|
||||
[Dependency] private readonly SharedActionsSystem _actions = default!;
|
||||
private void InitActions()
|
||||
{
|
||||
SubscribeLocalEvent<GhostComponent, CP14ZLevelActionUp>(OnZLevelUpGhost);
|
||||
SubscribeLocalEvent<GhostComponent, CP14ZLevelActionDown>(OnZLevelDownGhost);
|
||||
SubscribeLocalEvent<SpectralComponent, CP14ZLevelActionUp>(OnZLevelUp);
|
||||
SubscribeLocalEvent<SpectralComponent, CP14ZLevelActionDown>(OnZLevelDown);
|
||||
SubscribeLocalEvent<CP14ZLevelMoverComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<CP14ZLevelMoverComponent, ComponentRemove>(OnRemove);
|
||||
SubscribeLocalEvent<CP14ZLevelMoverComponent, CP14ZLevelActionUp>(OnZLevelUpGhost);
|
||||
SubscribeLocalEvent<CP14ZLevelMoverComponent, CP14ZLevelActionDown>(OnZLevelDownGhost);
|
||||
}
|
||||
|
||||
private void OnZLevelDownGhost(Entity<GhostComponent> ent, ref CP14ZLevelActionDown args)
|
||||
private void OnMapInit(Entity<CP14ZLevelMoverComponent> ent, ref MapInitEvent args)
|
||||
{
|
||||
_actions.AddAction(ent, ref ent.Comp.CP14ZLevelUpActionEntity, ent.Comp.UpActionProto);
|
||||
_actions.AddAction(ent, ref ent.Comp.CP14ZLevelDownActionEntity, ent.Comp.DownActionProto);
|
||||
}
|
||||
|
||||
private void OnRemove(Entity<CP14ZLevelMoverComponent> ent, ref ComponentRemove args)
|
||||
{
|
||||
_actions.RemoveAction(ent.Comp.CP14ZLevelUpActionEntity);
|
||||
_actions.RemoveAction(ent.Comp.CP14ZLevelDownActionEntity);
|
||||
}
|
||||
|
||||
private void OnZLevelDownGhost(Entity<CP14ZLevelMoverComponent> ent, ref CP14ZLevelActionDown args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
@@ -24,27 +37,7 @@ public sealed partial class CP14StationZLevelsSystem
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnZLevelUpGhost(Entity<GhostComponent> ent, ref CP14ZLevelActionUp args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
ZLevelMove(ent, 1);
|
||||
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnZLevelDown(Entity<SpectralComponent> ent, ref CP14ZLevelActionDown args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
ZLevelMove(ent, -1);
|
||||
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnZLevelUp(Entity<SpectralComponent> ent, ref CP14ZLevelActionUp args)
|
||||
private void OnZLevelUpGhost(Entity<CP14ZLevelMoverComponent> ent, ref CP14ZLevelActionUp args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user