metalgearsloth [Sat, 23 Mar 2024 01:42:51 +0000 (12:42 +1100)]
NPC steering tweaks (#26351)
- Fix the free node check considering the whole tile and not the poly.
- Clear maps on direction resets.
- More robust arrival checks for pathfinding nodes.
nikthechampiongr [Fri, 22 Mar 2024 01:59:18 +0000 (03:59 +0200)]
Fix puller being improperly unset when pulling stops. (#26312)
Fix puller not being improperly unset on PullableComponent while being unpulled.
When unpulled, the pullableComp has its puller field set to null after the message signifying the pulling has stopped
has been sent. Since the component has a field to determine whether its owner is being pulled which is determined by
the puller field, systems listening on the event would think that the owner of the component was still being pulled.
metalgearsloth [Fri, 22 Mar 2024 01:57:49 +0000 (12:57 +1100)]
FTL UIScale fixes (#26305)
- Fix text drawing being offset.
- Fix beacon snapping and distance check.
- Fix DrawData being offset.
- Fix bounds check for map objects not using PixelSize.
Admin messages now have separate "seen" and "dismissed" fields. The idea is that an admin should be able to tell whether a user pressed the "dismiss for now" button. Instead of using "seen" as "show this message to players when they join", "dismissed" is now used for this.
Existing notes in the database will automatically be marked as dismissed on migration. A note cannot be dismissed without being seen (enforced via constraint in the database too, aren't I fancy).
As part of this, it has become impossible for a player to play without dismissing the message in some form. Instead of a shitty popup window, the popup is now a fullscreen overlay that blocks clicks behind it, making the game unplayable. Also, if a user somehow has multiple messages they will be combined into one popup.
Also I had enough respect for the codebase to make it look better and clean up the code somewhat. Yippee.
James Simonson [Thu, 21 Mar 2024 13:16:18 +0000 (21:16 +0800)]
Rats eyes glow in dark + reorganize rat textures (#26300)
* Split mice from rats and made rats eye glow
+ added red eyes to regal rats (Both king and buff) + normal rats
- removed mouse-3 sprites from mice and moved it into a dedicated rat rsi
+fixed admin smite wording (you turn players into mice, not rats)
Wire layouts manually navigate the inheritance hierarchy, but the data fields on the prototypes were also automatically inherited already. This meant that inheriting a wire layout prototype and changing nothing would cause the wires to be duplicated unless they were manually modified on top.
Fix is easy: just disable inheritance on the data fields.
nikthechampiongr [Tue, 19 Mar 2024 10:09:00 +0000 (12:09 +0200)]
Simplify DoAfterArgs behavior for movement and distance checks (#25226)
* Merge BreakOnWeightlessMove and BreakOnMove. Provide different theshold for weightless movement.
* Adjust WeightlessMovementThresholds. Put a thing I forgot to put in the doafterargs.
* Make DoAfterArgs only use OnMove to determine whether to check for
movement and MoveThreshold to determine the threshold regardless of
weightlessness. Gave DistanceThreshold a default value which will always
be checked now.
* Fix issue introduced by merge.
* Use interaction system for determining whether a distance is within range
* Fix incorrect doafter args introduced by previous merge.
Forgor to commit these.
* Exorcise ghost.
The execution system should have been deleted when I merged previously.
For a reason I cannot comprehend it came back, but only the execution
system.
* Exorcise ghost Pt. 2
* Allow for movement check to be overriden in zero g and adjust doafter args where needed.
You can now override checking for movement in zero g with the BreakOnWeightlessMove bool. By default it will check.
The following doafters were made to ignore the movement check in zero g:
- Healing yourself with healing items,
- Removing embedded projectiles,
- Using tools like welders and crowbars
* Adjust distance for cuffing/uncuffing to work. Make injections not break on weightless movement.
In #26217 I re-organized the logic for the calculation. Part of that was moving the logic for GetFeltLowPressure and GetFeltHighPressure to be done before we actually check the hazard thresholds. What I didn't realize is that, with how our pressure protection is set up, these functions can return values so extreme they rebound into the other category.
For example, according to the math, when you're wearing a hardsuit in a low-pressure environment you have "felt" pressure of 1000 kPa. Yeah that's not right.
Now these functions clamp their result to OneAtmosphere, in the appropriate direction (101.3 kPa).
Golinth [Mon, 18 Mar 2024 01:37:00 +0000 (20:37 -0500)]
Criminal Record Icons below Job Icons (#26203)
SS13 Criminal Record Icon Location REAL
Adds a new Offset DataField to the StatusIcon Prototype. It effects status icon location on a per-pixel level. Not sure what else it could be used for, but hey, nothing wrong with generalizing. Also moves the mindshield icon priority to one, to fix an unreported bug with them covering non-job icons.
If a room's pressure drops it can become unbreathable long before people start taking pressure damage, and so also long before the air alarm starts reporting a danger state. I've increased the values so that the air alarm should show danger if the pressure becomes so low as to be unbreathable.
The math for our pressure damage (barotrauma) system is directly taken from TG. The constants are the same and the math is almost the same. However there are two errors.
1. Pressure damage started being applied within the WARNING bounds, rather than the HAZARD bounds. This means you started taking low pressure damage at 50 kPa instead of the intended 20 kPa, and also the HUD icon didn't show "danger" like it should even if you were already taking damage.
2. The calculations for high pressure damage were wrong. These are supposed to be linearly scaled, but the function was wrong so the scaling didn't actually work properly (especially when considering the fixed bounds above). This appears to be the case because the function was taken from an incorrect comment in the original source, rather than the real math.
Both of these issues are now fixed to match the TG behavior. Note that this somewhat nerfs pressure damage in non-extreme circumstances. e.g. a room at 40 kPa now gives NO pressure damage, whereas previously it would do full space damage.
The description of the pressure alerts is wrong for "low" severity, but I can't be arsed to fix that right now. Alerts don't have a way to change the description depending on severity...