Comsigs are hard...
This commit is contained in:
@@ -143,8 +143,6 @@
|
||||
return
|
||||
|
||||
var/mob/living/carbon/target = hit
|
||||
var/mob/living/carbon/human/T = target
|
||||
var/mob/living/carbon/human/S = user
|
||||
|
||||
var/roll = rollTackle(target)
|
||||
user.tackling = FALSE
|
||||
@@ -190,9 +188,9 @@
|
||||
target.adjustStaminaLoss(40)
|
||||
target.Paralyze(5)
|
||||
target.Knockdown(30)
|
||||
if(ishuman(target) && ishuman(user))
|
||||
S.dna.species.grab(S, T)
|
||||
S.setGrabState(GRAB_PASSIVE)
|
||||
if(ishuman(target) && iscarbon(user))
|
||||
target.grabbedby(user)
|
||||
target.grippedby(user, instant = TRUE)
|
||||
|
||||
if(5 to INFINITY) // absolutely BODIED
|
||||
user.visible_message("<span class='warning'>[user] lands a monster tackle on [target], knocking [target.p_them()] senseless and applying an aggressive pin!</span>", "<span class='userdanger'>You land a monster tackle on [target], knocking [target.p_them()] senseless and applying an aggressive pin!</span>", target)
|
||||
@@ -203,11 +201,11 @@
|
||||
target.adjustStaminaLoss(40)
|
||||
target.Paralyze(5)
|
||||
target.Knockdown(30)
|
||||
if(ishuman(target) && ishuman(user))
|
||||
if(ishuman(target) && iscarbon(user))
|
||||
target.grabbedby(user)
|
||||
target.grippedby(user, instant = TRUE) //instant aggro grab
|
||||
target.grippedby(user, instant = TRUE)
|
||||
|
||||
SEND_SIGNAL(user, COMSIG_CARBON_TACKLED, "tackle completed")
|
||||
SEND_SIGNAL(user, COMSIG_CARBON_TACKLED, roll)
|
||||
return COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
|
||||
/datum/action/bloodsucker/lunge/New()
|
||||
. = ..()
|
||||
RegisterSignal(owner, COMSIG_CARBON_TACKLED, .proc/Delayed_DeactivatePower)
|
||||
|
||||
|
||||
/datum/action/bloodsucker/lunge/Destroy()
|
||||
. = ..()
|
||||
UnregisterSignal(owner, COMSIG_CARBON_TACKLED)
|
||||
|
||||
/datum/action/bloodsucker/lunge/ActivatePower()
|
||||
var/mob/living/user = owner
|
||||
@@ -26,13 +30,15 @@
|
||||
T.skill_mod = 5
|
||||
T.min_distance = 2
|
||||
active = TRUE
|
||||
RegisterSignal(user, COMSIG_CARBON_TACKLED, .proc/DeactivatePower)
|
||||
while(B && ContinueActive(user))
|
||||
B.AddBloodVolume(-0.1)
|
||||
sleep(5)
|
||||
|
||||
/datum/action/bloodsucker/lunge/proc/Delayed_DeactivatePower()
|
||||
/*/datum/action/bloodsucker/lunge/proc/Delayed_DeactivatePower()
|
||||
addtimer(CALLBACK(src, .proc/DeactivatePower), 1 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
*/
|
||||
/datum/action/bloodsucker/lunge/DeactivatePower(mob/living/user = owner)
|
||||
. = ..()
|
||||
qdel(user.GetComponent(/datum/component/tackler))
|
||||
UnregisterSignal(user, COMSIG_CARBON_TACKLED)
|
||||
|
||||
Reference in New Issue
Block a user