Merge pull request #34553 from ShizCalev/abstract-transfertoloc

Fixes being able to place abstract items in fridges & chem dispensers
This commit is contained in:
Jordan Brown
2018-01-18 17:47:48 -05:00
committed by CitadelStationBot
parent 8d19f35d33
commit 594e8c8e6d
6 changed files with 7 additions and 7 deletions
@@ -327,7 +327,7 @@
desc = "A refrigerated storage unit for tasty tasty alcohol."
/obj/machinery/smartfridge/drinks/accept_check(obj/item/O)
if(!istype(O, /obj/item/reagent_containers) || !O.reagents || !O.reagents.reagent_list.len)
if(!istype(O, /obj/item/reagent_containers) || (O.flags_1 & ABSTRACT_1) || !O.reagents || !O.reagents.reagent_list.len)
return FALSE
if(istype(O, /obj/item/reagent_containers/glass) || istype(O, /obj/item/reagent_containers/food/drinks) || istype(O, /obj/item/reagent_containers/food/condiment))
return TRUE
@@ -375,7 +375,7 @@
return FALSE
return TRUE
return FALSE
if(!istype(O, /obj/item/reagent_containers))
if(!istype(O, /obj/item/reagent_containers) || (O.flags_1 & ABSTRACT_1))
return FALSE
if(istype(O, /obj/item/reagent_containers/pill)) // empty pill prank ok
return TRUE
@@ -225,7 +225,7 @@
if(default_unfasten_wrench(user, I))
return
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
if(istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container())
var/obj/item/reagent_containers/B = I
. = 1 //no afterattack
if(beaker)
@@ -64,7 +64,7 @@
if(default_deconstruction_crowbar(I))
return
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
if(istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container())
. = 1 //no afterattack
if(beaker)
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
@@ -88,7 +88,7 @@
if(default_unfasten_wrench(user, I))
return
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
if(istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container())
. = 1 // no afterattack
if(panel_open)
to_chat(user, "<span class='warning'>You can't use the [src.name] while its panel is opened!</span>")
@@ -225,7 +225,7 @@
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
if(istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container())
. = TRUE //no afterattack
if(stat & (NOPOWER|BROKEN))
return
@@ -62,7 +62,7 @@
if(default_unfasten_wrench(user, I))
return
if (istype(I, /obj/item/reagent_containers) && I.is_open_container())
if (istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container())
if (!beaker)
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")