@@ -1,6 +1,6 @@
|
|||||||
using Robust.Client.Player;
|
using Robust.Client.Player;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Content.Shared.EntityHealthBar;
|
using Content.Shared.White.EntityHealthBar;
|
||||||
|
|
||||||
namespace Content.Client.Commands
|
namespace Content.Client.Commands
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,24 +19,19 @@ public sealed class EntityCrimeRecordsOverlay : Overlay
|
|||||||
{
|
{
|
||||||
private readonly IEntityManager _entManager;
|
private readonly IEntityManager _entManager;
|
||||||
private readonly SharedTransformSystem _transform;
|
private readonly SharedTransformSystem _transform;
|
||||||
private readonly IPrototypeManager _prototypeManager;
|
|
||||||
private readonly InventorySystem _inventorySystem;
|
private readonly InventorySystem _inventorySystem;
|
||||||
private readonly ShaderInstance _shader;
|
|
||||||
private readonly ShowCrimeRecordsSystem _parentSystem;
|
private readonly ShowCrimeRecordsSystem _parentSystem;
|
||||||
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
||||||
|
|
||||||
public EntityCrimeRecordsOverlay(
|
public EntityCrimeRecordsOverlay(
|
||||||
IEntityManager entManager,
|
IEntityManager entManager,
|
||||||
IPrototypeManager protoManager,
|
|
||||||
InventorySystem inventorySystem,
|
InventorySystem inventorySystem,
|
||||||
ShowCrimeRecordsSystem showCrimSystem)
|
ShowCrimeRecordsSystem showCrimSystem)
|
||||||
{
|
{
|
||||||
_entManager = entManager;
|
_entManager = entManager;
|
||||||
_prototypeManager = protoManager;
|
|
||||||
_inventorySystem = inventorySystem;
|
_inventorySystem = inventorySystem;
|
||||||
_parentSystem = showCrimSystem;
|
_parentSystem = showCrimSystem;
|
||||||
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
|
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
|
||||||
_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Draw(in OverlayDrawArgs args)
|
protected override void Draw(in OverlayDrawArgs args)
|
||||||
@@ -49,7 +44,6 @@ public sealed class EntityCrimeRecordsOverlay : Overlay
|
|||||||
const float scale = 1f;
|
const float scale = 1f;
|
||||||
var scaleMatrix = Matrix3.CreateScale(new Vector2(scale, scale));
|
var scaleMatrix = Matrix3.CreateScale(new Vector2(scale, scale));
|
||||||
var rotationMatrix = Matrix3.CreateRotation(-rotation);
|
var rotationMatrix = Matrix3.CreateRotation(-rotation);
|
||||||
handle.UseShader(_shader);
|
|
||||||
// da pizda
|
// da pizda
|
||||||
this.ZIndex = this.ZIndex -= 1;
|
this.ZIndex = this.ZIndex -= 1;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Content.Client.White.EntityCrimeRecords
|
|||||||
SubscribeLocalEvent<ShowCrimeRecordsComponent, PlayerDetachedEvent>(OnPlayerDetached);
|
SubscribeLocalEvent<ShowCrimeRecordsComponent, PlayerDetachedEvent>(OnPlayerDetached);
|
||||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
|
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
|
||||||
|
|
||||||
_overlay = new(EntityManager, _protoMan, _inventorySystem, this);
|
_overlay = new(EntityManager, _inventorySystem, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInit(EntityUid uid, ShowCrimeRecordsComponent component, ComponentInit args)
|
private void OnInit(EntityUid uid, ShowCrimeRecordsComponent component, ComponentInit args)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using Robust.Shared.Prototypes;
|
|||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Client.EntityHealthBar;
|
namespace Content.Client.White.EntityHealthBar;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Yeah a lot of this is duplicated from doafters.
|
/// Yeah a lot of this is duplicated from doafters.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using Content.Shared.EntityHealthBar;
|
using Content.Shared.White.EntityHealthBar;
|
||||||
using Content.Shared.GameTicking;
|
using Content.Shared.GameTicking;
|
||||||
using Robust.Client.Player;
|
using Robust.Client.Player;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Client.EntityHealthBar
|
namespace Content.Client.White.EntityHealthBar
|
||||||
{
|
{
|
||||||
public sealed class ShowHealthBarsSystem : EntitySystem
|
public sealed class ShowHealthBarsSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using Content.Shared.Roles;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace Content.Client.EntityJobInfo;
|
namespace Content.Client.White.EntityJobInfo;
|
||||||
|
|
||||||
public sealed class EntityJobInfoOverlay : Overlay
|
public sealed class EntityJobInfoOverlay : Overlay
|
||||||
{
|
{
|
||||||
@@ -19,7 +19,6 @@ public sealed class EntityJobInfoOverlay : Overlay
|
|||||||
private readonly SharedTransformSystem _transform;
|
private readonly SharedTransformSystem _transform;
|
||||||
private readonly IPrototypeManager _prototypeManager;
|
private readonly IPrototypeManager _prototypeManager;
|
||||||
private readonly InventorySystem _inventorySystem;
|
private readonly InventorySystem _inventorySystem;
|
||||||
private readonly ShaderInstance _shader;
|
|
||||||
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
||||||
|
|
||||||
public EntityJobInfoOverlay(IEntityManager entManager, IPrototypeManager protoManager, InventorySystem inventorySystem)
|
public EntityJobInfoOverlay(IEntityManager entManager, IPrototypeManager protoManager, InventorySystem inventorySystem)
|
||||||
@@ -28,7 +27,6 @@ public sealed class EntityJobInfoOverlay : Overlay
|
|||||||
_prototypeManager = protoManager;
|
_prototypeManager = protoManager;
|
||||||
_inventorySystem = inventorySystem;
|
_inventorySystem = inventorySystem;
|
||||||
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
|
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
|
||||||
_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Draw(in OverlayDrawArgs args)
|
protected override void Draw(in OverlayDrawArgs args)
|
||||||
@@ -41,7 +39,6 @@ public sealed class EntityJobInfoOverlay : Overlay
|
|||||||
const float scale = 1f;
|
const float scale = 1f;
|
||||||
var scaleMatrix = Matrix3.CreateScale(new Vector2(scale, scale));
|
var scaleMatrix = Matrix3.CreateScale(new Vector2(scale, scale));
|
||||||
var rotationMatrix = Matrix3.CreateRotation(-rotation);
|
var rotationMatrix = Matrix3.CreateRotation(-rotation);
|
||||||
handle.UseShader(_shader);
|
|
||||||
|
|
||||||
foreach (var hum in _entManager.EntityQuery<HumanoidAppearanceComponent>(true))
|
foreach (var hum in _entManager.EntityQuery<HumanoidAppearanceComponent>(true))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Shared.EntityJobInfo;
|
using Content.Shared.White.EntityJobInfo;
|
||||||
using Content.Shared.GameTicking;
|
using Content.Shared.GameTicking;
|
||||||
using Robust.Client.Player;
|
using Robust.Client.Player;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
@@ -7,14 +7,15 @@ using Robust.Shared.Prototypes;
|
|||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Client.EntityJobInfo
|
namespace Content.Client.White.EntityJobInfo;
|
||||||
{
|
|
||||||
public sealed class ShowJobInfoSystem : EntitySystem
|
public sealed class ShowJobInfoSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IPlayerManager _player = default!;
|
[Dependency] private readonly IPlayerManager _player = default!;
|
||||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||||
[Dependency] private readonly IOverlayManager _overlayMan = default!;
|
[Dependency] private readonly IOverlayManager _overlayMan = default!;
|
||||||
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
||||||
|
[Dependency] private readonly ILogManager _log = default!;
|
||||||
|
|
||||||
private EntityJobInfoOverlay _overlay = default!;
|
private EntityJobInfoOverlay _overlay = default!;
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
@@ -36,9 +37,8 @@ namespace Content.Client.EntityJobInfo
|
|||||||
{
|
{
|
||||||
_overlayMan.AddOverlay(_overlay);
|
_overlayMan.AddOverlay(_overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRemove(EntityUid uid, ShowJobInfoComponent component, ComponentRemove args)
|
private void OnRemove(EntityUid uid, ShowJobInfoComponent component, ComponentRemove args)
|
||||||
{
|
{
|
||||||
if (_player.LocalPlayer?.ControlledEntity == uid)
|
if (_player.LocalPlayer?.ControlledEntity == uid)
|
||||||
@@ -62,4 +62,3 @@ namespace Content.Client.EntityJobInfo
|
|||||||
_overlayMan.RemoveOverlay(_overlay);
|
_overlayMan.RemoveOverlay(_overlay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Shared.Clothing
|
namespace Content.Shared.White.ClothingGrant.Components;
|
||||||
{
|
|
||||||
[RegisterComponent]
|
[RegisterComponent, NetworkedComponent]
|
||||||
|
[AutoGenerateComponentState]
|
||||||
public sealed partial class ClothingGrantComponentComponent : Component
|
public sealed partial class ClothingGrantComponentComponent : Component
|
||||||
{
|
{
|
||||||
[DataField("component", required: true)]
|
[DataField("component", required: true)]
|
||||||
[AlwaysPushInheritance]
|
[AlwaysPushInheritance]
|
||||||
public ComponentRegistry Components { get; set; } = new();
|
public ComponentRegistry Components { get; private set; } = new();
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
[AutoNetworkedField]
|
||||||
public bool IsActive = false;
|
public bool IsActive = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
namespace Content.Shared.Clothing
|
using Robust.Shared.GameStates;
|
||||||
|
|
||||||
|
namespace Content.Shared.White.ClothingGrant.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent, NetworkedComponent]
|
||||||
|
[AutoGenerateComponentState]
|
||||||
public sealed partial class ClothingGrantTagComponent : Component
|
public sealed partial class ClothingGrantTagComponent : Component
|
||||||
{
|
{
|
||||||
[DataField("tag", required: true), ViewVariables(VVAccess.ReadWrite)]
|
[DataField("tag", required: true), ViewVariables(VVAccess.ReadWrite)]
|
||||||
public string Tag = "";
|
public string Tag = "";
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)] public bool IsActive = false;
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
[AutoNetworkedField]
|
||||||
|
public bool IsActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ using Content.Shared.Clothing.Components;
|
|||||||
using Content.Shared.Inventory.Events;
|
using Content.Shared.Inventory.Events;
|
||||||
using Robust.Shared.Serialization.Manager;
|
using Robust.Shared.Serialization.Manager;
|
||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
|
using Content.Shared.White.ClothingGrant.Components;
|
||||||
|
|
||||||
namespace Content.Shared.Clothing;
|
namespace Content.Shared.White.ClothingGrant.Systems;
|
||||||
|
|
||||||
public sealed class ClothingGrantingSystem : EntitySystem
|
public sealed class ClothingGrantingSystem : EntitySystem
|
||||||
{
|
{
|
||||||
@@ -44,9 +45,10 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
|||||||
var temp = (object) newComp;
|
var temp = (object) newComp;
|
||||||
_serializationManager.CopyTo(data.Component, ref temp);
|
_serializationManager.CopyTo(data.Component, ref temp);
|
||||||
EntityManager.AddComponent(args.Equipee, (Component)temp!);
|
EntityManager.AddComponent(args.Equipee, (Component)temp!);
|
||||||
|
}
|
||||||
|
|
||||||
component.IsActive = true;
|
component.IsActive = true;
|
||||||
}
|
Dirty(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCompUnequip(EntityUid uid, ClothingGrantComponentComponent component, GotUnequippedEvent args)
|
private void OnCompUnequip(EntityUid uid, ClothingGrantComponentComponent component, GotUnequippedEvent args)
|
||||||
@@ -61,6 +63,7 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
component.IsActive = false;
|
component.IsActive = false;
|
||||||
|
Dirty(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTagEquip(EntityUid uid, ClothingGrantTagComponent component, GotEquippedEvent args)
|
private void OnTagEquip(EntityUid uid, ClothingGrantTagComponent component, GotEquippedEvent args)
|
||||||
@@ -73,6 +76,7 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
|||||||
_tagSystem.AddTag(args.Equipee, component.Tag);
|
_tagSystem.AddTag(args.Equipee, component.Tag);
|
||||||
|
|
||||||
component.IsActive = true;
|
component.IsActive = true;
|
||||||
|
Dirty(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTagUnequip(EntityUid uid, ClothingGrantTagComponent component, GotUnequippedEvent args)
|
private void OnTagUnequip(EntityUid uid, ClothingGrantTagComponent component, GotUnequippedEvent args)
|
||||||
@@ -82,5 +86,6 @@ public sealed class ClothingGrantingSystem : EntitySystem
|
|||||||
_tagSystem.RemoveTag(args.Equipee, component.Tag);
|
_tagSystem.RemoveTag(args.Equipee, component.Tag);
|
||||||
|
|
||||||
component.IsActive = false;
|
component.IsActive = false;
|
||||||
|
Dirty(component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
using Robust.Shared.GameStates;
|
||||||
|
|
||||||
namespace Content.Shared.White.EntityCrimeRecords
|
namespace Content.Shared.White.EntityCrimeRecords
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allow to see crime records info for character
|
/// Allow to see crime records info for character
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent, NetworkedComponent]
|
||||||
public sealed partial class ShowCrimeRecordsComponent : Component
|
public sealed partial class ShowCrimeRecordsComponent : Component
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
using Content.Shared.Damage.Prototypes;
|
using Content.Shared.Damage.Prototypes;
|
||||||
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||||
|
|
||||||
namespace Content.Shared.EntityHealthBar
|
namespace Content.Shared.White.EntityHealthBar
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This component allows you to see health bars above damageable mobs.
|
/// This component allows you to see health bars above damageable mobs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent, NetworkedComponent]
|
||||||
public sealed partial class ShowWhiteHealthBarsComponent : Component
|
public sealed partial class ShowHealthBarsComponent : Component
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Displays health bars of the damage containers.
|
/// Displays health bars of the damage containers.
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
namespace Content.Shared.EntityJobInfo;
|
using Robust.Shared.GameStates;
|
||||||
|
|
||||||
|
namespace Content.Shared.White.EntityJobInfo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This component allows you to see job icon from entity(char)
|
/// This component allows you to see job icon from entity(char)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent, NetworkedComponent]
|
||||||
public sealed partial class ShowJobInfoComponent : Component
|
public sealed partial class ShowJobInfoComponent : Component
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user