Skip to content

Commit

Permalink
[MIRROR] Makes chemical reactions that need a certain container, but …
Browse files Browse the repository at this point in the history
…accept subtypes of that container, actually work again (#433)

* Makes chemical reactions that need a certain container, but accept subtypes of that container, actually work again (#80882)

## About The Pull Request

During I think a semi-recent chem refactor, the variable that lets
reactions accept subtypes of their required container was made
non-functional. This is due to a little logic error in the check for
reagent containers, as it checked for the exact path of container
regardless of what the variable said.
## Why It's Good For The Game

If a variable says it should do something, it should actually do that
thing instead of just nothing
## Changelog
:cl:
fix: The "required_container_accepts_subtypes" variable on chemical
reactions now actually works again
/:cl:

* Makes chemical reactions that need a certain container, but accept subtypes of that container, actually work again

* merge skew

---------

Co-authored-by: Paxilmaniac <[email protected]>
Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Giz <[email protected]>
  • Loading branch information
4 people authored and FFMirrorBot committed Jan 12, 2024
1 parent a860ef5 commit 6f01ac7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions code/modules/reagents/chemistry/holder/reactions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@

if(cached_my_atom)
if(reaction.required_container)
if(reaction.required_container_accepts_subtypes && !istype(cached_my_atom, reaction.required_container))
continue
if(reaction.required_container_accepts_subtypes)
if(!istype(cached_my_atom, reaction.required_container))
continue
else if(cached_my_atom.type != reaction.required_container)
continue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
new_brain.modular_persistence = old_brain.modular_persistence
old_brain.modular_persistence = null

new_brain.mob_insert(target, movement_flags = DELETE_IF_REPLACED)
new_brain.Insert(target, movement_flags = DELETE_IF_REPLACED)

// Prefs can be applied to mindless mobs, let's not try to move the non-existent mind back in!
if(!keep_me_safe)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
var/chosen_style = GLOB.robotic_styles_list[prefs.augment_limb_styles[slot]]
new_limb.set_icon_static(chosen_style)
new_limb.current_style = prefs.augment_limb_styles[slot]
new_limb.replace_limb(augmented)
new_limb.replace_limb(augmented, special = TRUE)
qdel(old_limb)

//HEADS
Expand Down
2 changes: 1 addition & 1 deletion modular_nova/modules/synths/code/bodyparts/brain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// The last time (in ticks) a message about brain damage was sent. Don't touch.
var/last_message_time = 0

/obj/item/organ/internal/brain/synth/mob_insert(mob/living/carbon/brain_owner, special = FALSE, movement_flags)
/obj/item/organ/internal/brain/synth/mob_insert(mob/living/carbon/brain_owner, special, movement_flags)
. = ..()

if(brain_owner.stat != DEAD || !ishuman(brain_owner))
Expand Down

0 comments on commit 6f01ac7

Please sign in to comment.