This commit is contained in:
silicons
2020-07-18 18:44:17 -07:00
parent 0c6368e3e7
commit 1a040dd2a6
21 changed files with 20 additions and 22 deletions
+6 -1
View File
@@ -26,7 +26,12 @@
return
SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
A.attack_hand(src)
if(!CheckActionCooldown(A.clickdelay_attack_hand_preattack_cooldown))
if(A.clickdelay_attack_hand_is_action && A.clickdelay_attack_hand_set_preattack)
DelayNextAction()
A.attack_hand(src)
if(A.clickdelay_attack_hand_is_action && !A.clickdelay_attack_hand_set_preattack)
DelayNextAction()
//Return TRUE to cancel other attack hand effects that respect it.
/atom/proc/attack_hand(mob/user)
-1
View File
@@ -76,7 +76,6 @@
if(!locked)
open_machine()
return
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a metallic creaking from [src].</span>")
-1
View File
@@ -101,7 +101,6 @@ The console is located at computer/gulag_teleporter.dm
if(!locked)
open_machine()
return
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a metallic creaking from [src].</span>")
-1
View File
@@ -178,7 +178,6 @@
icon_state += "_occupied"
/obj/machinery/hypnochair/container_resist(mob/living/user)
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(600)].)</span>", \
"<span class='hear'>You hear a metallic creaking from [src].</span>")
-1
View File
@@ -301,7 +301,6 @@
open_machine()
dump_contents()
return
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the doors of [src]!</span>", \
"<span class='notice'>You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a thump from [src].</span>")
-3
View File
@@ -252,7 +252,6 @@
/obj/structure/spider/cocoon/container_resist(mob/living/user)
var/breakout_time = 600
user.last_resist = world.time
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)</span>")
visible_message("You see something struggling and writhing in \the [src]!")
if(do_after(user,(breakout_time), target = src))
@@ -260,8 +259,6 @@
return
qdel(src)
/obj/structure/spider/cocoon/Destroy()
var/turf/T = get_turf(src)
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
-1
View File
@@ -71,7 +71,6 @@
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't get out while you're restrained like this!</span>")
return
user.last_resist = world.time
to_chat(user, "<span class='notice'>You claw at the fabric of [src], trying to tear it open...</span>")
to_chat(loc, "<span class='warning'>Someone starts trying to break free of [src]!</span>")
if(!do_after(user, 200, target = src))
@@ -116,7 +116,6 @@
if(!hound)
go_out(user)
return
user.last_resist = world.time
if(user.a_intent == INTENT_HELP)
return
var/voracious = TRUE
@@ -121,7 +121,6 @@
update_icon()
/obj/machinery/implantchair/container_resist(mob/living/user)
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a metallic creaking from [src].</span>")
-1
View File
@@ -133,7 +133,6 @@
remove_occupant(user)
return
user.last_resist = world.time
if(user.mob_size <= MOB_SIZE_SMALL)
to_chat(user, "<span class='notice'>You begin to try escaping the [src] and start fumbling for the lock switch... (This will take some time.)</span>")
to_chat(loc, "<span class='warning'>You see [user] attempting to unlock the [src]!</span>")
@@ -506,7 +506,6 @@
if(opened)
return
if(ismovable(loc))
user.last_resist = world.time
var/atom/movable/AM = loc
AM.relay_container_resist(user, src)
return
@@ -515,7 +514,6 @@
return
//okay, so the closet is either welded or locked... resist!!!
user.last_resist = world.time
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear banging from [src].</span>")
-1
View File
@@ -106,7 +106,6 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
if(!locked)
open()
return
user.last_resist = world.time
user.visible_message(null, \
"<span class='notice'>You lean on the back of [src] and start pushing the tray open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a metallic creaking from [src].</span>")
@@ -69,7 +69,6 @@
empty_pod()
return
if(!moving)
user.last_resist = world.time
to_chat(user, "<span class='notice'>You start trying to escape from the pod...</span>")
if(do_after(user, 600, target = src))
to_chat(user, "<span class='notice'>You manage to open the pod.</span>")
@@ -47,7 +47,6 @@
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
/obj/machinery/abductor/experiment/container_resist(mob/living/user)
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a metallic creaking from [src].</span>")
@@ -262,7 +262,6 @@
return occupant
/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user)
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the glass of [src]!</span>", \
"<span class='notice'>You struggle inside [src], kicking the release with your foot... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear a thump from [src].</span>")
+9
View File
@@ -61,6 +61,15 @@
/mob/proc/CheckResistCooldown()
return (world.time >= (last_resist + resist_cooldown))
/atom
// Standard clickdelay variables
/// Amount of time to check for from a mob's last attack to allow an attack_hand().
var/clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE
/// Should we set last action before or after attack hand passes?
var/clickdelay_attack_hand_set_preattack = FALSE
/// Should we set last action for attack hand?
var/clickdelay_attack_hand_is_action = FALSE
/obj/item
// Standard clickdelay variables
/// Amount of time to check for from a mob's last attack, checked before an attack happens
+2
View File
@@ -687,10 +687,12 @@
return
if(do_resist())
last_resist = world.time
changeNext_move(CLICK_CD_RESIST)
/// The actual proc for resisting. Return TRUE to give clickdelay.
/mob/living/proc/do_resist()
set waitfor = FALSE // some of these sleep.
SEND_SIGNAL(src, COMSIG_LIVING_RESIST, src)
//resisting grabs (as if it helps anyone...)
// only works if you're not cuffed.
+2 -1
View File
@@ -11,6 +11,8 @@
throw_speed = 3
throw_range = 7
pressure_resistance = 8
clickdelay_attack_hand_is_action = TRUE
clickdelay_attack_hand_preattack_cooldown = CLICK_CD_MELEE
var/papertype = /obj/item/paper
var/total_paper = 30
var/list/papers = list()
@@ -64,7 +66,6 @@
/obj/item/paper_bin/attack_hand(mob/user)
if(user.lying)
return
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/pen/P = bin_pen
P.add_fingerprint(user)
@@ -189,4 +189,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.
@@ -150,7 +150,6 @@
return
if(busy)
return
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='hear'>You hear a metallic creaking from [src].</span>")
@@ -130,7 +130,6 @@
return
if(busy)
return
user.last_resist = world.time
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='hear'>You hear a metallic creaking from [src].</span>")