Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Minor Fixes from WizDen / merges up to 20th march #24

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
a8d4da2
Fix tranq rounds injecting when reflected (#26141)
Tayrtahn Mar 15, 2024
cacf0f7
fix eggsplosion (#26146)
deltanedas Mar 15, 2024
7cd910c
less fish in maints (#26156)
deltanedas Mar 16, 2024
af01779
Small performance optimization. Don't do String.Trim() second time (#…
CrafterKolyan Mar 15, 2024
09d5eb9
Add log when a player starts observing. (#26091)
nikthechampiongr Mar 13, 2024
54eb16c
Remove butchering popup when clicking own sprite with a knife (#26051)
Gyrandola Mar 13, 2024
231d28b
Fix Sky Blue carpet making red tables (#26049)
Gyrandola Mar 13, 2024
bd0df53
Round start Ion storms (#26165)
Plykiya Mar 16, 2024
830927d
Fix StrippableSystem blunders (#26166)
Krunklehorn Mar 16, 2024
0ef2cec
Fix store refunds (#26173)
metalgearsloth Mar 16, 2024
f13458a
Fix anomaly decay logs (#26180)
LordCarve Mar 16, 2024
235af01
Fix anomaly decay logs (#26180)
LordCarve Mar 16, 2024
d1ab9b7
Small species melee weapon change (#26183)
Dutch-VanDerLinde Mar 16, 2024
cd7ecf5
Change collision mask of canisters to allow passing through cargo fla…
IamVelcroboy Mar 17, 2024
88f20e7
Fix presetidcard extended access throwing (#26195)
metalgearsloth Mar 17, 2024
8b20f8b
Gives glue tag to crazy glue (#26154)
Adrian16199 Mar 17, 2024
3f2987f
SlowContactsSystem to SpeedModifierContactsSystem mini rework (#26110)
TheShuEd Mar 17, 2024
451badb
Add decoy syndicate bomb to uplink (#26034)
Ilya246 Mar 17, 2024
604704b
Obsolete `Logger` cleanup for `EntitySystem`s part 2 (#26159)
LordCarve Mar 17, 2024
16a4bc2
Update blood related tips! (#25809)
QuietlyWhisper Mar 17, 2024
077a307
Unify `Content`'s `EntitySystem` logging (#26216)
LordCarve Mar 17, 2024
57a57af
Fix barotrauma calculations
PJB3005 Mar 17, 2024
0979471
Increase air alarm low pressure thresholds.
PJB3005 Mar 17, 2024
ab0d3e9
Make puddle smoothing better (#26171)
potato1234x Mar 17, 2024
a2300d4
Criminal Record Icons below Job Icons (#26203)
Golinth Mar 18, 2024
a25aeda
make romerol work on the dead (#26222)
Dutch-VanDerLinde Mar 18, 2024
4466352
Move faction exception and everything it needs to shared (#25154)
deltanedas Mar 18, 2024
c11cacd
Add reckless replay load button (#26212)
ElectroJr Mar 18, 2024
f69e1eb
Fix borg charger error (#26230)
Tayrtahn Mar 18, 2024
fc09c4c
Improves Medical Hud interface and functionality (#26027)
DoutorWhite Mar 18, 2024
66e87e4
fix decoy bomb uplink category (#26205)
Ilya246 Mar 18, 2024
7a2259a
Fix barotrauma pressure protection (#26236)
PJB3005 Mar 18, 2024
1b21d51
makes closets/lockers better (#24942)
potato1234x Mar 18, 2024
47f9fcd
Spray Paint (Review Ready) (#23003)
brainfood1183 Mar 18, 2024
87460eb
Include bans in adminremarks command (#26240)
PJB3005 Mar 18, 2024
7c2e221
Adds craftable ducky slippers (#26138)
Plykiya Mar 18, 2024
12d932b
Zombies can very slowly regen heat and shock damage (#25925)
shampunj Mar 18, 2024
db3b319
Initial Infected can see each other (#25934)
Killerqu00 Mar 18, 2024
9830e6e
Fix SCRAM implant not working while cuffed. Incidentally fix freedom …
nikthechampiongr Mar 18, 2024
e9322cd
Fix artifact report info (#26252)
Vermidia Mar 19, 2024
648de56
Pulling rework v2 (#24936)
metalgearsloth Mar 19, 2024
69f3df4
Store Refund Fix (#26251)
keronshb Mar 19, 2024
713575e
Fix build (#26258)
metalgearsloth Mar 19, 2024
528b7fe
Adds logging for refunds (#26274)
keronshb Mar 20, 2024
803e452
make traitor syndicate reinforcements get the traitor role (#25400)
Dutch-VanDerLinde Mar 20, 2024
9d8e78d
Thrown soap/banana/(etc?) will fail to slip until it lands (#24494)
Errant-4 Mar 20, 2024
959f5e6
Monkey and gorilla melee weapon fix (#26288)
Dutch-VanDerLinde Mar 20, 2024
f1dd888
Fix blunt melee weapon hitsound (#26286)
Dutch-VanDerLinde Mar 20, 2024
25e1dd4
Fix EFCore obsoletion warnings in Content.Server.Database (#26285)
PJB3005 Mar 20, 2024
b1763d9
Fix wire layout inheritance. (#26289)
PJB3005 Mar 20, 2024
a449eb7
Per-department wire layouts (#26247)
Killerqu00 Mar 20, 2024
fdbe884
Pizza is not a fruit (#26293)
Tayrtahn Mar 20, 2024
66cdaba
Merge branch 'master' into wizden-cherrypick-2
DangerRevolution Mar 21, 2024
a77b1d5
Merge branch 'master' into wizden-cherrypick-2
DangerRevolution Mar 23, 2024
d6f3955
try fix the component error
DangerRevolution Mar 23, 2024
32f9f6f
Merge branch 'wizden-cherrypick-2' of https://github.com/DangerRevolu…
DangerRevolution Mar 23, 2024
818e8d1
fix the system, not sure why this wasn't merged correctly??
DangerRevolution Mar 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ private void BaseHandleState<T>(EntityUid uid, BaseActionComponent component, Ba
component.Container = EnsureEntity<T>(state.Container, uid);
component.EntityIcon = EnsureEntity<T>(state.EntityIcon, uid);
component.CheckCanInteract = state.CheckCanInteract;
component.CheckConsciousness = state.CheckConsciousness;
component.ClientExclusive = state.ClientExclusive;
component.Priority = state.Priority;
component.AttachedEntity = EnsureEntity<T>(state.AttachedEntity, uid);
Expand Down
23 changes: 12 additions & 11 deletions Content.Client/Alerts/ClientAlertsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Robust.Client.Player;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;

namespace Content.Client.Alerts;

Expand All @@ -12,6 +13,7 @@ public sealed class ClientAlertsSystem : AlertsSystem
{
public AlertOrderPrototype? AlertOrder { get; set; }

[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

Expand Down Expand Up @@ -49,24 +51,23 @@ public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts

protected override void AfterShowAlert(Entity<AlertsComponent> alerts)
{
if (_playerManager.LocalEntity != alerts.Owner)
return;

SyncAlerts?.Invoke(this, alerts.Comp.Alerts);
UpdateHud(alerts);
}

protected override void AfterClearAlert(Entity<AlertsComponent> alertsComponent)
protected override void AfterClearAlert(Entity<AlertsComponent> alerts)
{
if (_playerManager.LocalEntity != alertsComponent.Owner)
return;
UpdateHud(alerts);
}

SyncAlerts?.Invoke(this, alertsComponent.Comp.Alerts);
private void ClientAlertsHandleState(Entity<AlertsComponent> alerts, ref AfterAutoHandleStateEvent args)
{
UpdateHud(alerts);
}

private void ClientAlertsHandleState(EntityUid uid, AlertsComponent component, ref AfterAutoHandleStateEvent args)
private void UpdateHud(Entity<AlertsComponent> entity)
{
if (_playerManager.LocalEntity == uid)
SyncAlerts?.Invoke(this, component.Alerts);
if (_playerManager.LocalEntity == entity.Owner)
SyncAlerts?.Invoke(this, entity.Comp.Alerts);
}

private void OnPlayerAttached(EntityUid uid, AlertsComponent component, LocalPlayerAttachedEvent args)
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Antag/AntagStatusIconSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public override void Initialize()
SubscribeLocalEvent<RevolutionaryComponent, GetStatusIconsEvent>(GetRevIcon);
SubscribeLocalEvent<ZombieComponent, GetStatusIconsEvent>(GetIcon);
SubscribeLocalEvent<HeadRevolutionaryComponent, GetStatusIconsEvent>(GetIcon);
SubscribeLocalEvent<InitialInfectedComponent, GetStatusIconsEvent>(GetIcon);
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions Content.Client/CardboardBox/CardboardBoxSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Numerics;
using System.Numerics;
using Content.Shared.CardboardBox;
using Content.Shared.CardboardBox.Components;
using Content.Shared.Examine;
Expand All @@ -11,6 +11,7 @@ public sealed class CardboardBoxSystem : SharedCardboardBoxSystem
{
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -55,7 +56,7 @@ private void OnBoxEffect(PlayBoxEffectMessage msg)
foreach (var mob in mobMoverEntities)
{
var mapPos = _transform.GetMapCoordinates(mob);
if (!ExamineSystemShared.InRangeUnOccluded(sourcePos, mapPos, box.Distance, null))
if (!_examine.InRangeUnOccluded(sourcePos, mapPos, box.Distance, null))
continue;

var ent = Spawn(box.Effect, mapPos);
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public sealed class EntryPoint : GameClient
[Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IReplayLoadManager _replayLoad = default!;
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly ContentReplayPlaybackManager _replayMan = default!;

public override void Init()
{
Expand Down Expand Up @@ -100,12 +101,10 @@ public override void Init()
_prototypeManager.RegisterIgnore("seed"); // Seeds prototypes are server-only.
_prototypeManager.RegisterIgnore("objective");
_prototypeManager.RegisterIgnore("holiday");
_prototypeManager.RegisterIgnore("aiFaction");
_prototypeManager.RegisterIgnore("htnCompound");
_prototypeManager.RegisterIgnore("htnPrimitive");
_prototypeManager.RegisterIgnore("gameMap");
_prototypeManager.RegisterIgnore("gameMapPool");
_prototypeManager.RegisterIgnore("npcFaction");
_prototypeManager.RegisterIgnore("lobbyBackground");
_prototypeManager.RegisterIgnore("advertisementsPack");
_prototypeManager.RegisterIgnore("gamePreset");
Expand Down Expand Up @@ -193,6 +192,7 @@ private void SwitchToDefaultState(bool disconnected = false)
_resourceManager,
ReplayConstants.ReplayZipFolder.ToRootedPath());

_replayMan.LastLoad = (null, ReplayConstants.ReplayZipFolder.ToRootedPath());
_replayLoad.LoadAndStartReplay(reader);
}
else if (_gameController.LaunchState.FromLauncher)
Expand Down
25 changes: 16 additions & 9 deletions Content.Client/Overlays/ShowHealthIconsSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Content.Shared.Atmos.Rotting;
using Content.Shared.Damage;
using Content.Shared.Inventory.Events;
using Content.Shared.Mobs.Components;
using Content.Shared.Overlays;
using Content.Shared.StatusIcon;
using Content.Shared.StatusIcon.Components;
Expand All @@ -17,9 +19,6 @@ public sealed class ShowHealthIconsSystem : EquipmentHudSystem<ShowHealthIconsCo

public HashSet<string> DamageContainers = new();

[ValidatePrototypeId<StatusIconPrototype>]
private const string HealthIconFine = "HealthIconFine";

public override void Initialize()
{
base.Initialize();
Expand All @@ -45,18 +44,20 @@ protected override void DeactivateInternal()
DamageContainers.Clear();
}

private void OnGetStatusIconsEvent(EntityUid uid, DamageableComponent damageableComponent, ref GetStatusIconsEvent args)
private void OnGetStatusIconsEvent(Entity<DamageableComponent> entity, ref GetStatusIconsEvent args)
{
if (!IsActive || args.InContainer)
return;

var healthIcons = DecideHealthIcons(damageableComponent);
var healthIcons = DecideHealthIcons(entity);

args.StatusIcons.AddRange(healthIcons);
}

private IReadOnlyList<StatusIconPrototype> DecideHealthIcons(DamageableComponent damageableComponent)
private IReadOnlyList<StatusIconPrototype> DecideHealthIcons(Entity<DamageableComponent> entity)
{
var damageableComponent = entity.Comp;

if (damageableComponent.DamageContainerID == null ||
!DamageContainers.Contains(damageableComponent.DamageContainerID))
{
Expand All @@ -66,10 +67,16 @@ private IReadOnlyList<StatusIconPrototype> DecideHealthIcons(DamageableComponent
var result = new List<StatusIconPrototype>();

// Here you could check health status, diseases, mind status, etc. and pick a good icon, or multiple depending on whatever.
if (damageableComponent?.DamageContainerID == "Biological" &&
_prototypeMan.TryIndex<StatusIconPrototype>(HealthIconFine, out var healthyIcon))
if (damageableComponent?.DamageContainerID == "Biological")
{
result.Add(healthyIcon);
if (TryComp<MobStateComponent>(entity, out var state))
{
// Since there is no MobState for a rotting mob, we have to deal with this case first.
if (HasComp<RottingComponent>(entity) && _prototypeMan.TryIndex(damageableComponent.RottingIcon, out var rottingIcon))
result.Add(rottingIcon);
else if (damageableComponent.HealthIcons.TryGetValue(state.CurrentState, out var value) && _prototypeMan.TryIndex(value, out var icon))
result.Add(icon);
}
}

return result;
Expand Down
116 changes: 116 additions & 0 deletions Content.Client/Paint/PaintVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
using System.Linq;
using Robust.Client.GameObjects;
using static Robust.Client.GameObjects.SpriteComponent;
using Content.Shared.Clothing;
using Content.Shared.Hands;
using Content.Shared.Paint;
using Robust.Client.Graphics;
using Robust.Shared.Prototypes;

namespace Content.Client.Paint;

public sealed class PaintedVisualizerSystem : VisualizerSystem<PaintedComponent>
{
/// <summary>
/// Visualizer for Paint which applies a shader and colors the entity.
/// </summary>

[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly IPrototypeManager _protoMan = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<PaintedComponent, HeldVisualsUpdatedEvent>(OnHeldVisualsUpdated);
SubscribeLocalEvent<PaintedComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<PaintedComponent, EquipmentVisualsUpdatedEvent>(OnEquipmentVisualsUpdated);
}

protected override void OnAppearanceChange(EntityUid uid, PaintedComponent component, ref AppearanceChangeEvent args)
{
var shader = _protoMan.Index<ShaderPrototype>(component.ShaderName).Instance();

if (args.Sprite == null)
return;

// What is this even doing? It's not even checking what the value is.
if (!_appearance.TryGetData(uid, PaintVisuals.Painted, out bool isPainted))
return;

var sprite = args.Sprite;

foreach (var spriteLayer in sprite.AllLayers)
{
if (spriteLayer is not Layer layer)
continue;

if (layer.Shader == null) // If shader isn't null we dont want to replace the original shader.
{
layer.Shader = shader;
layer.Color = component.Color;
}
}
}

private void OnHeldVisualsUpdated(EntityUid uid, PaintedComponent component, HeldVisualsUpdatedEvent args)
{
if (args.RevealedLayers.Count == 0)
return;

if (!TryComp(args.User, out SpriteComponent? sprite))
return;

foreach (var revealed in args.RevealedLayers)
{
if (!sprite.LayerMapTryGet(revealed, out var layer))
continue;

sprite.LayerSetShader(layer, component.ShaderName);
sprite.LayerSetColor(layer, component.Color);
}
}

private void OnEquipmentVisualsUpdated(EntityUid uid, PaintedComponent component, EquipmentVisualsUpdatedEvent args)
{
if (args.RevealedLayers.Count == 0)
return;

if (!TryComp(args.Equipee, out SpriteComponent? sprite))
return;

foreach (var revealed in args.RevealedLayers)
{
if (!sprite.LayerMapTryGet(revealed, out var layer))
continue;

sprite.LayerSetShader(layer, component.ShaderName);
sprite.LayerSetColor(layer, component.Color);
}
}

private void OnShutdown(EntityUid uid, PaintedComponent component, ref ComponentShutdown args)
{
if (!TryComp(uid, out SpriteComponent? sprite))
return;

component.BeforeColor = sprite.Color;
var shader = _protoMan.Index<ShaderPrototype>(component.ShaderName).Instance();

if (!Terminating(uid))
{
foreach (var spriteLayer in sprite.AllLayers)
{
if (spriteLayer is not Layer layer)
continue;

if (layer.Shader == shader) // If shader isn't same as one in component we need to ignore it.
{
layer.Shader = null;
if (layer.Color == component.Color) // If color isn't the same as one in component we don't want to change it.
layer.Color = component.BeforeColor;
}
}
}
}
}
7 changes: 4 additions & 3 deletions Content.Client/Physics/Controllers/MoverController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Pulling.Components;
using Robust.Client.GameObjects;
using Robust.Client.Physics;
using Robust.Client.Player;
using Robust.Shared.Physics.Components;
Expand All @@ -24,7 +25,7 @@ public override void Initialize()

SubscribeLocalEvent<InputMoverComponent, UpdateIsPredictedEvent>(OnUpdatePredicted);
SubscribeLocalEvent<MovementRelayTargetComponent, UpdateIsPredictedEvent>(OnUpdateRelayTargetPredicted);
SubscribeLocalEvent<SharedPullableComponent, UpdateIsPredictedEvent>(OnUpdatePullablePredicted);
SubscribeLocalEvent<PullableComponent, UpdateIsPredictedEvent>(OnUpdatePullablePredicted);
}

private void OnUpdatePredicted(EntityUid uid, InputMoverComponent component, ref UpdateIsPredictedEvent args)
Expand All @@ -40,7 +41,7 @@ private void OnUpdateRelayTargetPredicted(EntityUid uid, MovementRelayTargetComp
args.IsPredicted = true;
}

private void OnUpdatePullablePredicted(EntityUid uid, SharedPullableComponent component, ref UpdateIsPredictedEvent args)
private void OnUpdatePullablePredicted(EntityUid uid, PullableComponent component, ref UpdateIsPredictedEvent args)
{
// Enable prediction if an entity is being pulled by the player.
// Disable prediction if an entity is being pulled by some non-player entity.
Expand Down
5 changes: 4 additions & 1 deletion Content.Client/Popups/PopupOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public sealed class PopupOverlay : Overlay
private readonly IUserInterfaceManager _uiManager;
private readonly PopupSystem _popup;
private readonly PopupUIController _controller;
private readonly ExamineSystemShared _examine;

private readonly ShaderInstance _shader;

Expand All @@ -33,12 +34,14 @@ public PopupOverlay(
IPrototypeManager protoManager,
IUserInterfaceManager uiManager,
PopupUIController controller,
ExamineSystemShared examine,
PopupSystem popup)
{
_configManager = configManager;
_entManager = entManager;
_playerMgr = playerMgr;
_uiManager = uiManager;
_examine = examine;
_popup = popup;
_controller = controller;

Expand Down Expand Up @@ -81,7 +84,7 @@ private void DrawWorld(DrawingHandleScreen worldHandle, OverlayDrawArgs args, fl
var distance = (mapPos.Position - args.WorldBounds.Center).Length();

// Should handle fade here too wyci.
if (!args.WorldBounds.Contains(mapPos.Position) || !ExamineSystemShared.InRangeUnOccluded(viewPos, mapPos, distance,
if (!args.WorldBounds.Contains(mapPos.Position) || !_examine.InRangeUnOccluded(viewPos, mapPos, distance,
e => e == popup.InitialPos.EntityId || e == ourEntity, entMan: _entManager))
continue;

Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Popups/PopupSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using Content.Shared.Examine;
using Content.Shared.GameTicking;
using Content.Shared.Popups;
using Robust.Client.Graphics;
Expand Down Expand Up @@ -26,6 +27,7 @@ public sealed class PopupSystem : SharedPopupSystem
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;

public IReadOnlyList<WorldPopupLabel> WorldLabels => _aliveWorldLabels;
public IReadOnlyList<CursorPopupLabel> CursorLabels => _aliveCursorLabels;
Expand All @@ -51,6 +53,7 @@ public override void Initialize()
_prototype,
_uiManager,
_uiManager.GetUIController<PopupUIController>(),
_examine,
this));
}

Expand Down
Loading
Loading