From 8922181b84889f7f26c965b37185d713911f7c76 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Sat, 29 Jun 2024 20:02:26 +0000 Subject: [PATCH] Cherrypicks 4 (#393) * Immovable Rod changes (#26757) * Adds non randomized rod velocity (#27123) * adds non randomized rod velocity * Adds despawn suffix to despawn rod * make fire spreading scale with mass (#27202) * make fire spreading scale with mass * realer --------- Co-authored-by: deltanedas <@deltanedas:kde.org> * lower max firestacks to 10, refactor flammable (#27159) * lower max firestacks to 10, refactor flammable * fix * uncap fire stack damage, lower fire stack damage * fix fire spread round removal (#27986) * fix a resolve debug assert * rewrite fire spread --------- Co-authored-by: deltanedas <@deltanedas:kde.org> * fire troll fix (#28034) Co-authored-by: deltanedas <@deltanedas:kde.org> * Hide doafters if you're in a container (#29487) * Hide doafters if you're in a container * Out of the loop --------- Co-authored-by: plykiya * Add ghost role raffles (#26629) * Add ghost role raffles * GRR: Fix dialogue sizing, fix merge * GRR: Add raffle deciders (winner picker) * GRR: Make settings prototype based with option to override * GRR: Use Raffles folder and namespace * GRR: DataFieldify and TimeSpanify * GRR: Don't actually DataFieldify HashSets * GRR: add GetGhostRoleCount() + docs * update engine on branch * Ghost role raffles: docs, fix window size, cleanup, etc * GRR: Admin UI * GRR: Admin UI: Display initial/max/ext of selected raffle settings proto * GRR: Make a ton of roles raffled * Make ERT use short raffle timer (#27830) Co-authored-by: plykiya * gives loneops a proper ghost role raffle (#27841) * shorten short raffle (#28685) * - fix: Conflicts. * - fix. --------- Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com> Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com> Co-authored-by: plykiya Co-authored-by: no <165581243+pissdemon@users.noreply.github.com> Co-authored-by: Boaz1111 <149967078+Boaz1111@users.noreply.github.com> Co-authored-by: HS <81934438+HolySSSS@users.noreply.github.com> --- Content.Client/DoAfter/DoAfterOverlay.cs | 7 +- Content.Client/Entry/EntryPoint.cs | 1 + .../Controls/Roles/GhostRoleEntryButtons.xaml | 2 +- .../Roles/GhostRoleEntryButtons.xaml.cs | 65 +++- .../Controls/Roles/GhostRolesEntry.xaml.cs | 2 +- .../Ghost/Controls/Roles/GhostRolesEui.cs | 24 +- .../Controls/Roles/GhostRolesWindow.xaml | 4 +- .../Controls/Roles/GhostRolesWindow.xaml.cs | 4 +- .../Ghost/Controls/Roles/MakeGhostRoleEui.cs | 19 +- .../Controls/Roles/MakeGhostRoleWindow.xaml | 18 + .../Roles/MakeGhostRoleWindow.xaml.cs | 121 +++++- .../Systems/AdminVerbSystem.Smites.cs | 2 +- .../Atmos/Components/FlammableComponent.cs | 34 +- .../Atmos/EntitySystems/FlammableSystem.cs | 102 +++-- .../Commands/ForcePresetCommand.cs | 4 +- .../GameTicking/Rules/NukeopsRuleSystem.cs | 3 +- .../Roles/Components/GhostRoleComponent.cs | 10 +- .../Components/GhostRoleRaffleComponent.cs | 58 +++ Content.Server/Ghost/Roles/GhostRoleSystem.cs | 358 +++++++++++++++++- .../Roles/MakeRaffledGhostRoleCommand.cs | 127 +++++++ .../Roles/Raffles/GhostRoleRaffleConfig.cs | 35 ++ .../GhostRoleRaffleDeciderPrototype.cs | 20 + .../Roles/Raffles/IGhostRoleRaffleDecider.cs | 28 ++ .../Raffles/RngGhostRoleRaffleDecider.cs | 27 ++ .../Ghost/Roles/UI/GhostRolesEui.cs | 20 +- .../IgnitionSource/IgnitionSourceSystem.cs | 2 +- .../ImmovableRod/ImmovableRodComponent.cs | 13 + .../ImmovableRod/ImmovableRodSystem.cs | 44 ++- .../Ghost/Roles/GhostRolesEuiMessages.cs | 61 ++- .../Roles/Raffles/GhostRoleRaffleSettings.cs | 30 ++ .../GhostRoleRaffleSettingsPrototype.cs | 22 ++ Resources/Locale/en-US/ghost/ghost-gui.ftl | 11 + .../Entities/Markers/Spawners/ghost_roles.yml | 14 + .../Prototypes/Entities/Mobs/NPCs/animals.yml | 6 + .../Entities/Mobs/NPCs/behonker.yml | 2 + .../Prototypes/Entities/Mobs/NPCs/carp.yml | 2 + .../Entities/Mobs/NPCs/elemental.yml | 2 + .../Entities/Mobs/NPCs/hellspawn.yml | 2 + .../Entities/Mobs/NPCs/regalrat.yml | 2 + .../Entities/Mobs/NPCs/revenant.yml | 2 + .../Prototypes/Entities/Mobs/NPCs/silicon.yml | 6 + .../Prototypes/Entities/Mobs/NPCs/slimes.yml | 8 + .../Prototypes/Entities/Mobs/NPCs/xeno.yml | 2 + .../Entities/Mobs/Player/dragon.yml | 6 +- .../Entities/Mobs/Player/familiars.yml | 2 + .../Entities/Mobs/Player/guardian.yml | 8 + .../Entities/Mobs/Player/humanoid.yml | 36 ++ .../Entities/Mobs/Player/skeleton.yml | 6 + Resources/Prototypes/Entities/Mobs/base.yml | 2 +- .../Objects/Consumable/Food/Baked/bread.yml | 4 +- .../Objects/Consumable/Food/Baked/cake.yml | 2 + .../reinforcement_teleporter.yml | 6 + .../Entities/Objects/Fun/immovable_rod.yml | 39 +- .../Prototypes/GhostRoleRaffles/deciders.yml | 3 + .../Prototypes/GhostRoleRaffles/settings.yml | 15 + Resources/Prototypes/_White/Wizard/wizard.yml | 2 + 56 files changed, 1317 insertions(+), 140 deletions(-) create mode 100644 Content.Server/Ghost/Roles/Components/GhostRoleRaffleComponent.cs create mode 100644 Content.Server/Ghost/Roles/MakeRaffledGhostRoleCommand.cs create mode 100644 Content.Server/Ghost/Roles/Raffles/GhostRoleRaffleConfig.cs create mode 100644 Content.Server/Ghost/Roles/Raffles/GhostRoleRaffleDeciderPrototype.cs create mode 100644 Content.Server/Ghost/Roles/Raffles/IGhostRoleRaffleDecider.cs create mode 100644 Content.Server/Ghost/Roles/Raffles/RngGhostRoleRaffleDecider.cs create mode 100644 Content.Shared/Ghost/Roles/Raffles/GhostRoleRaffleSettings.cs create mode 100644 Content.Shared/Ghost/Roles/Raffles/GhostRoleRaffleSettingsPrototype.cs create mode 100644 Resources/Prototypes/GhostRoleRaffles/deciders.yml create mode 100644 Resources/Prototypes/GhostRoleRaffles/settings.yml diff --git a/Content.Client/DoAfter/DoAfterOverlay.cs b/Content.Client/DoAfter/DoAfterOverlay.cs index dc6879ce0e..dddcb0eb93 100644 --- a/Content.Client/DoAfter/DoAfterOverlay.cs +++ b/Content.Client/DoAfter/DoAfterOverlay.cs @@ -8,6 +8,7 @@ using Robust.Client.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; using Robust.Shared.Utility; +using Robust.Shared.Containers; namespace Content.Client.DoAfter; @@ -19,6 +20,7 @@ public sealed class DoAfterOverlay : Overlay private readonly SharedTransformSystem _transform; private readonly MetaDataSystem _meta; private readonly ProgressColorSystem _progressColor; + private readonly SharedContainerSystem _container; private readonly Texture _barTexture; @@ -40,6 +42,7 @@ public sealed class DoAfterOverlay : Overlay _player = player; _transform = _entManager.EntitySysManager.GetEntitySystem(); _meta = _entManager.EntitySysManager.GetEntitySystem(); + _container = _entManager.EntitySysManager.GetEntitySystem(); _progressColor = _entManager.System(); var sprite = new SpriteSpecifier.Rsi(new ResPath("/Textures/Interface/Misc/progress_bar.rsi"), "icon"); _barTexture = _entManager.EntitySysManager.GetEntitySystem().Frame0(sprite); @@ -90,11 +93,13 @@ public sealed class DoAfterOverlay : Overlay var offset = 0f; + var isInContainer = _container.IsEntityOrParentInContainer(uid, meta, xform); + foreach (var doAfter in comp.DoAfters.Values) { // Hide some DoAfters from other players for stealthy actions (ie: thieving gloves) var alpha = 1f; - if (doAfter.Args.Hidden) + if (doAfter.Args.Hidden || isInContainer) { if (uid != localEnt) continue; diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index 9fa870b7bc..0a58f27818 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -134,6 +134,7 @@ namespace Content.Client.Entry _prototypeManager.RegisterIgnore("wireLayout"); _prototypeManager.RegisterIgnore("alertLevels"); _prototypeManager.RegisterIgnore("nukeopsRole"); + _prototypeManager.RegisterIgnore("ghostRoleRaffleDecider"); //WD-EDIT _prototypeManager.RegisterIgnore("loadout"); diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml index 92e38e35e0..ffde5d69f7 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml @@ -5,7 +5,7 @@ Text="{Loc 'ghost-roles-window-request-role-button'}" StyleClasses="OpenRight" HorizontalAlignment="Left" - SetWidth="150"/> + SetWidth="300"/>