From 678ef2f8bdd022d57c04db59bce5dcaa4b31c5d4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 22 Nov 2023 04:31:11 +0100 Subject: [PATCH] [MIRROR] Fixes fullupgrade chem dispenser not spawning with all their chemicals [MDB IGNORE] (#25180) * Fixes fullupgrade chem dispenser not spawning with all their chemicals (#79858) ## About The Pull Request Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/24911 Tin. They were spawning with only the emagged reagents. This was not an issue for the drink dispensers because they call the parent after adjusting the reagent lists. It needs to be done that way so that `RefreshParts()` gets called after adjusting the lists.
Before/after ![dreamseeker_H0sicTrScp](https://github.com/tgstation/tgstation/assets/13398309/649ab998-8308-4efa-be25-f4942ecab175) ![image](https://github.com/tgstation/tgstation/assets/13398309/9709dfa3-bf64-40f8-ab24-8508255d17ae)
## Why It's Good For The Game Fixes a bug ## Changelog :cl: fix: fullupgrade chem dispensers will now spawn with all their chems /:cl: * Fixes fullupgrade chem dispenser not spawning with all their chemicals --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/modules/reagents/chemistry/machinery/chem_dispenser.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index a4d31849cda..bc5b14614c6 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -136,7 +136,6 @@ //SKYRAT EDIT CHANGE END /obj/machinery/chem_dispenser/Initialize(mapload) - . = ..() if(dispensable_reagents != null && !dispensable_reagents.len) dispensable_reagents = default_dispensable_reagents if(dispensable_reagents) @@ -162,6 +161,8 @@ if(emagged_reagents) emagged_reagents = sort_list(emagged_reagents, GLOBAL_PROC_REF(cmp_reagents_asc)) + . = ..() // So that we call RefreshParts() after adjusting the lists + if(is_operational) begin_processing() update_appearance()