Merge pull request #12834 from silicons/clickcd_experimental
Experimental hybrid clickdelay system (No seriously I'm trying my best to not call it Minecraft attack delays)
This commit is contained in:
@@ -249,7 +249,7 @@
|
||||
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/alien/egg/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -269,8 +269,7 @@
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It feels slimy.</span>")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
|
||||
/obj/structure/alien/egg/proc/Grow()
|
||||
status = GROWN
|
||||
|
||||
@@ -52,10 +52,7 @@
|
||||
/obj/structure/sign/barsign/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/sign/barsign/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/sign/barsign/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='info'>Access denied.</span>")
|
||||
return
|
||||
|
||||
@@ -311,10 +311,7 @@ LINEN BINS
|
||||
/obj/structure/bedsheetbin/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/bedsheetbin/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
if(amount >= 1)
|
||||
|
||||
@@ -458,10 +458,7 @@
|
||||
return
|
||||
container_resist(user)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/closet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
@@ -506,8 +503,6 @@
|
||||
if(opened)
|
||||
return
|
||||
if(ismovable(loc))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
AM.relay_container_resist(user, src)
|
||||
return
|
||||
@@ -516,8 +511,6 @@
|
||||
return
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
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>")
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
locked = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/genpop/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/closet/secure_closet/genpop/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
|
||||
@@ -41,10 +41,8 @@
|
||||
if(manifest)
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/closet/crate/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
delivery_icon = "deliverybox"
|
||||
integrity_failure = 0 //Makes the crate break when integrity reaches 0, instead of opening and becoming an invisible sprite.
|
||||
|
||||
/obj/structure/closet/crate/large/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/closet/crate/large/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
add_fingerprint(user)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
|
||||
max_integrity = 200
|
||||
integrity_failure = 0.25
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
var/obj/item/showpiece = null
|
||||
var/alert = TRUE
|
||||
var/open = FALSE
|
||||
@@ -157,11 +159,7 @@
|
||||
/obj/structure/displaycase/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
/obj/structure/displaycase/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if (showpiece && (broken || open))
|
||||
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
|
||||
log_combat(user, src, "deactivates the hover field of")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
density = FALSE
|
||||
can_buckle = 1
|
||||
|
||||
/obj/structure/sacrificealtar/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/sacrificealtar/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -30,7 +30,7 @@
|
||||
var/time_between_uses = 1800
|
||||
var/last_process = 0
|
||||
|
||||
/obj/structure/healingfountain/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/healingfountain/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
new /obj/item/stack/sheet/mineral/wood(drop_location(), 10)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/dresser/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(. || !ishuman(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
@@ -69,10 +69,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/extinguisher_cabinet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(stored_extinguisher)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
new /obj/structure/falsewall/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/falsewall/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(opening)
|
||||
return
|
||||
. = ..()
|
||||
@@ -180,7 +180,7 @@
|
||||
radiate()
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/uranium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/falsewall/uranium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
radiate()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
. += "Someone appears to be strapped in. You can help them unbuckle, or activate the femur breaker."
|
||||
|
||||
/obj/structure/femur_breaker/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/femur_breaker/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
add_fingerprint(user)
|
||||
|
||||
// Currently being used
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
open = TRUE
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/fence/door/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/fence/door/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(can_open(user))
|
||||
toggle(user)
|
||||
|
||||
|
||||
@@ -105,10 +105,7 @@
|
||||
fireaxe = null
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/fireaxecabinet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(open || broken)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
var/gift_type = /obj/item/a_gift/anything
|
||||
var/list/ckeys_that_took = list()
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/flora/tree/pine/xmas/presents/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
desc = "Space Jesus is my copilot."
|
||||
icon_state = "driverseat"
|
||||
|
||||
/obj/structure/fluff/bus/passable/seat/driver/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/fluff/bus/passable/seat/driver/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
playsound(src, 'sound/items/carhorn.ogg', 50, 1)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -186,10 +186,7 @@
|
||||
else
|
||||
new_spawn.mind.assigned_role = "Free Golem"
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/effect/mob_spawn/human/golem/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(isgolem(user) && can_transfer)
|
||||
var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No")
|
||||
if(transfer_choice != "Yes" || QDELETED(src) || uses <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY, NO_TK))
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
layer = BELOW_OBJ_LAYER
|
||||
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
|
||||
max_integrity = 50
|
||||
attack_hand_is_action = TRUE
|
||||
attack_hand_speed = 8
|
||||
integrity_failure = 0.4
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
@@ -99,11 +101,10 @@
|
||||
..(user, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/grille/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(user, src, "hit")
|
||||
@@ -111,8 +112,9 @@
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
if(!shock(user, 70))
|
||||
take_damage(20, BRUTE, "melee", 1)
|
||||
@@ -134,7 +136,7 @@
|
||||
. = . || (mover.pass_flags & PASSGRILLE)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(!shock(user, 100))
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
. += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
|
||||
|
||||
/obj/structure/guillotine/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/guillotine/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
add_fingerprint(user)
|
||||
|
||||
// Currently being used by something
|
||||
|
||||
@@ -53,10 +53,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/guncase/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/guncase/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(contents.len && open)
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
MA.pixel_y = 12
|
||||
. += H
|
||||
|
||||
/obj/structure/headpike/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/headpike/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
to_chat(user, "<span class='notice'>You take down [src].</span>")
|
||||
if(victim)
|
||||
victim.forceMove(drop_location())
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
projector = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/holosign/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/holosign/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
take_damage(5 , BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
@@ -162,7 +162,7 @@
|
||||
return TRUE //nice or benign diseases!
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/medical/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/holosign/barrier/medical/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(CanPass(user) && user.a_intent == INTENT_HELP)
|
||||
force_allaccess = !force_allaccess
|
||||
to_chat(user, "<span class='warning'>You [force_allaccess ? "deactivate" : "activate"] the biometric scanners.</span>") //warning spans because you can make the station sick!
|
||||
@@ -182,7 +182,7 @@
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown()
|
||||
shockcd = FALSE
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -91,10 +91,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/janitorialcart/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
|
||||
var/list/items = list()
|
||||
if(mybag)
|
||||
|
||||
@@ -60,8 +60,7 @@
|
||||
deconstruct(TRUE)
|
||||
return TRUE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/kitchenspike/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
|
||||
var/mob/living/L = user.pulling
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM) && L.stat != DEAD)
|
||||
|
||||
@@ -122,10 +122,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/ladder/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
use(user)
|
||||
|
||||
/obj/structure/ladder/attack_paw(mob/user)
|
||||
|
||||
@@ -24,10 +24,7 @@
|
||||
var/respawn_time = 50
|
||||
var/respawn_sound = 'sound/magic/staff_animation.ogg'
|
||||
|
||||
/obj/structure/life_candle/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/life_candle/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!user.mind)
|
||||
return
|
||||
if(user.mind in linked_minds)
|
||||
|
||||
@@ -198,10 +198,6 @@
|
||||
/obj/item/gun_control/CanItemAutoclick()
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun_control/attack_obj(obj/O, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
O.attacked_by(src, user)
|
||||
|
||||
/obj/item/gun_control/attack(mob/living/M, mob/living/user)
|
||||
M.lastattacker = user.real_name
|
||||
M.lastattackerckey = user.ckey
|
||||
|
||||
@@ -50,10 +50,7 @@
|
||||
/obj/structure/mineral_door/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/mineral_door/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target)
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
if(icon_state == "mirror_broke" && !broken)
|
||||
obj_break(null, mapload)
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/mirror/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(broken || !Adjacent(user))
|
||||
return
|
||||
|
||||
@@ -118,10 +115,7 @@
|
||||
choosable_races += S.id
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/mirror/magic/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
|
||||
@@ -61,10 +61,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
/obj/structure/bodycontainer/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bodycontainer/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/bodycontainer/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(locked)
|
||||
to_chat(user, "<span class='danger'>It's locked.</span>")
|
||||
return
|
||||
@@ -109,8 +106,6 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
if(!locked)
|
||||
open()
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
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>")
|
||||
@@ -322,10 +317,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
/obj/structure/tray/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/tray/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/tray/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if (src.connected)
|
||||
connected.close()
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -14,10 +14,7 @@
|
||||
desc = "[initial(desc)] The planchette is sitting at \"[planchette]\"."
|
||||
return ..()
|
||||
|
||||
/obj/structure/spirit_board/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/spirit_board/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/uranium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/statue/uranium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
radiate()
|
||||
. = ..()
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
honk()
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/bananium/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/statue/bananium/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
honk()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
climbable = TRUE
|
||||
obj_flags = CAN_BE_HIT|SHOVABLE_ONTO
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
var/frame = /obj/structure/table_frame
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/buildstack = /obj/item/stack/sheet/metal
|
||||
@@ -60,7 +62,7 @@
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
/obj/structure/table/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(Adjacent(user) && user.pulling)
|
||||
if(isliving(user.pulling))
|
||||
var/mob/living/pushed_mob = user.pulling
|
||||
@@ -210,8 +212,10 @@
|
||||
return
|
||||
|
||||
/obj/structure/table/alt_attack_hand(mob/user)
|
||||
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
|
||||
return
|
||||
user.DelayNextAction()
|
||||
if(user && Adjacent(user) && !user.incapacitated())
|
||||
user.changeNext_move(CLICK_CD_MELEE*0.5)
|
||||
if(istype(user) && user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='warning'>[user] slams [user.p_their()] palms down on [src].</span>", "<span class='warning'>You slam your palms down on [src].</span>")
|
||||
playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
|
||||
@@ -654,6 +658,8 @@
|
||||
anchored = TRUE
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
|
||||
max_integrity = 20
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
|
||||
/obj/structure/rack/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -695,13 +701,12 @@
|
||||
/obj/structure/rack/attack_paw(mob/living/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/rack/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/rack/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(CHECK_MULTIPLE_BITFIELDS(user.mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) || user.get_num_legs() < 2)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='danger'>[user] kicks [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
take_damage(rand(4,8), BRUTE, "melee", 1)
|
||||
|
||||
@@ -48,10 +48,7 @@
|
||||
handle_density()
|
||||
to_chat(user, "<span class='notice'>You slide the target into the stake.</span>")
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/target_stake/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(pinned_target)
|
||||
removeTarget(user)
|
||||
|
||||
|
||||
@@ -58,10 +58,7 @@
|
||||
qdel(R)
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/transit_tube/station/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!pod_moving)
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(open_status == STATION_TUBE_OPEN)
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
empty_pod()
|
||||
return
|
||||
if(!moving)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
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>")
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
var/mob/living/swirlie = null //the mob being given a swirlie
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal //they're metal now, shut up
|
||||
var/buildstackamount = 1
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
|
||||
/obj/structure/toilet/Initialize()
|
||||
. = ..()
|
||||
@@ -26,18 +28,16 @@
|
||||
AM.forceMove(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/toilet/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/toilet/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(swirlie)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, "swing_hit", 25, 1)
|
||||
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto your head!</span>", "<span class='italics'>You hear reverberating porcelain.</span>")
|
||||
swirlie.adjustBruteLoss(5)
|
||||
|
||||
else if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.loc != get_turf(src))
|
||||
@@ -167,6 +167,8 @@
|
||||
icon_state = "urinal"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
var/exposed = 0 // can you currently put an item inside
|
||||
var/obj/item/hiddenitem = null // what's in the urinal
|
||||
|
||||
@@ -174,17 +176,13 @@
|
||||
..()
|
||||
hiddenitem = new /obj/item/reagent_containers/food/urinalcake
|
||||
|
||||
/obj/structure/urinal/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/urinal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.loc != get_turf(src))
|
||||
to_chat(user, "<span class='notice'>[GM.name] needs to be on [src].</span>")
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='danger'>[user] slams [GM] into [src]!</span>", "<span class='danger'>You slam [GM] into [src]!</span>")
|
||||
GM.adjustBruteLoss(8)
|
||||
else
|
||||
@@ -492,7 +490,7 @@
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 1
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/structure/sink/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -707,8 +705,7 @@
|
||||
icon_state = "puddle"
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M)
|
||||
/obj/structure/sink/puddle/on_attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
@@ -784,10 +781,7 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/curtain/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/curtain/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
playsound(loc, 'sound/effects/curtain.ogg', 50, 1)
|
||||
toggle()
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
rad_flags = RAD_PROTECT_CONTENTS
|
||||
flags_ricochet = RICOCHET_HARD
|
||||
ricochet_chance_mod = 0.4
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
|
||||
/// Electrochromatic status
|
||||
var/electrochromatic_status = NOT_ELECTROCHROMATIC
|
||||
@@ -157,7 +159,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
return 1
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
|
||||
add_fingerprint(user)
|
||||
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
|
||||
@@ -167,18 +169,15 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
return 1
|
||||
. = ..()
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/window/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] knocks on [src].")
|
||||
add_fingerprint(user)
|
||||
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
|
||||
|
||||
/obj/structure/window/attack_paw(mob/user)
|
||||
user.DelayNextAction()
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/window/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime
|
||||
@@ -836,13 +835,9 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
for (var/i in 1 to rand(1,4))
|
||||
. += new /obj/item/paper/natural(location)
|
||||
|
||||
/obj/structure/window/paperframe/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/window/paperframe/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
add_fingerprint(user)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] knocks on [src].")
|
||||
playsound(src, "pageturn", 50, 1)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user