things with stuff (#6233)
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
This commit is contained in:
@@ -244,12 +244,15 @@
|
||||
icon_state = "[base_icon]_hatched"
|
||||
|
||||
/obj/structure/alien/egg/attack_paw(mob/living/user)
|
||||
. = attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
|
||||
. = attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.getorgan(/obj/item/organ/alien/plasmavessel))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
|
||||
@@ -54,12 +54,13 @@
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/structure/sign/barsign/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/sign/barsign/attack_hand(mob/user)
|
||||
if (!src.allowed(user))
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='info'>Access denied.</span>")
|
||||
return
|
||||
if (broken)
|
||||
@@ -67,9 +68,6 @@
|
||||
return
|
||||
pick_sign()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(!allowed(user))
|
||||
|
||||
@@ -298,12 +298,13 @@ LINEN BINS
|
||||
to_chat(user, "<span class='notice'>You hide [I] among the sheets.</span>")
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.lying)
|
||||
return
|
||||
if(amount >= 1)
|
||||
|
||||
@@ -313,13 +313,14 @@
|
||||
container_resist()
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
if(!toggle(user))
|
||||
togglelock(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
@@ -341,7 +342,7 @@
|
||||
return
|
||||
|
||||
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
|
||||
attack_hand(usr)
|
||||
return attack_hand(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
if(!ishuman(usr))
|
||||
return 0
|
||||
@@ -74,7 +74,7 @@
|
||||
max_mob_size = MOB_SIZE_LARGE
|
||||
|
||||
/obj/structure/closet/body_bag/bluespace/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
if(!ishuman(usr))
|
||||
return 0
|
||||
|
||||
@@ -42,4 +42,4 @@
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/clothing/glasses/night(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party."
|
||||
@@ -27,7 +26,6 @@
|
||||
new /obj/item/storage/box/teargas(src)
|
||||
new /obj/item/storage/backpack/duffelbag/syndie/med(src)
|
||||
new /obj/item/device/pda/syndicate(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/resources
|
||||
desc = "An old, dusty locker."
|
||||
@@ -92,8 +90,6 @@
|
||||
if(pickednum == 50)
|
||||
new /obj/item/tank/jetpack/carbondioxide(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/resources/everything
|
||||
desc = "It's an emergency storage closet for repairs."
|
||||
|
||||
@@ -117,5 +113,3 @@
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
|
||||
return
|
||||
|
||||
@@ -39,10 +39,11 @@
|
||||
add_overlay("manifest")
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/open(mob/living/user)
|
||||
. = ..()
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
delivery_icon = "deliverybox"
|
||||
|
||||
/obj/structure/closet/crate/large/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
|
||||
@@ -155,9 +155,12 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (showpiece && (broken || open))
|
||||
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
|
||||
@@ -173,8 +176,6 @@
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
take_damage(2)
|
||||
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
can_buckle = 1
|
||||
|
||||
/obj/structure/sacrificealtar/attack_hand(mob/living/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
var/mob/living/L = locate() in buckled_mobs
|
||||
@@ -29,6 +31,9 @@
|
||||
var/last_process = 0
|
||||
|
||||
/obj/structure/healingfountain/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(last_process + time_between_uses > world.time)
|
||||
to_chat(user, "<span class='notice'>The fountain appears to be empty.</span>")
|
||||
return
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
return
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(stored_extinguisher)
|
||||
@@ -95,7 +98,7 @@
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
/obj/structure/falsewall/attack_hand(mob/user)
|
||||
if(opening)
|
||||
return
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
opening = TRUE
|
||||
update_icon()
|
||||
@@ -185,7 +188,7 @@
|
||||
|
||||
/obj/structure/falsewall/uranium/attack_hand(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/falsewall/uranium/proc/radiate()
|
||||
if(!active)
|
||||
|
||||
@@ -104,6 +104,9 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(open || broken)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
@@ -121,7 +124,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_paw(mob/living/user)
|
||||
attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_ai(mob/user)
|
||||
toggle_lock(user)
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
var/list/ckeys_that_took = list()
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/presents/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!user.ckey)
|
||||
return
|
||||
|
||||
|
||||
@@ -104,7 +104,8 @@
|
||||
icon_state = "driverseat"
|
||||
|
||||
/obj/structure/fluff/bus/passable/seat/driver/attack_hand(mob/user)
|
||||
playsound(src.loc, 'sound/items/carhorn.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/carhorn.ogg', 50, 1)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/fluff/paper
|
||||
name = "dense lining of papers"
|
||||
|
||||
@@ -161,6 +161,9 @@
|
||||
new_spawn.mind.assigned_role = "Free Golem"
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
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")
|
||||
@@ -173,7 +176,6 @@
|
||||
create(ckey = user.ckey,name = user.real_name)
|
||||
user.death()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/servant
|
||||
has_owner = TRUE
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/grille/hulk_damage()
|
||||
return 60
|
||||
@@ -103,6 +103,9 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
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)
|
||||
@@ -268,7 +271,7 @@
|
||||
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
/obj/structure/grille/get_dumping_location(datum/component/storage/source,mob/user)
|
||||
return null
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
#define GUILLOTINE_BLADE_MAX_SHARP 10 // This is maxiumum sharpness and will decapitate without failure
|
||||
#define GUILLOTINE_DECAP_MIN_SHARP 7 // Minimum amount of sharpness for decapitation. Any less and it will just do severe brute damage
|
||||
#define GUILLOTINE_ANIMATION_LENGTH 9 // How many deciseconds the animation is
|
||||
#define GUILLOTINE_BLADE_RAISED 1
|
||||
#define GUILLOTINE_BLADE_MOVING 2
|
||||
#define GUILLOTINE_BLADE_DROPPED 3
|
||||
#define GUILLOTINE_BLADE_SHARPENING 4
|
||||
#define GUILLOTINE_HEAD_OFFSET 16 // How much we need to move the player to center their head
|
||||
#define GUILLOTINE_LAYER_DIFF 1.2 // How much to increase/decrease a head when it's buckled/unbuckled
|
||||
#define GUILLOTINE_ACTIVATE_DELAY 30 // Delay for executing someone
|
||||
#define GUILLOTINE_WRENCH_DELAY 10
|
||||
#define GUILLOTINE_ACTION_INUSE 5
|
||||
#define GUILLOTINE_ACTION_WRENCH 6
|
||||
|
||||
/obj/structure/guillotine
|
||||
name = "guillotine"
|
||||
desc = "A large structure used to remove the heads of traitors and treasonists."
|
||||
icon = 'icons/obj/guillotine.dmi'
|
||||
icon_state = "guillotine_raised"
|
||||
can_buckle = TRUE
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
max_buckled_mobs = 1
|
||||
buckle_lying = FALSE
|
||||
buckle_prevents_pull = TRUE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
var/blade_status = GUILLOTINE_BLADE_RAISED
|
||||
var/blade_sharpness = GUILLOTINE_BLADE_MAX_SHARP // How sharp the blade is
|
||||
var/kill_count = 0
|
||||
var/current_action = 0 // What's currently happening to the guillotine
|
||||
|
||||
/obj/structure/guillotine/Initialize()
|
||||
LAZYINITLIST(buckled_mobs)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/guillotine/examine(mob/user)
|
||||
..()
|
||||
|
||||
var/msg = ""
|
||||
|
||||
msg += "It is [anchored ? "wrenched to the floor." : "unsecured. A wrench should fix that."]<br/>"
|
||||
|
||||
if (blade_status == GUILLOTINE_BLADE_RAISED)
|
||||
msg += "The blade is raised, ready to fall, and"
|
||||
|
||||
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP)
|
||||
msg += " looks sharp enough to decapitate without any resistance."
|
||||
else
|
||||
msg += " doesn't look particularly sharp. Perhaps a whetstone can be used to sharpen it."
|
||||
else
|
||||
msg += "The blade is hidden inside the stocks."
|
||||
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
msg += "<br/>"
|
||||
msg += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
|
||||
|
||||
to_chat(user, msg)
|
||||
|
||||
return msg
|
||||
|
||||
/obj/structure/guillotine/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
// Currently being used by something
|
||||
if (current_action)
|
||||
return
|
||||
|
||||
switch (blade_status)
|
||||
if (GUILLOTINE_BLADE_MOVING)
|
||||
return
|
||||
if (GUILLOTINE_BLADE_DROPPED)
|
||||
blade_status = GUILLOTINE_BLADE_MOVING
|
||||
icon_state = "guillotine_raise"
|
||||
addtimer(CALLBACK(src, .proc/raise_blade), GUILLOTINE_ANIMATION_LENGTH)
|
||||
return
|
||||
if (GUILLOTINE_BLADE_RAISED)
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
if (user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='warning'>[user] begins to pull the lever!</span>",
|
||||
"<span class='warning'>You begin to the pull the lever.</span>")
|
||||
current_action = GUILLOTINE_ACTION_INUSE
|
||||
|
||||
if (do_after(user, GUILLOTINE_ACTIVATE_DELAY, target = src) && blade_status == GUILLOTINE_BLADE_RAISED)
|
||||
current_action = 0
|
||||
blade_status = GUILLOTINE_BLADE_MOVING
|
||||
icon_state = "guillotine_drop"
|
||||
addtimer(CALLBACK(src, .proc/drop_blade, user), GUILLOTINE_ANIMATION_LENGTH - 2) // Minus two so we play the sound and decap faster
|
||||
else
|
||||
current_action = 0
|
||||
else
|
||||
var/mob/living/carbon/human/H = buckled_mobs[1]
|
||||
|
||||
if (H)
|
||||
H.regenerate_icons()
|
||||
|
||||
unbuckle_all_mobs()
|
||||
else
|
||||
blade_status = GUILLOTINE_BLADE_MOVING
|
||||
icon_state = "guillotine_drop"
|
||||
addtimer(CALLBACK(src, .proc/drop_blade), GUILLOTINE_ANIMATION_LENGTH)
|
||||
|
||||
/obj/structure/guillotine/proc/raise_blade()
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
icon_state = "guillotine_raised"
|
||||
|
||||
/obj/structure/guillotine/proc/drop_blade(mob/user)
|
||||
if (buckled_mobs.len && blade_sharpness)
|
||||
var/mob/living/carbon/human/H = buckled_mobs[1]
|
||||
|
||||
if (!H)
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/head/head = H.get_bodypart("head")
|
||||
|
||||
if (QDELETED(head))
|
||||
return
|
||||
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 100, 1)
|
||||
if (blade_sharpness >= GUILLOTINE_DECAP_MIN_SHARP || head.brute_dam >= 100)
|
||||
head.dismember()
|
||||
add_logs(user, H, "beheaded", src)
|
||||
H.regenerate_icons()
|
||||
unbuckle_all_mobs()
|
||||
kill_count += 1
|
||||
|
||||
var/blood_overlay = "bloody"
|
||||
|
||||
if (kill_count == 2)
|
||||
blood_overlay = "bloodier"
|
||||
else if (kill_count > 2)
|
||||
blood_overlay = "bloodiest"
|
||||
|
||||
blood_overlay = "guillotine_" + blood_overlay + "_overlay"
|
||||
cut_overlays()
|
||||
add_overlay(mutable_appearance(icon, blood_overlay))
|
||||
|
||||
// The crowd is pleased
|
||||
// The delay is to making large crowds have a longer laster applause
|
||||
var/delay_offset = 0
|
||||
for(var/mob/M in viewers(src, 7))
|
||||
var/mob/living/carbon/human/C = M
|
||||
if (ishuman(M))
|
||||
addtimer(CALLBACK(C, /mob/.proc/emote, "clap"), delay_offset * 0.3)
|
||||
delay_offset++
|
||||
else
|
||||
H.apply_damage(15 * blade_sharpness, BRUTE, head)
|
||||
add_logs(user, H, "dropped the blade on", src, " non-fatally")
|
||||
H.emote("scream")
|
||||
|
||||
if (blade_sharpness > 1)
|
||||
blade_sharpness -= 1
|
||||
|
||||
blade_status = GUILLOTINE_BLADE_DROPPED
|
||||
icon_state = "guillotine"
|
||||
|
||||
/obj/structure/guillotine/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/sharpener))
|
||||
add_fingerprint(user)
|
||||
if (blade_status == GUILLOTINE_BLADE_SHARPENING)
|
||||
return
|
||||
|
||||
if (blade_status == GUILLOTINE_BLADE_RAISED)
|
||||
if (blade_sharpness < GUILLOTINE_BLADE_MAX_SHARP)
|
||||
blade_status = GUILLOTINE_BLADE_SHARPENING
|
||||
if(do_after(user, 7, target = src))
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
user.visible_message("<span class='notice'>[user] sharpens the large blade of the guillotine.</span>",
|
||||
"<span class='notice'>You sharpen the large blade of the guillotine.</span>")
|
||||
blade_sharpness += 1
|
||||
playsound(src, 'sound/items/unsheath.ogg', 100, 1)
|
||||
return
|
||||
else
|
||||
blade_status = GUILLOTINE_BLADE_RAISED
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The blade is sharp enough!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to raise the blade in order to sharpen it!</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/guillotine/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if (!anchored)
|
||||
to_chat(usr, "<span class='warning'>The [src] needs to be wrenched to the floor!</span>")
|
||||
return FALSE
|
||||
|
||||
if (!istype(M, /mob/living/carbon/human))
|
||||
to_chat(usr, "<span class='warning'>It doesn't look like they can fit into this properly!</span>")
|
||||
return FALSE // Can't decapitate non-humans
|
||||
|
||||
if (blade_status != GUILLOTINE_BLADE_RAISED)
|
||||
to_chat(usr, "<span class='warning'>You need to raise the blade before buckling someone in!</span>")
|
||||
return FALSE
|
||||
|
||||
return ..(M, force, FALSE)
|
||||
|
||||
/obj/structure/guillotine/post_buckle_mob(mob/living/M)
|
||||
if (!istype(M, /mob/living/carbon/human))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if (H.dna)
|
||||
if (H.dna.species)
|
||||
var/datum/species/S = H.dna.species
|
||||
|
||||
if (istype(S))
|
||||
H.cut_overlays()
|
||||
H.update_body_parts_head_only()
|
||||
H.pixel_y += -GUILLOTINE_HEAD_OFFSET // Offset their body so it looks like they're in the guillotine
|
||||
H.layer += GUILLOTINE_LAYER_DIFF
|
||||
else
|
||||
unbuckle_all_mobs()
|
||||
else
|
||||
unbuckle_all_mobs()
|
||||
else
|
||||
unbuckle_all_mobs()
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/guillotine/post_unbuckle_mob(mob/living/M)
|
||||
M.regenerate_icons()
|
||||
M.pixel_y -= -GUILLOTINE_HEAD_OFFSET // Move their body back
|
||||
M.layer -= GUILLOTINE_LAYER_DIFF
|
||||
..()
|
||||
|
||||
/obj/structure/guillotine/can_be_unfasten_wrench(mob/user, silent)
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
if (!silent)
|
||||
to_chat(user, "<span class='warning'>Can't unfasten, someone's strapped in!</span>")
|
||||
return FAILED_UNFASTEN
|
||||
|
||||
if (current_action)
|
||||
return FAILED_UNFASTEN
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/guillotine/wrench_act(mob/living/user, obj/item/I)
|
||||
if (current_action)
|
||||
return
|
||||
|
||||
current_action = GUILLOTINE_ACTION_WRENCH
|
||||
|
||||
if (do_after(user, GUILLOTINE_WRENCH_DELAY, target = src))
|
||||
current_action = 0
|
||||
default_unfasten_wrench(user, I, 0)
|
||||
dir = SOUTH
|
||||
return TRUE
|
||||
else
|
||||
current_action = 0
|
||||
|
||||
#undef GUILLOTINE_BLADE_MAX_SHARP
|
||||
#undef GUILLOTINE_DECAP_MIN_SHARP
|
||||
#undef GUILLOTINE_ANIMATION_LENGTH
|
||||
#undef GUILLOTINE_BLADE_RAISED
|
||||
#undef GUILLOTINE_BLADE_MOVING
|
||||
#undef GUILLOTINE_BLADE_DROPPED
|
||||
#undef GUILLOTINE_BLADE_SHARPENING
|
||||
#undef GUILLOTINE_HEAD_OFFSET
|
||||
#undef GUILLOTINE_LAYER_DIFF
|
||||
#undef GUILLOTINE_ACTIVATE_DELAY
|
||||
#undef GUILLOTINE_WRENCH_DELAY
|
||||
#undef GUILLOTINE_ACTION_INUSE
|
||||
#undef GUILLOTINE_ACTION_WRENCH
|
||||
@@ -54,6 +54,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/guncase/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(contents.len && open)
|
||||
|
||||
@@ -38,7 +38,9 @@
|
||||
add_overlay(H)
|
||||
|
||||
/obj/structure/headpike/attack_hand(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You take down [src].</span>")
|
||||
victim.forceMove(drop_location())
|
||||
victim = null
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/holosign/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
take_damage(5 , BRUTE, "melee", 1)
|
||||
@@ -112,6 +115,9 @@
|
||||
shockcd = FALSE
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!shockcd)
|
||||
if(ismob(user))
|
||||
var/mob/living/M = user
|
||||
|
||||
@@ -16,10 +16,9 @@
|
||||
var/const/max_signs = 4
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/New()
|
||||
/obj/structure/janitorialcart/Initialize()
|
||||
. = ..()
|
||||
create_reagents(100)
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
@@ -90,6 +89,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(mybag)
|
||||
|
||||
@@ -47,9 +47,8 @@
|
||||
can_buckle = 1
|
||||
max_integrity = 250
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/attack_paw(mob/user)
|
||||
return src.attack_hand(usr)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/kitchenspike/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(has_buckled_mobs())
|
||||
@@ -61,6 +60,7 @@
|
||||
deconstruct(TRUE)
|
||||
return TRUE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
|
||||
var/mob/living/L = user.pulling
|
||||
|
||||
@@ -110,6 +110,9 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
use(user)
|
||||
|
||||
/obj/structure/ladder/attack_paw(mob/user)
|
||||
@@ -122,8 +125,10 @@
|
||||
if(R.Adjacent(src))
|
||||
return use(R)
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
|
||||
use(user, TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/structure/ladder/proc/show_fluff_message(going_up, mob/user)
|
||||
if(going_up)
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
var/respawn_sound = 'sound/magic/staff_animation.ogg'
|
||||
|
||||
/obj/structure/life_candle/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!user.mind)
|
||||
return
|
||||
if(user.mind in linked_minds)
|
||||
|
||||
@@ -53,9 +53,12 @@
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_paw(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target)
|
||||
@@ -131,7 +134,7 @@
|
||||
to_chat(user, "<span class='notice'>You finish digging.</span>")
|
||||
deconstruct(TRUE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
return attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
obj_break(null, mapload)
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(broken || !Adjacent(user))
|
||||
return
|
||||
|
||||
@@ -118,6 +121,9 @@
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
|
||||
@@ -58,9 +58,12 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
open()
|
||||
|
||||
/obj/structure/bodycontainer/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bodycontainer/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(locked)
|
||||
to_chat(user, "<span class='danger'>It's locked.</span>")
|
||||
return
|
||||
@@ -316,9 +319,12 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/tray/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/tray/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if (src.connected)
|
||||
connected.close()
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -355,18 +355,24 @@
|
||||
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
|
||||
|
||||
/obj/structure/piano/attack_hand(mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return 1
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/structure/piano/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/piano/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/piano/ui_interact(mob/user)
|
||||
if(!user || !anchored)
|
||||
return
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return 1
|
||||
user.set_machine(src)
|
||||
song.interact(user)
|
||||
|
||||
|
||||
@@ -39,7 +39,11 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(mob/user)
|
||||
/obj/structure/noticeboard/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/noticeboard/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/auth = allowed(user)
|
||||
var/dat = "<B>[name]</B><BR>"
|
||||
for(var/obj/item/P in src)
|
||||
|
||||
@@ -84,6 +84,9 @@ FLOOR SAFES
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='?src=[REF(src)];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=[REF(src)];decrement=1'>-</a> [dial] <a href='?src=[REF(src)];increment=1'>+</a>"
|
||||
|
||||
@@ -15,14 +15,16 @@
|
||||
..()
|
||||
|
||||
/obj/structure/spirit_board/attack_hand(mob/user)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/spirit_board/attack_ghost(mob/dead/observer/user)
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/spirit_board/proc/spirit_board_pick_letter(mob/M)
|
||||
if(!spirit_board_checks(M))
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("[user] rubs some dust off from the [name]'s surface.", \
|
||||
@@ -80,11 +83,11 @@
|
||||
|
||||
/obj/structure/statue/uranium/attack_hand(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/statue/uranium/attack_paw(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/statue/uranium/proc/radiate()
|
||||
if(!active)
|
||||
@@ -239,7 +242,7 @@
|
||||
|
||||
/obj/structure/statue/bananium/attack_hand(mob/user)
|
||||
honk()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/statue/bananium/attack_paw(mob/user)
|
||||
honk()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
new /obj/structure/table/reinforced/brass(A)
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(Adjacent(user) && user.pulling && isliving(user.pulling))
|
||||
@@ -78,8 +78,7 @@
|
||||
else
|
||||
return
|
||||
user.stop_pulling()
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/attack_tk()
|
||||
return FALSE
|
||||
@@ -138,7 +137,6 @@
|
||||
if(T.contents.len > 0) // If the tray isn't empty
|
||||
var/list/obj/item/oldContents = T.contents.Copy()
|
||||
T.quick_empty()
|
||||
|
||||
for(var/obj/item/C in oldContents)
|
||||
C.forceMove(drop_location())
|
||||
|
||||
@@ -475,6 +473,7 @@
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
||||
. = ..()
|
||||
if ((!( istype(O, /obj/item) ) || user.get_active_held_item() != O))
|
||||
return
|
||||
if(!user.dropItemToGround(O))
|
||||
@@ -482,7 +481,6 @@
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
@@ -497,6 +495,9 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/rack/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -504,7 +505,6 @@
|
||||
user.visible_message("<span class='danger'>[user] kicks [src].</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
take_damage(rand(4,8), BRUTE, "melee", 1)
|
||||
|
||||
|
||||
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
to_chat(user, "<span class='notice'>You slide the target into the stake.</span>")
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(pinned_target)
|
||||
removeTarget(user)
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!pod_moving)
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(open_status == STATION_TUBE_OPEN)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
|
||||
/obj/structure/toilet/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(swirlie)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, "swing_hit", 25, 1)
|
||||
@@ -133,6 +136,9 @@
|
||||
hiddenitem = new /obj/item/reagent_containers/food/urinalcake
|
||||
|
||||
/obj/structure/urinal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
@@ -228,8 +234,10 @@
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
|
||||
/obj/machinery/shower/attack_hand(mob/M)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
on = !on
|
||||
update_icon()
|
||||
add_fingerprint(M)
|
||||
@@ -249,7 +257,6 @@
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(TURF_WET_WATER, min_wet_time = 5 SECONDS, wet_time_to_add = 1 SECONDS)
|
||||
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
to_chat(user, "<span class='notice'>The water temperature seems to be [watertemp].</span>")
|
||||
@@ -452,6 +459,9 @@
|
||||
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!user || !istype(user))
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
@@ -571,9 +581,10 @@
|
||||
icon_state = "puddle"
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O, mob/user, params)
|
||||
@@ -643,9 +654,11 @@
|
||||
|
||||
|
||||
/obj/structure/curtain/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
playsound(loc, 'sound/effects/curtain.ogg', 50, 1)
|
||||
toggle()
|
||||
..()
|
||||
|
||||
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth (loc, 2)
|
||||
|
||||
@@ -157,6 +157,9 @@
|
||||
. = ..()
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -167,7 +170,6 @@
|
||||
/obj/structure/window/attack_paw(mob/user)
|
||||
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
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
@@ -699,6 +701,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/window/paperframe/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
Reference in New Issue
Block a user