mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
dc52779df9
9 changed files with 40 additions and 36 deletions
|
|
@ -119,6 +119,7 @@ public sealed partial class ScreechShockWaveOverlay : Overlay
|
|||
_shader.SetParameter("times", _times);
|
||||
_shader.SetParameter("count", _currentCount);
|
||||
_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
|
||||
_shader?.SetParameter("renderScale", args.Viewport.RenderScale * args.Viewport.Eye.Scale);
|
||||
|
||||
// finally do the rendering
|
||||
var worldHandle = args.WorldHandle;
|
||||
|
|
|
|||
5
Content.Client/Suicide/SuicideSystem.cs
Normal file
5
Content.Client/Suicide/SuicideSystem.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
using Content.Shared.Suicide;
|
||||
|
||||
namespace Content.Client.Suicide;
|
||||
|
||||
public sealed class SuicideSystem : SharedSuicideSystem;
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
using Content.Server.GameTicking;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Suicide;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Enums;
|
||||
|
|
|
|||
|
|
@ -1,45 +1,42 @@
|
|||
using System.Linq;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Construction;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Construction.Components;
|
||||
using Content.Server.DeviceLinking.Systems;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Hands.Systems;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Server.Lightning;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Temperature.Systems;
|
||||
using Content.Shared.Chemistry.Components.SolutionManager;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Construction.EntitySystems;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.DeviceLinking.Events;
|
||||
using Content.Shared.Destructible;
|
||||
using Content.Shared.DeviceLinking.Events;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Audio;
|
||||
using Content.Server.Lightning;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Kitchen;
|
||||
using Content.Shared.Kitchen.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Power;
|
||||
using Content.Shared.Power.EntitySystems;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Shared.Suicide;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using System.Linq;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Server.Construction.Components;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Power.EntitySystems;
|
||||
using Content.Shared.Temperature.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
|
||||
namespace Content.Server.Kitchen.EntitySystems
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using Content.Server.Ghost;
|
||||
using Content.Server.Hands.Systems;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.IdentityManagement;
|
||||
|
|
@ -12,13 +11,14 @@ using Content.Shared.Mind.Components;
|
|||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Suicide;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Chat;
|
||||
namespace Content.Server.Suicide;
|
||||
|
||||
public sealed partial class SuicideSystem : EntitySystem
|
||||
public sealed partial class SuicideSystem : SharedSuicideSystem
|
||||
{
|
||||
[Dependency] private EntityLookupSystem _entityLookupSystem = default!;
|
||||
[Dependency] private ISharedAdminLogManager _adminLogger = default!;
|
||||
|
|
@ -27,7 +27,6 @@ public sealed partial class SuicideSystem : EntitySystem
|
|||
[Dependency] private MobStateSystem _mobState = default!;
|
||||
[Dependency] private SharedPopupSystem _popup = default!;
|
||||
[Dependency] private GhostSystem _ghostSystem = default!;
|
||||
[Dependency] private SharedSuicideSystem _suicide = default!;
|
||||
[Dependency] private EntityQuery<ItemComponent> _itemQuery = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> CannotSuicideTag = "CannotSuicide";
|
||||
|
|
@ -83,6 +82,7 @@ public sealed partial class SuicideSystem : EntitySystem
|
|||
{
|
||||
_adminLogger.Add(LogType.Mind, $"{ToPrettyString(victim):player} suicided.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -162,13 +162,13 @@ public sealed partial class SuicideSystem : EntitySystem
|
|||
|
||||
if (args.DamageSpecifier != null)
|
||||
{
|
||||
_suicide.ApplyLethalDamage(victim, args.DamageSpecifier);
|
||||
ApplyLethalDamage(victim, args.DamageSpecifier);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
args.DamageType ??= "Bloodloss";
|
||||
_suicide.ApplyLethalDamage(victim, args.DamageType);
|
||||
ApplyLethalDamage(victim, args.DamageType);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.CombatMode;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Suicide;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
namespace Content.Shared.Execution;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ using Content.Shared.Damage.Systems;
|
|||
using Content.Shared.Mobs.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Chat;
|
||||
namespace Content.Shared.Suicide;
|
||||
|
||||
public sealed partial class SharedSuicideSystem : EntitySystem
|
||||
public abstract partial class SharedSuicideSystem : EntitySystem
|
||||
{
|
||||
private static readonly ProtoId<DamageTypePrototype> FallbackDamageType = "Blunt";
|
||||
|
||||
|
|
@ -5,9 +5,11 @@ uniform highp float[10] waveSpeeds;
|
|||
uniform highp float[10] downScales;
|
||||
uniform highp float[10] fades;
|
||||
uniform highp float[10] times;
|
||||
|
||||
// variables that are the same for everyone
|
||||
uniform lowp int count;
|
||||
uniform sampler2D SCREEN_TEXTURE;
|
||||
uniform highp vec2 renderScale;
|
||||
|
||||
void fragment()
|
||||
{
|
||||
|
|
@ -24,8 +26,8 @@ void fragment()
|
|||
WaveCentre.y *= ratio;
|
||||
|
||||
// calculate the distortion itself
|
||||
highp float dist = distance(vec2(st.x, st.y * ratio), WaveCentre) * downScales[i];
|
||||
highp vec2 delta = vec2(st.x, st.y * ratio) - WaveCentre;
|
||||
highp float dist = distance(vec2(st.x, st.y * ratio) / renderScale, WaveCentre / renderScale) * downScales[i];
|
||||
highp vec2 delta = (vec2(st.x, st.y * ratio) - WaveCentre) / renderScale;
|
||||
highp float angle = atan(delta.y/delta.x);
|
||||
highp float sinf = sin(angle*60.0)/80.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ uniform lowp int count;
|
|||
uniform highp float[5] falloffPower;
|
||||
uniform highp float[5] intensity;
|
||||
uniform highp vec2[5] position;
|
||||
// the `5`s in the array lengths correspond to the upper limit on the simultaneous distortion sources that can be present on screen at a time.
|
||||
// the `5`s in the array lengths correspond to the upper limit on the simultaneous distortion sources that can be present on screen at a time.
|
||||
// If you want to change this, make sure to change all of them here, in the for loop, and, in whatever overlay assigns the uniforms
|
||||
// (apparently #define is an unknown preprocessor directive)
|
||||
|
||||
|
|
@ -18,28 +18,28 @@ void fragment() {
|
|||
highp vec2 delta;
|
||||
highp float distance;
|
||||
highp float deformation;
|
||||
|
||||
|
||||
for (int i = 0; i < 5 && i < count; i++) {
|
||||
|
||||
|
||||
delta = FRAGCOORD.xy - position[i];
|
||||
distance = length(delta / renderScale);
|
||||
|
||||
deformation = intensity[i] / pow(distance, falloffPower[i]);
|
||||
|
||||
|
||||
// ensure deformation goes to zero at max distance
|
||||
// avoids long-range single-pixel shifts that are noticeable when leaving PVS.
|
||||
|
||||
|
||||
if (distance >= maxDistance) {
|
||||
deformation = 0.0;
|
||||
} else {
|
||||
deformation *= (1.0 - pow(distance/maxDistance, 4.0));
|
||||
}
|
||||
|
||||
|
||||
if(deformation > 0.8)
|
||||
deformation = pow(deformation, 0.3);
|
||||
|
||||
finalCoords -= deformation * delta;
|
||||
}
|
||||
|
||||
|
||||
COLOR = zTextureSpec(SCREEN_TEXTURE, finalCoords*SCREEN_PIXEL_SIZE );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue