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

Upstream Merge 6 28 2024 #32

Merged
merged 81 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
4212fbb
Physics based air throws
VMSolidus Apr 29, 2024
bddb87b
Update base_structureclosets.yml
VMSolidus Apr 29, 2024
162c284
Updates for review
VMSolidus Apr 29, 2024
3374757
Hello, this is an asymptote. Divide by zero must be an exit condition.
VMSolidus Apr 29, 2024
3dc71fb
Adding the clamp back in
VMSolidus Apr 29, 2024
b3c503c
I found another small optimization
VMSolidus May 1, 2024
68e0510
Another one
VMSolidus May 1, 2024
9e7aa5d
New Cvar
VMSolidus May 4, 2024
3d03262
Update comments for documentation
VMSolidus May 4, 2024
67fdaff
Apply suggestions from code review
VMSolidus May 6, 2024
6cc4704
MORE
VMSolidus May 16, 2024
54ca8ce
Update AtmosphereSystem.HighPressureDelta.cs
VMSolidus May 16, 2024
7500efd
guh, last push
VMSolidus May 16, 2024
3440636
Merge branch 'Simple-Station:master' into Atmos-optimization-test
VMSolidus May 16, 2024
7470ba7
Fix for objects getting stuck on walls, new CVar for more expensive a…
VMSolidus May 16, 2024
b328725
Update animals.yml
VMSolidus May 16, 2024
f7e2f70
Fix tiny mobs boiling themselves to death
VMSolidus May 16, 2024
53d221f
Merge branch 'master' into Atmos-optimization-test
VMSolidus May 29, 2024
eba2d1d
Merge branch 'master' into Atmos-optimization-test
VMSolidus May 29, 2024
7c1ba29
Merge branch 'master' into Atmos-optimization-test
VMSolidus Jun 11, 2024
9d81e24
Initial Beta for Rip Tile Rework
VMSolidus Jun 12, 2024
70a9345
Tentative fixes for wall quantum tunneling
VMSolidus Jun 12, 2024
4d1cf7d
More fixes
VMSolidus Jun 12, 2024
c9286a5
Update CCVars.cs
VMSolidus Jun 12, 2024
9c00871
Update CCVars.cs
VMSolidus Jun 12, 2024
45c1bf0
Discover polymorphism
Mnemotechnician Jun 13, 2024
3df0c63
Apply polymorphism + fix some obfuscation phrases
Mnemotechnician Jun 13, 2024
f0af64c
Oops
Mnemotechnician Jun 14, 2024
86eaa73
Cleaned up imports
Mnemotechnician Jun 14, 2024
6770f30
Refactored and localized commands; made them more user-friendly.
Mnemotechnician Jun 14, 2024
e4f5917
Added HandheldTranslatorComponent.SetLanguageOnInteract for convenience
Mnemotechnician Jun 14, 2024
ad56d53
Refactor everything and pray it works:
Mnemotechnician Jun 15, 2024
0e63714
Update yaml prototypes accordingly
Mnemotechnician Jun 15, 2024
44b625f
Move LanguagePrototype.Replacement to ObfuscationMethod and remove Ob…
Mnemotechnician Jun 15, 2024
adf3745
Apply suggestions from code review
VMSolidus Jun 16, 2024
2f05074
Do not log missing LanguageSpeakerComponents
Mnemotechnician Jun 18, 2024
5a2dc13
Rewrite translator implants to use the existing implant infrastructure
Mnemotechnician Jun 18, 2024
b3545d0
Update the language menu when choosing a new language
Mnemotechnician Jun 18, 2024
734e764
Fix handheld translators adjusting your current language
Mnemotechnician Jun 18, 2024
31d82fb
I fixes
Mnemotechnician Jun 18, 2024
fe43060
Merge branch 'master' into refactor/languages
Mnemotechnician Jun 21, 2024
40d411b
Cherrypick "Shoot Over Bodies" And Related PRs (#479)
VMSolidus Jun 23, 2024
19667eb
Merge branch 'master' into refactor/languages
Mnemotechnician Jun 23, 2024
fcea083
Update Credits (#483)
github-actions[bot] Jun 24, 2024
df7a78b
Fix fireball bug
VMSolidus Jun 24, 2024
2c49d79
Update LogPowerUsed
VMSolidus Jun 24, 2024
c4890df
Fixing bug with starting stat modifiers
VMSolidus Jun 25, 2024
351c4ec
Add System for making Humanoids get thrown harder
VMSolidus Jun 25, 2024
9b544bf
Update CCVars.cs
VMSolidus Jun 25, 2024
c9eadac
1984 move by pressure, reroute to ThrowingSystem because its more adv…
VMSolidus Jun 25, 2024
bc25b78
This is significantly smoother
VMSolidus Jun 25, 2024
53b5b3a
Directional Animated Vendors (#400)
VMSolidus Jun 25, 2024
3ca81a4
Update Patrons.yml (#488)
LovelyLophi Jun 25, 2024
8fb17ae
Automatic Changelog Update (#488)
SimpleStation14 Jun 25, 2024
e53f65c
Birbs Have Wings Too (#477)
VMSolidus Jun 25, 2024
13319c2
Automatic Changelog Update (#477)
SimpleStation14 Jun 25, 2024
1132b05
Fewer Mid-Round Events (#486)
DEATHB4DEFEAT Jun 25, 2024
3eb60a4
Automatic Changelog Update (#486)
SimpleStation14 Jun 25, 2024
8e9cd91
Merge branch 'master' into Psionic-Power-Refactor
VMSolidus Jun 25, 2024
afff078
More updates
VMSolidus Jun 26, 2024
6adc50d
Merge branch 'Simple-Station:master' into refactor/languages
Mnemotechnician Jun 27, 2024
d9d74de
Minor improvements
Mnemotechnician Jun 27, 2024
3971ec3
Fix Shuttle FTL (#490)
VMSolidus Jun 27, 2024
efeb93b
Port Height Sliders (#458)
VMSolidus Jun 27, 2024
45b5c92
Automatic Changelog Update (#458)
SimpleStation14 Jun 27, 2024
d0cb65a
Partial Glimmer Refactor & Pyromancy Full Refactor
VMSolidus Jun 28, 2024
1c4f9e6
Update GlimmerSystem.cs
VMSolidus Jun 28, 2024
84c1540
Update GlimmerSystem.cs
VMSolidus Jun 28, 2024
c5b0e49
Got this backwards
VMSolidus Jun 28, 2024
2ed8c5d
More glimmer updates
VMSolidus Jun 28, 2024
f87142a
Last one for the night
VMSolidus Jun 28, 2024
d86df40
Merge branch 'master' into Psionic-Power-Refactor
VMSolidus Jun 28, 2024
0f3ffff
Merge remote-tracking branch 'LanguageRefactor/refactor/languages' in…
VMSolidus Jun 28, 2024
bcd1513
Merge remote-tracking branch 'EE-Personal/Psionic-Power-Refactor' int…
VMSolidus Jun 28, 2024
98a4b08
Merge remote-tracking branch 'EE-Personal/Atmos-optimization-test' in…
VMSolidus Jun 28, 2024
f9f8486
Update SharedHumanoidAppearanceSystem.cs
VMSolidus Jun 28, 2024
5a78adf
IT BUILT
VMSolidus Jun 21, 2024
10a4c93
Start of CPR
VMSolidus Jun 23, 2024
3cc0546
Finishing CPR
VMSolidus Jun 24, 2024
2a1c02c
Merge branch 'SS14-Classic:master' into upstream-merge-6-28-2024
VMSolidus Jun 28, 2024
0d2fa14
Update base.yml
VMSolidus Jun 28, 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
13 changes: 5 additions & 8 deletions Content.Client/Language/LanguageMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using Content.Client.Language.Systems;
using Content.Shared.Language;
using Content.Shared.Language.Systems;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Console;
using Robust.Shared.Utility;
using Serilog;
using static Content.Shared.Language.Systems.SharedLanguageSystem;

namespace Content.Client.Language;

Expand Down Expand Up @@ -120,8 +114,11 @@ private void AddLanguageEntry(string language)
private void OnLanguageChosen(string id)
{
var proto = _clientLanguageSystem.GetLanguagePrototype(id);
if (proto != null)
_clientLanguageSystem.RequestSetLanguage(proto);
if (proto == null)
return;

_clientLanguageSystem.RequestSetLanguage(proto);
UpdateState(id, _clientLanguageSystem.SpokenLanguages);
}

private struct EntryState
Expand Down
1 change: 0 additions & 1 deletion Content.Client/Language/Systems/LanguageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Content.Shared.Language.Events;
using Content.Shared.Language.Systems;
using Robust.Client;
using Robust.Shared.Console;

namespace Content.Client.Language.Systems;

Expand Down
8 changes: 0 additions & 8 deletions Content.Client/Language/Systems/TranslatorImplanterSystem.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Client/Preferences/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<Control HorizontalExpand="True"/>
<OptionButton Name="CSpawnPriorityButton" HorizontalAlignment="Right" />
</BoxContainer>
<!-- Height -->
<!-- Height -->
<BoxContainer HorizontalExpand="True">
<Label Name="CHeightLabel" MinWidth="110" />
<Slider Name="CHeightSlider" MinValue="0.5" Value="1" MaxValue="1.5" HorizontalExpand="True" Margin="5 0 5 0" />
Expand Down
11 changes: 6 additions & 5 deletions Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IProt

var prototype = _speciesList.Find(x => x.ID == Profile?.Species) ?? _speciesList.First();


_heightSlider.MinValue = prototype.MinHeight;
_heightSlider.MaxValue = prototype.MaxHeight;
_heightSlider.Value = Profile?.Height ?? prototype.DefaultHeight;
Expand Down Expand Up @@ -289,11 +288,10 @@ public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IProt
}
else
{
//Whelp, the fixture doesn't exist, guesstimate it instead
// Whelp, the fixture doesn't exist, guesstimate it instead
CWeightLabel.Text = Loc.GetString("humanoid-profile-editor-weight-label", ("weight", (int) 71));
}


#endregion Height

#region Skin
Expand Down Expand Up @@ -960,8 +958,9 @@ private void SetSpecies(string newSpecies)
OnSkinColorOnValueChanged(); // Species may have special color prefs, make sure to update it.
CMarkings.SetSpecies(newSpecies); // Repopulate the markings tab as well.
UpdateSexControls(); // update sex for new species
UpdateHeightControls();// - Changing species provides inaccurate sliders
UpdateWidthControls();// - Changing species provides inaccurate sliders
// Changing species provides inaccurate sliders without these
UpdateHeightControls();
UpdateWidthControls();
UpdateWeight();
RebuildSpriteView(); // they might have different inv so we need a new dummy
UpdateSpeciesGuidebookIcon();
Expand Down Expand Up @@ -1241,8 +1240,10 @@ private void UpdateWeight()
{
if (Profile == null)
return;

var species = _speciesList.Find(x => x.ID == Profile.Species) ?? _speciesList.First();
_prototypeManager.Index(species.Prototype).TryGetComponent<FixturesComponent>(out var fixture);

if (fixture != null)
{
var radius = fixture.Fixtures["fix1"].Shape.Radius;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PanelContainer StyleClasses="BackgroundDark"></PanelContainer>
<BoxContainer Name="SettingsBox" Orientation="Horizontal" HorizontalExpand="True" VerticalExpand="False">
<Label Text="{Loc 'glimmer-monitor-interval'}"/>
<Button Name="IntervalButton6s" Access="Public" Text="6s" StyleClasses="OpenRight"/>
<Button Name="IntervalButton1" Access="Public" Text="1m" StyleClasses="OpenRight"/>
<Button Name="IntervalButton5" Access="Public" Text="5m" StyleClasses="OpenBoth"/>
<Button Name="IntervalButton10" Access="Public" Text="10m" StyleClasses="OpenLeft"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ public GlimmerMonitorUiFragment()
VerticalExpand = true;

var intervalGroup = new ButtonGroup();
IntervalButton6s.Group = intervalGroup;
IntervalButton1.Group = intervalGroup;
IntervalButton5.Group = intervalGroup;
IntervalButton10.Group = intervalGroup;

IntervalButton1.Pressed = true;
IntervalButton6s.Pressed = true;

IntervalButton6s.OnPressed += _ => UpdateState(_cachedValues);
IntervalButton1.OnPressed += _ => UpdateState(_cachedValues);
IntervalButton5.OnPressed += _ => UpdateState(_cachedValues);
IntervalButton10.OnPressed += _ => UpdateState(_cachedValues);
Expand Down Expand Up @@ -62,14 +64,12 @@ private List<int> FormatGlimmerValues(List<int> glimmerValues)
{
var returnList = glimmerValues;

if (IntervalButton5.Pressed)
{
returnList = GetAveragedList(glimmerValues, 5);
}
else if (IntervalButton10.Pressed)
{
if (IntervalButton1.Pressed)
returnList = GetAveragedList(glimmerValues, 10);
}
else if (IntervalButton5.Pressed)
returnList = GetAveragedList(glimmerValues, 50);
else if (IntervalButton10.Pressed)
returnList = GetAveragedList(glimmerValues, 100);

return ClipToFifteen(returnList);
}
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Shuttles/UI/BaseShuttleControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ public BaseShuttleControl(float minRange, float maxRange, float range) : base(mi

protected void DrawData(DrawingHandleScreen handle, string text)
{
var coordsDimensions = handle.GetDimensions(Font, text, UIScale);
var coordsDimensions = handle.GetDimensions(Font, text, 1f);
const float coordsMargins = 5f;

handle.DrawString(Font,
new Vector2(coordsMargins, Height) - new Vector2(0f, coordsDimensions.Y + coordsMargins),
new Vector2(coordsMargins, PixelHeight) - new Vector2(0f, coordsDimensions.Y + coordsMargins),
text,
Color.FromSrgb(IFFComponent.SelfColor));
}
Expand Down
11 changes: 6 additions & 5 deletions Content.Client/Shuttles/UI/ShuttleMapControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected override void KeyBindUp(GUIBoundKeyEventArgs args)

var mapTransform = Matrix3.CreateInverseTransform(Offset, Angle.Zero);

if (beaconsOnly && TryGetBeacon(_beacons, mapTransform, args.RelativePosition, PixelRect, out var foundBeacon, out _))
if (beaconsOnly && TryGetBeacon(_beacons, mapTransform, args.RelativePixelPosition, PixelRect, out var foundBeacon, out _))
{
RequestBeaconFTL?.Invoke(foundBeacon.Entity, _ftlAngle);
}
Expand Down Expand Up @@ -206,7 +206,8 @@ private void DrawParallax(DrawingHandleScreen handle)
private List<IMapObject> GetViewportMapObjects(Matrix3 matty, List<IMapObject> mapObjects)
{
var results = new List<IMapObject>();
var viewBox = SizeBox.Scale(1.2f);
var enlargement = new Vector2i((int) (16 * UIScale), (int) (16 * UIScale));
var viewBox = new UIBox2i(Vector2i.Zero - enlargement, PixelSize + enlargement);

foreach (var mapObj in mapObjects)
{
Expand Down Expand Up @@ -398,8 +399,8 @@ protected override void Draw(DrawingHandleScreen handle)

foreach (var (gridUiPos, iffText) in sendStrings)
{
var textWidth = handle.GetDimensions(_font, iffText, UIScale);
handle.DrawString(_font, gridUiPos + textWidth with { X = -textWidth.X / 2f }, iffText, adjustedColor);
var textWidth = handle.GetDimensions(_font, iffText, 1f);
handle.DrawString(_font, gridUiPos + textWidth with { X = -textWidth.X / 2f, Y = textWidth.Y * UIScale }, iffText, adjustedColor);
}
}

Expand Down Expand Up @@ -587,7 +588,7 @@ private bool TryGetBeacon(IEnumerable<IMapObject> mapObjects, Matrix3 mapTransfo

var distance = (localPos - mousePos).Length();

if (distance > BeaconSnapRange ||
if (distance > BeaconSnapRange * UIScale ||
distance > nearestValue)
{
continue;
Expand Down
8 changes: 8 additions & 0 deletions Content.Client/Weapons/Ranged/Systems/GunSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Client.Gameplay;
using Content.Client.Items;
using Content.Client.Weapons.Ranged.Components;
using Content.Shared.Camera;
Expand All @@ -12,6 +13,7 @@
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
using Robust.Client.State;
using Robust.Shared.Animations;
using Robust.Shared.Input;
using Robust.Shared.Map;
Expand All @@ -27,6 +29,7 @@ public sealed partial class GunSystem : SharedGunSystem
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IStateManager _state = default!;
[Dependency] private readonly AnimationPlayerSystem _animPlayer = default!;
[Dependency] private readonly InputSystem _inputSystem = default!;
[Dependency] private readonly SharedCameraRecoilSystem _recoil = default!;
Expand Down Expand Up @@ -171,10 +174,15 @@ public override void Update(float frameTime)
// Define target coordinates relative to gun entity, so that network latency on moving grids doesn't fuck up the target location.
var coordinates = EntityCoordinates.FromMap(entity, mousePos, TransformSystem, EntityManager);

NetEntity? target = null;
if (_state.CurrentState is GameplayStateBase screen)
target = GetNetEntity(screen.GetClickedEntity(mousePos));

Log.Debug($"Sending shoot request tick {Timing.CurTick} / {Timing.CurTime}");

EntityManager.RaisePredictiveEvent(new RequestShootEvent
{
Target = target,
Coordinates = GetNetCoordinates(coordinates),
Gun = GetNetEntity(gunUid),
});
Expand Down
4 changes: 2 additions & 2 deletions Content.Server.Database/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ public class Profile
public string Sex { get; set; } = null!;
public string Gender { get; set; } = null!;
public string Species { get; set; } = null!;
public float Height { get; set; } = 1f; // Parkstation-HeightSlider
public float Width { get; set; } = 1f; // Parkstation-HeightSlider
public float Height { get; set; } = 1f;
public float Width { get; set; } = 1f;
[Column(TypeName = "jsonb")] public JsonDocument? Markings { get; set; } = null!;
public string HairName { get; set; } = null!;
public string HairColor { get; set; } = null!;
Expand Down
4 changes: 1 addition & 3 deletions Content.Server/Abilities/Mime/MimePowersSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ private void OnInvisibleWall(EntityUid uid, MimePowersComponent component, Invis
}
}
if (TryComp<PsionicComponent>(uid, out var psionic))
_psionics.LogPowerUsed(uid, "invisible wall",
(int) Math.Round(4 * psionic.Amplification - psionic.Dampening),
(int) Math.Round(6 * psionic.Amplification - psionic.Dampening));
_psionics.LogPowerUsed(uid, "invisible wall", psionic, 4, 6);

_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-popup", ("mime", uid)), uid);
// Make sure we set the invisible wall to despawn properly
Expand Down
6 changes: 6 additions & 0 deletions Content.Server/Atmos/EntitySystems/AtmosphereSystem.CVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public sealed partial class AtmosphereSystem
public bool MonstermosEqualization { get; private set; }
public bool MonstermosDepressurization { get; private set; }
public bool MonstermosRipTiles { get; private set; }
public float MonstermosRipTilesMinimumPressure { get; private set; }
public float MonstermosRipTilesPressureOffset { get; private set; }
public bool GridImpulse { get; private set; }
public float SpacingEscapeRatio { get; private set; }
public float SpacingMinGas { get; private set; }
Expand All @@ -29,6 +31,7 @@ public sealed partial class AtmosphereSystem
public float AtmosTickRate { get; private set; }
public float Speedup { get; private set; }
public float HeatScale { get; private set; }
public float HumanoidThrowMultiplier { get; private set; }

/// <summary>
/// Time between each atmos sub-update. If you are writing an atmos device, use AtmosDeviceUpdateEvent.dt
Expand All @@ -50,6 +53,8 @@ private void InitializeCVars()
Subs.CVar(_cfg, CCVars.MonstermosEqualization, value => MonstermosEqualization = value, true);
Subs.CVar(_cfg, CCVars.MonstermosDepressurization, value => MonstermosDepressurization = value, true);
Subs.CVar(_cfg, CCVars.MonstermosRipTiles, value => MonstermosRipTiles = value, true);
Subs.CVar(_cfg, CCVars.MonstermosRipTilesMinimumPressure, value => MonstermosRipTilesMinimumPressure = value, true);
Subs.CVar(_cfg, CCVars.MonstermosRipTilesPressureOffset, value => MonstermosRipTilesPressureOffset = value, true);
Subs.CVar(_cfg, CCVars.AtmosGridImpulse, value => GridImpulse = value, true);
Subs.CVar(_cfg, CCVars.AtmosSpacingEscapeRatio, value => SpacingEscapeRatio = value, true);
Subs.CVar(_cfg, CCVars.AtmosSpacingMinGas, value => SpacingMinGas = value, true);
Expand All @@ -61,6 +66,7 @@ private void InitializeCVars()
Subs.CVar(_cfg, CCVars.AtmosHeatScale, value => { HeatScale = value; InitializeGases(); }, true);
Subs.CVar(_cfg, CCVars.ExcitedGroups, value => ExcitedGroups = value, true);
Subs.CVar(_cfg, CCVars.ExcitedGroupsSpaceIsAllConsuming, value => ExcitedGroupsSpaceIsAllConsuming = value, true);
Subs.CVar(_cfg, CCVars.AtmosHumanoidThrowMultiplier, value => HumanoidThrowMultiplier = value, true);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Server.Atmos.Components;
using Content.Shared.Atmos;
using Content.Shared.Humanoid;
using Content.Shared.Mobs.Components;
using Content.Shared.Physics;
using Robust.Shared.Audio;
Expand Down Expand Up @@ -69,28 +70,8 @@ private void UpdateHighPressure(float frameTime)
}
}

private void AddMovedByPressure(EntityUid uid, MovedByPressureComponent component, PhysicsComponent body)
{
if (!TryComp<FixturesComponent>(uid, out var fixtures))
return;

_physics.SetBodyStatus(uid, body, BodyStatus.InAir);

foreach (var (id, fixture) in fixtures.Fixtures)
{
_physics.RemoveCollisionMask(uid, id, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
}

// TODO: Make them dynamic type? Ehh but they still want movement so uhh make it non-predicted like weightless?
// idk it's hard.

component.Accumulator = 0f;
_activePressures.Add((uid, component));
}

private void HighPressureMovements(Entity<GridAtmosphereComponent> gridAtmosphere, TileAtmosphere tile, EntityQuery<PhysicsComponent> bodies, EntityQuery<TransformComponent> xforms, EntityQuery<MovedByPressureComponent> pressureQuery, EntityQuery<MetaDataComponent> metas)
{
//!MAGIC EXIT CONDITION THAT MAKES ALMOST 200 LINES RUN 1/100TH AS OFTEN.
if (tile.PressureDifference < SpaceWindMinimumCalculatedMass * SpaceWindMinimumCalculatedMass)
return;
// TODO ATMOS finish this
Expand Down Expand Up @@ -122,7 +103,7 @@ private void HighPressureMovements(Entity<GridAtmosphereComponent> gridAtmospher
var gridWorldRotation = xforms.GetComponent(gridAtmosphere).WorldRotation;

// If we're using monstermos, smooth out the yeet direction to follow the flow
//WTF:This is bad, don't run this. It just makes the throws worse by somehow rounding them to orthogonal
//TODO This is bad, don't run this. It just makes the throws worse by somehow rounding them to orthogonal
if (!MonstermosEqualization)
{
// We step through tiles according to the pressure direction on the current tile.
Expand Down Expand Up @@ -184,8 +165,8 @@ private void ConsiderPressureDifference(GridAtmosphereComponent gridAtmosphere,
tile.PressureDirection = differenceDirection;
}

//INFO:The EE version of this function drops pressureResistanceProbDelta, since it's not needed. If you are for whatever reason calling this function
//INFO:And it isn't working, you've probably still got the pressureResistanceProbDelta line included.
//INFO The EE version of this function drops pressureResistanceProbDelta, since it's not needed. If you are for whatever reason calling this function
//INFO And if it isn't working, you've probably still got the pressureResistanceProbDelta line included.
/// <notes>
/// EXPLANATION:
/// pressureDifference = Force of Air Flow on a given tile
Expand All @@ -201,14 +182,6 @@ private void ConsiderPressureDifference(GridAtmosphereComponent gridAtmosphere,
/// For a human sized entity with a standard weight of 80kg and a spacing between a hard vacuum and a room pressurized at 101kpa,
/// The human shall only be moved if he is either very close to the hole, or is standing in a region of high airflow
/// </notes>
/// <param name="ent"></param>
/// <param name="cycle"></param>
/// <param name="pressureDifference"></param>
/// <param name="direction"></param>
/// <param name="throwTarget"></param>
/// <param name="gridWorldRotation"></param>
/// <param name="xform"></param>
/// <param name="physics"></param>

public void ExperiencePressureDifference(
Entity<MovedByPressureComponent> ent,
Expand All @@ -232,23 +205,23 @@ public void ExperiencePressureDifference(
&& !float.IsPositiveInfinity(component.MoveResist))
{
var moveForce = pressureDifference * MathF.Max(physics.InvMass, SpaceWindMaximumCalculatedInverseMass);
if (HasComp<HumanoidAppearanceComponent>(ent))
moveForce *= HumanoidThrowMultiplier;
if (moveForce > physics.Mass)
{
var maxSafeForceForObject = SpaceWindMaxVelocity * physics.Mass;
moveForce = MathF.Min(moveForce, maxSafeForceForObject);
AddMovedByPressure(uid, component, physics);
// Grid-rotation adjusted direction
var dirVec = (direction.ToAngle() + gridWorldRotation).ToWorldVec();
moveForce *= MathF.Max(physics.InvMass, SpaceWindMaximumCalculatedInverseMass);

// TODO: Consider replacing throw target with proper trigonometry angles.
//TODO Consider replacing throw target with proper trigonometry angles.
if (throwTarget != EntityCoordinates.Invalid)
{
var pos = throwTarget.ToMap(EntityManager, _transformSystem).Position - xform.WorldPosition + dirVec;
_physics.ApplyLinearImpulse(uid, pos * moveForce, body: physics);
_throwing.TryThrow(uid, pos.Normalized() * moveForce, moveForce);
}
else
{
_physics.ApplyLinearImpulse(uid, dirVec * moveForce, body: physics);
_throwing.TryThrow(uid, dirVec.Normalized() * moveForce, moveForce);
}

component.LastHighPressureMovementAirCycle = cycle;
Expand Down
Loading
Loading