From 358de9b7df856d7288c91aca88a09f0768313764 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Wed, 22 Nov 2023 01:53:04 +0100 Subject: [PATCH 01/35] Remove extra pumpkinds from autodrobe (#21822) --- .../Prototypes/Catalog/VendingMachines/Inventories/theater.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml index f3c108d72a1..d4dd657027c 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/theater.yml @@ -24,7 +24,7 @@ ClothingOuterSuitChicken: 2 ClothingHeadHatChickenhead: 2 ClothingOuterSuitMonkey: 2 - ClothingHeadHatPumpkin: 4 # Extra pumpkins for the season + ClothingHeadHatPumpkin: 2 ClothingHeadHatShrineMaidenWig: 2 ClothingOuterSuitShrineMaiden: 2 Gohei: 2 From aa5995613451239d1b5de7e620094eb91d1ab5ce Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Wed, 22 Nov 2023 13:53:30 +1300 Subject: [PATCH 02/35] Fix handcuffed entity deletion and a mind shutdown error. (#21825) * Fix handcuffed deletion error * Fix mind shutdown error --- Content.Server/Mind/MindSystem.cs | 2 +- Content.Shared/Cuffs/SharedCuffableSystem.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Mind/MindSystem.cs b/Content.Server/Mind/MindSystem.cs index 4623c07052b..46ddb072cdb 100644 --- a/Content.Server/Mind/MindSystem.cs +++ b/Content.Server/Mind/MindSystem.cs @@ -40,7 +40,7 @@ private void OnMindShutdown(EntityUid uid, MindComponent mind, ComponentShutdown if (mind.UserId is {} user) { UserMinds.Remove(user); - if (_players.GetPlayerData(user).ContentData() is { } oldData) + if (_players.TryGetPlayerData(user, out var data) && data.ContentData() is { } oldData) oldData.Mind = null; mind.UserId = null; } diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index 4951bb7f1cb..5dbe62aa6ae 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -619,6 +619,9 @@ public void Uncuff(EntityUid target, EntityUid? user, EntityUid cuffsToRemove, C if (!Resolve(target, ref cuffable) || !Resolve(cuffsToRemove, ref cuff)) return; + if (TerminatingOrDeleted(cuffsToRemove) || TerminatingOrDeleted(target)) + return; + if (user != null) { var attempt = new UncuffAttemptEvent(user.Value, target); From 6fa144b465674e703d2cdf1692d910b472df5683 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:01:30 +1100 Subject: [PATCH 03/35] Update desert planet walls to WallRockSand (#21783) * Update desert planet walls to WallRockSand * This --- .../Prototypes/Procedural/biome_ore_templates.yml | 7 +++++++ Resources/Prototypes/Procedural/biome_templates.yml | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Resources/Prototypes/Procedural/biome_ore_templates.yml b/Resources/Prototypes/Procedural/biome_ore_templates.yml index 6a77171ca79..9dc3fef286a 100644 --- a/Resources/Prototypes/Procedural/biome_ore_templates.yml +++ b/Resources/Prototypes/Procedural/biome_ore_templates.yml @@ -5,6 +5,7 @@ WallRock: WallRockTin WallRockBasalt: WallRockBasaltTin WallRockChromite: WallRockChromiteTin + WallRockSand: WallRockSandTin WallRockSnow: WallRockSnowTin maxCount: 30 minGroupSize: 10 @@ -31,6 +32,7 @@ WallRock: WallRockGold WallRockBasalt: WallRockBasaltGold WallRockChromite: WallRockChromiteGold + WallRockSand: WallRockSandGold WallRockSnow: WallRockSnowGold maxCount: 30 minGroupSize: 5 @@ -44,6 +46,7 @@ WallRock: WallRockSilver WallRockBasalt: WallRockBasaltSilver WallRockChromite: WallRockChromiteSilver + WallRockSand: WallRockSandSilver WallRockSnow: WallRockSnowSilver maxCount: 30 minGroupSize: 5 @@ -58,6 +61,7 @@ WallRock: WallRockPlasma WallRockBasalt: WallRockBasaltPlasma WallRockChromite: WallRockChromitePlasma + WallRockSand: WallRockSandPlasma WallRockSnow: WallRockSnowPlasma maxCount: 12 minGroupSize: 5 @@ -71,6 +75,7 @@ WallRock: WallRockUranium WallRockBasalt: WallRockBasaltUranium WallRockChromite: WallRockChromiteUranium + WallRockSand: WallRockSandUranium WallRockSnow: WallRockSnowUranium maxCount: 12 minGroupSize: 5 @@ -83,6 +88,7 @@ WallRock: WallRockBananium WallRockBasalt: WallRockBasaltBananium WallRockChromite: WallRockChromiteBananium + WallRockSand: WallRockSandBananium WallRockSnow: WallRockSnowBananium maxCount: 12 minGroupSize: 5 @@ -96,6 +102,7 @@ WallRock: WallRockArtifactFragment WallRockBasalt: WallRockBasaltArtifactFragment WallRockChromite: WallRockChromiteArtifactFragment + WallRockSand: WallRockSandArtifactFragment WallRockSnow: WallRockSnowArtifactFragment maxCount: 6 minGroupSize: 1 diff --git a/Resources/Prototypes/Procedural/biome_templates.yml b/Resources/Prototypes/Procedural/biome_templates.yml index db6f82f9948..47d8cde5a0d 100644 --- a/Resources/Prototypes/Procedural/biome_templates.yml +++ b/Resources/Prototypes/Procedural/biome_templates.yml @@ -44,7 +44,7 @@ frequency: 2 noiseType: OpenSimplex2 allowedTiles: - - FloorLowDesert + - FloorAsteroidSand entities: - FloraRockSolid01 - FloraRockSolid02 @@ -62,9 +62,9 @@ cellularDistanceFunction: Euclidean cellularReturnType: Distance2 allowedTiles: - - FloorLowDesert + - FloorAsteroidSand entities: - - AsteroidRock + - WallRockSand - !type:BiomeDummyLayer id: Loot # Fill layer @@ -72,14 +72,14 @@ threshold: -1 variants: - 0 - tile: FloorLowDesert + tile: FloorAsteroidSand - !type:BiomeTileLayer - threshold: 0.25 + threshold: 0.80 noise: seed: 1 noiseType: OpenSimplex2 frequency: 2 - tile: FloorLowDesert + tile: FloorAsteroidSand # Grass - type: biomeTemplate From 626313be1c6a3cc13df788f2130258137e16ed4b Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:02:02 +1100 Subject: [PATCH 04/35] Fix docking FTL to planets being impossible (#21780) --- Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs b/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs index fd9cf67c5a0..0fa82c303f6 100644 --- a/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs +++ b/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs @@ -176,7 +176,7 @@ public bool CanDock( // Check if there's no intersecting grids (AKA oh god it's docking at cargo). grids.Clear(); _mapManager.FindGridsIntersecting(targetGridXform.MapID, dockedBounds, ref grids); - if (grids.Any(o => o.Owner != targetGrid)) + if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid)) { continue; } From 45f781a8f698912737036ae2af17445435b98f37 Mon Sep 17 00:00:00 2001 From: LankLTE <135308300+LankLTE@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:02:42 -0800 Subject: [PATCH 05/35] Gave freelance to ghosts (#21764) --- Resources/Prototypes/Entities/Mobs/Player/observer.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index c7cac426a41..d03281a212f 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -51,6 +51,7 @@ - Service - Supply - Syndicate + - Freelance globalReceive: true - type: Physics bodyType: KinematicController From 6f7523015bf0ce4e2709c317229ab7a032d2d3fe Mon Sep 17 00:00:00 2001 From: PJBot Date: Tue, 21 Nov 2023 20:03:09 -0500 Subject: [PATCH 06/35] Automatic changelog update --- Resources/Changelog/Changelog.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index e62f5f33a4f..bee75b8c44b 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,10 +1,4 @@ Entries: -- author: Ubaser - changes: - - {message: 'Nanotrasen has decided to purchase their blood packs from a different - company, so they now contain real blood.', type: Tweak} - id: 4698 - time: '2023-08-29T04:30:10.0000000+00:00' - author: DrSmugleaf changes: - {message: Fixed not showing the name of the fellow traitor that you have to keep @@ -2896,3 +2890,8 @@ Entries: - {message: Shuttle walls and windows can now be constructed., type: Tweak} id: 5197 time: '2023-11-21T01:20:24.0000000+00:00' +- author: metalgearsloth + changes: + - {message: Fix being unable to FTL dock to planets., type: Fix} + id: 5198 + time: '2023-11-22T01:02:02.0000000+00:00' From e24e0bdaf53283c8a435aa16b3054e0d449da778 Mon Sep 17 00:00:00 2001 From: Chronophylos Date: Wed, 22 Nov 2023 02:06:43 +0100 Subject: [PATCH 07/35] add localization for pda footer text (#21749) --- Content.Client/PDA/PdaWindow.xaml | 2 +- Resources/Locale/en-US/pda/pda-component.ftl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Client/PDA/PdaWindow.xaml b/Content.Client/PDA/PdaWindow.xaml index 0b0898cc3ad..2ddb0821a7e 100644 --- a/Content.Client/PDA/PdaWindow.xaml +++ b/Content.Client/PDA/PdaWindow.xaml @@ -25,7 +25,7 @@ - diff --git a/Resources/Locale/en-US/pda/pda-component.ftl b/Resources/Locale/en-US/pda/pda-component.ftl index 551ff29e552..85a3c94c414 100644 --- a/Resources/Locale/en-US/pda/pda-component.ftl +++ b/Resources/Locale/en-US/pda/pda-component.ftl @@ -24,6 +24,8 @@ pda-bound-user-interface-lock-uplink-description = Prevent anyone from accessing comp-pda-ui-menu-title = PDA +comp-pda-ui-footer = Personal Digital Assistant + comp-pda-ui-station = Station: [color=white]{$station}[/color] comp-pda-ui-station-alert-level = Alert Level: [color={ $color }]{ $level }[/color] From 0da68ddc6c55ea8f953dc4b40a8ba6398af5a75b Mon Sep 17 00:00:00 2001 From: Feluk6174 <77207907+Feluk6174@users.noreply.github.com> Date: Wed, 22 Nov 2023 01:08:53 +0000 Subject: [PATCH 08/35] Added Bananadine (#21759) * added bananadine and its functionallity (and backed banana peel) * added baked banana peals sprites * fixed typos and changed the sprite used by backed banan peel to the right one * Changed the cooktime and now grinded baked banana leaves have carbon * Updated bananadine description * Ficed typo in ragent-desc-bananadine * Reverted actidental change to nocturine --- .../Locale/en-US/reagents/meta/narcotics.ftl | 3 +++ .../Objects/Consumable/Food/produce.yml | 22 ++++++++++++++++++ Resources/Prototypes/Reagents/narcotics.yml | 18 ++++++++++++++ .../Recipes/Cooking/meal_recipes.yml | 8 +++++++ .../banana.rsi/baked-peel-inhand-left.png | Bin 0 -> 4597 bytes .../banana.rsi/baked-peel-inhand-right.png | Bin 0 -> 4605 bytes .../Hydroponics/banana.rsi/baked-peel.png | Bin 0 -> 4629 bytes .../Hydroponics/banana.rsi/baked-peel2.png | Bin 0 -> 4642 bytes .../Hydroponics/banana.rsi/baked-peel3.png | Bin 0 -> 4593 bytes .../Specific/Hydroponics/banana.rsi/meta.json | 17 ++++++++++++++ 10 files changed, 68 insertions(+) create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel-inhand-left.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel-inhand-right.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel2.png create mode 100644 Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel3.png diff --git a/Resources/Locale/en-US/reagents/meta/narcotics.ftl b/Resources/Locale/en-US/reagents/meta/narcotics.ftl index e4b905bd3e1..7e5e41037ec 100644 --- a/Resources/Locale/en-US/reagents/meta/narcotics.ftl +++ b/Resources/Locale/en-US/reagents/meta/narcotics.ftl @@ -16,6 +16,9 @@ reagent-desc-thc = The main psychoactive compound in cannabis. reagent-name-thc-oil = THC oil reagent-desc-thc-oil = Pure THC oil, extracted from the leaves of the cannabis plant. Much stronger than its natural form and can be used to numb chronic pain in patients. +reagent-name-bananadine = Bananadine +reagent-desc-bananadine = A mild psychedelic that is found in small traces in banana peels. + reagent-name-nicotine = Nicotine reagent-desc-nicotine = Dangerous and highly addictive, but that's what the propaganda says. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 8232a34b596..37177164d88 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -304,6 +304,28 @@ grindableSolutionName: food - type: SpaceGarbage +- type: entity + name: baked banana peel + parent: TrashBananaPeel + id: TrashBakedBananaPeel + components: + - type: Sprite + sprite: Objects/Specific/Hydroponics/banana.rsi + state: baked-peel + - type: Item + sprite: Objects/Specific/Hydroponics/banana.rsi + heldPrefix: baked-peel + - type: SolutionContainerManager + solutions: + food: + reagents: + - ReagentId: PulpedBananaPeel + Quantity: 1 + - ReagentId: Bananadine + Quantity: 1 + - ReagentId: Carbon + Quantity: 2 + - type: entity name: mimana peel parent: TrashBananaPeel diff --git a/Resources/Prototypes/Reagents/narcotics.yml b/Resources/Prototypes/Reagents/narcotics.yml index 77caafb647a..2678f4cd714 100644 --- a/Resources/Prototypes/Reagents/narcotics.yml +++ b/Resources/Prototypes/Reagents/narcotics.yml @@ -250,6 +250,24 @@ time: 5 refresh: false +- type: reagent + id: Bananadine + name: reagent-name-bananadine + group: Narcotics + desc: reagent-desc-bananadine + physicalDesc: reagent-physical-desc-powdery + flavor: bitter + color: "#ffff00" + metabolisms: + Narcotic: + effects: + - !type:GenericStatusEffect + key: SeeingRainbows + component: SeeingRainbows + type: Add + time: 5 + refresh: false + # Probably replace this one with sleeping chem when putting someone in a comatose state is easier - type: reagent id: Nocturine diff --git a/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml b/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml index 24cbc3cf79a..8bc8c1a15b8 100644 --- a/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml +++ b/Resources/Prototypes/Recipes/Cooking/meal_recipes.yml @@ -1613,6 +1613,14 @@ Sigynate: 50 Dermaline: 50 +- type: microwaveMealRecipe + id: RecipeTrashBakedBananaPeel + name: baked banana peel recipe + result: TrashBakedBananaPeel + time: 5 + solids: + TrashBananaPeel: 1 + # Suppermatter - type: microwaveMealRecipe id: RecipeSuppermatter diff --git a/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel-inhand-left.png b/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel-inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..63d83d1f83071b8162a1ff00fa361b8f7f69e3b2 GIT binary patch literal 4597 zcmeHLYj6|S6_)In7=xL_Ns}o!(~SskR{PNEwXqDYWw0j5I9S0Zag*-juDrFR7235W z^DvG>ONa@OaR>z53?&aBrp=HvhGGnE{FVcfGTS(Yc6 z>3CZHc{Nw}?78QB_uTKEd!*gXl@&|#^QPySOs0HaxpxKhi}jW}3BF&KS6_hcLsa9F ze7^anT(|*C^KB-xZUfDnA!nJhP1&IP5wrr3bsN1+H|H4r7LaG8D|2i~zQ*y2oAnRAI@#z662ii!#)aS3nXe&ipZ4U4!X&XyXEak!|J4=CV zgZa&SM!0(Kzq7dT-6yKr_B~Sa;L|Sg zKt#YkqdTD|NGR{H6Lkb?xn4r9YFDlfj zlNa)n3%qj=?Au6(ymcS>4sYLg^XR4xKfko|y;rw)-nL|GPGE0IRj)R3;(Vj>b*SY(%W746lYC3@?_iJx?a0% z-uYnfd+qn{iB(2V^a5`n1R7K#f-8U&abb*vg3tkF1GsRNpXD(V|3@6Y7zM@hB)q zJeF(SCoPyPdMwp;Kk1K_qB^;JO$=47sR#&b>IJuGSyY@?lwbiMj5H2QghLUPO?WH@ zE(@}*CM=j?qSbpWHIPT8N(^C)m9dg|Swe24Eya0QQB0KB72YK&2)OfD>NG9N5=1;6 zx5jN&B^D$ox7$sSG(poiSm0_?MB@^8M4hQaBr&{56=HH!la&ajV{*LGpm{777{^B9 z3rGF_G<-x&u>gD!2`)-dR+0#ZiA)bwD{BOhR6yV8p$3|wh**JCr6DGuvPKlqW@bW& zLfSvt5DOX05d{K;P#8>An3WncrGDbl9y$d)C z3CQNkfbvCDjf)6KhXQb`3^;b4von&!;H1ElIAf=IoOkge4rD6mVESeS$Dl*3#Q5z$D{ zm_sL=EvfW*EVPvz)l`N!O#%mxWtkjlNQ@2y0o;dC=jk|v!Q-YZc| zg-p~jjoN9r>)XP@Vt`mq&r<*}^spATG=?}$i3JoT|IJ!IJXjIf!84-qj)#tKsYVA5zdGX2kxdx2hJfojX0ag zyLtOqbXAeGI2S`DLEsU%g7h?gp|H8eM$H>*9j`BCHM~P0Se~J5ntQ( zq(Md<1!|HysLxRDiFCbBaR%|;$}5#_w{i*$o0w!={7%p{LD#q#7?<%xc1_SVE(XSB zJds`hH@fmhpBPaD{^-TwdGN}OMg8zBIf;L0sn;~DfA;q5ZwJlfX!$A?9zgr_X5O)2 z+6++MuKE0BxBq2I!Lu5E-1)1;cjSCHtE{Dj%w71xqjP6| z>y_5$OYoY7yNg?MHwm-1quHmA@8_>xJL!J$S@49nBHCT&)^^hGe7xtxUz>M6_U5NM zzFO9Kx%b%S$l49-pWqwVCGnp1i}rWapS$_$cQ!rUb^6+u_crwJys%~6;n;~!&kkKz zPwTHe;A;N(to-%V6;r-cnzu)>FHRL3# literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel-inhand-right.png b/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..301c5f007c44e42dc23e35b72ff1bf69bb84c3ae GIT binary patch literal 4605 zcmeHKYj6|S6_)IPA7D>P7(4@Zy4f@VOji5SW3{miu4Q9Qk?mp^JFOGC+Py1pEosGS zZOOzqgeHL?hNL_aN|=;5X-jZgPud0tD8wn|F%TxnkW6RjKwLAWMIn&Vw6tj%_v}i3 zwVCO7QvO+*>wEUxbH01-cg{WXK3!kCydZymzQtlG@YQ%%!o18FxijJKer3%?nBGIp zKH29hwdBGBSX%F}SPdH()(LW!HQSO6x~E{w0okxI#(e7xbKU~-f{eTazsz9R=C=oLYgQ#RHK{uIOVG|kf-Mmu<# zv^2GJ zUutRn#Q<9=^NzY=eBP{**K}&h?)iV7y{7p?{d5sy>)q4Owf&*A?ZWoAs9oopo;z3@ zo1OPSAa9O$(Y~H1n2@*iL*MJq_S|}N<72@@4L$lUvVm)_=V_u=C>Ino=yBvp>o@(iTyFwr)?kMM;%*W)~M{-8JL%BR3QA zx}ZApqVm_9*+2ZdcHkYV1(II)9i_2ZZ}zX?MKx>_BsG9+iEz|Nn5ArKA}WY&NXG&w zs6;&Y^}}!Bm?C-bCWoK$M=MdQQnOY=4Qp!~#kFmsTf&!?=a(gT00<*pz!Kq5B*rH^ zxQWYyY^X^bGfnh158e!QRHlqbn} zJZ_7#HdPCfwA<|_DTZVi0xXDFXG9kgL?m{v0g=Y=qL`>DQC(3Zn1Lw-)OOv2lflD1J~I809Ti0M@w0Fnvl3q4|uol!)tL@~8p6H!$Mis<)F zgpkBB|7g1wGLIvPBnqK0n8sjNdeWB0jT`eYCq z&CxQ$QIs$N$`^_0LPSIc6oA_lz;Q5kR+Jowkle^g*d>Z00u&<<$l>N(tX<@sEH?q7 zPE(*Nh0w&P3@8bpL|POm2jwQ*vM3UEhC)Pub2ykX;UyH!Q|a&xIKL_>a_9fDHZBiV2KJEh8YKq%cbcm7jcPz^(ogBfkYZjX z3^OkUFNohrLy%mAJrHmZoRgvn z2g5l8+D-*%$A6&5R9TM;8mb5akH8g_r}+zoEix0ecycW9R%B!W2qS2kpgDsuisK!0 zhA{H>A5oSiS!4n(!UZ#7cSB(Recp=3#Q9Io(}f$Txt8~SbI*>qt8$u} z`iALEIoRC;iP?R_snk_ZYJF(i`fX3`zWLm?`t$FSD@Hbgv&GVN=ZNE?cIuV0hf0dh zbS~^k_9f$+daj@7E*k#i?#+LB>EX`~7W`gI{b*@X`(4AS_aFIc-%EeGc&YdJ{&@Ar z_xG*do9y3xBYF0|yn`k4OgxK(Up~6}A7_re`p=msKDf1U{==@i3ohzR`I8^4%l_rH ihMJNcpD(pgJBxN?bH{S*rLBgSud3Gj^RIt*!@mLc=q4Tj literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel.png b/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel.png new file mode 100644 index 0000000000000000000000000000000000000000..7bcdef68282af7ad08946f12e72cee4825e34770 GIT binary patch literal 4629 zcmeHKYj6|S6<+y)g^W{|M@qpNwxR_CS?x=bcQ=xWVi~L{YaHxiC-o%R$CbRbq!rq= zB|DBG1~&mSCd8q*;7JH+DJ@B+=`=ubAWngracR<)Vd$hKxMBLh;hCY($<*WCUCFOD zGaXOLKTC6c@1A?kchC9Gxkuiu73Hh*Yzu4%g5(9t{OjP18pApR{?(eBZ^P-gpe7Iu z1ePOK_y9F6S%}5Zfx|LkongsDGNJ6daLk5lL&q2kEZOF~9j+Iq*Dt|!VOqzqAuSn5 z9-MpNpx}BgoPPp`@?7ey6L4*Otmd~U12Hv5=hXqe0;L=z;h^2no}g%sBsr2nNf$@b z98JRWE&IkjGLW){Bkw`~wkRbf6@iixG!|EbN*EwWvgetd-m;Sq7o2{wvSa_Zd=EX( z$Op?CA6?e@wypGF{&(8fKd{Cz+_oeyu&v{@!N+4arMHF#KYsnt=0m8pb<@#f%(7!; zTSw|`nCM}y_xC=%qc^ds0;hj7w9T?7y7$Na+Ou-?>Fd?E1#6}iT~7bHyXyyE_w--z zwzM4YxcT4>ZDVJvD@67!o!#Fpe0XZ%so(K`9DHYOfmr(3H;R|O?7Y%;YDaB#ZR_RQ zx}WvYB|*-$w!nUW?gOvu#ELx&Zq3?Ib6y|#3gtM|bA+k?%kuh*UGEaz=c>Q=i*jw& z%m>Apv;Bn!_iv%X{<`ylw_eykeDt}EKfkj3%nx5Ul(nieyK0{=`q_IUgNY;STbl=X z+pnJO>$u#qJ@aDk!>|37xzyizjv9f(-vCWg@AV37@0-B73qZ*g=+D%*z zt_?A6M@<#I-fORcbyT9p0qS%(9RyaIR2nIJu?_Xa4v9yY^~B^-o71gdKARC3ah#*G`ZFenHqk(g-($)2RCE5UKHCi!OUnBh!x1e%ZG zPSPHY-BgBJJkR-6sljkB;P={%^Ep|S6qz%Zbdif97>2+^$?3wJ5=&!@NIEf+2oeI} zbOTCaCqMxkZc)(hTMlMFL|Pk--F~n`T+32!a$d0b*@j zfmJDlCwgT-$q-7C1u@7lG!`Ui0&@b|jj>`-!Wf#7B!*x_0RR(9mbg`FJR-n!DiI+B z@K`itZWx4fzKVd?PC1BiNkv%DgV4ZhU!z1DlH(gyN(5Bug25(PL=ZITW=P6SIvJK8 zS6UC^8mvSE)9jt*j*%7)1_Ox|j5>t?rX0q?mBfLdtMMvT4SVflU3YAohu29Kbips^ z0D_M7;i}O-yn-M(BIUjT$E&guZ2Di?#^pghP#>neOwr)^O{OSyqbk9M)Kls)te95` zMa@gW2~sKqO=twN=_kZWZAo=PGz4JxNSEuVT=|?*AOwk}M25r|(gpKJ16WrCU@$7k zvNS7Dj7&QxqibqVPY7|~3qc+sSFk+IUnsQDOw_W;+KD<~WC0R}kt9Yk24Mut(R7+H z{N9Hcq}(o6f^CZ_g15#gi7;4JaAC9)xEUcx0aE-A0>5~O#&0tiWOYWgCBE1X1{pUIM-kZf%Hu2Hz!Th~Hf8M@EeAzT-dYf|8lBvd1(8$(>^i z3$mwYJ{0EY0lqZnZ@IJY%R}GKt<8s`4+4H)Rn5t3yL`6IM1JYU&2x{<5&m@Bdc6Jl z-Gv|RYxB1C51q*Q>0X=nkqsBG={w8XPV@V-20Zg$BzKNZO%V*up`(2y5m$bF- zy3wIz6uDYxgb??l<1HbnjxapjC^lYSj$v{C1av~2!a&(D}5W_jOxQ;hJV%e_D|vTd#Tu_@1(_rmr3%=!hmUXsz#ZAeoN zQUvEdI4HQD4dpWcRAB*vI^8=;XD|kX_xHvR{OnPG@ejGazsLqRNu1)Je3z$lwAH!O;7*Rfar2(R8A`Rj?}JCCE5j?UL!XG>qN z+&$WC#e#13qbmc?>>o&WR^#-WxA&M1$6k8H*YJi|clo2bPk|-Zf-a?hd+6YgzTv*| zN6)rx=X&le`&iw+uY(DbLyKo!IRyT6Y5t`@1pYj7c3nxZV$bkVQp{}9h zW<%32hiGqzXV#V2<`gVAp%G6UF8-u&YyEX?crIl>-gky=es5{>I|m1eL)YrQ|LZEX zFn?Jvf0l2_vHo3D#MgA)|7vglgV&zh{;OLrUj1?J@foZ3<<%Z3k9~e&bR>CZV@LaN z!1|jVLp?XQ?ah5>V8zkDu{W;lyT+RC|8D4efB9$K?V%4A-#T@APFarm%#NP-Pygft z(~D0IT|M~qml8F1ug$*OHu7Na`O<>I8#(8iW6IB;?JGm%+e_PWOGH+=qH#T8h4L5NQmbqzVZ+uE|Oa)iFU(Y0*438{9|7 z{ENl|fh>GX&9DIZz*8WOlXe1+M)8Rjs#ehoK{5_~sfAkG7MJi1lB%>M1gWA`ifM}` zLWn}vKHidu7~zNlE=8m$R8`@reV%`KIp};Y@S{ znrCq*X^+KjC_}A4fcGgvi|(G^=dtPM^P(ciB5y1iK@?dhX;j>3W>L1Rvi z0WL-YA`=uRK>1^;24aGwLqTx63~@pNU|d0t#w0-`F^7XBF^+T)m>3GOfZ<#c0OSOS zbqN_(C5TM)N{1356y*e*=ma!I0R~_WKszv&47ng)kR_p8PA5SdP@=%EQW8-B(N&X-sFJvPctj7zE`KnpCVE(#aAol67$G z1nZ4bLWPy6V;a5FFxS(K(A8>V8~%Cyf+~MO-a-$O2lK!cHQiD0A42%XutHrnQ|SI%U@Co48c(p#|E*G!^L0@f{`$m;RMVj z1W5tFPQwZ5{AJNqC8Q-mLMjhK9wAq-JdIx{bcvCuQiHRscCty*vj7RhV3m=qP8h-Q z6qO+ifA}E+jtX%hrxOEYNWU;42gU(`#srb27>RIlG|NtQ`hO2m|7~_n4$+P4ZE-BA zZu~#eo>rL9M1=Q{s1;u4%fa#K4r4r>kq4 zt|>7vCFSYr`oGa-9e-n#V(=fmBzzxyVaxR>e3vu_*R1v-qx$#Axt|_{lKgn(CKW*n z9@B>jIovl73TJBmK*h|z7tDI3X#RHOlmm+1_WR0f>n{q8^YV^1&fePva=!3>(z&V1 z+1T%+2hsP=hx#uiIu;D?+`nw59`qXuG+4wCjZB?fRiRH!Awx9h{eYakMFFd9!oR z?$#M(`De>F&%dxUah22DeSev``}6!=AEM5a zU-bMi|LjU@tNGZX-UVDsPD9btC7oF1*A86X%Jv>8Uccg%+|?JB7_p4xAtz(Z`@;)2 Re+c75{1sKclPep${tXT9BclKS literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel3.png b/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/baked-peel3.png new file mode 100644 index 0000000000000000000000000000000000000000..5e0b4a50809b1e8568abd215d4ca008a80d09672 GIT binary patch literal 4593 zcmeHKe{2)?6+b5sLVlo@W)Ns9-Aq>?<$S;F%lU{yGdo~wIHbf&(k@zazWbhYi|uoL zm)OZ5Kt^e4P}+*Fr8Ghm+Kw%>5?u=&jFJjiI_TO}sM^$tHG=(up@vr7%Br#K-Pv&x zt9;EaQ&94rU^6vGNMEzmqpy963! zH|%fQKN*pUwE5EU1rXnM)$45tc)fTcsVQm{VOV-_^HU!G>H8|qKGfKM;M=vUALHdi z^{*DVB)%T$`IE*-x537Yp+X@k;jmp4~6rT|M#} z&!$Z$`>(GW)3*%tx+3)O@`WRN#E;J0dFF%Q??!*Vp(0%Oz&C1^?{i-1JM%(Q65 z*`8fJ{Lb#LKc8&;>_XXR-J>^my|uEq2b_J2NwIqAsm=G4`4wygDf>!bacPECf7x?Cpk;5J)nW zN;y)jLrX?T+U<6e6hkr$0TzVb9XG@@5!aWQ5E%>~(xs%DFjOs$o0wu)>oh!eJFMdq z@x>CsU=BX6XITI~$h4RsX$M8dV&qg0-KgsVkZeF->7j?Z6Nuc1bgeTfp}H; zkfoe|qB9w_jw4GXilP{p>aZ(4ZA&qeEDcqeBx_o1=8AQkseyod z4tJXM#Mv!lunGnRpC)yh;RSpiyScw0YmzDpmKdhxu)-<~;dUw_;dC=B!E-!IxOm11 zX+o@1q^3Xx;<_QmC1gSYxI+b;Dnz?PmU9y)36AH&x5l)4sh%k%X1fu0CT9znYmK6(1mV~uhGA2Sg)tDGT zWFj817EHp0+J=C~&NwoGTbhQbXei*|v9DL-o#{!_kQzgchG?=$S5Xv8b3A-<97Xe! zMolQGLnWG+R`0Y{%(Mt_7$8l6SiJ)A}GCXr}p$&jW+J@#DJ%`FGvI?19T`a}Z( zXs!>3Ci?Kb6fICW-i4qht4jBOvo$WBU> z8J-JIN7psQNQp^Q8v!1HD=1Iv8wy`xC2Hk#>r^{3vjBtUFNf_l8XlIr%^41@b zqa~5zs%S!@T{PijIf`)8l0>j>h8Nvo#Bgk;L~{iG??;61W`>%6#A?!PixWw$CjTSt z8G|W(6sXDQpg%*qCv*Ki%NfLbD__}iyOmqu`0OS#;&+y=S-NJ#z>JJ%t813788I*; zQ_x@u?jr;PJ z*SXVMYMbW7SGC<3v%h!!p_0nwJ3@;JkJSD_z4TanEOdTJ`E3J<+aovL|0VX+;$<%+ z!grs&J?tNB_DAW0f`VrMGxBdYf6X!CkImaZLM+?IN91f+_fsJZyY}4b!=q=%UV*T& NKwZ7>)o-@-{TsPr6i@&F literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/meta.json b/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/meta.json index 88c277fde7d..27357cf18ed 100644 --- a/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Hydroponics/banana.rsi/meta.json @@ -33,6 +33,23 @@ "name": "peel-inhand-right", "directions": 4 }, + { + "name": "baked-peel" + }, + { + "name": "baked-peel2" + }, + { + "name": "baked-peel3" + }, + { + "name": "baked-peel-inhand-left", + "directions": 4 + }, + { + "name": "baked-peel-inhand-right", + "directions": 4 + }, { "name": "seed" }, From 45425d8a9be4334cb10791dfacee4378b8195dcb Mon Sep 17 00:00:00 2001 From: PJBot Date: Tue, 21 Nov 2023 20:09:58 -0500 Subject: [PATCH 09/35] Automatic changelog update --- Resources/Changelog/Changelog.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index bee75b8c44b..64ee00b6ceb 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,10 +1,4 @@ Entries: -- author: DrSmugleaf - changes: - - {message: Fixed not showing the name of the fellow traitor that you have to keep - alive., type: Fix} - id: 4699 - time: '2023-08-29T06:23:20.0000000+00:00' - author: metalgearsloth changes: - {message: Added fultons for salvagers., type: Add} @@ -2895,3 +2889,9 @@ Entries: - {message: Fix being unable to FTL dock to planets., type: Fix} id: 5198 time: '2023-11-22T01:02:02.0000000+00:00' +- author: Feluk6174 + changes: + - {message: 'Bananadine is now a psychedelic that can be obtained by grinding baked + banana peels, which can be obtained by microwaving banana peels.', type: Add} + id: 5199 + time: '2023-11-22T01:08:53.0000000+00:00' From 818d53b7c45174036ccdd369942371901b4f0c17 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:32:19 -0500 Subject: [PATCH 10/35] Fix DNA scrambler uplink text (#21830) --- Resources/Locale/en-US/store/uplink-catalog.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Locale/en-US/store/uplink-catalog.ftl b/Resources/Locale/en-US/store/uplink-catalog.ftl index b85fd29c9d5..c78c38c7dfe 100644 --- a/Resources/Locale/en-US/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/store/uplink-catalog.ftl @@ -138,7 +138,7 @@ uplink-freedom-implanter-name = Freedom Implanter uplink-freedom-implanter-desc = Get away from those nasty sec officers with this three use implant! uplink-dna-scrambler-implanter-name = DNA Scrambler Implanter -uplink-dna-scrambler-implanter-desc = A single use implant that can be activated to modify your DNA and give you a completely new look, also has the function of undoing the change. Unable to scramble already scrambled DNA. +uplink-dna-scrambler-implanter-desc = A single use implant that can be activated to modify your DNA and give you a completely new look. uplink-emp-implanter-name = EMP Implanter uplink-emp-implanter-desc = Detonates a small EMP pulse on activation that drains nearby electronics of their power, can be used three times before the internal battery runs out. From a8a76958bd1c120a08da1cd3e9acefb06d6afb52 Mon Sep 17 00:00:00 2001 From: Gotimanga <127038462+Gotimanga@users.noreply.github.com> Date: Wed, 22 Nov 2023 04:32:34 +0000 Subject: [PATCH 11/35] Cooked eggs (#21820) --- .../Locale/en-US/reagents/meta/consumable/food/ingredients.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Locale/en-US/reagents/meta/consumable/food/ingredients.ftl b/Resources/Locale/en-US/reagents/meta/consumable/food/ingredients.ftl index 603259f80f6..4f5c5ae7826 100644 --- a/Resources/Locale/en-US/reagents/meta/consumable/food/ingredients.ftl +++ b/Resources/Locale/en-US/reagents/meta/consumable/food/ingredients.ftl @@ -10,7 +10,7 @@ reagent-desc-oats = Used for a variety of tasty purposes. reagent-name-enzyme = universal enzyme reagent-desc-enzyme = Used in cooking various dishes. -reagent-name-egg = egg +reagent-name-egg = cooked egg reagent-desc-egg = Cooked chicken embryo, delicious. reagent-name-raw-egg = raw egg From 1ef0ed132b6970e8fa64fea05b148bddc0b5f043 Mon Sep 17 00:00:00 2001 From: PJBot Date: Tue, 21 Nov 2023 23:33:38 -0500 Subject: [PATCH 12/35] Automatic changelog update --- Resources/Changelog/Changelog.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 64ee00b6ceb..1b96b0e7169 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,9 +1,4 @@ Entries: -- author: metalgearsloth - changes: - - {message: Added fultons for salvagers., type: Add} - id: 4700 - time: '2023-08-29T06:34:06.0000000+00:00' - author: DrSmugleaf changes: - {message: Fixed not tracking job playtime., type: Fix} @@ -2895,3 +2890,8 @@ Entries: banana peels, which can be obtained by microwaving banana peels.', type: Add} id: 5199 time: '2023-11-22T01:08:53.0000000+00:00' +- author: Gotimanga + changes: + - {message: The reagent "egg" is now known as "cooked egg", type: Tweak} + id: 5200 + time: '2023-11-22T04:32:35.0000000+00:00' From ee3e3583bd6adcf9b255515cbf149c9cceca74b5 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:35:37 +1100 Subject: [PATCH 13/35] Add map names to stuff (#21760) - Station map - FTL map --- Content.Server/GameTicking/GameTicker.RoundFlow.cs | 2 ++ .../Shuttles/Systems/ShuttleSystem.FasterThanLight.cs | 7 ++++--- Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs | 4 ++-- Content.Server/Shuttles/Systems/ShuttleSystem.cs | 4 +--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index 85f833bd1c3..1d354136623 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -163,6 +163,8 @@ public IReadOnlyList LoadGameMap(GameMapPrototype map, MapId targetMa var gridIds = _map.LoadMap(targetMapId, ev.GameMap.MapPath.ToString(), ev.Options); + _metaData.SetEntityName(_mapManager.GetMapEntityId(targetMapId), "Station map"); + var gridUids = gridIds.ToList(); RaiseLocalEvent(new PostGameMapLoad(map, targetMapId, gridUids, stationName)); diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 87813e88b2e..7ccadd94951 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -213,7 +213,7 @@ private bool TrySetupFTL(EntityUid uid, ShuttleComponent shuttle, [NotNullWhen(t if (HasComp(uid)) { - _sawmill.Warning($"Tried queuing {ToPrettyString(uid)} which already has HyperspaceComponent?"); + Log.Warning($"Tried queuing {ToPrettyString(uid)} which already has HyperspaceComponent?"); return false; } @@ -404,7 +404,7 @@ private void UpdateHyperspace(float frameTime) _console.RefreshShuttleConsoles(uid); break; default: - _sawmill.Error($"Found invalid FTL state {comp.State} for {uid}"); + Log.Error($"Found invalid FTL state {comp.State} for {uid}"); RemComp(uid); break; } @@ -453,7 +453,8 @@ private void SetupHyperspace() return; _hyperSpaceMap = _mapManager.CreateMap(); - _sawmill.Info($"Setup hyperspace map at {_hyperSpaceMap.Value}"); + _metadata.SetEntityName(_mapManager.GetMapEntityId(_hyperSpaceMap.Value), "FTL"); + Log.Debug($"Setup hyperspace map at {_hyperSpaceMap.Value}"); DebugTools.Assert(!_mapManager.IsMapPaused(_hyperSpaceMap.Value)); var parallax = EnsureComp(_mapManager.GetMapEntityId(_hyperSpaceMap.Value)); parallax.Parallax = "FastSpace"; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs index 4d53647c9e2..854ce538dc7 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.GridFill.cs @@ -80,7 +80,7 @@ private void GridSpawns(EntityUid uid, GridSpawnComponent component) if (!valid) { - _sawmill.Error($"Error loading gridspawn for {ToPrettyString(uid)} / {path}"); + Log.Error($"Error loading gridspawn for {ToPrettyString(uid)} / {path}"); } } @@ -129,7 +129,7 @@ private void OnGridFillMapInit(EntityUid uid, GridFillComponent component, MapIn if (!valid) { - _sawmill.Error($"Error loading gridfill dock for {ToPrettyString(uid)} / {component.Path}"); + Log.Error($"Error loading gridfill dock for {ToPrettyString(uid)} / {component.Path}"); } _mapManager.DeleteMap(mapId); diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.cs index 41e4cbc2be9..2252d71d676 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.cs @@ -33,6 +33,7 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem [Dependency] private readonly EntityLookupSystem _lookup = default!; [Dependency] private readonly FixtureSystem _fixtures = default!; [Dependency] private readonly MapLoaderSystem _loader = default!; + [Dependency] private readonly MetaDataSystem _metadata = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; @@ -43,14 +44,11 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem [Dependency] private readonly ThrusterSystem _thruster = default!; [Dependency] private readonly UserInterfaceSystem _uiSystem = default!; - private ISawmill _sawmill = default!; - public const float TileMassMultiplier = 0.5f; public override void Initialize() { base.Initialize(); - _sawmill = Logger.GetSawmill("shuttles"); InitializeFTL(); InitializeGridFills(); From 985da5219104102cfbc5e173951a005f4d46d2a6 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:35:57 +1100 Subject: [PATCH 14/35] Decal fix (#21761) - Don't send stale chunks for deleted grid as client just errors it anyway. - Store some allocations in fields. --- Content.Client/Decals/DecalSystem.cs | 24 +++++++++++++++--------- Content.Server/Decals/DecalSystem.cs | 4 +--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Content.Client/Decals/DecalSystem.cs b/Content.Client/Decals/DecalSystem.cs index 66b30545dad..be442ab8a0a 100644 --- a/Content.Client/Decals/DecalSystem.cs +++ b/Content.Client/Decals/DecalSystem.cs @@ -15,6 +15,9 @@ public sealed class DecalSystem : SharedDecalSystem private DecalOverlay _overlay = default!; + private HashSet _removedUids = new(); + private readonly List _removedChunks = new(); + public override void Initialize() { base.Initialize(); @@ -65,13 +68,14 @@ private void OnHandleState(EntityUid gridUid, DecalGridComponent gridComp, ref C return; // is this a delta or full state? - var removedChunks = new List(); + _removedChunks.Clear(); + if (!state.FullState) { foreach (var key in gridComp.ChunkCollection.ChunkCollection.Keys) { if (!state.AllChunks!.Contains(key)) - removedChunks.Add(key); + _removedChunks.Add(key); } } else @@ -79,12 +83,12 @@ private void OnHandleState(EntityUid gridUid, DecalGridComponent gridComp, ref C foreach (var key in gridComp.ChunkCollection.ChunkCollection.Keys) { if (!state.Chunks.ContainsKey(key)) - removedChunks.Add(key); + _removedChunks.Add(key); } } - if (removedChunks.Count > 0) - RemoveChunks(gridUid, gridComp, removedChunks); + if (_removedChunks.Count > 0) + RemoveChunks(gridUid, gridComp, _removedChunks); if (state.Chunks.Count > 0) UpdateChunks(gridUid, gridComp, state.Chunks); @@ -137,9 +141,10 @@ private void UpdateChunks(EntityUid gridId, DecalGridComponent gridComp, Diction { if (chunkCollection.TryGetValue(indices, out var chunk)) { - var removedUids = new HashSet(chunk.Decals.Keys); - removedUids.ExceptWith(newChunkData.Decals.Keys); - foreach (var removedUid in removedUids) + _removedUids.Clear(); + _removedUids.UnionWith(chunk.Decals.Keys); + _removedUids.ExceptWith(newChunkData.Decals.Keys); + foreach (var removedUid in _removedUids) { OnDecalRemoved(gridId, removedUid, gridComp, indices, chunk); gridComp.DecalIndex.Remove(removedUid); @@ -166,7 +171,8 @@ private void RemoveChunks(EntityUid gridId, DecalGridComponent gridComp, IEnumer foreach (var index in chunks) { - if (!chunkCollection.TryGetValue(index, out var chunk)) continue; + if (!chunkCollection.TryGetValue(index, out var chunk)) + continue; foreach (var decalId in chunk.Decals.Keys) { diff --git a/Content.Server/Decals/DecalSystem.cs b/Content.Server/Decals/DecalSystem.cs index ce2e0711e74..3a3ab0bbcd8 100644 --- a/Content.Server/Decals/DecalSystem.cs +++ b/Content.Server/Decals/DecalSystem.cs @@ -454,9 +454,7 @@ public void UpdatePlayer(ICommonSession player) previouslySent.Remove(netGrid); // Was the grid deleted? - if (!TryGetEntity(netGrid, out var gridId) || !MapManager.IsGrid(gridId.Value)) - staleChunks[netGrid] = oldIndices; - else + if (TryGetEntity(netGrid, out var gridId) && !MapManager.IsGrid(gridId.Value)) { // If grid was deleted then don't worry about telling the client to delete the chunk. oldIndices.Clear(); From 5cbf935cf0943779190708779a382116fe8c8fcf Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:36:38 +1100 Subject: [PATCH 15/35] Wrap gateway generator in cvar for dev (#21758) --- .../Gateway/Systems/GatewayGeneratorSystem.cs | 12 ++++++++++-- Content.Server/Parallax/BiomeSystem.cs | 1 - Content.Shared/CCVar/CCVars.cs | 7 +++++++ Resources/ConfigPresets/Build/development.toml | 3 +++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs b/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs index 2350e62ebf8..184c1cf3136 100644 --- a/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs +++ b/Content.Server/Gateway/Systems/GatewayGeneratorSystem.cs @@ -3,12 +3,14 @@ using Content.Server.Gateway.Components; using Content.Server.Parallax; using Content.Server.Procedural; +using Content.Shared.CCVar; using Content.Shared.Dataset; using Content.Shared.Movement.Components; using Content.Shared.Parallax.Biomes; using Content.Shared.Physics; using Content.Shared.Procedural; using Content.Shared.Salvage; +using Robust.Shared.Configuration; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Physics.Collision.Shapes; @@ -26,6 +28,7 @@ namespace Content.Server.Gateway.Systems; /// public sealed class GatewayGeneratorSystem : EntitySystem { + [Dependency] private readonly IConfigurationManager _cfgManager = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly IPrototypeManager _protoManager = default!; @@ -87,6 +90,9 @@ private void OnGeneratorUnpaused(Entity ent, ref Enti private void OnGeneratorMapInit(EntityUid uid, GatewayGeneratorComponent generator, MapInitEvent args) { + if (!_cfgManager.GetCVar(CCVars.GatewayGeneratorEnabled)) + return; + generator.NextUnlock = TimeSpan.FromMinutes(5); for (var i = 0; i < 3; i++) @@ -109,6 +115,10 @@ private void GenerateDestination(EntityUid uid, GatewayGeneratorComponent? gener var random = new Random(seed); var mapId = _mapManager.CreateMap(); var mapUid = _mapManager.GetMapEntityId(mapId); + + var gatewayName = SharedSalvageSystem.GetFTLName(_protoManager.Index(PlanetNames), seed); + _metadata.SetEntityName(mapUid, gatewayName); + var origin = new Vector2i(random.Next(-MaxOffset, MaxOffset), random.Next(-MaxOffset, MaxOffset)); var restriction = AddComp(mapUid); restriction.Origin = origin; @@ -127,8 +137,6 @@ private void GenerateDestination(EntityUid uid, GatewayGeneratorComponent? gener // Clear area nearby as a sort of landing pad. _maps.SetTiles(mapUid, grid, tiles); - var gatewayName = SharedSalvageSystem.GetFTLName(_protoManager.Index(PlanetNames), seed); - _metadata.SetEntityName(mapUid, gatewayName); var originCoords = new EntityCoordinates(mapUid, origin); diff --git a/Content.Server/Parallax/BiomeSystem.cs b/Content.Server/Parallax/BiomeSystem.cs index 9a2357e7088..8f6e0730b98 100644 --- a/Content.Server/Parallax/BiomeSystem.cs +++ b/Content.Server/Parallax/BiomeSystem.cs @@ -38,7 +38,6 @@ public sealed partial class BiomeSystem : SharedBiomeSystem [Dependency] private readonly IParallelManager _parallel = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly ISerializationManager _serManager = default!; [Dependency] private readonly AtmosphereSystem _atmos = default!; [Dependency] private readonly DecalSystem _decals = default!; [Dependency] private readonly SharedMapSystem _mapSystem = default!; diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index cc71c6191ff..5918729147d 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -1812,5 +1812,12 @@ public static readonly CVarDef /// public static readonly CVarDef ReplayAutoRecordTempDir = CVarDef.Create("replay.auto_record_temp_dir", "", CVar.SERVERONLY); + + /* + * Miscellaneous + */ + + public static readonly CVarDef GatewayGeneratorEnabled = + CVarDef.Create("gateway.generator_enabled", true); } } diff --git a/Resources/ConfigPresets/Build/development.toml b/Resources/ConfigPresets/Build/development.toml index 82833fe2d51..da3a4130262 100644 --- a/Resources/ConfigPresets/Build/development.toml +++ b/Resources/ConfigPresets/Build/development.toml @@ -5,6 +5,9 @@ lobbyenabled = false map = "Dev" role_timers = false +[gateway] +generator_enabled = false + [physics] # Makes mapping annoying grid_splitting = false From f6a1fbaf1e664417d91a6fe85ba1a6ee7631ccb1 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Wed, 22 Nov 2023 17:58:06 +1300 Subject: [PATCH 16/35] Decal fix 2: Electric Boogaloo (#21831) --- Content.Server/Decals/DecalSystem.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Content.Server/Decals/DecalSystem.cs b/Content.Server/Decals/DecalSystem.cs index 3a3ab0bbcd8..0dcb0b31f38 100644 --- a/Content.Server/Decals/DecalSystem.cs +++ b/Content.Server/Decals/DecalSystem.cs @@ -454,9 +454,14 @@ public void UpdatePlayer(ICommonSession player) previouslySent.Remove(netGrid); // Was the grid deleted? - if (TryGetEntity(netGrid, out var gridId) && !MapManager.IsGrid(gridId.Value)) + if (TryGetEntity(netGrid, out var gridId) && HasComp(gridId.Value)) { - // If grid was deleted then don't worry about telling the client to delete the chunk. + // no -> add it to the list of stale chunks + staleChunks[netGrid] = oldIndices; + } + else + { + // If the grid was deleted then don't worry about telling the client to delete the chunk. oldIndices.Clear(); _chunkIndexPool.Return(oldIndices); } From 77241c9a4b73573831e6faf1cd9b17abddaf33f5 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:22:35 +1100 Subject: [PATCH 17/35] Update submodule to 180.2.0 (#21834) --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index 96cb52e5d28..a761fbc09e2 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 96cb52e5d2837bf23341f4c025f4ca3bfcf4c6d6 +Subproject commit a761fbc09e2d08b78daa5c81a268293a78380c86 From c7c49df35788ba197b9176247dcfdb5370442586 Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Wed, 22 Nov 2023 12:16:02 -0500 Subject: [PATCH 18/35] Fix cyborg locking (#21809) * Fix cyborg locking * Revert "Fix cyborg locking" This reverts commit bd5bbbb8b46edb720a9d479772f7931f5f497907. * create generic component * update submodules * Revert "update submodules" This reverts commit 303200f298f1c56660955d13caa8218b02e306ad. --- .../ActivatableUIRequiresLockComponent.cs | 15 +++++++ .../ActivatableUIRequiresLockSystem.cs | 41 +++++++++++++++++++ .../Mobs/Cyborgs/base_borg_chassis.yml | 1 + 3 files changed, 57 insertions(+) create mode 100644 Content.Server/Lock/Components/ActivatableUIRequiresLockComponent.cs create mode 100644 Content.Server/Lock/EntitySystems/ActivatableUIRequiresLockSystem.cs diff --git a/Content.Server/Lock/Components/ActivatableUIRequiresLockComponent.cs b/Content.Server/Lock/Components/ActivatableUIRequiresLockComponent.cs new file mode 100644 index 00000000000..dac677c1c27 --- /dev/null +++ b/Content.Server/Lock/Components/ActivatableUIRequiresLockComponent.cs @@ -0,0 +1,15 @@ +namespace Content.Server.Lock.Components; + +/// +/// This is used for activatable UIs that require the entity to have a lock in a certain state. +/// +[RegisterComponent] +public sealed partial class ActivatableUIRequiresLockComponent : Component +{ + /// + /// TRUE: the lock must be locked to access the UI. + /// FALSE: the lock must be unlocked to access the UI. + /// + [DataField("requireLocked"), ViewVariables(VVAccess.ReadWrite)] + public bool requireLocked = false; +} diff --git a/Content.Server/Lock/EntitySystems/ActivatableUIRequiresLockSystem.cs b/Content.Server/Lock/EntitySystems/ActivatableUIRequiresLockSystem.cs new file mode 100644 index 00000000000..bfb2fbc6e16 --- /dev/null +++ b/Content.Server/Lock/EntitySystems/ActivatableUIRequiresLockSystem.cs @@ -0,0 +1,41 @@ +using Content.Server.Lock.Components; +using Content.Server.Popups; +using Content.Server.UserInterface; +using Content.Shared.Lock; + +namespace Content.Server.Lock.EntitySystems; +public sealed class ActivatableUIRequiresLockSystem : EntitySystem +{ + [Dependency] private readonly ActivatableUISystem _activatableUI = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnUIOpenAttempt); + SubscribeLocalEvent(LockToggled); + } + + private void OnUIOpenAttempt(EntityUid uid, ActivatableUIRequiresLockComponent component, ActivatableUIOpenAttemptEvent args) + { + if (args.Cancelled) + return; + + if (TryComp(uid, out var lockComp) && lockComp.Locked != component.requireLocked) + { + args.Cancel(); + if (lockComp.Locked) + _popupSystem.PopupEntity(Loc.GetString("entity-storage-component-locked-message"), uid, args.User); + } + } + + private void LockToggled(EntityUid uid, ActivatableUIRequiresLockComponent component, LockToggledEvent args) + { + if (!TryComp(uid, out var lockComp) || lockComp.Locked == component.requireLocked) + return; + + _activatableUI.CloseAll(uid); + } +} + diff --git a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml index 8b1f61a8c54..ac19ad2f238 100644 --- a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml +++ b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml @@ -208,5 +208,6 @@ - AllAccess - type: Lock locked: true + - type: ActivatableUIRequiresLock - type: AccessReader access: [["Command"], ["Research"]] From 511cd0772789c5e0650d2f7e0cf90c6c641d5cfb Mon Sep 17 00:00:00 2001 From: PJBot Date: Wed, 22 Nov 2023 12:17:07 -0500 Subject: [PATCH 19/35] Automatic changelog update --- Resources/Changelog/Changelog.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 1b96b0e7169..f95809fe86c 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,9 +1,4 @@ Entries: -- author: DrSmugleaf - changes: - - {message: Fixed not tracking job playtime., type: Fix} - id: 4701 - time: '2023-08-29T20:39:18.0000000+00:00' - author: DrSmugleaf changes: - {message: Fixed players not getting their round start message telling them their @@ -2895,3 +2890,8 @@ Entries: - {message: The reagent "egg" is now known as "cooked egg", type: Tweak} id: 5200 time: '2023-11-22T04:32:35.0000000+00:00' +- author: themias + changes: + - {message: You must now unlock a cyborg's panel to access it, type: Fix} + id: 5201 + time: '2023-11-22T17:16:03.0000000+00:00' From 068f58d2b82d87c96bf5eb985f65546ac1fcb2a6 Mon Sep 17 00:00:00 2001 From: Vasilis Date: Wed, 22 Nov 2023 22:25:02 +0100 Subject: [PATCH 20/35] Potentially fix workflows using net8 (#21841) --- global.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 00000000000..63322953f33 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "7.0.000", + "rollForward": "latestFeature" + } +} From 895231961cf83cba69b69b29073ec2059cef0973 Mon Sep 17 00:00:00 2001 From: Vasilis Date: Thu, 23 Nov 2023 00:34:37 +0100 Subject: [PATCH 21/35] REALLY fix publish (#21842) --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 63322953f33..7665c95ab4e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.000", + "version": "7.0.114", "rollForward": "latestFeature" } } From f173b6a710b01daab11f9728dff0e8131302af1b Mon Sep 17 00:00:00 2001 From: Nyranu <139381125+Nyranu@users.noreply.github.com> Date: Thu, 23 Nov 2023 03:41:48 +0300 Subject: [PATCH 22/35] Cat cake. A small update. (#21805) * Cat cake. A small update. * up1 * up2 --- .../Objects/Consumable/Food/Baked/cake.yml | 7 +++ .../Mobs/Pets/cat.rsi/cak-equipped-HELMET.png | Bin 0 -> 1150 bytes .../Mobs/Pets/cat.rsi/cak-inhand-left.png | Bin 0 -> 826 bytes .../Mobs/Pets/cat.rsi/cak-inhand-right.png | Bin 0 -> 843 bytes .../Textures/Mobs/Pets/cat.rsi/meta.json | 54 ++++++++++++++++++ 5 files changed, 61 insertions(+) create mode 100644 Resources/Textures/Mobs/Pets/cat.rsi/cak-equipped-HELMET.png create mode 100644 Resources/Textures/Mobs/Pets/cat.rsi/cak-inhand-left.png create mode 100644 Resources/Textures/Mobs/Pets/cat.rsi/cak-inhand-right.png diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml index 97eaeb11450..bdf5e65847b 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml @@ -578,6 +578,13 @@ horizontalRotation: 0 - type: Item size: Ginormous + heldPrefix: cak + - type: Clothing + quickEquip: false + sprite: Mobs/Pets/cat.rsi + equippedPrefix: cak + slots: + - HEAD - type: GhostRole prob: 1 name: ghost-role-information-Cak-name diff --git a/Resources/Textures/Mobs/Pets/cat.rsi/cak-equipped-HELMET.png b/Resources/Textures/Mobs/Pets/cat.rsi/cak-equipped-HELMET.png new file mode 100644 index 0000000000000000000000000000000000000000..6ea20f86bda446152151d53d887d0319f2f47fcd GIT binary patch literal 1150 zcmV-^1cCdBP)Px(I7vi7RCt{2nz3&aNfgGvL08PJCqjxh#KlRT0t%#vDpKyM%LySW>NHT$^AA9Q zPFEcLRg@GoD5XoTa1$gHstb}Mh2m`&hc#E+c(N4HP>vZx}2gA^=O|yW9N$P1yV{} z9PER04k9v~b6gzkBk$&`Bx`>WtOWpo#_b1aJ#T??j@I)Q8n+)LGvj}SbB@i{p9_s) zB>)kDh!8~)y1QL=e0q7WDOzQ~R+yDSv z`FsQb(B=lTjv)LU>jz*ZfZY6V?i8b5$9f7{*_RUX<~`PqB-Bs?05)5#k?sB(E0ceI zu)V++{oFiICjM+-jHNaLz5}SY&^ki@^c099_@bY_klBoDCBP^LtmXD?ZSPec{{Z4x zKY@z>j{ZG_=W%!&>p1)P$$Gr+HV61W{hEfs#`&GnIiRwqmR*;Z@huRq{{Y6nM`Cin zLyBM}K;DN*AtP-0I!`9Nl@?$Tiir0uzvhkcUFCo(xD)~yV`k10>-T_FWY!cf60$2V zK-GEYQiQ-foB(w@P&ZD1x*ez+CqUf})QuCMZU^ed2~f8Kb#v(jD7{rv$L7d9%I-SZ z?Fwhk0%Q%At;;P+cCT^r+(OYYtV7`9U>^Vs5t%wl;*-P$Sp&etzFARN03tF%2wc7U z5JCvZ7ZMoXnXL;WUr1zq%goeoQaTBSk3xKS`K;{aOXI`KX9ypKrLQj}Kz6D({XYNz zN-12w|G2c_WpVxfV<xHD#P=jz^T-uoYkQBWp&mQ)(+vHUiTz0?b3rro(?05Tj2h~h zvvuw=sD>Ki$I(lV;Px%^hrcPRCt{2n!j%oF%-wYt{7an1qr3yuuzu@Isrmrub4Wpl%;-C2}(n(2l_x1DF@7YcqAP@)y z0)apv5C{YUSC@WrNKNQ2a0zLxY1;d%3Y!7v#|K5Hwbpcge844*esV~ihwFk(a11ul zvJqEGvFPhwOjulF)wHl>005|61t}%eu42>FT9ds092j;Xr37J{wX|5=?DzWw0He_e zgKwX4@AZ2uEd2Gh)9KV|!)BJ05_z5j;LQTo5|C0B@0UI-Lwu>PPiLTn;(s43uCW@x zR|3N>mX<#P*$?D-j^thJe#V1@Vwgb&wYnk9AOnV77F`RQ0cMaP>8)e=(JO&r7iN&v z)+C}rhlq-H>}wA0uqgpWu#=sy6Y%4wo1*MB7mci~<8Y0Z5Y2?jqRN?)zHk|GZ4L0n zWfbd1=sFS%Xgh$m2?n$sK-&ZZ+76&?ZoL7{?*ereSpdw?q+M<|^;6Y6RK+?i#zr!r$%D}E1XqbPzg#;Nafs_az)v;H|j?J7i3 z#99hkYl@<1ri0fk%boXl8Q>!{PWm$!y_aC`ouH54Wpv(R1{t0_ zd-GpR(~M!^GCMdArziV-6W_E(8f_pD2m}IwK;V-21D}qFh0OPMbN~PV07*qoM6N<$ Ef@;Nk<^TWy literal 0 HcmV?d00001 diff --git a/Resources/Textures/Mobs/Pets/cat.rsi/cak-inhand-right.png b/Resources/Textures/Mobs/Pets/cat.rsi/cak-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..26f646e4fbc26434f61e6162b1e536c012037485 GIT binary patch literal 843 zcmV-R1GM~!P)Px&1xZ9fRCt{2nlW$FKorOSS20|R7o;fdmJ?e=J5j_ZsF*si&@TZU_y`QJF*0{R zm7)$vWX#%bSx_RS5)9|n@@P9=+Q(2XL~-JKj^kbn_meCovG4Bx{`X#V@*Uvucsw4D z$K&yMJf4S76!xjg^BcAYwANJi{h?zu;QI1>8no7$t}oA<98ZNBFL1ZQ_EEdPvd?YWGMaX$DM&taerdk~Bj&KE%$`R|1nE zk~FI=cHI!sR2R{0=_hG6{anT)&H$!!PVk&To8Z~=H)7Fe8!Oi`5kZJzb5{l!7HKM@ zGy_}*vkLQ?ZHBN)fIHYjgtZX*m+=O;7T_9hfNKG+@dmgS;2Lj$YXPqD2DldB8gGDW z0j}`|xEA1=TJHlm%)XGgkM9pwGN9^frzXd!YpS&bgb)QW%LZ+74WCQ|0{5A#v{QCNduhfF+%k<5K zJ8`AyG#Yei@8DRN8J$nO)bDKi1E^F2wh3f08gwa+W1=e*f{o*t z%tbgMBbJD2Uxi?_ChnfU(J>ly>zAU|nq~u?zaNEtio!nWaj$T1ody7ZPJl3os%T9pM8XF*dXorBg()^ofgGD-H z#~mX{lJ%Yu0+t85cW^A~o*AgJc;T4P*deabpv$f;SKN1fjq+ay@9}s%9*?IozX1qB V--a3Ypi}?=002ovPDHLkV1g> Date: Wed, 22 Nov 2023 19:42:52 -0500 Subject: [PATCH 23/35] Automatic changelog update --- Resources/Changelog/Changelog.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index f95809fe86c..d34d824972c 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,10 +1,4 @@ Entries: -- author: DrSmugleaf - changes: - - {message: Fixed players not getting their round start message telling them their - supervisors., type: Add} - id: 4702 - time: '2023-08-29T22:50:23.0000000+00:00' - author: Flareguy changes: - {message: Ported steel chair sprites from Paradise Station & Shiptest., type: Tweak} @@ -2895,3 +2889,8 @@ Entries: - {message: You must now unlock a cyborg's panel to access it, type: Fix} id: 5201 time: '2023-11-22T17:16:03.0000000+00:00' +- author: Nyranu + changes: + - {message: The ability to put a cakecat on your head., type: Add} + id: 5202 + time: '2023-11-23T00:41:48.0000000+00:00' From 4be03591b94d58d34f97ab6236760bd064f7b0f9 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 22 Nov 2023 16:43:12 -0800 Subject: [PATCH 24/35] Fix health alert not being updated when a system overrides the current state through UpdateMobStateEvent (#21741) --- .../Mobs/Systems/MobThresholdSystem.cs | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Mobs/Systems/MobThresholdSystem.cs b/Content.Shared/Mobs/Systems/MobThresholdSystem.cs index f34240d8fe3..59d9fb4c239 100644 --- a/Content.Shared/Mobs/Systems/MobThresholdSystem.cs +++ b/Content.Shared/Mobs/Systems/MobThresholdSystem.cs @@ -22,6 +22,7 @@ public override void Initialize() SubscribeLocalEvent(MobThresholdStartup); SubscribeLocalEvent(OnDamaged); SubscribeLocalEvent(OnUpdateMobState); + SubscribeLocalEvent(OnThresholdsMobState); } private void OnGetState(EntityUid uid, MobThresholdsComponent component, ref ComponentGetState args) @@ -424,9 +425,7 @@ private void MobThresholdStartup(EntityUid target, MobThresholdsComponent thresh if (!TryComp(target, out var mobState) || !TryComp(target, out var damageable)) return; CheckThresholds(target, mobState, thresholds, damageable); - var ev = new MobThresholdChecked(target, mobState, thresholds, damageable); - RaiseLocalEvent(target, ref ev, true); - UpdateAlerts(target, mobState.CurrentState, thresholds, damageable); + UpdateAllEffects((target, thresholds, mobState, damageable), mobState.CurrentState); } private void MobThresholdShutdown(EntityUid target, MobThresholdsComponent component, ComponentShutdown args) @@ -447,6 +446,23 @@ private void OnUpdateMobState(EntityUid target, MobThresholdsComponent component } } + private void UpdateAllEffects(Entity ent, MobState currentState) + { + var (_, thresholds, mobState, damageable) = ent; + if (Resolve(ent, ref thresholds, ref mobState, ref damageable)) + { + var ev = new MobThresholdChecked(ent, mobState, thresholds, damageable); + RaiseLocalEvent(ent, ref ev, true); + } + + UpdateAlerts(ent, currentState, thresholds, damageable); + } + + private void OnThresholdsMobState(Entity ent, ref MobStateChangedEvent args) + { + UpdateAllEffects((ent, ent, null, null), args.NewMobState); + } + #endregion } From 7d2e8c7087d1b502d957d22a0ee12d11bb358cf0 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 22 Nov 2023 17:04:51 -0800 Subject: [PATCH 25/35] Update Robust to v180.2.1 (#21845) --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index a761fbc09e2..d9b0f3a227e 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit a761fbc09e2d08b78daa5c81a268293a78380c86 +Subproject commit d9b0f3a227edfd7dee29b883fa79223a01a94f09 From 93bd9972f12a4645ca4e54307a6daaf47ffd8d7c Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 23 Nov 2023 14:34:37 +1100 Subject: [PATCH 26/35] Content arch (#20107) Co-authored-by: DrSmugleaf --- Content.Client/Weather/WeatherOverlay.cs | 218 ++++++++++++++++++ .../Interaction/InteractionTest.Helpers.cs | 2 +- .../Tests/PrototypeSaveTest.cs | 6 +- .../Administration/Commands/ControlMob.cs | 6 +- .../Administration/Commands/OwoifyCommand.cs | 21 +- .../Administration/Commands/SetMindCommand.cs | 15 +- .../Commands/SetOutfitCommand.cs | 12 +- .../Administration/Systems/AdminVerbSystem.cs | 2 +- .../Administration/UI/SetOutfitEui.cs | 7 +- .../Humanoid/Systems/RandomHumanoidSystem.cs | 2 +- Content.Server/Jobs/AddComponentSpecial.cs | 2 +- Content.Server/NPC/Commands/AddNPCCommand.cs | 8 +- .../Sandbox/Commands/ColorNetworkCommand.cs | 21 +- .../Uplink/Commands/AddUplinkCommand.cs | 19 +- .../Verbs/Commands/InvokeVerbCommand.cs | 21 +- .../Verbs/Commands/ListVerbsCommand.cs | 17 +- .../Systems/ArtifactAnalyzerSystem.cs | 4 +- .../XenoArtifacts/ArtifactSystem.Nodes.cs | 4 +- Content.Shared/Anomaly/SharedAnomalySystem.cs | 2 +- .../Blocking/BlockingSystem.User.cs | 1 - Content.Shared/Chasm/ChasmSystem.cs | 2 - .../Climbing/Systems/ClimbSystem.cs | 2 - .../Containers/ItemSlot/ItemSlotsSystem.cs | 2 +- Content.Shared/Cuffs/SharedCuffableSystem.cs | 1 - .../Inventory/InventorySystem.Equip.cs | 3 +- Content.Shared/Lock/LockSystem.cs | 4 +- .../Equipment/Systems/MechSoundboardSystem.cs | 3 - Content.Shared/RCD/Systems/RCDSystem.cs | 1 - .../EntitySystems/EncryptionKeySystem.cs | 1 - .../SharedEntityStorageSystem.cs | 2 - Content.Shared/Stunnable/SharedStunSystem.cs | 6 - .../Systems/RechargeBasicEntityAmmoSystem.cs | 2 - SpaceStation14.sln | 21 ++ 33 files changed, 331 insertions(+), 109 deletions(-) create mode 100644 Content.Client/Weather/WeatherOverlay.cs diff --git a/Content.Client/Weather/WeatherOverlay.cs b/Content.Client/Weather/WeatherOverlay.cs new file mode 100644 index 00000000000..12af31b8631 --- /dev/null +++ b/Content.Client/Weather/WeatherOverlay.cs @@ -0,0 +1,218 @@ +using System.Linq; +using System.Numerics; +using Content.Client.Parallax; +using Content.Shared.Weather; +using Robust.Client.GameObjects; +using Robust.Client.Graphics; +using Robust.Client.ResourceManagement; +using Robust.Client.Utility; +using Robust.Shared.Enums; +using Robust.Shared.Graphics.RSI; +using Robust.Shared.Map; +using Robust.Shared.Map.Components; +using Robust.Shared.Physics.Components; +using Robust.Shared.Prototypes; +using Robust.Shared.Timing; +using Robust.Shared.Utility; + +namespace Content.Client.Weather; + +public sealed class WeatherOverlay : Overlay +{ + [Dependency] private readonly IClyde _clyde = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IMapManager _mapManager = default!; + [Dependency] private readonly IPrototypeManager _protoManager = default!; + [Dependency] private readonly IResourceCache _cache = default!; + private readonly SharedTransformSystem _transform; + private readonly SpriteSystem _sprite; + private readonly WeatherSystem _weather; + + public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV; + + private IRenderTexture? _blep; + + public WeatherOverlay(SharedTransformSystem transform, SpriteSystem sprite, WeatherSystem weather) + { + ZIndex = ParallaxSystem.ParallaxZIndex + 1; + _transform = transform; + _weather = weather; + _sprite = sprite; + IoCManager.InjectDependencies(this); + } + + protected override bool BeforeDraw(in OverlayDrawArgs args) + { + if (args.MapId == MapId.Nullspace) + return false; + + if (!_entManager.TryGetComponent(_mapManager.GetMapEntityId(args.MapId), out var weather) || + weather.Weather.Count == 0) + { + return false; + } + + return base.BeforeDraw(in args); + } + + protected override void Draw(in OverlayDrawArgs args) + { + var mapUid = _mapManager.GetMapEntityId(args.MapId); + + if (!_entManager.TryGetComponent(mapUid, out var comp)) + { + return; + } + + foreach (var (proto, weather) in comp.Weather) + { + if (!_protoManager.TryIndex(proto, out var weatherProto)) + continue; + + var alpha = _weather.GetPercent(weather, mapUid); + DrawWorld(args, weatherProto, alpha); + } + } + + private void DrawWorld(in OverlayDrawArgs args, WeatherPrototype weatherProto, float alpha) + { + var worldHandle = args.WorldHandle; + var mapId = args.MapId; + var worldAABB = args.WorldAABB; + var worldBounds = args.WorldBounds; + var invMatrix = args.Viewport.GetWorldToLocalMatrix(); + var position = args.Viewport.Eye?.Position.Position ?? Vector2.Zero; + + if (_blep?.Texture.Size != args.Viewport.Size) + { + _blep?.Dispose(); + _blep = _clyde.CreateRenderTarget(args.Viewport.Size, new RenderTargetFormatParameters(RenderTargetColorFormat.Rgba8Srgb), name: "weather-stencil"); + } + + // Cut out the irrelevant bits via stencil + // This is why we don't just use parallax; we might want specific tiles to get drawn over + // particularly for planet maps or stations. + worldHandle.RenderInRenderTarget(_blep, () => + { + var bodyQuery = _entManager.GetEntityQuery(); + var xformQuery = _entManager.GetEntityQuery(); + var weatherIgnoreQuery = _entManager.GetEntityQuery(); + + // idk if this is safe to cache in a field and clear sloth help + var grids = new List>(); + _mapManager.FindGridsIntersecting(mapId, worldAABB, ref grids); + + foreach (var grid in grids) + { + var matrix = _transform.GetWorldMatrix(grid, xformQuery); + Matrix3.Multiply(in matrix, in invMatrix, out var matty); + worldHandle.SetTransform(matty); + + foreach (var tile in grid.Comp.GetTilesIntersecting(worldAABB)) + { + // Ignored tiles for stencil + if (_weather.CanWeatherAffect(grid, tile, weatherIgnoreQuery, bodyQuery)) + { + continue; + } + + var gridTile = new Box2(tile.GridIndices * grid.Comp.TileSize, + (tile.GridIndices + Vector2i.One) * grid.Comp.TileSize); + + worldHandle.DrawRect(gridTile, Color.White); + } + } + + }, Color.Transparent); + + worldHandle.SetTransform(Matrix3.Identity); + worldHandle.UseShader(_protoManager.Index("StencilMask").Instance()); + worldHandle.DrawTextureRect(_blep.Texture, worldBounds); + Texture? sprite = null; + var curTime = _timing.RealTime; + + switch (weatherProto.Sprite) + { + case SpriteSpecifier.Rsi rsi: + var rsiActual = _cache.GetResource(rsi.RsiPath).RSI; + rsiActual.TryGetState(rsi.RsiState, out var state); + var frames = state!.GetFrames(RsiDirection.South); + var delays = state.GetDelays(); + var totalDelay = delays.Sum(); + var time = curTime.TotalSeconds % totalDelay; + var delaySum = 0f; + + for (var i = 0; i < delays.Length; i++) + { + var delay = delays[i]; + delaySum += delay; + + if (time > delaySum) + continue; + + sprite = frames[i]; + break; + } + + sprite ??= _sprite.Frame0(weatherProto.Sprite); + break; + case SpriteSpecifier.Texture texture: + sprite = texture.GetTexture(_cache); + break; + default: + throw new NotImplementedException(); + } + + // Draw the rain + worldHandle.UseShader(_protoManager.Index("StencilDraw").Instance()); + + // TODO: This is very similar to parallax but we need stencil support but we can probably combine these somehow + // and not make it spaghetti, while getting the advantages of not-duped code? + + + // Okay I have spent like 5 hours on this at this point and afaict you have one of the following comprises: + // - No scrolling so the weather is always centered on the player + // - Crappy looking rotation but strafing looks okay and scrolls + // - Crappy looking strafing but rotation looks okay. + // - No rotation + // - Storing state across frames to do scrolling and just having it always do topdown. + + // I have chosen no rotation. + + const float scale = 1f; + const float slowness = 0f; + var scrolling = Vector2.Zero; + + // Size of the texture in world units. + var size = (sprite.Size / (float) EyeManager.PixelsPerMeter) * scale; + var scrolled = scrolling * (float) curTime.TotalSeconds; + + // Origin - start with the parallax shift itself. + var originBL = position * slowness + scrolled; + + // Centre the image. + originBL -= size / 2; + + // Remove offset so we can floor. + var flooredBL = args.WorldAABB.BottomLeft - originBL; + + // Floor to background size. + flooredBL = (flooredBL / size).Floored() * size; + + // Re-offset. + flooredBL += originBL; + + for (var x = flooredBL.X; x < args.WorldAABB.Right; x += size.X) + { + for (var y = flooredBL.Y; y < args.WorldAABB.Top; y += size.Y) + { + var box = Box2.FromDimensions(new Vector2(x, y), size); + worldHandle.DrawTextureRect(sprite, box, (weatherProto.Color ?? Color.White).WithAlpha(alpha)); + } + } + + worldHandle.SetTransform(Matrix3.Identity); + worldHandle.UseShader(null); + } +} diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs index 25171e1ea2e..5afa0872975 100644 --- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs +++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs @@ -500,7 +500,7 @@ protected void AssertDeleted(bool deleted = true, NetEntity? target = null) /// /// Assert whether or not the target has the given component. /// - protected void AssertComp(bool hasComp = true, NetEntity? target = null) + protected void AssertComp(bool hasComp = true, NetEntity? target = null) where T : IComponent { target ??= Target; if (target == null) diff --git a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs index 6096c497efa..207f35189f8 100644 --- a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs +++ b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs @@ -162,7 +162,7 @@ await server.WaitAssertion(() => } // An entity may also remove components on init -> check no components are missing. - foreach (var (compType, comp) in prototype.Components) + foreach (var compType in prototype.Components.Keys) { Assert.That(compNames, Does.Contain(compType), $"Prototype {prototype.ID} removes component {compType} on spawn."); } @@ -208,7 +208,7 @@ public DataNode Write(ISerializationManager serializationManager, EntityUid valu Assert.Fail($"Uninitialized entities should not be saving entity Uids. Component: {WritingComponent}. Prototype: {Prototype.ID}"); } - return new ValueDataNode(value.ToString()); + return new ValueDataNode(value.Id.ToString()); } EntityUid ITypeReader.Read(ISerializationManager serializationManager, @@ -217,7 +217,7 @@ EntityUid ITypeReader.Read(ISerializationManager seria SerializationHookContext hookCtx, ISerializationContext? context, ISerializationManager.InstantiationDelegate? instanceProvider) { - return EntityUid.Parse(node.Value); + return EntityUid.Parse(node.Value, "0"); } } } diff --git a/Content.Server/Administration/Commands/ControlMob.cs b/Content.Server/Administration/Commands/ControlMob.cs index 317461a3736..9d39cb9ddeb 100644 --- a/Content.Server/Administration/Commands/ControlMob.cs +++ b/Content.Server/Administration/Commands/ControlMob.cs @@ -33,15 +33,15 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var target = new EntityUid(targetId); + var targetNet = new NetEntity(targetId); - if (!target.IsValid() || !_entities.EntityExists(target)) + if (!_entities.TryGetEntity(targetNet, out var target)) { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; } - _entities.System().ControlMob(player.UserId, target); + _entities.System().ControlMob(player.UserId, target.Value); } } } diff --git a/Content.Server/Administration/Commands/OwoifyCommand.cs b/Content.Server/Administration/Commands/OwoifyCommand.cs index 73a1236d194..8ca35b1b42f 100644 --- a/Content.Server/Administration/Commands/OwoifyCommand.cs +++ b/Content.Server/Administration/Commands/OwoifyCommand.cs @@ -8,6 +8,8 @@ namespace Content.Server.Administration.Commands; [AdminCommand(AdminFlags.Fun)] public sealed class OwoifyCommand : IConsoleCommand { + [Dependency] private readonly IEntityManager _entManager = default!; + public string Command => "owoify"; public string Description => "For when you need everything to be cat. Uses OwOAccent's formatting on the name and description of an entity."; @@ -22,22 +24,25 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var entityManager = IoCManager.Resolve(); - if (!int.TryParse(args[0], out var targetId)) { shell.WriteLine(Loc.GetString("shell-argument-must-be-number")); return; } - var eUid = new EntityUid(targetId); + var nent = new NetEntity(targetId); + + if (!_entManager.TryGetEntity(nent, out var eUid)) + { + return; + } - var meta = entityManager.GetComponent(eUid); + var meta = _entManager.GetComponent(eUid.Value); - var owoSys = entityManager.System(); - var metaDataSys = entityManager.System(); + var owoSys = _entManager.System(); + var metaDataSys = _entManager.System(); - metaDataSys.SetEntityName(eUid, owoSys.Accentuate(meta.EntityName), meta); - metaDataSys.SetEntityDescription(eUid, owoSys.Accentuate(meta.EntityDescription), meta); + metaDataSys.SetEntityName(eUid.Value, owoSys.Accentuate(meta.EntityName), meta); + metaDataSys.SetEntityDescription(eUid.Value, owoSys.Accentuate(meta.EntityDescription), meta); } } diff --git a/Content.Server/Administration/Commands/SetMindCommand.cs b/Content.Server/Administration/Commands/SetMindCommand.cs index 5310c2dd7f5..a7b6849423e 100644 --- a/Content.Server/Administration/Commands/SetMindCommand.cs +++ b/Content.Server/Administration/Commands/SetMindCommand.cs @@ -11,6 +11,7 @@ namespace Content.Server.Administration.Commands [AdminCommand(AdminFlags.Admin)] sealed class SetMindCommand : IConsoleCommand { + [Dependency] private readonly IEntityManager _entManager = default!; public string Command => "setmind"; @@ -26,7 +27,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - if (!int.TryParse(args[0], out var entityUid)) + if (!int.TryParse(args[0], out var entInt)) { shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number")); return; @@ -38,17 +39,15 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) ghostOverride = bool.Parse(args[2]); } - var entityManager = IoCManager.Resolve(); + var nent = new NetEntity(entInt); - var eUid = new EntityUid(entityUid); - - if (!eUid.IsValid() || !entityManager.EntityExists(eUid)) + if (!_entManager.TryGetEntity(nent, out var eUid)) { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; } - if (!entityManager.HasComponent(eUid)) + if (!_entManager.HasComponent(eUid)) { shell.WriteLine(Loc.GetString("set-mind-command-target-has-no-mind-message")); return; @@ -68,8 +67,8 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var mindSystem = entityManager.System(); - var metadata = entityManager.GetComponent(eUid); + var mindSystem = _entManager.System(); + var metadata = _entManager.GetComponent(eUid.Value); var mind = playerCData.Mind ?? mindSystem.CreateMind(session.UserId, metadata.EntityName); diff --git a/Content.Server/Administration/Commands/SetOutfitCommand.cs b/Content.Server/Administration/Commands/SetOutfitCommand.cs index 97c1fa0656c..4c66a099184 100644 --- a/Content.Server/Administration/Commands/SetOutfitCommand.cs +++ b/Content.Server/Administration/Commands/SetOutfitCommand.cs @@ -34,21 +34,21 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - if (!int.TryParse(args[0], out var entityUid)) + if (!int.TryParse(args[0], out var entInt)) { shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number")); return; } - var target = new EntityUid(entityUid); + var targetNet = new NetEntity(entInt); - if (!target.IsValid() || !_entities.EntityExists(target)) + if (!_entities.TryGetEntity(targetNet, out var target)) { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; } - if (!_entities.HasComponent(target)) + if (!_entities.HasComponent(target)) { shell.WriteLine(Loc.GetString("shell-target-entity-does-not-have-message", ("missing", "inventory"))); return; @@ -63,12 +63,12 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) } var eui = IoCManager.Resolve(); - var ui = new SetOutfitEui(target); + var ui = new SetOutfitEui(targetNet); eui.OpenEui(ui, player); return; } - if (!SetOutfit(target, args[1], _entities)) + if (!SetOutfit(target.Value, args[1], _entities)) shell.WriteLine(Loc.GetString("set-outfit-command-invalid-outfit-id-error")); } diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.cs b/Content.Server/Administration/Systems/AdminVerbSystem.cs index bc065745f5e..af27db29ffd 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.cs @@ -332,7 +332,7 @@ private void AddDebugVerbs(GetVerbsEvent args) Text = Loc.GetString("set-outfit-verb-get-data-text"), Category = VerbCategory.Debug, Icon = new SpriteSpecifier.Texture(new ("/Textures/Interface/VerbIcons/outfit.svg.192dpi.png")), - Act = () => _euiManager.OpenEui(new SetOutfitEui(args.Target), player), + Act = () => _euiManager.OpenEui(new SetOutfitEui(GetNetEntity(args.Target)), player), Impact = LogImpact.Medium }; args.Verbs.Add(verb); diff --git a/Content.Server/Administration/UI/SetOutfitEui.cs b/Content.Server/Administration/UI/SetOutfitEui.cs index 6243657c325..2812975f4d7 100644 --- a/Content.Server/Administration/UI/SetOutfitEui.cs +++ b/Content.Server/Administration/UI/SetOutfitEui.cs @@ -10,10 +10,9 @@ namespace Content.Server.Administration.UI public sealed class SetOutfitEui : BaseEui { [Dependency] private readonly IAdminManager _adminManager = default!; - [Dependency] private readonly IEntityManager _entManager = default!; - private readonly EntityUid _target; + private readonly NetEntity _target; - public SetOutfitEui(EntityUid entity) + public SetOutfitEui(NetEntity entity) { _target = entity; IoCManager.InjectDependencies(this); @@ -31,7 +30,7 @@ public override EuiStateBase GetNewState() { return new SetOutfitEuiState { - TargetNetEntity = _entManager.GetNetEntity(_target) + TargetNetEntity = _target, }; } diff --git a/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs b/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs index 6a17a52c3dc..f3607f74dc1 100644 --- a/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs +++ b/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs @@ -52,7 +52,7 @@ public EntityUid SpawnRandomHumanoid(string prototypeId, EntityCoordinates coord { var comp = (Component) _serialization.CreateCopy(entry.Component, notNullableOverride: true); comp.Owner = humanoid; // This .owner must survive for now. - EntityManager.AddComponent(humanoid, comp, true); + EntityManager.AddComponent(humanoid, comp); } } diff --git a/Content.Server/Jobs/AddComponentSpecial.cs b/Content.Server/Jobs/AddComponentSpecial.cs index 1b183c5c3f8..62443a1c4e0 100644 --- a/Content.Server/Jobs/AddComponentSpecial.cs +++ b/Content.Server/Jobs/AddComponentSpecial.cs @@ -27,7 +27,7 @@ public override void AfterEquip(EntityUid mob) var temp = (object) component; serializationManager.CopyTo(data.Component, ref temp); - entityManager.AddComponent(mob, (Component) temp!, true); + entityManager.AddComponent(mob, (Component) temp!); } } } diff --git a/Content.Server/NPC/Commands/AddNPCCommand.cs b/Content.Server/NPC/Commands/AddNPCCommand.cs index 070b9f35d32..c5582b7b4c3 100644 --- a/Content.Server/NPC/Commands/AddNPCCommand.cs +++ b/Content.Server/NPC/Commands/AddNPCCommand.cs @@ -24,11 +24,11 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var entId = new EntityUid(int.Parse(args[0])); + var nent = new NetEntity(int.Parse(args[0])); - if (!_entities.EntityExists(entId)) + if (!_entities.TryGetEntity(nent, out var entId)) { - shell.WriteError($"Unable to find entity with uid {entId}"); + shell.WriteError($"Unable to find entity {nent}"); return; } @@ -38,7 +38,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var comp = _entities.AddComponent(entId); + var comp = _entities.AddComponent(entId.Value); comp.RootTask = new HTNCompoundTask() { Task = args[1] diff --git a/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs b/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs index cc20b719469..2ab29d1b2f0 100644 --- a/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs +++ b/Content.Server/Sandbox/Commands/ColorNetworkCommand.cs @@ -11,6 +11,9 @@ namespace Content.Server.Sandbox.Commands [AnyCommand] public sealed class ColorNetworkCommand : IConsoleCommand { + [Dependency] private readonly IAdminManager _adminManager = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + public string Command => "colornetwork"; public string Description => Loc.GetString("color-network-command-description"); public string Help => Loc.GetString("color-network-command-help-text", ("command",Command)); @@ -30,25 +33,21 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - - - var entityManager = IoCManager.Resolve(); - if (!int.TryParse(args[0], out var targetId)) { shell.WriteLine(Loc.GetString("shell-argument-must-be-number")); return; } - var eUid = new EntityUid(targetId); + var nent = new NetEntity(targetId); - if (!eUid.IsValid() || !entityManager.EntityExists(eUid)) + if (!_entManager.TryGetEntity(nent, out var eUid)) { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; } - if (!entityManager.TryGetComponent(eUid, out NodeContainerComponent? nodeContainerComponent)) + if (!_entManager.TryGetComponent(eUid, out NodeContainerComponent? nodeContainerComponent)) { shell.WriteLine(Loc.GetString("shell-entity-is-not-node-container")); return; @@ -74,13 +73,15 @@ private void PaintNodes(NodeContainerComponent nodeContainerComponent, NodeGroup { var group = nodeContainerComponent.Nodes[nodeGroupId.ToString().ToLower()].NodeGroup; - if (group == null) return; + if (group == null) + return; foreach (var x in group.Nodes) { - if (!IoCManager.Resolve().TryGetComponent(x.Owner, out AtmosPipeColorComponent? atmosPipeColorComponent)) continue; + if (!_entManager.TryGetComponent(x.Owner, out AtmosPipeColorComponent? atmosPipeColorComponent)) + continue; - EntitySystem.Get().SetColor(x.Owner, atmosPipeColorComponent, color); + _entManager.System().SetColor(x.Owner, atmosPipeColorComponent, color); } } } diff --git a/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs b/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs index fd656a9f717..cdaed3f928e 100644 --- a/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs +++ b/Content.Server/Traitor/Uplink/Commands/AddUplinkCommand.cs @@ -12,6 +12,10 @@ namespace Content.Server.Traitor.Uplink.Commands [AdminCommand(AdminFlags.Admin)] public sealed class AddUplinkCommand : IConsoleCommand { + [Dependency] private readonly IConfigurationManager _cfgManager = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + public string Command => "adduplink"; public string Description => Loc.GetString("add-uplink-command-description"); @@ -41,7 +45,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) if (args.Length > 0) { // Get player entity - if (!IoCManager.Resolve().TryGetSessionByUsername(args[0], out session)) + if (!_playerManager.TryGetSessionByUsername(args[0], out session)) { shell.WriteLine(Loc.GetString("shell-target-player-does-not-exist")); return; @@ -60,7 +64,6 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) // Get target item EntityUid? uplinkEntity = null; - var entityManager = IoCManager.Resolve(); if (args.Length >= 2) { if (!int.TryParse(args[1], out var itemID)) @@ -69,8 +72,9 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var eUid = new EntityUid(itemID); - if (!eUid.IsValid() || !entityManager.EntityExists(eUid)) + var eNet = new NetEntity(itemID); + + if (!_entManager.TryGetEntity(eNet, out var eUid)) { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; @@ -80,11 +84,10 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) } // Get TC count - var configManager = IoCManager.Resolve(); - var tcCount = configManager.GetCVar(CCVars.TraitorStartingBalance); - Logger.Debug(entityManager.ToPrettyString(user)); + var tcCount = _cfgManager.GetCVar(CCVars.TraitorStartingBalance); + Logger.Debug(_entManager.ToPrettyString(user)); // Finally add uplink - var uplinkSys = entityManager.EntitySysManager.GetEntitySystem(); + var uplinkSys = _entManager.System(); if (!uplinkSys.AddUplink(user, FixedPoint2.New(tcCount), uplinkEntity: uplinkEntity)) { shell.WriteLine(Loc.GetString("add-uplink-command-error-2")); diff --git a/Content.Server/Verbs/Commands/InvokeVerbCommand.cs b/Content.Server/Verbs/Commands/InvokeVerbCommand.cs index af2131fb551..3309ef81530 100644 --- a/Content.Server/Verbs/Commands/InvokeVerbCommand.cs +++ b/Content.Server/Verbs/Commands/InvokeVerbCommand.cs @@ -9,6 +9,8 @@ namespace Content.Server.Verbs.Commands [AdminCommand(AdminFlags.Admin)] public sealed class InvokeVerbCommand : IConsoleCommand { + [Dependency] private readonly IEntityManager _entManager = default!; + public string Command => "invokeverb"; public string Description => Loc.GetString("invoke-verb-command-description"); public string Help => Loc.GetString("invoke-verb-command-help"); @@ -21,8 +23,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var entityManager = IoCManager.Resolve(); - var verbSystem = entityManager.System(); + var verbSystem = _entManager.System(); // get the 'player' entity (defaulting to command user, otherwise uses a uid) EntityUid? playerEntity = null; @@ -38,10 +39,6 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } } - else - { - entityManager.EntityExists(new EntityUid(intPlayerUid)); - } // gets the target entity if (!int.TryParse(args[1], out var intUid)) @@ -56,16 +53,16 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var target = new EntityUid(intUid); - if (!entityManager.EntityExists(target)) + var targetNet = new NetEntity(intUid); + + if (!_entManager.TryGetEntity(targetNet, out var target)) { shell.WriteError(Loc.GetString("invoke-verb-command-invalid-target-entity")); return; } var verbName = args[2].ToLowerInvariant(); - var verbs = verbSystem.GetLocalVerbs(target, playerEntity.Value, Verb.VerbTypes, true); - + var verbs = verbSystem.GetLocalVerbs(target.Value, playerEntity.Value, Verb.VerbTypes, true); // if the "verb name" is actually a verb-type, try run any verb of that type. var verbType = Verb.VerbTypes.FirstOrDefault(x => x.Name == verbName); @@ -74,7 +71,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) var verb = verbs.FirstOrDefault(v => v.GetType() == verbType); if (verb != null) { - verbSystem.ExecuteVerb(verb, playerEntity.Value, target, forced: true); + verbSystem.ExecuteVerb(verb, playerEntity.Value, target.Value, forced: true); shell.WriteLine(Loc.GetString("invoke-verb-command-success", ("verb", verbName), ("target", target), ("player", playerEntity))); return; } @@ -84,7 +81,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) { if (verb.Text.ToLowerInvariant() == verbName) { - verbSystem.ExecuteVerb(verb, playerEntity.Value, target, forced: true); + verbSystem.ExecuteVerb(verb, playerEntity.Value, target.Value, forced: true); shell.WriteLine(Loc.GetString("invoke-verb-command-success", ("verb", verb.Text), ("target", target), ("player", playerEntity))); return; } diff --git a/Content.Server/Verbs/Commands/ListVerbsCommand.cs b/Content.Server/Verbs/Commands/ListVerbsCommand.cs index dc56cffb444..fd159e37bbc 100644 --- a/Content.Server/Verbs/Commands/ListVerbsCommand.cs +++ b/Content.Server/Verbs/Commands/ListVerbsCommand.cs @@ -8,6 +8,8 @@ namespace Content.Server.Verbs.Commands [AdminCommand(AdminFlags.Admin)] public sealed class ListVerbsCommand : IConsoleCommand { + [Dependency] private readonly IEntityManager _entManager = default!; + public string Command => "listverbs"; public string Description => Loc.GetString("list-verbs-command-description"); public string Help => Loc.GetString("list-verbs-command-help"); @@ -20,11 +22,11 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var entityManager = IoCManager.Resolve(); - var verbSystem = EntitySystem.Get(); + var verbSystem = _entManager.System(); // get the 'player' entity (defaulting to command user, otherwise uses a uid) EntityUid? playerEntity = null; + if (!int.TryParse(args[0], out var intPlayerUid)) { if (args[0] == "self" && shell.Player?.AttachedEntity != null) @@ -37,10 +39,6 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } } - else - { - entityManager.EntityExists(new EntityUid(intPlayerUid)); - } // gets the target entity if (!int.TryParse(args[1], out var intUid)) @@ -55,14 +53,15 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var target = new EntityUid(intUid); - if (!entityManager.EntityExists(target)) + var targetNet = new NetEntity(intUid); + + if (!_entManager.TryGetEntity(targetNet, out var target)) { shell.WriteError(Loc.GetString("list-verbs-command-invalid-target-entity")); return; } - var verbs = verbSystem.GetLocalVerbs(target, playerEntity.Value, Verb.VerbTypes); + var verbs = verbSystem.GetLocalVerbs(target.Value, playerEntity.Value, Verb.VerbTypes); foreach (var verb in verbs) { diff --git a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs index 9200928d662..343826c7aec 100644 --- a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs +++ b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs @@ -180,7 +180,9 @@ private void OnPortDisconnected(EntityUid uid, AnalysisConsoleComponent componen component.AnalyzerEntity = null; } - UpdateUserInterface(uid, component); + // TODO: Yeah this comp relies upon event ordering so we get this for now. + if (!TerminatingOrDeleted(uid)) + UpdateUserInterface(uid, component); } private void UpdateUserInterface(EntityUid uid, AnalysisConsoleComponent? component = null) diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index e6f937236df..ab4670b9056 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -204,7 +204,7 @@ private void EnterNode(EntityUid uid, ref ArtifactNode node, ArtifactComponent? var temp = (object) comp; _serialization.CopyTo(entry.Component, ref temp); - EntityManager.AddComponent(uid, (Component) temp!, true); + EntityManager.AddComponent(uid, (Component) temp!); } node.Discovered = true; @@ -238,7 +238,7 @@ private void ExitNode(EntityUid uid, ArtifactComponent? component = null) comp.Owner = uid; var temp = (object) comp; _serialization.CopyTo(entry, ref temp); - EntityManager.AddComponent(uid, (Component) temp!, true); + EntityManager.AddComponent(uid, (Component) temp!); continue; } diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index 48413ac0018..e3678d1459f 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -109,7 +109,7 @@ public void DoAnomalyPulse(EntityUid uid, AnomalyComponent? component = null) var pulse = EnsureComp(uid); pulse.EndTime = Timing.CurTime + pulse.PulseDuration; Appearance.SetData(uid, AnomalyVisuals.IsPulsing, true); - + var ev = new AnomalyPulseEvent(uid, component.Stability, component.Severity); RaiseLocalEvent(uid, ref ev, true); } diff --git a/Content.Shared/Blocking/BlockingSystem.User.cs b/Content.Shared/Blocking/BlockingSystem.User.cs index bfefaf2b92d..237cdfa488d 100644 --- a/Content.Shared/Blocking/BlockingSystem.User.cs +++ b/Content.Shared/Blocking/BlockingSystem.User.cs @@ -1,5 +1,4 @@ using Content.Shared.Damage; -using Content.Shared.Damage.Prototypes; using Robust.Shared.Audio; using Robust.Shared.Containers; diff --git a/Content.Shared/Chasm/ChasmSystem.cs b/Content.Shared/Chasm/ChasmSystem.cs index 7353bd0e9c7..c63691c3f9d 100644 --- a/Content.Shared/Chasm/ChasmSystem.cs +++ b/Content.Shared/Chasm/ChasmSystem.cs @@ -1,9 +1,7 @@ using Content.Shared.ActionBlocker; -using Content.Shared.Buckle.Components; using Content.Shared.Movement.Events; using Content.Shared.StepTrigger.Systems; using Robust.Shared.Network; -using Robust.Shared.Physics.Components; using Robust.Shared.Timing; namespace Content.Shared.Chasm; diff --git a/Content.Shared/Climbing/Systems/ClimbSystem.cs b/Content.Shared/Climbing/Systems/ClimbSystem.cs index f065d19dd30..50ae6fb56c8 100644 --- a/Content.Shared/Climbing/Systems/ClimbSystem.cs +++ b/Content.Shared/Climbing/Systems/ClimbSystem.cs @@ -1,4 +1,3 @@ -using System.Numerics; using Content.Shared.ActionBlocker; using Content.Shared.Body.Components; using Content.Shared.Body.Part; @@ -13,7 +12,6 @@ using Content.Shared.IdentityManagement; using Content.Shared.Interaction; using Content.Shared.Movement.Events; -using Content.Shared.Movement.Systems; using Content.Shared.Physics; using Content.Shared.Popups; using Content.Shared.Stunnable; diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs index 9194a8208e3..789ff37dcf6 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs @@ -110,7 +110,7 @@ public void AddItemSlot(EntityUid uid, string id, ItemSlot slot, ItemSlotsCompon /// public void RemoveItemSlot(EntityUid uid, ItemSlot slot, ItemSlotsComponent? itemSlots = null) { - if (Terminating(uid) || slot.ContainerSlot == null) + if (TerminatingOrDeleted(uid) || slot.ContainerSlot == null) return; slot.ContainerSlot.Shutdown(); diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index 5dbe62aa6ae..f47daf5ee2a 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -3,7 +3,6 @@ using Content.Shared.Administration.Components; using Content.Shared.Administration.Logs; using Content.Shared.Alert; -using Content.Shared.Atmos.Piping.Unary.Components; using Content.Shared.Buckle.Components; using Content.Shared.Cuffs.Components; using Content.Shared.Damage; diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 7b6ccaf0d48..6f373db115f 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -14,7 +14,6 @@ using Robust.Shared.Containers; using Robust.Shared.Network; using Robust.Shared.Player; -using Robust.Shared.Prototypes; using Robust.Shared.Timing; namespace Content.Shared.Inventory; @@ -24,9 +23,9 @@ public abstract partial class InventorySystem [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; - [Dependency] private readonly SharedItemSystem _item = default!; [Dependency] private readonly SharedContainerSystem _containerSystem = default!; [Dependency] private readonly SharedHandsSystem _handsSystem = default!; + [Dependency] private readonly SharedItemSystem _item = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly INetManager _netMan = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; diff --git a/Content.Shared/Lock/LockSystem.cs b/Content.Shared/Lock/LockSystem.cs index 97baa28bf90..71a9f7d1c84 100644 --- a/Content.Shared/Lock/LockSystem.cs +++ b/Content.Shared/Lock/LockSystem.cs @@ -106,7 +106,7 @@ public bool TryLock(EntityUid uid, EntityUid user, LockComponent? lockComp = nul lockComp.Locked = true; _appearanceSystem.SetData(uid, StorageVisuals.Locked, true); - Dirty(lockComp); + Dirty(uid, lockComp); var ev = new LockToggledEvent(true); RaiseLocalEvent(uid, ref ev, true); @@ -134,7 +134,7 @@ public void Unlock(EntityUid uid, EntityUid? user, LockComponent? lockComp = nul lockComp.Locked = false; _appearanceSystem.SetData(uid, StorageVisuals.Locked, false); - Dirty(lockComp); + Dirty(uid, lockComp); var ev = new LockToggledEvent(false); RaiseLocalEvent(uid, ref ev, true); diff --git a/Content.Shared/Mech/Equipment/Systems/MechSoundboardSystem.cs b/Content.Shared/Mech/Equipment/Systems/MechSoundboardSystem.cs index b4254fe0798..c58a09a4f40 100644 --- a/Content.Shared/Mech/Equipment/Systems/MechSoundboardSystem.cs +++ b/Content.Shared/Mech/Equipment/Systems/MechSoundboardSystem.cs @@ -1,8 +1,5 @@ -using Content.Shared.Mech; using Content.Shared.Mech.Equipment.Components; -using Content.Shared.Mech.Equipment.Systems; using Content.Shared.Timing; -using Robust.Shared.Audio; using System.Linq; namespace Content.Shared.Mech.Equipment.Systems; diff --git a/Content.Shared/RCD/Systems/RCDSystem.cs b/Content.Shared/RCD/Systems/RCDSystem.cs index ccc47a2fdeb..cfdab20fb84 100644 --- a/Content.Shared/RCD/Systems/RCDSystem.cs +++ b/Content.Shared/RCD/Systems/RCDSystem.cs @@ -12,7 +12,6 @@ using Content.Shared.RCD.Components; using Content.Shared.Tag; using Content.Shared.Tiles; -using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Network; diff --git a/Content.Shared/Radio/EntitySystems/EncryptionKeySystem.cs b/Content.Shared/Radio/EntitySystems/EncryptionKeySystem.cs index eb97fe41133..2f1b3ac4613 100644 --- a/Content.Shared/Radio/EntitySystems/EncryptionKeySystem.cs +++ b/Content.Shared/Radio/EntitySystems/EncryptionKeySystem.cs @@ -6,7 +6,6 @@ using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Radio.Components; -using Content.Shared.Tools; using Content.Shared.Tools.Components; using Content.Shared.Wires; using Robust.Shared.Containers; diff --git a/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs index f84a65398dc..bbf4b42da43 100644 --- a/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs @@ -20,9 +20,7 @@ using Robust.Shared.Map; using Robust.Shared.Network; using Robust.Shared.Physics; -using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; -using Robust.Shared.Prototypes; using Robust.Shared.Timing; using Robust.Shared.Utility; diff --git a/Content.Shared/Stunnable/SharedStunSystem.cs b/Content.Shared/Stunnable/SharedStunSystem.cs index 4875f2f68f8..289dcabd1d7 100644 --- a/Content.Shared/Stunnable/SharedStunSystem.cs +++ b/Content.Shared/Stunnable/SharedStunSystem.cs @@ -1,7 +1,5 @@ using Content.Shared.ActionBlocker; using Content.Shared.Administration.Logs; -using Content.Shared.Audio; -using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; using Content.Shared.Inventory.Events; @@ -11,15 +9,11 @@ using Content.Shared.Hands; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; -using Content.Shared.Mobs.Systems; using Content.Shared.Movement.Events; using Content.Shared.Movement.Systems; using Content.Shared.Standing; using Content.Shared.StatusEffect; using Content.Shared.Throwing; -using Robust.Shared.Audio; -using Robust.Shared.GameStates; -using Robust.Shared.Player; namespace Content.Shared.Stunnable; diff --git a/Content.Shared/Weapons/Ranged/Systems/RechargeBasicEntityAmmoSystem.cs b/Content.Shared/Weapons/Ranged/Systems/RechargeBasicEntityAmmoSystem.cs index ded4ce34a23..13e07b922fa 100644 --- a/Content.Shared/Weapons/Ranged/Systems/RechargeBasicEntityAmmoSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/RechargeBasicEntityAmmoSystem.cs @@ -1,9 +1,7 @@ using Content.Shared.Examine; using Content.Shared.Weapons.Ranged.Components; using Robust.Shared.Network; -using Robust.Shared.Player; using Robust.Shared.Timing; -using Robust.Shared.Utility; namespace Content.Shared.Weapons.Ranged.Systems; diff --git a/SpaceStation14.sln b/SpaceStation14.sln index 10c4ea1c2c4..7c8c703fe3f 100644 --- a/SpaceStation14.sln +++ b/SpaceStation14.sln @@ -126,6 +126,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.Serialization.Generator", "RobustToolbox\Robust.Serialization.Generator\Robust.Serialization.Generator.csproj", "{6FBF108E-5CB5-47DE-8D7E-B496ABA9E3E2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Content.PatreonParser", "Content.PatreonParser\Content.PatreonParser.csproj", "{D97D8258-D915-4D1D-B1E3-1A8D00CF9EB5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arch", "RobustToolbox\Arch\Arch.csproj", "{FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arch.SourceGen", "RobustToolbox\Arch\Arch\src\Arch.SourceGen\Arch.SourceGen.csproj", "{6EA70D29-EE1B-431B-A396-294CBD52D2D4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -438,6 +441,22 @@ Global {D97D8258-D915-4D1D-B1E3-1A8D00CF9EB5}.DebugOpt|Any CPU.Build.0 = Debug|Any CPU {D97D8258-D915-4D1D-B1E3-1A8D00CF9EB5}.Tools|Any CPU.ActiveCfg = Debug|Any CPU {D97D8258-D915-4D1D-B1E3-1A8D00CF9EB5}.Tools|Any CPU.Build.0 = Debug|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.Release|Any CPU.Build.0 = Release|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.DebugOpt|Any CPU.ActiveCfg = Debug|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.DebugOpt|Any CPU.Build.0 = Debug|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.Tools|Any CPU.ActiveCfg = Debug|Any CPU + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE}.Tools|Any CPU.Build.0 = Debug|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.Release|Any CPU.Build.0 = Release|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.DebugOpt|Any CPU.ActiveCfg = Debug|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.DebugOpt|Any CPU.Build.0 = Debug|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.Tools|Any CPU.ActiveCfg = Debug|Any CPU + {6EA70D29-EE1B-431B-A396-294CBD52D2D4}.Tools|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -469,6 +488,8 @@ Global {A965CB3B-FD31-44AF-8872-85ABA436098D} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} {07CA34A1-1D37-4771-A2E3-495A1044AE0B} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} {6FBF108E-5CB5-47DE-8D7E-B496ABA9E3E2} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} + {FCF7C99C-EC56-4DF4-A101-8C42E8EDB6EE} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} + {6EA70D29-EE1B-431B-A396-294CBD52D2D4} = {83B4CBBA-547A-42F0-A7CD-8A67D93196CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AA37ED9F-F8D6-468E-A101-658AD605B09A} From 4239545655b5aef993f73898824ae43ea0178e1d Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 23 Nov 2023 15:38:42 +1100 Subject: [PATCH 27/35] Update submodule to 181.0.0 (#21848) --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index d9b0f3a227e..bd73f1c05a9 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit d9b0f3a227edfd7dee29b883fa79223a01a94f09 +Subproject commit bd73f1c05a967d248a71d76b9362e1f3b61431e5 From fc92bb51c506d1b3a72ebccc7ee18ca7581cf46e Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:30:44 +1100 Subject: [PATCH 28/35] Update submodule to 181.0.1 (#21851) --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index bd73f1c05a9..95649a2dd07 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit bd73f1c05a967d248a71d76b9362e1f3b61431e5 +Subproject commit 95649a2dd079d45b484289af850d9df42f2312db From 76fe97b7c2b975bed7320ed6fee8e488a2ad2aca Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 24 Nov 2023 00:19:30 +1100 Subject: [PATCH 29/35] Use GetHashCode for client construction (#21857) --- Content.Client/Construction/ConstructionSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Client/Construction/ConstructionSystem.cs b/Content.Client/Construction/ConstructionSystem.cs index 2ca0f3d706d..d0a14860f11 100644 --- a/Content.Client/Construction/ConstructionSystem.cs +++ b/Content.Client/Construction/ConstructionSystem.cs @@ -198,7 +198,7 @@ public bool TrySpawnGhost( var comp = EntityManager.GetComponent(ghost.Value); comp.Prototype = prototype; EntityManager.GetComponent(ghost.Value).LocalRotation = dir.ToAngle(); - _ghosts.Add(ghost.Value.Id, ghost.Value); + _ghosts.Add(ghost.GetHashCode(), ghost.Value); var sprite = EntityManager.GetComponent(ghost.Value); sprite.Color = new Color(48, 255, 48, 128); @@ -265,7 +265,7 @@ public void TryStartConstruction(EntityUid ghostId, ConstructionGhostComponent? } var transform = EntityManager.GetComponent(ghostId); - var msg = new TryStartStructureConstructionMessage(GetNetCoordinates(transform.Coordinates), ghostComp.Prototype.ID, transform.LocalRotation, ghostId.Id); + var msg = new TryStartStructureConstructionMessage(GetNetCoordinates(transform.Coordinates), ghostComp.Prototype.ID, transform.LocalRotation, ghostId.GetHashCode()); RaiseNetworkEvent(msg); } From 9abff95a5495ec4ecdf559dad652561fded6f862 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 24 Nov 2023 00:19:41 +1100 Subject: [PATCH 30/35] Update submodule to 181.0.2 (#21856) --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index 95649a2dd07..aaa446254c5 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 95649a2dd079d45b484289af850d9df42f2312db +Subproject commit aaa446254c5a00549077547eeaebfccd1b597041 From ab907ebef4c6fc08052de52a27cb0708b202bd90 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 24 Nov 2023 00:24:53 +1100 Subject: [PATCH 31/35] Update submodule to 182.0.0 (#21859) --- RobustToolbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RobustToolbox b/RobustToolbox index aaa446254c5..9f57b705d7a 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit aaa446254c5a00549077547eeaebfccd1b597041 +Subproject commit 9f57b705d7a7a32820d2e9ebb623aa90feed107e From 0c4e2650dd0b5b75e419e2f987f3450359c3dad5 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 24 Nov 2023 00:35:49 +1100 Subject: [PATCH 32/35] Minor decal change (#21860) --- Content.Client/Decals/Overlays/DecalOverlay.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Content.Client/Decals/Overlays/DecalOverlay.cs b/Content.Client/Decals/Overlays/DecalOverlay.cs index f2c11e2a682..6fcd48264ba 100644 --- a/Content.Client/Decals/Overlays/DecalOverlay.cs +++ b/Content.Client/Decals/Overlays/DecalOverlay.cs @@ -30,21 +30,22 @@ protected override void Draw(in OverlayDrawArgs args) { // Shouldn't need to clear cached textures unless the prototypes get reloaded. var handle = args.WorldHandle; - var xformQuery = _entManager.GetEntityQuery(); var xformSystem = _entManager.System(); var eyeAngle = args.Viewport.Eye?.Rotation ?? Angle.Zero; - foreach (var (decalGrid, xform) in _entManager.EntityQuery(true)) + var gridQuery = _entManager.AllEntityQueryEnumerator(); + + while (gridQuery.MoveNext(out var decalGrid, out var xform)) { + if (xform.MapID != args.MapId) + continue; + var zIndexDictionary = decalGrid.DecalRenderIndex; if (zIndexDictionary.Count == 0) continue; - if (xform.MapID != args.MapId) - continue; - - var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform, xformQuery); + var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform); handle.SetTransform(worldMatrix); From 31bdafafb186ad28ac1fc72dab8b2035769ed910 Mon Sep 17 00:00:00 2001 From: Zack Backmen Date: Thu, 23 Nov 2023 17:44:38 +0300 Subject: [PATCH 33/35] upd --- .../Commands/AddBankAcountCommand.cs | 36 +++++++++++++------ .../Commands/FakeFingerprint.cs | 32 ++++++++++++++--- .../Commands/LoadCharacterCommand.cs | 13 +++++-- .../Backmen/Economy/EconomySystem.cs | 3 ++ .../Backmen/GhostTheme/GhostThemeSystem.cs | 2 +- .../Commands/PurchaseShuttleCommand.cs | 10 +++--- .../Backmen/SpecForces/SpecForcesSystem.cs | 6 ++-- Content.Server/NPC/Commands/AddNPCCommand.cs | 2 +- Content.Shared/CCVar/CCVars.cs | 2 ++ 9 files changed, 78 insertions(+), 28 deletions(-) diff --git a/Content.Server/Backmen/Administration/Commands/AddBankAcountCommand.cs b/Content.Server/Backmen/Administration/Commands/AddBankAcountCommand.cs index 43cb68c664d..7af26d17701 100644 --- a/Content.Server/Backmen/Administration/Commands/AddBankAcountCommand.cs +++ b/Content.Server/Backmen/Administration/Commands/AddBankAcountCommand.cs @@ -6,7 +6,6 @@ using Content.Shared.Backmen.Economy; using Content.Shared.Database; using Content.Shared.FixedPoint; -using Robust.Server.GameObjects; using Robust.Shared.Console; using Robust.Shared.Player; @@ -16,7 +15,7 @@ namespace Content.Server.Backmen.Administration.Commands; public sealed class AddBankAcсountCommand : IConsoleCommand { [Dependency] private readonly IAdminLogManager _adminLogger = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; + [Dependency] private readonly IEntityManager _entManager = default!; public string Command { get; } = "addbankacсount"; @@ -30,14 +29,28 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - if (!EntityUid.TryParse(args[0], out var targetUid) || !targetUid.Valid || - !_entityManager.HasComponent(targetUid)) + if (!int.TryParse(args[0], out var entInt)) + { + shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number")); + return; + } + + var targetNet = new NetEntity(entInt); + + if (!_entManager.TryGetEntity(targetNet, out var target)) + { + shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); + return; + } + + if (!targetNet.Valid || + !_entManager.HasComponent(target)) { shell.WriteError("Игрок не найден!"); return; } - var bankManagerSystem = _entityManager.System(); + var bankManagerSystem = _entManager.System(); Entity? account = null; @@ -47,8 +60,8 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var economySystem = _entityManager.System(); - var playerBank = economySystem.AddPlayerBank(targetUid, account, true); + var economySystem = _entManager.System(); + var playerBank = economySystem.AddPlayerBank(target.Value, account, true); if (playerBank == null) { shell.WriteError("Ошибка! Не возможно создать или привязать банковский аккаунт!"); @@ -64,18 +77,19 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) } _adminLogger.Add(LogType.AdminMessage, LogImpact.Extreme, - $"Admin {(shell.Player != null ? shell.Player.Name : "An administrator")} AddBankAcсount {_entityManager.ToPrettyString(targetUid)} #{account!.Value.Comp.AccountNumber} balance: {account.Value.Comp.Balance}"); + $"Admin {(shell.Player != null ? shell.Player.Name : "An administrator")} AddBankAcсount {_entManager.ToPrettyString(target)} #{account!.Value.Comp.AccountNumber} balance: {account.Value.Comp.Balance}"); } public CompletionResult GetCompletion(IConsoleShell shell, string[] args) { return args.Length switch { - 1 => CompletionResult.FromHintOptions(CompletionHelper.NetEntities(args[0], _entityManager), + 1 => CompletionResult.FromHintOptions(CompletionHelper.NetEntities(args[0], _entManager), "Персонаж с кпк"), 2 => CompletionResult.FromHintOptions( - _entityManager.System().ActiveBankAccounts - .Select(x => new CompletionOption(x.Value.Comp.AccountNumber, x.Value.Comp.AccountName+$" ({x.Value.Owner})")) + _entManager.System().ActiveBankAccounts + .Select(x => new CompletionOption(x.Value.Comp.AccountNumber, + x.Value.Comp.AccountName + $" ({x.Value.Owner})")) , "Аккаунт №"), _ => CompletionResult.Empty }; diff --git a/Content.Server/Backmen/Administration/Commands/FakeFingerprint.cs b/Content.Server/Backmen/Administration/Commands/FakeFingerprint.cs index e67a1304b65..9b9c1f5003e 100644 --- a/Content.Server/Backmen/Administration/Commands/FakeFingerprint.cs +++ b/Content.Server/Backmen/Administration/Commands/FakeFingerprint.cs @@ -21,26 +21,48 @@ public sealed class FakeFingerprint : IConsoleCommand public void Execute(IConsoleShell shell, string argStr, string[] args) { - if(args.Length != 2){ + if(args.Length != 2) + { shell.WriteLine(Loc.GetString("shell-wrong-arguments-number")); return; } - if(!EntityUid.TryParse(args[0], out var playerUid)){ + + if (!int.TryParse(args[0], out var playerInt)) + { + shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number")); + return; + } + + var playerNet = new NetEntity(playerInt); + + if (!_entityManager.TryGetEntity(playerNet, out var playerUid)) + { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; } - if(!EntityUid.TryParse(args[1], out var item)){ + + if (!int.TryParse(args[1], out var itemInt)) + { + shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number")); + return; + } + + var itemNet = new NetEntity(itemInt); + + if (!_entityManager.TryGetEntity(itemNet, out var item)) + { shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); return; } - var f = _entityManager.EnsureComponent(item); + + var f = _entityManager.EnsureComponent(item.Value); if (_entityManager.TryGetComponent(playerUid, out var dna)) { f.DNAs.Add(dna.DNA); } var inventory = _entityManager.System(); - if (inventory.TryGetSlotEntity(playerUid, "gloves", out var gloves)) + if (inventory.TryGetSlotEntity(playerUid.Value, "gloves", out var gloves)) { if (_entityManager.TryGetComponent(gloves, out var fiber) && !string.IsNullOrEmpty(fiber.FiberMaterial)) f.Fibers.Add(string.IsNullOrEmpty(fiber.FiberColor) ? Loc.GetString("forensic-fibers", ("material", fiber.FiberMaterial)) : Loc.GetString("forensic-fibers-colored", ("color", fiber.FiberColor), ("material", fiber.FiberMaterial))); diff --git a/Content.Server/Backmen/Administration/Commands/LoadCharacterCommand.cs b/Content.Server/Backmen/Administration/Commands/LoadCharacterCommand.cs index 1d0368a71b4..58a74edd454 100644 --- a/Content.Server/Backmen/Administration/Commands/LoadCharacterCommand.cs +++ b/Content.Server/Backmen/Administration/Commands/LoadCharacterCommand.cs @@ -49,13 +49,22 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) if (args.Length >= 1) { - if (!EntityUid.TryParse(args.First(), out var uid)) + + if (!int.TryParse(args.First(), out var entInt)) { shell.WriteLine(Loc.GetString("shell-entity-uid-must-be-number")); return; } - target = uid; + var targetNet = new NetEntity(entInt); + + if (!_entityManager.TryGetEntity(targetNet, out var uid)) + { + shell.WriteLine(Loc.GetString("shell-invalid-entity-id")); + return; + } + + target = uid.Value; } else { diff --git a/Content.Server/Backmen/Economy/EconomySystem.cs b/Content.Server/Backmen/Economy/EconomySystem.cs index fd83cc745c9..8dc80c30e76 100644 --- a/Content.Server/Backmen/Economy/EconomySystem.cs +++ b/Content.Server/Backmen/Economy/EconomySystem.cs @@ -28,9 +28,12 @@ using Content.Shared.Verbs; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.GameObjects; +using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Player; using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Utility; namespace Content.Server.Backmen.Economy; diff --git a/Content.Server/Backmen/GhostTheme/GhostThemeSystem.cs b/Content.Server/Backmen/GhostTheme/GhostThemeSystem.cs index aaaee1d1bb7..6b0cfa27355 100644 --- a/Content.Server/Backmen/GhostTheme/GhostThemeSystem.cs +++ b/Content.Server/Backmen/GhostTheme/GhostThemeSystem.cs @@ -37,7 +37,7 @@ private void OnPlayerAttached(EntityUid uid, GhostComponent component, PlayerAtt { var comp = (Component) _serialization.CreateCopy(entry.Component, notNullableOverride: true); comp.Owner = uid; - EntityManager.AddComponent(uid, comp, true); + EntityManager.AddComponent(uid, comp); } EnsureComp(uid).GhostTheme = ghostTheme; diff --git a/Content.Server/Backmen/Shipyard/Commands/PurchaseShuttleCommand.cs b/Content.Server/Backmen/Shipyard/Commands/PurchaseShuttleCommand.cs index 0212199da59..c5f1e84ea8d 100644 --- a/Content.Server/Backmen/Shipyard/Commands/PurchaseShuttleCommand.cs +++ b/Content.Server/Backmen/Shipyard/Commands/PurchaseShuttleCommand.cs @@ -14,7 +14,7 @@ namespace Content.Server.Backmen.Shipyard.Commands; [AdminCommand(AdminFlags.Fun)] public sealed class PurchaseShuttleCommand : IConsoleCommand { - [Dependency] private readonly IEntitySystemManager _entityManager = default!; + [Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; public string Command => "purchaseshuttle"; @@ -40,10 +40,10 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - var shuttlePath = args[1]; - var system = _entityManager.GetEntitySystem(); - var station = new EntityUid(stationId); - system.TryPurchaseShuttle(station, vessel, out _); + var system = _entityManager.System(); + var stationNet = new NetEntity(stationId); + if(stationNet.Valid && _entityManager.TryGetEntity(stationNet, out var station)) + system.TryPurchaseShuttle(station.Value, vessel, out _); } public CompletionResult GetCompletion(IConsoleShell shell, string[] args) diff --git a/Content.Server/Backmen/SpecForces/SpecForcesSystem.cs b/Content.Server/Backmen/SpecForces/SpecForcesSystem.cs index e346e580630..a6e6b7470e2 100644 --- a/Content.Server/Backmen/SpecForces/SpecForcesSystem.cs +++ b/Content.Server/Backmen/SpecForces/SpecForcesSystem.cs @@ -69,7 +69,7 @@ private void OnMapInit(EntityUid uid, SpecForceComponent component, MapInitEvent { var comp = (Component) _serialization.CreateCopy(entry.Component, notNullableOverride: true); comp.Owner = uid; - EntityManager.AddComponent(uid, comp, true); + EntityManager.AddComponent(uid, comp); } } } @@ -145,7 +145,7 @@ private EntityUid SpawnEntity(string? protoName, EntityCoordinates coordinates) { var comp = (Component) _serialization.CreateCopy(tplSpecForceComponent, notNullableOverride: true); comp.Owner = uid; - EntityManager.AddComponent(uid, comp, true); + EntityManager.AddComponent(uid, comp); } EnsureComp(uid); @@ -153,7 +153,7 @@ private EntityUid SpawnEntity(string? protoName, EntityCoordinates coordinates) { var comp = (Component) _serialization.CreateCopy(tplGhostRoleComponent, notNullableOverride: true); comp.Owner = uid; - EntityManager.AddComponent(uid, comp, true); + EntityManager.AddComponent(uid, comp); } return uid; diff --git a/Content.Server/NPC/Commands/AddNPCCommand.cs b/Content.Server/NPC/Commands/AddNPCCommand.cs index f42ff37109b..c0c8908a422 100644 --- a/Content.Server/NPC/Commands/AddNPCCommand.cs +++ b/Content.Server/NPC/Commands/AddNPCCommand.cs @@ -43,7 +43,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) { Task = args[1] }; - _entities.System().SetBlackboard(entId,"Owner",entId); // backmen + _entities.System().SetBlackboard(entId.Value,"Owner",entId); // backmen shell.WriteLine("AI component added."); } diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 37f8b17d7a1..a6d0f73703b 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -1829,6 +1829,8 @@ public static readonly CVarDef /// public static readonly CVarDef NewsContentLimit = CVarDef.Create("news.content_limit", 2048, CVar.SERVER | CVar.REPLICATED); + + /* * Miscellaneous */ From 9306846d88653d75b4c2e13179cfea2a467db456 Mon Sep 17 00:00:00 2001 From: Zack Backmen Date: Thu, 23 Nov 2023 19:48:54 +0300 Subject: [PATCH 34/35] fix? --- .../Backmen/Shipwrecked/NPCZombieSystem.cs | 19 +++++++++++++------ .../Body/Systems/BloodstreamSystem.cs | 3 +++ .../Humanoid/Systems/RandomHumanoidSystem.cs | 9 +++++++++ .../Body/Systems/SharedBodySystem.Body.cs | 2 +- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Content.Server/Backmen/Shipwrecked/NPCZombieSystem.cs b/Content.Server/Backmen/Shipwrecked/NPCZombieSystem.cs index 928918dc243..166a0621672 100644 --- a/Content.Server/Backmen/Shipwrecked/NPCZombieSystem.cs +++ b/Content.Server/Backmen/Shipwrecked/NPCZombieSystem.cs @@ -1,8 +1,10 @@ using Content.Server.Backmen.Shipwrecked.Components; using Content.Server.Explosion.EntitySystems; +using Content.Server.Humanoid.Systems; using Content.Server.NPC; using Content.Server.NPC.HTN; using Content.Server.NPC.Systems; +using Content.Server.RandomMetadata; using Content.Server.Zombies; using Content.Shared.Damage; using Content.Shared.Humanoid; @@ -31,8 +33,8 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnSpawnZombifiedStartup); - SubscribeLocalEvent(OnZombieSurpriseInit); + SubscribeLocalEvent(OnSpawnZombifiedStartup, after: new []{ typeof(RandomMetadataSystem), typeof(RandomHumanoidSystem) }); + SubscribeLocalEvent(OnZombieSurpriseInit, after: new []{ typeof(RandomMetadataSystem), typeof(RandomHumanoidSystem) }); SubscribeLocalEvent(OnZombieWakeupTrigger); SubscribeLocalEvent(OnZombifyEntity); } @@ -40,9 +42,8 @@ public override void Initialize() private void OnZombifyEntity(NpcZombieMakeEvent ev) { if (TerminatingOrDeleted(ev.Target)) - { return; - } + _zombieSystem.ZombifyEntity(ev.Target); @@ -101,8 +102,11 @@ private void OnZombifyEntity(NpcZombieMakeEvent ev) Dirty(ev.Target,z); } - private void OnSpawnZombifiedStartup(EntityUid uid, ZombifiedOnSpawnComponent component, ComponentAdd args) + private void OnSpawnZombifiedStartup(EntityUid uid, ZombifiedOnSpawnComponent component, MapInitEvent args) { + if (TerminatingOrDeleted(uid)) + return; + RemCompDeferred(uid); QueueLocalEvent(new NpcZombieMakeEvent { @@ -112,8 +116,11 @@ private void OnSpawnZombifiedStartup(EntityUid uid, ZombifiedOnSpawnComponent co } [ValidatePrototypeId] private const string ZombieSurpriseDetector = "ZombieSurpriseDetector"; - private void OnZombieSurpriseInit(EntityUid uid, ZombieSurpriseComponent component, ComponentInit args) + private void OnZombieSurpriseInit(EntityUid uid, ZombieSurpriseComponent component, MapInitEvent args) { + if (TerminatingOrDeleted(uid)) + return; + // Spawn a separate collider attached to the entity. var trigger = Spawn(ZombieSurpriseDetector, Transform(uid).Coordinates); Comp(trigger).ToZombify = uid; diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index ddc32ab0152..b681f16ee54 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -91,6 +91,9 @@ public override void Update(float frameTime) bloodstream.AccumulatedFrametime -= bloodstream.UpdateInterval; + if (bloodstream.BloodSolution == null) + continue; + // Adds blood to their blood level if it is below the maximum; Blood regeneration. Must be alive. if (bloodstream.BloodSolution.Volume < bloodstream.BloodSolution.MaxVolume && !_mobStateSystem.IsDead(uid)) { diff --git a/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs b/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs index f3607f74dc1..14372d91dfb 100644 --- a/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs +++ b/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs @@ -52,6 +52,15 @@ public EntityUid SpawnRandomHumanoid(string prototypeId, EntityCoordinates coord { var comp = (Component) _serialization.CreateCopy(entry.Component, notNullableOverride: true); comp.Owner = humanoid; // This .owner must survive for now. + + // start-backmen: fix + var compType = comp.GetType(); + if (EntityManager.HasComponent(humanoid, compType)) + { + EntityManager.RemoveComponent(humanoid, compType); + } + // end-backmen: fix + EntityManager.AddComponent(humanoid, comp); } } diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs index 74a202386ec..bb31c0380c0 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs @@ -223,7 +223,7 @@ public IEnumerable GetBodyContainers(EntityUid id, BodyComponent? { if (id == null || !Resolve(id.Value, ref body, false) || - body.RootContainer.ContainedEntity == null || + body.RootContainer?.ContainedEntity == null || !Resolve(body.RootContainer.ContainedEntity.Value, ref rootPart)) { yield break; From 86227b2dcfe8bbea9f0566aa41d8ee59119c752b Mon Sep 17 00:00:00 2001 From: Zack Backmen Date: Thu, 23 Nov 2023 20:00:39 +0300 Subject: [PATCH 35/35] fix borgs --- Resources/Prototypes/Traits/disabilities.yml | 16 ++++++++-------- Resources/Prototypes/Traits/neutral.yml | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Resources/Prototypes/Traits/disabilities.yml b/Resources/Prototypes/Traits/disabilities.yml index 846e2778dda..826a5db8516 100644 --- a/Resources/Prototypes/Traits/disabilities.yml +++ b/Resources/Prototypes/Traits/disabilities.yml @@ -10,7 +10,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: PermanentBlindness @@ -22,7 +22,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: Narcolepsy timeBetweenIncidents: 300, 600 @@ -35,7 +35,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: Pacified @@ -47,7 +47,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: Paracusia minTimeBetweenIncidents: 0.1 @@ -64,7 +64,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: Muted @@ -76,7 +76,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: Uncloneable @@ -89,7 +89,7 @@ - Felinid - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: WheelchairBound - type: LegsParalyzed @@ -102,6 +102,6 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: FrontalLisp diff --git a/Resources/Prototypes/Traits/neutral.yml b/Resources/Prototypes/Traits/neutral.yml index df2e315a15d..96ad3ecc063 100644 --- a/Resources/Prototypes/Traits/neutral.yml +++ b/Resources/Prototypes/Traits/neutral.yml @@ -6,7 +6,7 @@ components: - BSSDrone # backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: PirateAccent @@ -18,7 +18,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: ArchaicAccent @@ -30,7 +30,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis components: - type: Accentless removes: @@ -46,7 +46,7 @@ components: - BSSDrone #backmen: bssdrone - StationAI # backmen: AI - - Borg + - BorgChassis whitelist: components: - Felinid