From a2c1687260f8b89753cb82cde0f74ca7fe97c211 Mon Sep 17 00:00:00 2001 From: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Date: Thu, 18 Jul 2024 05:33:16 +0300 Subject: [PATCH 1/8] Lay Down via Keybind (#530) # Description Adds a way to lay down/crawl using a keybind (R by default) similarly to ss13. It has the same effects as falling down after slipping or buckling to a bed, except you don't drop items while doing so and can (very slowly) move around. This opens new gameplay and roleplay possibilities. You can only toggle standing/laying once in 2.5 seconds (this cooldown is to prevent pro gamers from spamming it). It shows a small popup to everyone. If the attempt fails for whatever reason - being buckled, sleeping, stunned, or anything else - another popup is shown that's only visible to you. It's been tested and made sure that the system works correctly with buckling, sleeping, being stunned, and shocked.

Media

18 mb recording won't fit on github: https://cdn.discordapp.com/attachments/1255902264309321851/1260354667578261504/weeee-2024-07-10_00.57.23.mp4?ex=668f0441&is=668db2c1&hm=d338a3499bf47780a66b7ba96d5e8830d8cb4167064423b8983b2d0144b7aa88&

--- # Changelog :cl: - add: You can now lie down and stand up at will! The default keybind for it is "R", but it can be changed in settings. --------- Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> --- Content.Client/Input/ContentContexts.cs | 1 + .../Options/UI/Tabs/KeyRebindTab.xaml.cs | 1 + .../NPC/Systems/NPCCombatSystem.Ranged.cs | 1 + .../Standing/LayingDownComponent.cs | 14 +++ Content.Server/Standing/LayingDownSystem.cs | 101 ++++++++++++++++++ Content.Shared/Input/ContentKeyFunctions.cs | 1 + .../Weapons/Ranged/Systems/SharedGunSystem.cs | 8 ++ .../en-US/escape-menu/ui/options-menu.ftl | 1 + Resources/Locale/en-US/movement/laying.ftl | 7 ++ .../Prototypes/Entities/Mobs/Species/base.yml | 1 + Resources/keybinds.yml | 3 + 11 files changed, 139 insertions(+) create mode 100644 Content.Server/Standing/LayingDownComponent.cs create mode 100644 Content.Server/Standing/LayingDownSystem.cs create mode 100644 Resources/Locale/en-US/movement/laying.ftl diff --git a/Content.Client/Input/ContentContexts.cs b/Content.Client/Input/ContentContexts.cs index ca22ab095d6..07c1349aac7 100644 --- a/Content.Client/Input/ContentContexts.cs +++ b/Content.Client/Input/ContentContexts.cs @@ -69,6 +69,7 @@ public static void SetupContexts(IInputContextContainer contexts) human.AddFunction(ContentKeyFunctions.OpenBackpack); human.AddFunction(ContentKeyFunctions.OpenBelt); human.AddFunction(ContentKeyFunctions.OfferItem); + human.AddFunction(ContentKeyFunctions.ToggleStanding); human.AddFunction(ContentKeyFunctions.MouseMiddle); human.AddFunction(ContentKeyFunctions.ArcadeUp); human.AddFunction(ContentKeyFunctions.ArcadeDown); diff --git a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs index 9daca74dd3a..1ab092c2ddd 100644 --- a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs +++ b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs @@ -184,6 +184,7 @@ void AddCheckBox(string checkBoxName, bool currentState, ActionUnfortunately cannot be shared because some standing conditions are server-side only +public sealed class LayingDownSystem : EntitySystem +{ + [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; + [Dependency] private readonly MovementSpeedModifierSystem _movement = default!; + [Dependency] private readonly SharedPopupSystem _popups = default!; + [Dependency] private readonly Shared.Standing.StandingStateSystem _standing = default!; // WHY IS THERE TWO DIFFERENT STANDING SYSTEMS?! + [Dependency] private readonly IGameTiming _timing = default!; + + + public override void Initialize() + { + CommandBinds.Builder + .Bind(ContentKeyFunctions.ToggleStanding, InputCmdHandler.FromDelegate(ToggleStanding, handle: false, outsidePrediction: false)) + .Register(); + + SubscribeLocalEvent(DoRefreshMovementSpeed); + SubscribeLocalEvent(DoRefreshMovementSpeed); + SubscribeLocalEvent(OnRefreshMovementSpeed); + SubscribeLocalEvent(OnParentChanged); + } + + public override void Shutdown() + { + base.Shutdown(); + + CommandBinds.Unregister(); + } + + private void DoRefreshMovementSpeed(EntityUid uid, LayingDownComponent component, object args) + { + _movement.RefreshMovementSpeedModifiers(uid); + } + + private void OnRefreshMovementSpeed(EntityUid uid, LayingDownComponent component, RefreshMovementSpeedModifiersEvent args) + { + if (TryComp(uid, out var standingState) && standingState.Standing) + return; + + args.ModifySpeed(component.DownedSpeedMultiplier, component.DownedSpeedMultiplier); + } + + private void OnParentChanged(EntityUid uid, LayingDownComponent component, EntParentChangedMessage args) + { + // If the entity is not on a grid, try to make it stand up to avoid issues + if (!TryComp(uid, out var standingState) + || standingState.Standing + || Transform(uid).GridUid != null) + return; + + _standing.Stand(uid, standingState); + } + + private void ToggleStanding(ICommonSession? session) + { + if (session is not { AttachedEntity: { Valid: true } uid } playerSession + || !Exists(uid) + || !TryComp(uid, out var standingState) + || !TryComp(uid, out var layingDown)) + return; + + // If successful, show popup to self and others. Otherwise, only to self. + if (ToggleStandingImpl(uid, standingState, layingDown, out var popupBranch)) + { + _popups.PopupEntity(Loc.GetString($"laying-comp-{popupBranch}-other", ("entity", uid)), uid, Filter.PvsExcept(uid), true); + layingDown.NextToggleAttempt = _timing.CurTime + layingDown.Cooldown; + } + + _popups.PopupEntity(Loc.GetString($"laying-comp-{popupBranch}-self", ("entity", uid)), uid, uid); + } + + private bool ToggleStandingImpl(EntityUid uid, StandingStateComponent standingState, LayingDownComponent layingDown, out string popupBranch) + { + var success = layingDown.NextToggleAttempt <= _timing.CurTime; + + if (_standing.IsDown(uid, standingState)) + { + success = success && _standing.Stand(uid, standingState, force: false); + popupBranch = success ? "stand-success" : "stand-fail"; + } + else + { + success = success && Transform(uid).GridUid != null; // Do not allow laying down when not on a surface. + success = success && _standing.Down(uid, standingState: standingState, playSound: true, dropHeldItems: false); + popupBranch = success ? "lay-success" : "lay-fail"; + } + + return success; + } +} diff --git a/Content.Shared/Input/ContentKeyFunctions.cs b/Content.Shared/Input/ContentKeyFunctions.cs index 19514a4ee0f..323fd048238 100644 --- a/Content.Shared/Input/ContentKeyFunctions.cs +++ b/Content.Shared/Input/ContentKeyFunctions.cs @@ -55,6 +55,7 @@ public static class ContentKeyFunctions public static readonly BoundKeyFunction ZoomIn = "ZoomIn"; public static readonly BoundKeyFunction ResetZoom = "ResetZoom"; public static readonly BoundKeyFunction OfferItem = "OfferItem"; + public static readonly BoundKeyFunction ToggleStanding = "ToggleStanding"; public static readonly BoundKeyFunction ArcadeUp = "ArcadeUp"; public static readonly BoundKeyFunction ArcadeDown = "ArcadeDown"; diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index ff8b102bb57..1dfdede1afa 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -205,6 +205,14 @@ private void StopShooting(EntityUid uid, GunComponent gun) Dirty(uid, gun); } + /// + /// Sets the targeted entity of the gun. Should be called before attempting to shoot to avoid shooting over the target. + /// + public void SetTarget(GunComponent gun, EntityUid target) + { + gun.Target = target; + } + /// /// Attempts to shoot at the target coordinates. Resets the shot counter after every shot. /// diff --git a/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl b/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl index e438512b553..23446b2b847 100644 --- a/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl +++ b/Resources/Locale/en-US/escape-menu/ui/options-menu.ftl @@ -138,6 +138,7 @@ ui-options-function-swap-hands = Swap hands ui-options-function-move-stored-item = Move stored item ui-options-function-rotate-stored-item = Rotate stored item ui-options-function-offer-item = Offer something +ui-options-function-toggle-standing = Toggle standing ui-options-static-storage-ui = Lock storage window to hotbar ui-options-function-smart-equip-backpack = Smart-equip to backpack diff --git a/Resources/Locale/en-US/movement/laying.ftl b/Resources/Locale/en-US/movement/laying.ftl new file mode 100644 index 00000000000..f75061d6a75 --- /dev/null +++ b/Resources/Locale/en-US/movement/laying.ftl @@ -0,0 +1,7 @@ +laying-comp-lay-success-self = You lay down. +laying-comp-lay-success-other = {THE($entity)} lays down. +laying-comp-lay-fail-self = You can't lay down right now. + +laying-comp-stand-success-self = You stand up. +laying-comp-stand-success-other = {THE($entity)} stands up. +laying-comp-stand-fail-self = You can't stand up right now. diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 9f3269abda6..1b9e9674f44 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -311,6 +311,7 @@ - type: FireVisuals alternateState: Standing - type: OfferItem + - type: LayingDown - type: entity save: false diff --git a/Resources/keybinds.yml b/Resources/keybinds.yml index 14d5d68091a..8fa26542caa 100644 --- a/Resources/keybinds.yml +++ b/Resources/keybinds.yml @@ -258,6 +258,9 @@ binds: - function: OfferItem type: State key: F +- function: ToggleStanding + type: State + key: R - function: ShowDebugConsole type: State key: Tilde From f0c955895869f53731694abb96270d61e396bb03 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Wed, 17 Jul 2024 22:34:52 -0400 Subject: [PATCH 2/8] Add Species Restrictions to Loadout Items (#554) # Description This is kind of a small PR here, all I'm really doing is adding species(read: Harpy) restrictions to all items that are invalid for a Harpy to wear, and then reparenting items that have a skirt but aren't tagged as such, so that Harpies can wear them. This now makes widespread actual usage of species restrictions in Loadouts. And also this stops people complaining that Harpies can buy items that they cannot wear. ![image](https://github.com/user-attachments/assets/d90a3fdc-8b2c-4fa9-938b-bedcfac0dc7b) Harpies coincidentally now have a blank Shoes tab. ![image](https://github.com/user-attachments/assets/f3585a90-3518-4288-b305-14c1a675c88d) # Changelog :cl: - fix: Harpies can no longer buy Loadout items that are impossible for them to wear due to having digitigrade legs. --- .../Entities/Clothing/Uniforms/jumpsuits.yml | 4 +- .../Entities/Clothing/Uniforms/misc_roles.yml | 4 +- .../Prototypes/Loadouts/Jobs/engineering.yml | 6 ++ .../Prototypes/Loadouts/Jobs/medical.yml | 27 +++++++ .../Prototypes/Loadouts/Jobs/science.yml | 3 + .../Prototypes/Loadouts/Jobs/security.yml | 24 ++++++ .../Prototypes/Loadouts/Jobs/service.yml | 15 ++++ Resources/Prototypes/Loadouts/shoes.yml | 79 +++++++++++++++++++ Resources/Prototypes/Loadouts/uniform.yml | 48 +++++++++++ .../Entities/Clothing/Uniforms/costumes.yml | 18 ++--- 10 files changed, 215 insertions(+), 13 deletions(-) diff --git a/Resources/Prototypes/DeltaV/Entities/Clothing/Uniforms/jumpsuits.yml b/Resources/Prototypes/DeltaV/Entities/Clothing/Uniforms/jumpsuits.yml index f3fdeabd107..99021b47e42 100644 --- a/Resources/Prototypes/DeltaV/Entities/Clothing/Uniforms/jumpsuits.yml +++ b/Resources/Prototypes/DeltaV/Entities/Clothing/Uniforms/jumpsuits.yml @@ -234,7 +234,7 @@ sprite: DeltaV/Clothing/Uniforms/Jumpsuit/centcom_officer.rsi - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformJumpsuitKilt name: kilt description: A fine bit o' garb for the lad an' lasses. @@ -253,4 +253,4 @@ - type: Sprite sprite: DeltaV/Clothing/Uniforms/Jumpsuit/chemshirtsuit.rsi - type: Clothing - sprite: DeltaV/Clothing/Uniforms/Jumpsuit/chemshirtsuit.rsi \ No newline at end of file + sprite: DeltaV/Clothing/Uniforms/Jumpsuit/chemshirtsuit.rsi diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/misc_roles.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/misc_roles.yml index 55ffe34b532..a8147ef7820 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/misc_roles.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/misc_roles.yml @@ -1,5 +1,5 @@ - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: UniformShortsRed name: boxing shorts description: These are shorts, not boxers. @@ -10,7 +10,7 @@ sprite: Clothing/Uniforms/Shorts/Color/red.rsi - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: UniformShortsRedWithTop name: boxing shorts with top description: These are shorts, not boxers. diff --git a/Resources/Prototypes/Loadouts/Jobs/engineering.yml b/Resources/Prototypes/Loadouts/Jobs/engineering.yml index 44ef2262bc5..d91814e34d1 100644 --- a/Resources/Prototypes/Loadouts/Jobs/engineering.yml +++ b/Resources/Prototypes/Loadouts/Jobs/engineering.yml @@ -4,6 +4,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - StationEngineer @@ -49,6 +52,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - StationEngineer diff --git a/Resources/Prototypes/Loadouts/Jobs/medical.yml b/Resources/Prototypes/Loadouts/Jobs/medical.yml index 6dcce11d09f..e9e6aa04231 100644 --- a/Resources/Prototypes/Loadouts/Jobs/medical.yml +++ b/Resources/Prototypes/Loadouts/Jobs/medical.yml @@ -47,6 +47,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -62,6 +65,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -77,6 +83,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -92,6 +101,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -107,6 +119,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -122,6 +137,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -137,6 +155,9 @@ cost: 3 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor @@ -188,6 +209,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Paramedic @@ -236,6 +260,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - MedicalDoctor diff --git a/Resources/Prototypes/Loadouts/Jobs/science.yml b/Resources/Prototypes/Loadouts/Jobs/science.yml index b9c815a15b0..e281b51d036 100644 --- a/Resources/Prototypes/Loadouts/Jobs/science.yml +++ b/Resources/Prototypes/Loadouts/Jobs/science.yml @@ -19,6 +19,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Scientist diff --git a/Resources/Prototypes/Loadouts/Jobs/security.yml b/Resources/Prototypes/Loadouts/Jobs/security.yml index e6a6693ec18..29e1850db51 100644 --- a/Resources/Prototypes/Loadouts/Jobs/security.yml +++ b/Resources/Prototypes/Loadouts/Jobs/security.yml @@ -5,6 +5,9 @@ cost: 1 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - SecurityOfficer @@ -19,6 +22,9 @@ cost: 1 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - SecurityOfficer @@ -85,6 +91,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - SecurityOfficer @@ -109,6 +118,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Warden @@ -121,6 +133,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Warden @@ -181,6 +196,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Detective @@ -196,6 +214,9 @@ cost: 1 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Detective @@ -224,6 +245,9 @@ category: Jobs cost: 1 requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Detective diff --git a/Resources/Prototypes/Loadouts/Jobs/service.yml b/Resources/Prototypes/Loadouts/Jobs/service.yml index ed6107db9e9..1a2059f0be1 100644 --- a/Resources/Prototypes/Loadouts/Jobs/service.yml +++ b/Resources/Prototypes/Loadouts/Jobs/service.yml @@ -60,6 +60,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Lawyer @@ -84,6 +87,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Lawyer @@ -108,6 +114,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Lawyer @@ -132,6 +141,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Lawyer @@ -169,6 +181,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Reporter diff --git a/Resources/Prototypes/Loadouts/shoes.yml b/Resources/Prototypes/Loadouts/shoes.yml index 3c2e21e631b..0f493cc5431 100644 --- a/Resources/Prototypes/Loadouts/shoes.yml +++ b/Resources/Prototypes/Loadouts/shoes.yml @@ -4,6 +4,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorBlack @@ -12,6 +16,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorBlue @@ -20,6 +28,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorBrown @@ -28,6 +40,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorGreen @@ -36,6 +52,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorOrange @@ -44,6 +64,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorPurple @@ -52,6 +76,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorRed @@ -60,6 +88,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorWhite @@ -68,6 +100,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesColorYellow @@ -76,6 +112,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesGeta @@ -85,6 +125,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsWork @@ -93,6 +137,10 @@ category: Shoes cost: 2 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsLaceup @@ -101,6 +149,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsWinter @@ -109,6 +161,10 @@ category: Shoes cost: 2 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsCowboyBrown @@ -117,6 +173,10 @@ category: Shoes cost: 2 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsCowboyBlack @@ -125,6 +185,10 @@ category: Shoes cost: 2 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsCowboyWhite @@ -133,6 +197,10 @@ category: Shoes cost: 2 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesBootsCowboyFancy @@ -145,6 +213,9 @@ items: - ClothingShoeSlippersDuck requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Clown @@ -154,6 +225,10 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesLeather @@ -162,5 +237,9 @@ category: Shoes cost: 1 exclusive: true + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy items: - ClothingShoesMiscWhite diff --git a/Resources/Prototypes/Loadouts/uniform.yml b/Resources/Prototypes/Loadouts/uniform.yml index 20c5b42c7c2..c6838b97d33 100644 --- a/Resources/Prototypes/Loadouts/uniform.yml +++ b/Resources/Prototypes/Loadouts/uniform.yml @@ -4,6 +4,9 @@ cost: 2 exclusive: true requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -20,6 +23,9 @@ items: - ClothingUniformJumpsuitColorBlack requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -44,6 +50,9 @@ items: - ClothingUniformJumpsuitColorBlue requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -68,6 +77,9 @@ items: - ClothingUniformJumpsuitColorGreen requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -92,6 +104,9 @@ items: - ClothingUniformJumpsuitColorOrange requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -116,6 +131,9 @@ items: - ClothingUniformJumpsuitColorPink requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -140,6 +158,9 @@ items: - ClothingUniformJumpsuitColorRed requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -164,6 +185,9 @@ items: - ClothingUniformJumpsuitColorWhite requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -188,6 +212,9 @@ items: - ClothingUniformJumpsuitColorYellow requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -212,6 +239,9 @@ items: - ClothingUniformJumpsuitColorDarkBlue requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -236,6 +266,9 @@ items: - ClothingUniformJumpsuitColorTeal requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -260,6 +293,9 @@ items: - ClothingUniformJumpsuitColorPurple requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -284,6 +320,9 @@ items: - ClothingUniformJumpsuitColorDarkGreen requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -308,6 +347,9 @@ items: - ClothingUniformJumpsuitColorLightBrown requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -332,6 +374,9 @@ items: - ClothingUniformJumpsuitColorBrown requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger @@ -356,6 +401,9 @@ items: - ClothingUniformJumpsuitColorMaroon requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy - !type:CharacterJobRequirement jobs: - Passenger diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Uniforms/costumes.yml b/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Uniforms/costumes.yml index c82dbffae86..0ef1a5a85a3 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Uniforms/costumes.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Uniforms/costumes.yml @@ -54,7 +54,7 @@ sprite: Nyanotrasen/Clothing/Uniforms/Costume/maid.rsi - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingCostumeBunnySuit name: bunny suit description: Ready to go with stockings and a bow tie. @@ -89,10 +89,10 @@ sprite: Nyanotrasen/Clothing/Uniforms/Jumpskirt/Decorskirt.rsi - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingCostumeNaota name: turquoise hoodie and shorts - description: A hoodie with a small kangaroo pouch. + description: A hoodie with a small kangaroo pouch. components: - type: Sprite sprite: Nyanotrasen/Clothing/Uniforms/Costume/naota.rsi @@ -113,7 +113,7 @@ femaleMask: NoMask - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformDressRed name: red dress description: A voluminous, fancy red dress. @@ -125,7 +125,7 @@ femaleMask: NoMask - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformSwimsuitBlue name: blue swimsuit description: A form-fitting, hydrodynamic blue swimsuit. @@ -358,7 +358,7 @@ femaleMask: NoMask - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformMNKUnderGarment name: MNK under garment description: MNK ensured comfort for the important bits. @@ -369,7 +369,7 @@ sprite: Nyanotrasen/Clothing/Misc/under_garments.rsi - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformMNKGymBra name: MNK gym bra description: Maximum performance with MNK sweat blockers. @@ -381,7 +381,7 @@ femaleMask: NoMask - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformMNKDressBlack name: MNK black dress description: A sleek black dress sporting a MNK window. @@ -405,7 +405,7 @@ femaleMask: NoMask - type: entity - parent: ClothingUniformBase + parent: ClothingUniformSkirtBase id: ClothingUniformMNKBlackShoulder name: MNK exposed shoulders description: A MNK outfit with exposed shoulders. From 771be20dea707fb5b00acae4bee86176f1f4bf0d Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Thu, 18 Jul 2024 02:36:06 +0000 Subject: [PATCH 3/8] Automatic Changelog Update (#530) --- Resources/Changelog/Changelog.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 1bfefd4d462..439b234a8d2 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -4513,3 +4513,11 @@ Entries: message: Added an alert on the UI for when the user is walking or running. id: 6166 time: '2024-07-16T21:39:46.0000000+00:00' +- author: Mnemotechnician + changes: + - type: Add + message: >- + You can now lie down and stand up at will! The default keybind for it is + "R", but it can be changed in settings. + id: 6167 + time: '2024-07-18T02:33:16.0000000+00:00' From fa1bd9f427615425cd4528c8177d05783f48ac45 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Thu, 18 Jul 2024 02:36:32 +0000 Subject: [PATCH 4/8] Automatic Changelog Update (#554) --- Resources/Changelog/Changelog.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 439b234a8d2..6f15a1c5c3d 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -4521,3 +4521,11 @@ Entries: "R", but it can be changed in settings. id: 6167 time: '2024-07-18T02:33:16.0000000+00:00' +- author: VMSolidus + changes: + - type: Fix + message: >- + Harpies can no longer buy Loadout items that are impossible for them to + wear due to having digitigrade legs. + id: 6168 + time: '2024-07-18T02:34:52.0000000+00:00' From 8939fa10df019d71d76dc6399a8a0dc164d74106 Mon Sep 17 00:00:00 2001 From: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:22:51 +0300 Subject: [PATCH 5/8] Fix Foreigner Translators AGAIN (#559) # Description Previous fix made it so that foreigner translators use no power (due to being parented off of the wrong proto). So I took some time to rearrange translators.yml because the file was shitfucked and that's what caused the mistake in the first place. This time it was made sure that: - All (powered) translators can hold a power cell and do use power - Foreigner's translator starts with a high-cap power cell and unspawnable Translator spawns with a medium - All children of the base powered translator spawn without a power cell and cannot work as such until a power cell is inserted. --- # Changelog :cl: - fix: Foreigner translator should now consume power, as intended. Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> --- .../Entities/Objects/Devices/translators.yml | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Devices/translators.yml b/Resources/Prototypes/Entities/Objects/Devices/translators.yml index 2eb44264548..d75b7af7fd6 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/translators.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/translators.yml @@ -1,3 +1,4 @@ +# Translator that doesn't need power to work - type: entity noSpawn: true id: TranslatorUnpowered @@ -29,37 +30,38 @@ unequipDelay: 0.3 quickEquip: false # Would conflict +# Base translator that uses a power cell. Starts with an empty slot. - type: entity noSpawn: true - id: Translator + id: TranslatorPoweredBase parent: [ TranslatorUnpowered, PowerCellSlotMediumItem ] - suffix: Powered components: - type: PowerCellDraw drawRate: 1 - -- type: entity - noSpawn: true - id: TranslatorEmpty - parent: Translator - suffix: Empty - components: - type: ItemSlots slots: cell_slot: name: power-cell-slot-component-slot-name-default +# Normal translator with medium power cell in it +- type: entity + noSpawn: true + id: Translator + parent: [ PowerCellSlotMediumItem, TranslatorPoweredBase ] + suffix: Powered + +# Normal translator with a high power cell and special appearance - type: entity noSpawn: true id: TranslatorForeigner - parent: [ TranslatorUnpowered, PowerCellSlotHighItem ] + parent: [ PowerCellSlotHighItem, TranslatorPoweredBase ] name: foreigner's translator description: A special-issue translator that helps foreigner's speak and understand this station's primary language. - type: entity id: CanilunztTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Canilunzt translator description: Translates speech between Canilunzt and Galactic Common, allowing your local yeepers to communicate with the locals and vice versa! components: @@ -76,7 +78,7 @@ - type: entity id: BubblishTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Bubblish translator description: Translates speech between Bubblish and Galactic Common, helping communicate with slimes and slime people. components: @@ -93,7 +95,7 @@ - type: entity id: NekomimeticTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Nekomimetic translator description: Translates speech between Nekomimetic and Galactic Common, enabling you to communicate with your pet cats. components: @@ -110,7 +112,7 @@ - type: entity id: DraconicTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Draconic translator description: Translates speech between Draconic and Galactic Common, making it easier to understand your local Uniathi. components: @@ -127,7 +129,7 @@ - type: entity id: SolCommonTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Sol Common translator description: Translates speech between Sol Common and Galactic Common. Like a true Earthman! components: @@ -144,7 +146,7 @@ - type: entity id: RootSpeakTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: RootSpeak translator description: Translates speech between RootSpeak and Galactic Common. You may now speak for the trees. components: @@ -161,7 +163,7 @@ - type: entity id: MofficTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Moffic translator description: Translates speech between Moffic and Galactic Common, helping you understand the buzzes of your pet mothroach! components: @@ -178,7 +180,7 @@ - type: entity id: XenoTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Xeno translator description: Translates speech between Xeno and Galactic Common. This will probably not help you survive an encounter, though. components: @@ -194,7 +196,7 @@ - type: entity id: AnimalTranslator - parent: [ TranslatorEmpty ] + parent: [ TranslatorPoweredBase ] name: Animal translator description: Translates all the cutes noises that most animals make into a more understandable form! components: From 20fe5d3887148186c31e321db7fb21e0b1365088 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Thu, 18 Jul 2024 08:23:18 +0000 Subject: [PATCH 6/8] Automatic Changelog Update (#559) --- Resources/Changelog/Changelog.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 6f15a1c5c3d..99af9f7d9bd 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -4529,3 +4529,9 @@ Entries: wear due to having digitigrade legs. id: 6168 time: '2024-07-18T02:34:52.0000000+00:00' +- author: Mnemotechnician + changes: + - type: Fix + message: Foreigner translator should now consume power, as intended. + id: 6169 + time: '2024-07-18T08:22:52.0000000+00:00' From 952953be0788a5d4154de1e5c76ae042cc06a112 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 18 Jul 2024 04:24:58 -0400 Subject: [PATCH 7/8] Physics Based Air Throws (#342) # Description I've made it so that when a room is explosively depressurized(or when a body of high pressure air flows into one of lower pressure air), that entities inside are launched by the air pressure with effects according to their mass. An entity's mass is now used as an innate resistance to forced movement by airflow, and more massive entities are both less likely to be launched, and will launch less far than others. While lighter entities are launched far more easily, and will shoot off into space quite quickly! Spacing departments has never been so exciting! This can be made extraordinarily fun if more objects are given the ability to injure people when colliding with them at high speeds. As a note, Humans are very unlikely to be sucked into space at a typical force generated from a 101kpa room venting into 0kpa, unless they happened to be standing right next to the opening to space when it was created. The same cannot be said for "Lighter-Than-Human" species such as Felinids and Harpies. I guess that's just the price to pay for being cute. :) On a plus side, because the math behind this is simplified even further than it was before, this actually runs more efficiently than the previous system. # TODO Nothing, this is basically done. I've spent a good 6 hours straight finely tuning the system until I was satisfied that it reflects something close to reality. # MEDIA **Before the Space Wind Rework:** https://github.com/Simple-Station/Einstein-Engines/assets/16548818/0bf56c50-58e6-4aef-97f8-027fbe62331e **With this Rework:** https://github.com/Simple-Station/Einstein-Engines/assets/16548818/6be507a9-e9de-4bb8-9d46-8b7c83ed5f1d # Changelog :cl: VMSolidus - add: Atmospheric "Throws" are now calculated using object mass, and behave accordingly. Tiny objects will shoot out of rooms quite fast! --------- Signed-off-by: VMSolidus Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> --- .../EntitySystems/AtmosphereSystem.CVars.cs | 12 ++ .../AtmosphereSystem.HighPressureDelta.cs | 93 ++++++---------- .../AtmosphereSystem.Monstermos.cs | 19 ++-- .../Atmos/EntitySystems/AtmosphereSystem.cs | 2 + .../Temperature/Systems/TemperatureSystem.cs | 5 +- Content.Shared/CCVar/CCVars.cs | 50 ++++++++- Content.Shared/Maps/ContentTileDefinition.cs | 6 + .../Prototypes/Entities/Mobs/NPCs/animals.yml | 46 ++++++-- Resources/Prototypes/Tiles/floors.yml | 103 ++++++++++++++++++ 9 files changed, 255 insertions(+), 81 deletions(-) diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.CVars.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.CVars.cs index 3aaa5429fb0..4d50700738b 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.CVars.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.CVars.cs @@ -12,9 +12,14 @@ public sealed partial class AtmosphereSystem public float SpaceWindPressureForceDivisorPush { get; private set; } public float SpaceWindMaxVelocity { get; private set; } public float SpaceWindMaxPushForce { get; private set; } + public float SpaceWindMinimumCalculatedMass { get; private set; } + public float SpaceWindMaximumCalculatedInverseMass { get; private set; } + public bool MonstermosUseExpensiveAirflow { get; private set; } 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; } @@ -26,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; } /// /// Time between each atmos sub-update. If you are writing an atmos device, use AtmosDeviceUpdateEvent.dt @@ -41,9 +47,14 @@ private void InitializeCVars() Subs.CVar(_cfg, CCVars.SpaceWindPressureForceDivisorPush, value => SpaceWindPressureForceDivisorPush = value, true); Subs.CVar(_cfg, CCVars.SpaceWindMaxVelocity, value => SpaceWindMaxVelocity = value, true); Subs.CVar(_cfg, CCVars.SpaceWindMaxPushForce, value => SpaceWindMaxPushForce = value, true); + Subs.CVar(_cfg, CCVars.SpaceWindMinimumCalculatedMass, value => SpaceWindMinimumCalculatedMass = value, true); + Subs.CVar(_cfg, CCVars.SpaceWindMaximumCalculatedInverseMass, value => SpaceWindMaximumCalculatedInverseMass = value, true); + Subs.CVar(_cfg, CCVars.MonstermosUseExpensiveAirflow, value => MonstermosUseExpensiveAirflow = value, true); 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); @@ -55,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); } } } diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs index cb50ff114e0..461435f0624 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs @@ -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; @@ -49,8 +50,7 @@ private void UpdateHighPressure(float frameTime) comp.Accumulator = 0f; toRemove.Add(ent); - if (HasComp(uid) && - TryComp(uid, out var body)) + if (TryComp(uid, out var body)) { _physics.SetBodyStatus(uid, body, BodyStatus.OnGround); } @@ -70,27 +70,10 @@ private void UpdateHighPressure(float frameTime) } } - private void AddMobMovedByPressure(EntityUid uid, MovedByPressureComponent component, PhysicsComponent body) - { - if (!TryComp(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 gridAtmosphere, TileAtmosphere tile, EntityQuery bodies, EntityQuery xforms, EntityQuery pressureQuery, EntityQuery metas) { + if (tile.PressureDifference < SpaceWindMinimumCalculatedMass * SpaceWindMinimumCalculatedMass) + return; // TODO ATMOS finish this // Don't play the space wind sound on tiles that are on fire... @@ -120,7 +103,8 @@ private void HighPressureMovements(Entity gridAtmospher var gridWorldRotation = xforms.GetComponent(gridAtmosphere).WorldRotation; // If we're using monstermos, smooth out the yeet direction to follow the flow - if (MonstermosEqualization) + //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. // The goal is to get a general direction of the airflow in the area. @@ -160,7 +144,7 @@ private void HighPressureMovements(Entity gridAtmospher (entity, pressureMovements), gridAtmosphere.Comp.UpdateCounter, tile.PressureDifference, - tile.PressureDirection, 0, + tile.PressureDirection, tile.PressureSpecificTarget != null ? _mapSystem.ToCenterCoordinates(tile.GridIndex, tile.PressureSpecificTarget.GridIndices) : EntityCoordinates.Invalid, gridWorldRotation, xforms.GetComponent(entity), @@ -181,12 +165,29 @@ 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 if it isn't working, you've probably still got the pressureResistanceProbDelta line included. + /// + /// EXPLANATION: + /// pressureDifference = Force of Air Flow on a given tile + /// physics.Mass = Mass of the object potentially being thrown + /// physics.InvMass = 1 divided by said Mass. More CPU efficient way to do division. + /// + /// Objects can only be thrown if the force of air flow is greater than the SQUARE of their mass or {SpaceWindMinimumCalculatedMass}, whichever is heavier + /// This means that the heavier an object is, the exponentially more force is required to move it + /// The force of a throw is equal to the force of air pressure, divided by an object's mass. So not only are heavier objects + /// less likely to be thrown, they are also harder to throw, + /// while lighter objects are yeeted easily, and from great distance. + /// + /// 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 + /// + public void ExperiencePressureDifference( Entity ent, int cycle, float pressureDifference, AtmosDirection direction, - float pressureResistanceProbDelta, EntityCoordinates throwTarget, Angle gridWorldRotation, TransformComponent? xform = null, @@ -199,50 +200,28 @@ public void ExperiencePressureDifference( if (!Resolve(uid, ref xform)) return; - // TODO ATMOS stuns? - - var maxForce = MathF.Sqrt(pressureDifference) * 2.25f; - var moveProb = 100f; - if (component.PressureResistance > 0) - moveProb = MathF.Abs((pressureDifference / component.PressureResistance * MovedByPressureComponent.ProbabilityBasePercent) - - MovedByPressureComponent.ProbabilityOffset); - - // Can we yeet the thing (due to probability, strength, etc.) - if (moveProb > MovedByPressureComponent.ProbabilityOffset && _robustRandom.Prob(MathF.Min(moveProb / 100f, 1f)) - && !float.IsPositiveInfinity(component.MoveResist) - && (physics.BodyType != BodyType.Static - && (maxForce >= (component.MoveResist * MovedByPressureComponent.MoveForcePushRatio))) - || (physics.BodyType == BodyType.Static && (maxForce >= (component.MoveResist * MovedByPressureComponent.MoveForceForcePushRatio)))) + if (physics.BodyType != BodyType.Static + && !float.IsPositiveInfinity(component.MoveResist)) { - if (HasComp(uid)) + var moveForce = pressureDifference * MathF.Max(physics.InvMass, SpaceWindMaximumCalculatedInverseMass); + if (HasComp(ent)) + moveForce *= HumanoidThrowMultiplier; + if (moveForce > physics.Mass) { - AddMobMovedByPressure(uid, component, physics); - } - - if (maxForce > MovedByPressureComponent.ThrowForce) - { - var moveForce = maxForce; - moveForce /= (throwTarget != EntityCoordinates.Invalid) ? SpaceWindPressureForceDivisorThrow : SpaceWindPressureForceDivisorPush; - moveForce *= MathHelper.Clamp(moveProb, 0, 100); - - // Apply a sanity clamp to prevent being thrown through objects. - var maxSafeForceForObject = SpaceWindMaxVelocity * physics.Mass; - moveForce = MathF.Min(moveForce, maxSafeForceForObject); - // Grid-rotation adjusted direction var dirVec = (direction.ToAngle() + gridWorldRotation).ToWorldVec(); + moveForce *= MathF.Max(physics.InvMass, SpaceWindMaximumCalculatedInverseMass); - // TODO: Technically these directions won't be correct but uhh I'm just here for optimisations buddy not to fix my old bugs. + //TODO Consider replacing throw target with proper trigonometry angles. if (throwTarget != EntityCoordinates.Invalid) { - var pos = ((throwTarget.ToMap(EntityManager, _transformSystem).Position - xform.WorldPosition).Normalized() + dirVec).Normalized(); - _physics.ApplyLinearImpulse(uid, pos * moveForce, body: physics); + var pos = throwTarget.ToMap(EntityManager, _transformSystem).Position - xform.WorldPosition + dirVec; + _throwing.TryThrow(uid, pos.Normalized() * MathF.Min(moveForce, SpaceWindMaxVelocity), moveForce); } else { - moveForce = MathF.Min(moveForce, SpaceWindMaxPushForce); - _physics.ApplyLinearImpulse(uid, dirVec * moveForce, body: physics); + _throwing.TryThrow(uid, dirVec.Normalized() * MathF.Min(moveForce, SpaceWindMaxVelocity), moveForce); } component.LastHighPressureMovementAirCycle = cycle; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs index dcbc1e86ee2..1ba9a48aa0c 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs @@ -5,11 +5,13 @@ using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Content.Shared.Database; +using Content.Shared.Maps; +using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Physics.Components; +using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; - namespace Content.Server.Atmos.EntitySystems { public sealed partial class AtmosphereSystem @@ -137,7 +139,7 @@ private void EqualizePressureInZone( var logN = MathF.Log2(tileCount); // Optimization - try to spread gases using an O(n log n) algorithm that has a chance of not working first to avoid O(n^2) - if (giverTilesLength > logN && takerTilesLength > logN) + if (!MonstermosUseExpensiveAirflow && giverTilesLength > logN && takerTilesLength > logN) { // Even if it fails, it will speed up the next part. Array.Sort(_equalizeTiles, 0, tileCount, _monstermosComparer); @@ -550,7 +552,8 @@ private void ExplosivelyDepressurize( } InvalidateVisuals(otherTile.GridIndex, otherTile.GridIndices, visuals); - HandleDecompressionFloorRip(mapGrid, otherTile, otherTile.MonstermosInfo.CurrentTransferAmount); + if (MonstermosRipTiles && otherTile.PressureDifference > MonstermosRipTilesMinimumPressure) + HandleDecompressionFloorRip(mapGrid, otherTile, otherTile.PressureDifference); } if (GridImpulse && tileCount > 0) @@ -676,14 +679,14 @@ private void AdjustEqMovement(TileAtmosphere tile, AtmosDirection direction, flo adj.MonstermosInfo[direction.GetOpposite()] -= amount; } - private void HandleDecompressionFloorRip(MapGridComponent mapGrid, TileAtmosphere tile, float sum) + private void HandleDecompressionFloorRip(MapGridComponent mapGrid, TileAtmosphere tile, float delta) { - if (!MonstermosRipTiles) + if (!mapGrid.TryGetTileRef(tile.GridIndices, out var tileRef)) return; + var tileref = tileRef.Tile; - var chance = MathHelper.Clamp(0.01f + (sum / SpacingMaxWind) * 0.3f, 0.003f, 0.3f); - - if (sum > 20 && _robustRandom.Prob(chance)) + var tileDef = (ContentTileDefinition) _tileDefinitionManager[tileref.TypeId]; + if (!tileDef.Reinforced && tileDef.TileRipResistance < delta * MonstermosRipTilesPressureOffset) PryTile(mapGrid, tile.GridIndices); } diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs index d2f40e77169..39425157ad4 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Atmos.EntitySystems; using Content.Shared.Doors.Components; using Content.Shared.Maps; +using Content.Shared.Throwing; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Audio.Systems; @@ -37,6 +38,7 @@ public sealed partial class AtmosphereSystem : SharedAtmosphereSystem [Dependency] private readonly TileSystem _tile = default!; [Dependency] private readonly MapSystem _map = default!; [Dependency] public readonly PuddleSystem Puddle = default!; + [Dependency] private readonly ThrowingSystem _throwing = default!; private const float ExposedUpdateDelay = 1f; private float _exposedTimer = 0f; diff --git a/Content.Server/Temperature/Systems/TemperatureSystem.cs b/Content.Server/Temperature/Systems/TemperatureSystem.cs index 6c9e99e5f3b..0f57da4b881 100644 --- a/Content.Server/Temperature/Systems/TemperatureSystem.cs +++ b/Content.Server/Temperature/Systems/TemperatureSystem.cs @@ -161,8 +161,9 @@ public float GetHeatCapacity(EntityUid uid, TemperatureComponent? comp = null, P { return Atmospherics.MinimumHeatCapacity; } - - return comp.SpecificHeat * physics.FixturesMass; + if (physics.Mass < 1) + return comp.SpecificHeat; + else return comp.SpecificHeat * physics.FixturesMass; } private void OnInit(EntityUid uid, InternalTemperatureComponent comp, MapInitEvent args) diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index ed2e552a9f0..2ba535c2539 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -1169,7 +1169,7 @@ public static readonly CVarDef /// Useful to prevent clipping through objects. /// public static readonly CVarDef SpaceWindMaxVelocity = - CVarDef.Create("atmos.space_wind_max_velocity", 30f, CVar.SERVERONLY); + CVarDef.Create("atmos.space_wind_max_velocity", 15f, CVar.SERVERONLY); /// /// The maximum force that may be applied to an object by pushing (i.e. not throwing) atmospheric pressure differences. @@ -1178,6 +1178,24 @@ public static readonly CVarDef public static readonly CVarDef SpaceWindMaxPushForce = CVarDef.Create("atmos.space_wind_max_push_force", 20f, CVar.SERVERONLY); + /// + /// If an object's mass is below this number, then this number is used in place of mass to determine whether air pressure can throw an object. + /// This has nothing to do with throwing force, only acting as a way of reducing the odds of tiny 5 gram objects from being yeeted by people's breath + /// + /// + /// If you are reading this because you want to change it, consider looking into why almost every item in the game weighs only 5 grams + /// And maybe do your part to fix that? :) + /// + public static readonly CVarDef SpaceWindMinimumCalculatedMass = + CVarDef.Create("atmos.space_wind_minimum_calculated_mass", 10f, CVar.SERVERONLY); + + /// + /// Calculated as 1/Mass, where Mass is the physics.Mass of the desired threshold. + /// If an object's inverse mass is lower than this, it is capped at this. Basically, an upper limit to how heavy an object can be before it stops resisting space wind more. + /// + public static readonly CVarDef SpaceWindMaximumCalculatedInverseMass = + CVarDef.Create("atmos.space_wind_maximum_calculated_inverse_mass", 0.04f, CVar.SERVERONLY); + /// /// Whether monstermos tile equalization is enabled. /// @@ -1199,7 +1217,21 @@ public static readonly CVarDef /// Also looks weird on slow spacing for unrelated reasons. If you do want to enable this, you should probably turn on instaspacing. /// public static readonly CVarDef MonstermosRipTiles = - CVarDef.Create("atmos.monstermos_rip_tiles", false, CVar.SERVERONLY); + CVarDef.Create("atmos.monstermos_rip_tiles", true, CVar.SERVERONLY); + + /// + /// Taken as the cube of a tile's mass, this acts as a minimum threshold of mass for which air pressure calculates whether or not to rip a tile from the floor + /// This should be set by default to the cube of the game's lowest mass tile as defined in their prototypes, but can be increased for server performance reasons + /// + public static readonly CVarDef MonstermosRipTilesMinimumPressure = + CVarDef.Create("atmos.monstermos_rip_tiles_min_pressure", 7500f, CVar.SERVERONLY); + + /// + /// Taken after the minimum pressure is checked, the effective pressure is multiplied by this amount. + /// This allows server hosts to finely tune how likely floor tiles are to be ripped apart by air pressure + /// + public static readonly CVarDef MonstermosRipTilesPressureOffset = + CVarDef.Create("atmos.monstermos_rip_tiles_pressure_offset", 0.44f, CVar.SERVERONLY); /// /// Whether explosive depressurization will cause the grid to gain an impulse. @@ -1230,6 +1262,13 @@ public static readonly CVarDef public static readonly CVarDef AtmosSpacingMaxWind = CVarDef.Create("atmos.mmos_max_wind", 500f, CVar.SERVERONLY); + /// + /// Increases default airflow calculations to O(n^2) complexity, for use with heavy space wind optimizations. Potato servers BEWARE + /// This solves the problem of objects being trapped in an infinite loop of slamming into a wall repeatedly. + /// + public static readonly CVarDef MonstermosUseExpensiveAirflow = + CVarDef.Create("atmos.mmos_expensive_airflow", true, CVar.SERVERONLY); + /// /// Whether atmos superconduction is enabled. /// @@ -1286,6 +1325,13 @@ public static readonly CVarDef public static readonly CVarDef AtmosHeatScale = CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY); + /// + /// A multiplier on the amount of force applied to Humanoid entities, as tracked by HumanoidAppearanceComponent + /// This multiplier is added after all other checks are made, and applies to both throwing force, and how easy it is for an entity to be thrown. + /// + public static readonly CVarDef AtmosHumanoidThrowMultiplier = + CVarDef.Create("atmos.humanoid_throw_multiplier", 2f, CVar.SERVERONLY); + /* * MIDI instruments */ diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index 32f5db0e821..be171559d02 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -121,5 +121,11 @@ public void AssignTileId(ushort id) { TileId = id; } + + [DataField] + public bool Reinforced = false; + + [DataField] + public float TileRipResistance = 125f; } } diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 5d8753e669e..9bdfacb81ab 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -23,7 +23,7 @@ shape: !type:PhysShapeCircle radius: 0.25 - density: 10 + density: 0.8 mask: - FlyingMobMask layer: @@ -89,7 +89,7 @@ shape: !type:PhysShapeCircle radius: 0.1 - density: 30 + density: 0.1 mask: - FlyingMobMask layer: @@ -346,7 +346,7 @@ shape: !type:PhysShapeCircle radius: 0.2 - density: 100 + density: 0.0007 mask: - SmallMobMask layer: @@ -450,7 +450,7 @@ shape: !type:PhysShapeCircle radius: 0.2 - density: 120 + density: 0.007 mask: - SmallMobMask layer: @@ -1581,7 +1581,7 @@ shape: !type:PhysShapeCircle radius: 0.2 - density: 100 + density: 0.76 mask: - SmallMobMask layer: @@ -2540,7 +2540,7 @@ shape: !type:PhysShapeCircle radius: 0.35 - density: 50 #They actually are pretty light, I looked it up + density: 16.66 mask: - MobMask layer: @@ -2623,7 +2623,7 @@ shape: !type:PhysShapeCircle radius: 0.35 - density: 50 + density: 25.5 mask: - MobMask layer: @@ -2778,7 +2778,7 @@ shape: !type:PhysShapeCircle radius: 0.35 - density: 15 + density: 9 mask: - MobMask layer: @@ -2931,6 +2931,17 @@ Base: caracal_flop Dead: Base: caracal_dead + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.35 + density: 30 + mask: + - MobMask + layer: + - MobLayer - type: entity name: kitten @@ -2966,6 +2977,17 @@ thresholds: 0: Alive 25: Dead + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.35 + density: 2 + mask: + - MobMask + layer: + - MobLayer - type: entity name: sloth @@ -3052,7 +3074,7 @@ shape: !type:PhysShapeCircle radius: 0.35 - density: 5 + density: 4 mask: - MobMask layer: @@ -3129,7 +3151,7 @@ shape: !type:PhysShapeCircle radius: 0.2 - density: 120 + density: 0.8 mask: - SmallMobMask layer: @@ -3253,7 +3275,7 @@ shape: !type:PhysShapeCircle radius: 0.35 - density: 250 + density: 750 mask: - MobMask layer: @@ -3330,7 +3352,7 @@ shape: !type:PhysShapeCircle radius: 0.35 - density: 100 # High, because wood is heavy. + density: 15 mask: - MobMask layer: diff --git a/Resources/Prototypes/Tiles/floors.yml b/Resources/Prototypes/Tiles/floors.yml index b5ca240d5ca..2abaab63fb0 100644 --- a/Resources/Prototypes/Tiles/floors.yml +++ b/Resources/Prototypes/Tiles/floors.yml @@ -15,6 +15,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelCheckerLight @@ -33,6 +34,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteelCheckerLight heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelCheckerDark @@ -51,6 +53,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteelCheckerDark heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelMini @@ -69,6 +72,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelPavement @@ -87,6 +91,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelDiagonal @@ -105,6 +110,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelOffset @@ -117,6 +123,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelMono @@ -135,6 +142,7 @@ collection: FootstepTile itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelPavementVertical @@ -153,6 +161,7 @@ collection: FootstepTile itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelHerringbone @@ -171,6 +180,7 @@ collection: FootstepTile itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorSteelDiagonalMini @@ -189,6 +199,7 @@ collection: FootstepTile itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorBrassFilled @@ -201,6 +212,7 @@ collection: FootstepHull itemDrop: FloorTileItemBrassFilled heatCapacity: 10000 + tileRipResistance: 220 - type: tile id: FloorBrassReebe @@ -213,6 +225,7 @@ collection: FootstepHull itemDrop: FloorTileItemBrassReebe heatCapacity: 10000 + tileRipResistance: 220 - type: tile id: FloorPlastic @@ -231,6 +244,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWood @@ -251,6 +265,7 @@ collection: BarestepWood itemDrop: FloorTileItemWood heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhite @@ -269,6 +284,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhiteMini @@ -287,6 +303,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhitePavement @@ -305,6 +322,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhiteDiagonal @@ -323,6 +341,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhiteOffset @@ -335,6 +354,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhiteMono @@ -353,6 +373,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhitePavementVertical @@ -371,6 +392,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhiteHerringbone @@ -389,6 +411,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhiteDiagonalMini @@ -407,6 +430,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorWhitePlastic @@ -425,6 +449,7 @@ collection: FootstepTile itemDrop: FloorTileItemWhite heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorDark @@ -443,6 +468,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkMini @@ -461,6 +487,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkPavement @@ -479,6 +506,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkDiagonal @@ -497,6 +525,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkOffset @@ -509,6 +538,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkMono @@ -527,6 +557,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkPavementVertical @@ -545,6 +576,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkHerringbone @@ -563,6 +595,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkDiagonalMini @@ -581,6 +614,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorDarkPlastic @@ -599,6 +633,7 @@ collection: FootstepTile itemDrop: FloorTileItemDark heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorTechMaint @@ -611,6 +646,7 @@ collection: FootstepHull itemDrop: FloorTileItemTechmaint heatCapacity: 10000 + tileRipResistance: 250 - type: tile id: FloorReinforced @@ -623,6 +659,7 @@ collection: FootstepHull itemDrop: FloorTileItemReinforced heatCapacity: 10000 + reinforced: true - type: tile id: FloorMono @@ -635,6 +672,7 @@ collection: FootstepTile itemDrop: FloorTileItemMono heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorLino @@ -647,6 +685,7 @@ collection: FootstepTile itemDrop: FloorTileItemLino heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorSteelDirty @@ -659,6 +698,7 @@ collection: FootstepPlating itemDrop: FloorTileItemDirty heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorElevatorShaft @@ -671,6 +711,7 @@ collection: FootstepHull itemDrop: FloorTileItemElevatorShaft heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorMetalDiamond @@ -683,6 +724,7 @@ collection: FootstepHull itemDrop: FloorTileItemMetalDiamond heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorRockVault @@ -695,6 +737,7 @@ collection: FootstepAsteroid itemDrop: FloorTileItemRockVault heatCapacity: 10000 + tileRipResistance: 400 - type: tile id: FloorBlue @@ -707,6 +750,7 @@ collection: FootstepTile itemDrop: FloorTileItemBlue heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorSteelLime @@ -725,6 +769,7 @@ collection: FootstepFloor itemDrop: FloorTileItemLime heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorMining @@ -737,6 +782,7 @@ collection: FootstepTile itemDrop: FloorTileItemMining heatCapacity: 10000 + tileRipResistance: 250 - type: tile id: FloorMiningDark @@ -749,6 +795,7 @@ collection: FootstepTile itemDrop: FloorTileItemMiningDark heatCapacity: 10000 + tileRipResistance: 250 - type: tile id: FloorMiningLight @@ -761,6 +808,7 @@ collection: FootstepTile itemDrop: FloorTileItemMiningLight heatCapacity: 10000 + tileRipResistance: 250 # Departamental - type: tile @@ -774,6 +822,7 @@ collection: FootstepHull itemDrop: FloorTileItemFreezer heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorShowroom @@ -786,6 +835,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShowroom heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorHydro @@ -798,6 +848,7 @@ collection: FootstepFloor itemDrop: FloorTileItemHydro heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorBar @@ -816,6 +867,7 @@ collection: FootstepFloor itemDrop: FloorTileItemBar heatCapacity: 10000 + tileRipResistance: 100 - type: tile id: FloorClown @@ -828,6 +880,7 @@ collection: FootstepFloor itemDrop: FloorTileItemClown heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorMime @@ -840,6 +893,7 @@ collection: FootstepFloor itemDrop: FloorTileItemMime heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorKitchen @@ -852,6 +906,7 @@ collection: FootstepTile itemDrop: FloorTileItemKitchen heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorLaundry @@ -864,6 +919,7 @@ collection: FootstepTile itemDrop: FloorTileItemLaundry heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorSteelDamaged @@ -883,6 +939,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel #This should probably be made null when it becomes possible to make it such, in SS13 prying destroyed tiles wouldn't give you anything. heatCapacity: 10000 + tileRipResistance: 175 - type: tile id: FloorSteelBurnt @@ -899,6 +956,7 @@ collection: FootstepFloor itemDrop: FloorTileItemSteel #Same case as FloorSteelDamaged, make it null when possible heatCapacity: 10000 + tileRipResistance: 175 # Concrete @@ -920,6 +978,7 @@ itemDrop: FloorTileItemConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorConcreteMono @@ -939,6 +998,7 @@ itemDrop: FloorTileItemConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorConcreteSmooth @@ -958,6 +1018,7 @@ itemDrop: FloorTileItemConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorGrayConcrete @@ -977,6 +1038,7 @@ itemDrop: FloorTileItemGrayConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorGrayConcreteMono @@ -996,6 +1058,7 @@ itemDrop: FloorTileItemGrayConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorGrayConcreteSmooth @@ -1015,6 +1078,7 @@ itemDrop: FloorTileItemGrayConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorOldConcrete @@ -1034,6 +1098,7 @@ itemDrop: FloorTileItemOldConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorOldConcreteMono @@ -1053,6 +1118,7 @@ itemDrop: FloorTileItemOldConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 - type: tile id: FloorOldConcreteSmooth @@ -1072,6 +1138,7 @@ itemDrop: FloorTileItemOldConcrete heatCapacity: 10000 weather: true + tileRipResistance: 300 # Carpets (non smoothing) - type: tile @@ -1088,6 +1155,7 @@ friction: 0.25 itemDrop: FloorTileItemArcadeBlue heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorArcadeBlue2 @@ -1103,6 +1171,7 @@ friction: 0.25 itemDrop: FloorTileItemArcadeBlue2 heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorArcadeRed @@ -1118,6 +1187,7 @@ friction: 0.25 itemDrop: FloorTileItemArcadeRed heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorEighties @@ -1133,6 +1203,7 @@ friction: 0.25 itemDrop: FloorTileItemEighties heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorCarpetClown @@ -1148,6 +1219,7 @@ friction: 0.25 itemDrop: FloorTileItemCarpetClown heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorCarpetOffice @@ -1163,6 +1235,7 @@ friction: 0.25 itemDrop: FloorTileItemCarpetOffice heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorBoxing @@ -1182,6 +1255,7 @@ friction: 0.25 itemDrop: FloorTileItemBoxing heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorGym @@ -1201,6 +1275,7 @@ friction: 0.25 itemDrop: FloorTileItemGym heatCapacity: 10000 + tileRipResistance: 50 # Shuttle - type: tile @@ -1214,6 +1289,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttleWhite heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorShuttleGrey @@ -1226,6 +1302,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttleGrey heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorShuttleBlack @@ -1238,6 +1315,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttleBlack heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorShuttleBlue @@ -1250,6 +1328,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttleBlue heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorShuttleOrange @@ -1262,6 +1341,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttleOrange heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorShuttlePurple @@ -1274,6 +1354,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttlePurple heatCapacity: 10000 + tileRipResistance: 4500 - type: tile id: FloorShuttleRed @@ -1286,6 +1367,7 @@ collection: FootstepFloor itemDrop: FloorTileItemShuttleRed heatCapacity: 10000 + tileRipResistance: 4500 # Materials @@ -1300,6 +1382,7 @@ collection: FootstepTile itemDrop: FloorTileItemGold heatCapacity: 10000 + tileRipResistance: 600 - type: tile id: FloorSilver @@ -1312,6 +1395,7 @@ collection: FootstepTile itemDrop: FloorTileItemSilver heatCapacity: 10000 + tileRipResistance: 500 - type: tile id: FloorGlass @@ -1330,6 +1414,7 @@ collection: FootstepTile itemDrop: SheetGlass1 heatCapacity: 10000 + tileRipResistance: 150 - type: tile id: FloorRGlass @@ -1348,6 +1433,7 @@ collection: FootstepTile itemDrop: SheetRGlass1 heatCapacity: 10000 + tileRipResistance: 175 # Circuits - type: tile @@ -1361,6 +1447,7 @@ collection: FootstepHull itemDrop: FloorTileItemGCircuit heatCapacity: 10000 + tileRipResistance: 225 - type: tile id: FloorBlueCircuit @@ -1373,6 +1460,7 @@ collection: FootstepHull itemDrop: FloorTileItemBCircuit heatCapacity: 10000 + tileRipResistance: 225 # Terrain - type: tile @@ -1666,6 +1754,7 @@ itemDrop: FloorTileItemFlesh friction: 0.05 #slippy heatCapacity: 10000 + tileRipResistance: 80 - type: tile id: FloorTechMaint2 @@ -1678,6 +1767,7 @@ collection: FootstepHull itemDrop: FloorTileItemSteelMaint heatCapacity: 10000 + tileRipResistance: 225 - type: tile id: FloorTechMaint3 @@ -1696,6 +1786,7 @@ collection: FootstepHull itemDrop: FloorTileItemGratingMaint heatCapacity: 10000 + tileRipResistance: 225 - type: tile id: FloorWoodTile @@ -1716,6 +1807,7 @@ collection: BarestepWood itemDrop: FloorTileItemWoodPattern heatCapacity: 10000 + tileRipResistance: 75 - type: tile id: FloorBrokenWood @@ -1739,6 +1831,7 @@ collection: BarestepWood itemDrop: MaterialWoodPlank1 heatCapacity: 10000 + tileRipResistance: 60 - type: tile id: FloorWebTile @@ -1753,6 +1846,7 @@ collection: BarestepCarpet itemDrop: FloorTileItemWeb heatCapacity: 10000 + tileRipResistance: 30 - type: tile id: FloorChromite @@ -1784,6 +1878,7 @@ collection: FootstepHull itemDrop: FloorTileItemSteel #probably should not be normally obtainable, but the game shits itself and dies when you try to put null here heatCapacity: 10000 + tileRipResistance: 500 - type: tile id: FloorHullReinforced @@ -1796,6 +1891,7 @@ itemDrop: FloorTileItemSteel heatCapacity: 100000 #/tg/ has this set as "INFINITY." I don't know if that exists here so I've just added an extra 0 indestructible: true + reinforced: true - type: tile id: FloorReinforcedHardened @@ -1806,6 +1902,7 @@ footstepSounds: collection: FootstepHull itemDrop: FloorTileItemReinforced #same case as FloorHull + reinforced: true # Faux sci tiles @@ -1837,6 +1934,7 @@ collection: FootstepGrass itemDrop: FloorTileItemAstroGrass heatCapacity: 10000 + tileRipResistance: 50 - type: tile id: FloorMowedAstroGrass @@ -1846,6 +1944,7 @@ isSubfloor: false deconstructTools: [ Cutting ] itemDrop: FloorTileItemMowedAstroGrass + tileRipResistance: 50 - type: tile id: FloorJungleAstroGrass @@ -1855,6 +1954,7 @@ isSubfloor: false deconstructTools: [ Cutting ] itemDrop: FloorTileItemJungleAstroGrass + tileRipResistance: 50 # Ice - type: tile @@ -1870,6 +1970,7 @@ mobFrictionNoInput: 0.05 mobAcceleration: 2 itemDrop: FloorTileItemAstroIce + tileRipResistance: 50 - type: tile id: FloorAstroSnow @@ -1879,6 +1980,7 @@ isSubfloor: false deconstructTools: [ Prying ] itemDrop: FloorTileItemAstroSnow + tileRipResistance: 50 - type: tile id: FloorWoodLarge @@ -1899,3 +2001,4 @@ collection: BarestepWood itemDrop: FloorTileItemWoodLarge heatCapacity: 10000 + tileRipResistance: 100 From 4177b703b65e4c6f54dbae3e68a08865963361ea Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Thu, 18 Jul 2024 08:25:22 +0000 Subject: [PATCH 8/8] Automatic Changelog Update (#342) --- Resources/Changelog/Changelog.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 99af9f7d9bd..e357069c73b 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -4535,3 +4535,11 @@ Entries: message: Foreigner translator should now consume power, as intended. id: 6169 time: '2024-07-18T08:22:52.0000000+00:00' +- author: VMSolidus + changes: + - type: Add + message: >- + Atmospheric "Throws" are now calculated using object mass, and behave + accordingly. Tiny objects will shoot out of rooms quite fast! + id: 6170 + time: '2024-07-18T08:24:58.0000000+00:00'