From 87b6eb55e5ae86694e3620aa90a40c54ec3c7a9f Mon Sep 17 00:00:00 2001 From: chromiumboy <50505512+chromiumboy@users.noreply.github.com> Date: Mon, 14 Apr 2025 00:02:29 -0500 Subject: [PATCH 1/3] Hotfix for water/fuel tank fixtures (#36527) Sharing the same fixture layer as walls causes dragged water/fuel tanks to be blocked by things that they really shouldn't be, such as lights and holopads Being PRed as a hotfix in order to fully finalize #36341 --- .../Entities/Structures/Storage/Tanks/base_structuretanks.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml index dff863f8fa..ec960013f1 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Tanks/base_structuretanks.yml @@ -20,7 +20,8 @@ mask: - MachineMask layer: - - WallLayer + - MachineLayer + - InteractImpassable - type: Damageable damageContainer: Inorganic damageModifierSet: Metallic From 3b04d5a66c4fce43b0865ba4d858fb0b3bb01291 Mon Sep 17 00:00:00 2001 From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Date: Mon, 14 Apr 2025 16:00:03 +0200 Subject: [PATCH 2/3] [HOTFIX] Sprite fade review #36509 (#36552) cherry-picked --- Content.Client/Sprite/SpriteFadeSystem.cs | 36 ++++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/Content.Client/Sprite/SpriteFadeSystem.cs b/Content.Client/Sprite/SpriteFadeSystem.cs index 949012d04a..0a028f596e 100644 --- a/Content.Client/Sprite/SpriteFadeSystem.cs +++ b/Content.Client/Sprite/SpriteFadeSystem.cs @@ -10,6 +10,7 @@ using Robust.Client.UserInterface; using Robust.Shared.Map; using Robust.Shared.Physics.Systems; using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; namespace Content.Client.Sprite; @@ -22,21 +23,20 @@ public sealed class SpriteFadeSystem : EntitySystem [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IStateManager _stateManager = default!; + [Dependency] private readonly FixtureSystem _fixtures = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly IUserInterfaceManager _uiManager = default!; [Dependency] private readonly IInputManager _inputManager = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; + private List<(MapCoordinates Point, bool ExcludeBoundingBox)> _points = new(); + private readonly HashSet _comps = new(); private EntityQuery _spriteQuery; private EntityQuery _fadeQuery; private EntityQuery _fadingQuery; - - /// - /// Radius of the mouse point for the intersection test - /// - private static Vector2 MouseRadius = new Vector2(10f * float.Epsilon, 10f * float.Epsilon); + private EntityQuery _fixturesQuery; private const float TargetAlpha = 0.4f; private const float ChangeRate = 1f; @@ -48,6 +48,7 @@ public sealed class SpriteFadeSystem : EntitySystem _spriteQuery = GetEntityQuery(); _fadeQuery = GetEntityQuery(); _fadingQuery = GetEntityQuery(); + _fixturesQuery = GetEntityQuery(); SubscribeLocalEvent(OnFadingShutdown); } @@ -67,22 +68,22 @@ public sealed class SpriteFadeSystem : EntitySystem { var player = _playerManager.LocalEntity; // ExcludeBoundingBox is set if we don't want to fade this sprite within the collision bounding boxes for the given POI - var pointsOfInterest = new List<(MapCoordinates Point, bool ExcludeBoundingBox)>(); + _points.Clear(); if (_uiManager.CurrentlyHovered is IViewportControl vp && _inputManager.MouseScreenPosition.IsValid) { - pointsOfInterest.Add((vp.PixelToMap(_inputManager.MouseScreenPosition.Position), true)); + _points.Add((vp.PixelToMap(_inputManager.MouseScreenPosition.Position), true)); } if (TryComp(player, out TransformComponent? playerXform)) { - pointsOfInterest.Add((_transform.GetMapCoordinates(_playerManager.LocalEntity!.Value, xform: playerXform), false)); + _points.Add((_transform.GetMapCoordinates(_playerManager.LocalEntity!.Value, xform: playerXform), false)); } if (_stateManager.CurrentState is GameplayState state && _spriteQuery.TryGetComponent(player, out var playerSprite)) { - foreach (var (mapPos, excludeBB) in pointsOfInterest) + foreach (var (mapPos, excludeBB) in _points) { // Also want to handle large entities even if they may not be clickable. foreach (var ent in state.GetClickableEntities(mapPos, excludeFaded: false)) @@ -95,21 +96,28 @@ public sealed class SpriteFadeSystem : EntitySystem continue; } - if (excludeBB) + // If it intersects a fixture ignore it. + if (excludeBB && _fixturesQuery.TryComp(ent, out var body)) { - var test = new Box2Rotated(mapPos.Position - MouseRadius, mapPos.Position + MouseRadius); + var transform = _physics.GetPhysicsTransform(ent); var collided = false; - foreach (var fixture in _physics.GetCollidingEntities(mapPos.MapId, test)) + + foreach (var fixture in body.Fixtures.Values) { - if (fixture.Owner == ent) + if (!fixture.Hard) + continue; + + if (_fixtures.TestPoint(fixture.Shape, transform, mapPos.Position)) { collided = true; break; } } + + // Check next entity if (collided) { - break; + continue; } } From 961d2cfdefacec7adb036c83ca526ed859da07dc Mon Sep 17 00:00:00 2001 From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Date: Mon, 14 Apr 2025 16:12:03 +0200 Subject: [PATCH 3/3] Clarify "purple text" characters in rules & readd Space Law non-restricted item seizure (#36414) Initial commit --- Resources/Locale/en-US/mind/components/mind-component.ftl | 4 ++-- .../ServerRules/RoleplayRules/RuleR11Escalation.xml | 5 ++++- .../ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Resources/Locale/en-US/mind/components/mind-component.ftl b/Resources/Locale/en-US/mind/components/mind-component.ftl index 5c7168397b..cd7bde2398 100644 --- a/Resources/Locale/en-US/mind/components/mind-component.ftl +++ b/Resources/Locale/en-US/mind/components/mind-component.ftl @@ -4,8 +4,8 @@ comp-mind-ghosting-prevented = You are not able to ghost right now. ## Messages displayed when a body is examined and in a certain state -comp-mind-examined-catatonic = { CAPITALIZE(SUBJECT($ent)) } { CONJUGATE-BE($ent) } totally catatonic. The stresses of life in deep-space must have been too much for { OBJECT($ent) }. Any recovery is unlikely. +comp-mind-examined-catatonic = { CAPITALIZE(SUBJECT($ent)) } { CONJUGATE-BE($ent) } totally catatonic. The stresses of life in deep-space must have been too much for { OBJECT($ent) }. Any recovery is impossible. comp-mind-examined-dead = { CAPITALIZE(SUBJECT($ent)) } { CONJUGATE-BE($ent) } dead. comp-mind-examined-ssd = { CAPITALIZE(SUBJECT($ent)) } { CONJUGATE-HAVE($ent) } a blank, absent-minded stare and appears completely unresponsive to anything. { CAPITALIZE(SUBJECT($ent)) } may snap out of it soon. comp-mind-examined-dead-and-ssd = { CAPITALIZE(POSS-ADJ($ent)) } soul lies dormant and may return soon. -comp-mind-examined-dead-and-irrecoverable = { CAPITALIZE(POSS-ADJ($ent)) } soul has departed and moved on. Any recovery is unlikely. +comp-mind-examined-dead-and-irrecoverable = { CAPITALIZE(POSS-ADJ($ent)) } soul has departed and moved on. Any recovery is impossible. diff --git a/Resources/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11Escalation.xml b/Resources/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11Escalation.xml index 18ebc79a83..8777d6daca 100644 --- a/Resources/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11Escalation.xml +++ b/Resources/ServerInfo/Guidebook/ServerRules/RoleplayRules/RuleR11Escalation.xml @@ -27,7 +27,7 @@ See [textlink="Escalation Involving Animals" link="RuleR11-1"]. ## Exemptions - Escalation rules aren't enforced against non-players, but players will be held responsible for rule violations even if they don't realize that a character or animal was controlled by another player. Characters who have purple text saying that they are catatonic are considered non-players. Characters who are disconnected are still considered players. + Escalation rules aren't enforced against non-players, but players will be held responsible for rule violations even if they don't realize that a character or animal was controlled by another player. Characters who are disconnected are still considered players. Characters who have purple text upon being examined saying "recovery is impossible" are considered non-players. ## MRP Amendment Escalation rules are enforced even against non-players. @@ -50,6 +50,7 @@ - As an antagonist, killing someone who didn't give you what you want. - A chef and bartender reach the lethal level of conflict through appropriate escalation. The chef crits the bartender and does not take them to medbay or security. The bartender immediately tries to crit the chef next time they run into each other. - A chef and bartender reach the lethal level of conflict through appropriate escalation. The chef crits the bartender and does not take them to medbay or security. The chef insults the bartender next time they see them. + - A cargo technician gets a cargo bounty for a brain. After receiving a body from Medical with the purple examine text reading "Any recovery is impossible.", the cargo technician proceeds to permanently destroy the body to get the brain out. Prohibited: - A player starts punching you, so you gib them. @@ -62,6 +63,8 @@ - Hiding someone's body because they punched you earlier in the round. - Harassing the bar or bartender by frequently coming in to break their glasses or furniture. - Randomly picking fights with people. + - Stealing an ID from a disconnected player as a non-antagonist. - A chef and bartender reach the lethal level of conflict through appropriate escalation. The chef crits the bartender and does not take them to medbay or security. The chef immediately tries to crit the bartender next time they run into each other. - A chef and bartender reach the lethal level of conflict through appropriate escalation. The chef crits the bartender and takes them to the medbay or security. The bartender immediately tries to crit the chef next time they run into each other. + - A cargo technician gets a cargo bounty for a brain. After finding a dead passenger in a hallway, without the body's examine text reading "Any recovery is impossible.", the cargo technician proceeds to permanently destroy the body to get the brain out. diff --git a/Resources/ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml b/Resources/ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml index 1cee4c3dbf..5360d0b344 100644 --- a/Resources/ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml +++ b/Resources/ServerInfo/Guidebook/ServerRules/SpaceLaw/SpaceLaw.xml @@ -16,7 +16,7 @@ - Prisoners must be granted freedom of movement, and should not be restrained with handcuffs or other devices after incarceration unless there is an undue risk to life and limb. Similarly, any prisoners held for permanent confinement should be held in the communal brig, and should not be confined to a solitary cell unless they pose a risk to life and limb. ## Search and Seizure - A personnel search is a seizure of the objects in a person's backpack, hands, coat, belt, and pockets. If any contraband is found during a search, the officer may choose to further the search into a detainment or simply confiscate the restricted items. After the search is conducted, all legal items are to be returned to the person. A crewmate may legally decline any search conducted without probable cause or a warrant while the alert level is green. It should be noted that if the alert level is blue or above, all personnel searches are legal. + A personnel search is a seizure of the objects in a person's backpack, hands, coat, belt, and pockets. If any contraband is found during a search, the officer may choose to further the search into a detainment or simply confiscate the restricted items. Non-restricted items may be seized by Security if they were used to facilitate a crime. After the search is conducted, all legal items are to be returned to the person. A crewmate may legally decline any search conducted without probable cause or a warrant while the alert level is green. It should be noted that if the alert level is blue or above, all personnel searches are legal. A departmental search is the sweep of an entire area or department for contraband. It is recommended that the officers be extremely thorough, checking all lockers, crates, and doors. These can only be done with permission or, ideally, a warrant signed by the department head or highest-ranking command staff, which is the captain in most cases.