Merge branch 'master' into wounds-part-2
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
// WARNING: This entire section is shitcode and prone to breaking at any time.
|
||||
INVOKE_ASYNC(src, .proc/attempt_feed, M, user, target) // for example, the arguments in this proc are wrong
|
||||
// but i don't have time to properly fix it right now.
|
||||
|
||||
/obj/item/reagent_containers/glass/proc/attempt_feed(mob/M, mob/user, obj/target)
|
||||
if(!canconsume(M, user))
|
||||
return
|
||||
|
||||
|
||||
@@ -368,13 +368,17 @@
|
||||
obj_flags |= EMAGGED
|
||||
return TRUE
|
||||
|
||||
/obj/item/hypospray/mkii/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/item/hypospray/mkii/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/hypospray/mkii/attack(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/attempt_inject, target, user, proximity)
|
||||
|
||||
/obj/item/hypospray/mkii/proc/attempt_inject(atom/target, mob/user, proximity)
|
||||
if(!vial || !proximity || !isliving(target))
|
||||
return
|
||||
var/mob/living/L = target
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
user.visible_message("<span class='notice'>[user] inserts a power cell into [src].</span>", "<span class='notice'>You insert the power cell into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/maunamug/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/item/reagent_containers/glass/maunamug/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(cell && open)
|
||||
cell.update_icon()
|
||||
user.put_in_hands(cell)
|
||||
|
||||
@@ -28,22 +28,24 @@
|
||||
/obj/item/reagent_containers/pill/get_w_volume() // DEFAULT_VOLUME_TINY at 25u, DEFAULT_VOLUME_SMALL at 50u
|
||||
return DEFAULT_VOLUME_TINY/2 + reagents.total_volume / reagents.maximum_volume * DEFAULT_VOLUME_TINY
|
||||
|
||||
/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone)
|
||||
/obj/item/reagent_containers/pill/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
|
||||
INVOKE_ASYNC(src, .proc/attempt_feed, M, user)
|
||||
|
||||
/obj/item/reagent_containers/pill/proc/attempt_feed(mob/living/M, mob/living/user)
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
return 0
|
||||
return FALSE
|
||||
to_chat(M, "<span class='notice'>You [apply_method] [src].</span>")
|
||||
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
|
||||
if(!do_mob(user, M))
|
||||
return 0
|
||||
return FALSE
|
||||
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
|
||||
|
||||
@@ -56,8 +58,7 @@
|
||||
reagents.reaction(M, apply_type)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
|
||||
. = ..()
|
||||
@@ -77,6 +78,7 @@
|
||||
"<span class='notice'>You dissolve [src] in [target].</span>", vision_distance = 2)
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
qdel(src)
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
/obj/item/reagent_containers/pill/tox
|
||||
name = "toxins pill"
|
||||
|
||||
@@ -55,11 +55,10 @@
|
||||
if(do_after(user, action_speed, target = A))
|
||||
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/rag/alt_pre_attack(mob/living/M, mob/living/user, params)
|
||||
if(istype(M) && user.a_intent == INTENT_HELP)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
if(M.on_fire)
|
||||
user.visible_message("<span class='warning'>\The [user] uses \the [src] to pat out [M == user ? "[user.p_their()]" : "\the [M]'s"] flames!</span>")
|
||||
if(hitsound)
|
||||
@@ -193,4 +192,4 @@
|
||||
extinguish_efficiency = 5
|
||||
action_speed = 15
|
||||
damp_threshold = 0.8
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
|
||||
return
|
||||
if(istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
@@ -50,7 +52,7 @@
|
||||
spray(A)
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.last_action = world.time
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
var/turf/T = get_turf(src)
|
||||
if(reagents.has_reagent(/datum/reagent/toxin/acid))
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/reagent_containers/syringe/attack_hand()
|
||||
/obj/item/reagent_containers/syringe/on_attack_hand()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
@@ -54,8 +53,11 @@
|
||||
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/attempt_inject, target, user, proximity)
|
||||
|
||||
/obj/item/reagent_containers/syringe/proc/attempt_inject(atom/target, mob/user, proximity)
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
|
||||
Reference in New Issue
Block a user