tweak: Изменены голобарьеры (#539)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Server._White.Holo;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Coordinates.Helpers;
|
||||
@@ -83,7 +84,11 @@ public sealed class HolosignSystem : EntitySystem
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
component.Signs.Add(holoUid); // WD EDIT
|
||||
// WD EDIT
|
||||
EnsureComp<HoloComponent>(holoUid, out var holo);
|
||||
component.Signs.Add(holoUid);
|
||||
holo.Sign = uid;
|
||||
// WD EDIT
|
||||
}
|
||||
|
||||
private void OnComponentRemove(EntityUid uid, HolosignProjectorComponent comp, ComponentRemove args) // wd edit
|
||||
|
||||
8
Content.Server/_White/Holo/HoloComponent.cs
Normal file
8
Content.Server/_White/Holo/HoloComponent.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Content.Server._White.Holo;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class HoloComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
public EntityUid? Sign;
|
||||
}
|
||||
20
Content.Server/_White/Holo/HoloSystem.cs
Normal file
20
Content.Server/_White/Holo/HoloSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Server.Holosign;
|
||||
using Content.Shared.Destructible;
|
||||
|
||||
namespace Content.Server._White.Holo;
|
||||
|
||||
public sealed class HoloSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<HoloComponent, DestructionEventArgs>(OnDestruction);
|
||||
}
|
||||
|
||||
private void OnDestruction(EntityUid uid, HoloComponent component, DestructionEventArgs args)
|
||||
{
|
||||
if (!TryComp<HolosignProjectorComponent>(component.Sign, out var holo))
|
||||
return;
|
||||
|
||||
holo.Signs.Remove(uid);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,12 @@
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- type: Clickable # WD EDIT
|
||||
- type: MeleeSound # WD EDIT
|
||||
soundGroups:
|
||||
Brute:
|
||||
path:
|
||||
"/Audio/Weapons/egloves.ogg"
|
||||
|
||||
- type: entity
|
||||
id: HoloFan
|
||||
@@ -71,7 +77,6 @@
|
||||
radius: 3
|
||||
color: red
|
||||
- type: Climbable
|
||||
- type: Clickable
|
||||
|
||||
- type: entity
|
||||
id: HolosignForcefield
|
||||
|
||||
Reference in New Issue
Block a user