This commit is contained in:
silicons
2020-07-28 21:53:07 -07:00
parent dbc766a7ca
commit 78312c23bf
9 changed files with 36 additions and 25 deletions

View File

@@ -624,7 +624,7 @@ so as to remain in compliance with the most up-to-date laws."
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr
if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes) if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes)
return return
C.changeNext_move(CLICK_CD_RESIST) C.MarkResistTime()
C.shoes.handle_tying(C) C.shoes.handle_tying(C)
// PRIVATE = only edit, use, or override these if you're editing the system as a whole // PRIVATE = only edit, use, or override these if you're editing the system as a whole

View File

@@ -104,6 +104,17 @@
if(weight) if(weight)
user.adjustStaminaLossBuffered(weight) user.adjustStaminaLossBuffered(weight)
// CIT SCREENSHAKE
if(force >= 15)
shake_camera(user, ((force - 10) * 0.01 + 1), ((force - 10) * 0.01))
if(M.client)
switch (M.client.prefs.damagescreenshake)
if (1)
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
if (2)
if(!CHECK_MOBILITY(M, MOBILITY_MOVE))
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
//the equivalent of the standard version of attack() but for object targets. //the equivalent of the standard version of attack() but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user) /obj/item/proc/attack_obj(obj/O, mob/living/user)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ) if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)

View File

@@ -162,6 +162,3 @@
var/typing_indicator_timerid var/typing_indicator_timerid
/// Current state of our typing indicator. Used for cut overlay, DO NOT RUNTIME ASSIGN OTHER THAN FROM SHOW/CLEAR. Used to absolutely ensure we do not get stuck overlays. /// Current state of our typing indicator. Used for cut overlay, DO NOT RUNTIME ASSIGN OTHER THAN FROM SHOW/CLEAR. Used to absolutely ensure we do not get stuck overlays.
var/typing_indicator_current var/typing_indicator_current
///For storing what do_after's someone has, in case we want to restrict them to only one of a certain do_after at a time
var/list/do_afters

View File

@@ -69,7 +69,8 @@
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>") to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
return return
/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone) /obj/item/reagent_containers/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
. = ..()
if(user.a_intent == INTENT_HARM) if(user.a_intent == INTENT_HARM)
return ..() return ..()

View File

@@ -9,6 +9,11 @@
container_HP = 2 container_HP = 2
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target) /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)) if(!canconsume(M, user))
return return

View File

@@ -368,6 +368,10 @@
return return
/obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity) /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)) if(!vial || !proximity || !isliving(target))
return return
var/mob/living/L = target var/mob/living/L = target

View File

@@ -28,22 +28,24 @@
/obj/item/reagent_containers/pill/get_w_volume() // DEFAULT_VOLUME_TINY at 25u, DEFAULT_VOLUME_SMALL at 50u /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 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)) if(!canconsume(M, user))
return 0 return FALSE
if(M == user) if(M == user)
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>") M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
if(self_delay) if(self_delay)
if(!do_mob(user, M, self_delay)) if(!do_mob(user, M, self_delay))
return 0 return FALSE
to_chat(M, "<span class='notice'>You [apply_method] [src].</span>") to_chat(M, "<span class='notice'>You [apply_method] [src].</span>")
else else
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \ 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>") "<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
if(!do_mob(user, M)) if(!do_mob(user, M))
return 0 return FALSE
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \ 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>") "<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
@@ -56,8 +58,7 @@
reagents.reaction(M, apply_type) reagents.reaction(M, apply_type)
reagents.trans_to(M, reagents.total_volume) reagents.trans_to(M, reagents.total_volume)
qdel(src) qdel(src)
return 1 return TRUE
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity) /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) "<span class='notice'>You dissolve [src] in [target].</span>", vision_distance = 2)
reagents.trans_to(target, reagents.total_volume) reagents.trans_to(target, reagents.total_volume)
qdel(src) qdel(src)
return STOP_ATTACK_PROC_CHAIN
/obj/item/reagent_containers/pill/tox /obj/item/reagent_containers/pill/tox
name = "toxins pill" name = "toxins pill"

View File

@@ -54,6 +54,9 @@
/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) if(busy)
return return
if(!proximity) if(!proximity)

View File

@@ -45,18 +45,6 @@
. = ..() . = ..()
shake_camera(user, (pressureSetting * 0.75 + 1), (pressureSetting * 0.75)) shake_camera(user, (pressureSetting * 0.75 + 1), (pressureSetting * 0.75))
/obj/item/attack(mob/living/M, mob/living/user)
. = ..()
if(force >= 15)
shake_camera(user, ((force - 10) * 0.01 + 1), ((force - 10) * 0.01))
if(M.client)
switch (M.client.prefs.damagescreenshake)
if (1)
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
if (2)
if(!CHECK_MOBILITY(M, MOBILITY_MOVE))
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
/obj/item/attack_obj(obj/O, mob/living/user) /obj/item/attack_obj(obj/O, mob/living/user)
. = ..() . = ..()
if(force >= 20) if(force >= 20)