Glass container reagents saftey check (#18096)

* changed fake disintegrate to not need a permit (as far as sec bots are concerned)

* prefer boolean defines to magic numbers

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* added check

* Update code/modules/reagents/reagent_containers/glass_containers.dm

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
KalevTait
2022-06-27 13:25:34 +01:00
committed by GitHub
co-authored by AffectedArc07 Sirryan2002
parent 3c0603f7ea
commit faf173b35c
@@ -68,12 +68,15 @@
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
if((!proximity) || !check_allowed_items(target,target_self = TRUE))
if((!proximity) || !check_allowed_items(target, target_self = TRUE))
return
if(!is_open_container())
return
if(!reagents)
return
if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")