Skip to content

Commit

Permalink
[MIRROR] Fixes fullupgrade chem dispenser not spawning with all their…
Browse files Browse the repository at this point in the history
… chemicals [MDB IGNORE] (#25180) (#771)

* Fixes fullupgrade chem dispenser not spawning with all their chemicals (#79858)

## About The Pull Request

Fixes Skyrat-SS13/Skyrat-tg#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.

<details>
<summary>Before/after</summary>

![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)

</details>

## 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: SkyratBot <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2023
1 parent f8de576 commit 5c759f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/reagents/chemistry/machinery/chem_dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 5c759f1

Please sign in to comment.