Singularity Shaders and a lot of Shader Stuff (#2517)
* Beginnings of singulo shader * LOTS of changes!! * Minor changes * Singulo stuff * Aesthetic changes to singulo * Combining singulo change * ShaderAura uses IEntities now, not IPlayerSession * Fixes? * Fixes draw order for atmos * using fix * Address reviews * nuget.config whaaa * nuget haha * nuget why are you so dum * happy now * Preparing for omegachange * Merge from seventh level of hell * woork * Ignorecomponents add * mmf * RobustToolbox? * Fixes * Fixes Robust? * adds sprite * Nullables * Crit overlay stuff * Commits Robust
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using Content.Shared.GameObjects.Components.Singularity;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Singularity
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IClientSingularityInstance))]
|
||||
class ClientSingularityComponent : SharedSingularityComponent, IClientSingularityInstance
|
||||
{
|
||||
public int Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
set
|
||||
{
|
||||
_level = value;
|
||||
}
|
||||
}
|
||||
private int _level;
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
{
|
||||
if (curState is not SingularityComponentState state)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_level = state.Level;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Singularity
|
||||
{
|
||||
interface IClientSingularityInstance
|
||||
{
|
||||
public int Level { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Singularity
|
||||
{
|
||||
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IClientSingularityInstance))]
|
||||
public class ToySingularityComponent : Component, IClientSingularityInstance
|
||||
{
|
||||
public override string Name => "ToySingularity";
|
||||
public int Level {
|
||||
get {
|
||||
return 1;
|
||||
}
|
||||
set {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.UserInterface;
|
||||
using Content.Client.UserInterface.Suspicion;
|
||||
@@ -68,7 +68,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
|
||||
|
||||
private void AddTraitorOverlay()
|
||||
{
|
||||
if (_overlayManager.HasOverlay(nameof(TraitorOverlay)))
|
||||
if (_overlayManager.HasOverlay<TraitorOverlay>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
|
||||
return;
|
||||
}
|
||||
|
||||
_overlayManager.RemoveOverlay(nameof(TraitorOverlay));
|
||||
_overlayManager.RemoveOverlay<TraitorOverlay>();
|
||||
}
|
||||
|
||||
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Shared.GameObjects.EntitySystems;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -25,7 +26,6 @@ namespace Content.Client.GameObjects.Components.Suspicion
|
||||
IEntityManager entityManager,
|
||||
IResourceCache resourceCache,
|
||||
IEyeManager eyeManager)
|
||||
: base(nameof(TraitorOverlay))
|
||||
{
|
||||
_playerManager = IoCManager.Resolve<IPlayerManager>();
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Client.Graphics.Overlays;
|
||||
using Content.Shared.GameObjects.Components.Weapons;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -15,7 +17,7 @@ namespace Content.Client.GameObjects.Components.Weapons
|
||||
private TimeSpan _startTime;
|
||||
private double _duration;
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
|
||||
{
|
||||
if (curState == null)
|
||||
{
|
||||
@@ -55,7 +57,7 @@ namespace Content.Client.GameObjects.Components.Weapons
|
||||
_duration = newState.Duration;
|
||||
|
||||
var overlayManager = IoCManager.Resolve<IOverlayManager>();
|
||||
var overlay = overlayManager.GetOverlay<FlashOverlay>(nameof(FlashOverlay));
|
||||
var overlay = overlayManager.GetOverlay<FlashOverlay>();
|
||||
overlay.ReceiveFlash(_duration);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user