diff --git a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm index 38fb764a955..3559d7f69b3 100644 --- a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm @@ -1755,28 +1755,32 @@ quality = DRINK_GOOD taste_description = "bitter, creamy cacao" chemical_flags = REAGENT_CAN_BE_SYNTHESIZED - var/obj/item/shield/mighty_shield + var/datum/weakref/mighty_shield /datum/reagent/consumable/ethanol/alexander/on_mob_metabolize(mob/living/drinker) . = ..() if(ishuman(drinker)) var/mob/living/carbon/human/the_human = drinker for(var/obj/item/shield/the_shield in the_human.contents) - mighty_shield = the_shield - mighty_shield.block_chance += 10 + mighty_shield = WEAKREF(the_shield) + the_shield.block_chance += 10 to_chat(the_human, span_notice("[the_shield] appears polished, although you don't recall polishing it.")) + break /datum/reagent/consumable/ethanol/alexander/on_mob_life(mob/living/drinker, seconds_per_tick, times_fired) - if(mighty_shield && !(mighty_shield in drinker.contents)) //If you had a shield and lose it, you lose the reagent as well. Otherwise this is just a normal drink. + var/obj/item/shield/the_shield = mighty_shield?.resolve() + if(the_shield && !(the_shield in drinker.contents)) //If you had a shield and lose it, you lose the reagent as well. Otherwise this is just a normal drink. holder.remove_reagent(type, volume) return return ..() /datum/reagent/consumable/ethanol/alexander/on_mob_end_metabolize(mob/living/drinker) . = ..() - if(mighty_shield) - mighty_shield.block_chance -= 10 - to_chat(drinker,span_notice("You notice [mighty_shield] looks worn again. Weird.")) + var/obj/item/shield/the_shield = mighty_shield?.resolve() + if(the_shield) + the_shield.block_chance -= 10 + to_chat(drinker,span_notice("You notice [the_shield] looks worn again. Weird.")) + mighty_shield = null /datum/reagent/consumable/ethanol/amaretto_alexander name = "Amaretto Alexander"