unfucks a few things post comments.

This commit is contained in:
shellspeed1
2021-11-12 19:00:17 -08:00
parent 030f078445
commit e3407c5b39
+28 -7
View File
@@ -19,7 +19,7 @@
var/last_synth = 0
var/obj/item/reagent_containers/glass/bottle/vial/vial
var/list/allowed_containers = list(/obj/item/reagent_containers/glass/bottle/vial/small, /obj/item/reagent_containers/glass/bottle/vial/large)
var/quickload = TRUE //
var/quickload = TRUE
/obj/item/gun/chem/Initialize()
. = ..()
@@ -54,11 +54,34 @@
/obj/item/gun/chem/attackby(obj/item/I, mob/living/user)
if((istype(I, /obj/item/reagent_containers/glass/bottle/vial)))
if(vial)
if(!quickload)
to_chat(user, "<span class='warning'>[src] can not hold more than one vial!</span>")
return FALSE
unload_hypo(vial, user)
else
var/obj/item/reagent_containers/glass/bottle/vial/V = I
if(!is_type_in_list(V, allowed_containers))
to_chat(user, "<span class='notice'>[src] doesn't accept this type of vial.</span>")
return FALSE
if(!user.transferItemToLoc(V,src))
return FALSE
vial = V
user.visible_message("<span class='notice'>[user] has loaded a vial into [src].</span>","<span class='notice'>You have loaded [vial] into [src].</span>")
update_icon()
playsound(loc, 'sound/weapons/autoguninsert.ogg', 35, 1)
return TRUE
else
to_chat(user, "<span class='notice'>This doesn't fit in [src].</span>")
return FALSE
/*
/obj/item/hypospray/mkii/attackby(obj/item/I, mob/living/user)
if((istype(I, /obj/item/reagent_containers/glass/bottle/vial) && vial != null))
if(!quickload)
to_chat(user, "<span class='warning'>[src] can not hold more than one vial!</span>")
return FALSE
unload_hypo(vial, user)
else
if((istype(I, /obj/item/reagent_containers/glass/bottle/vial)))
var/obj/item/reagent_containers/glass/bottle/vial/V = I
if(!is_type_in_list(V, allowed_containers))
to_chat(user, "<span class='notice'>[src] doesn't accept this type of vial.</span>")
@@ -73,17 +96,15 @@
else
to_chat(user, "<span class='notice'>This doesn't fit in [src].</span>")
return FALSE
*/
/obj/item/gun/chem/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..() //Don't bother changing this or removing it from containers will break.
/obj/item/gun/chem/attack_self(mob/living/user)
if(user && user.incapacitated())
if(user.incapacitated())
return
else if(!vial)
if(user && !user.incapacitated())
if(!vial)
to_chat(user, "This Hypo needs to be loaded first!")
return
else
unload_hypo(vial,user)