mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Plumbing Bottler deals with specific container types (#79375)
## About The Pull Request - Fixes #60264 Based on its name it makes sense it should only deal with bottles (slime extracts as the exception which was already there). We have a specific type for this `obj/item/reagent_containers/cup/bottle` this mean now it won't fill - Pills(`/obj/item/reagent_containers/pill`) - Patches(`/obj/item/reagent_containers/pill/patch`) - Syringes(`/obj/item/reagent_containers/syringe`) - etc(i don't know basically anything else that is of type `obj/item/reagent_containers` ## Changelog 🆑 fix: plumbing bottler now only deals with bottles, beakers similar stuff but not pills, patches, syringes or anything than can hold reagents. That & slime extracts, slime industrial extract & shotgun shell /🆑
This commit is contained in:
@@ -82,8 +82,13 @@
|
||||
if(reagents.total_volume + 0.01 >= wanted_amount && anchored && length(inputspot.contents))
|
||||
use_power(active_power_usage * seconds_per_tick)
|
||||
var/obj/AM = pick(inputspot.contents)///pick a reagent_container that could be used
|
||||
if((is_reagent_container(AM) && !istype(AM, /obj/item/reagent_containers/hypospray/medipen)) || istype(AM, /obj/item/ammo_casing/shotgun/dart))
|
||||
var/obj/item/reagent_containers/B = AM
|
||||
//allowed containers
|
||||
var/static/list/allowed_containers = list(
|
||||
/obj/item/reagent_containers/cup,
|
||||
/obj/item/ammo_casing/shotgun/dart,
|
||||
)
|
||||
if(is_type_in_list(AM, allowed_containers))
|
||||
var/obj/item/B = AM
|
||||
///see if it would overflow else inject
|
||||
if((B.reagents.total_volume + wanted_amount) <= B.reagents.maximum_volume)
|
||||
reagents.trans_to(B, wanted_amount, transferred_by = src)
|
||||
@@ -91,10 +96,8 @@
|
||||
return
|
||||
///glass was full so we move it away
|
||||
AM.forceMove(badspot)
|
||||
if(istype(AM, /obj/item/slime_extract)) ///slime extracts need inject
|
||||
else if(istype(AM, /obj/item/slime_extract)) ///slime extracts need inject
|
||||
AM.forceMove(goodspot)
|
||||
reagents.trans_to(AM, wanted_amount, transferred_by = src, methods = INJECT)
|
||||
return
|
||||
if(istype(AM, /obj/item/slimecross/industrial)) ///no need to move slimecross industrial things
|
||||
else if(istype(AM, /obj/item/slimecross/industrial)) ///no need to move slimecross industrial things
|
||||
reagents.trans_to(AM, wanted_amount, transferred_by = src, methods = INJECT)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user