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:
@@ -11,6 +11,8 @@
|
||||
//Interaction
|
||||
/atom/movable/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(can_buckle && has_buckled_mobs())
|
||||
if(buckled_mobs.len > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
|
||||
|
||||
@@ -98,6 +98,9 @@
|
||||
roll_and_drop(user.loc)
|
||||
|
||||
/obj/structure/sign/poster/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(ruined)
|
||||
return
|
||||
visible_message("[user] rips [src] in a single, decisive motion!" )
|
||||
|
||||
@@ -109,6 +109,9 @@
|
||||
beauty = -200
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(isflyperson(H))
|
||||
|
||||
@@ -286,12 +286,15 @@
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/foamedmetal/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>")
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(get_turf(user) == get_turf(src))
|
||||
teleport(user)
|
||||
if(Adjacent(user))
|
||||
|
||||
@@ -99,10 +99,11 @@
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/spiderling/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/obj/structure/spider/spiderling/hunter
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
|
||||
|
||||
@@ -49,6 +49,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
|
||||
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
|
||||
|
||||
var/interaction_flags_item = INTERACT_ITEM_ATTACK_HAND_PICKUP
|
||||
|
||||
var/item_color = null //this needs deprecating, soonish
|
||||
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||
@@ -98,6 +100,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/force_string //string form of an item's force. Edit this var only to set a custom force string
|
||||
var/last_force_string_check = 0
|
||||
var/tip_timer
|
||||
|
||||
var/icon_override //CIT CHANGE - adds icon_override var. Will be removed with #4322
|
||||
|
||||
var/trigger_guard = TRIGGER_GUARD_NONE
|
||||
@@ -238,6 +241,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/item/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
if(anchored)
|
||||
@@ -250,7 +256,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
can_handle_hot = TRUE
|
||||
else if(C.gloves && (C.gloves.max_heat_protection_temperature > 360))
|
||||
can_handle_hot = TRUE
|
||||
else if(C.has_trait(TRAIT_RESISTHEAT))
|
||||
else if(C.has_trait(TRAIT_RESISTHEAT) || C.has_trait(TRAIT_RESISTHEATHANDS))
|
||||
can_handle_hot = TRUE
|
||||
|
||||
if(can_handle_hot)
|
||||
@@ -272,6 +278,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
|
||||
C.update_damage_overlays()
|
||||
|
||||
if(!(interaction_flags_item & INTERACT_ITEM_ATTACK_HAND_PICKUP)) //See if we're supposed to auto pickup.
|
||||
return
|
||||
|
||||
if(istype(loc, /obj/item/storage))
|
||||
//If the item is in a storage item, take it out
|
||||
@@ -281,7 +289,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(throwing)
|
||||
throwing.finalize(FALSE)
|
||||
if(loc == user)
|
||||
if(!user.dropItemToGround(src))
|
||||
if(!allow_attack_hand_drop(user) || !user.dropItemToGround(src))
|
||||
return
|
||||
|
||||
pickup(user)
|
||||
@@ -413,9 +421,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
SendSignal(COMSIG_ITEM_PICKUP, user)
|
||||
item_flags |= IN_INVENTORY
|
||||
return
|
||||
|
||||
/obj/item/proc/allow_attack_hand_drop(mob/user)
|
||||
return TRUE
|
||||
|
||||
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||
/obj/item/proc/on_exit_storage(obj/item/storage/S)
|
||||
|
||||
@@ -306,7 +306,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
|
||||
/obj/item/pipe_dispenser/pre_attackby(atom/A, mob/user)
|
||||
/obj/item/pipe_dispenser/pre_attack(atom/A, mob/user)
|
||||
if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
var/lastattacker = null
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
|
||||
if(user.a_intent == INTENT_HELP || pushed_over)
|
||||
return ..()
|
||||
|
||||
@@ -290,6 +290,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
desc = "A Shady Jim's Super Slims cigarette."
|
||||
list_reagents = list("nicotine" = 15, "lipolicide" = 4, "ammonia" = 2, "plantbgone" = 1, "toxin" = 1.5)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/xeno
|
||||
desc = "A Xeno Filtered brand cigarette."
|
||||
list_reagents = list ("nicotine" = 20, "regen_jelly" = 15, "krokodil" = 4)
|
||||
|
||||
// Rollies.
|
||||
|
||||
/obj/item/clothing/mask/cigarette/rollie
|
||||
@@ -609,6 +613,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"
|
||||
|
||||
|
||||
/obj/item/lighter/slime
|
||||
name = "slime zippo"
|
||||
desc = "A specialty zippo made from slimes and industry. Has a much hotter flame than normal."
|
||||
icon_state = "slimezippo"
|
||||
heat = 3000 //Blue flame!
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
grind_results = list("iron" = 1, "welding_fuel" = 5, "pyroxadone" = 5)
|
||||
|
||||
|
||||
///////////
|
||||
//ROLLING//
|
||||
///////////
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
/obj/item/defibrillator/ui_action_click()
|
||||
toggle_paddles()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/defibrillator/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(slot_flags == SLOT_BACK)
|
||||
@@ -96,9 +97,10 @@
|
||||
return
|
||||
else if(istype(loc, /obj/machinery/defibrillator_mount))
|
||||
ui_action_click() //checks for this are handled in defibrillator.mount.dm
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/defibrillator/MouseDrop(obj/over_object)
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
|
||||
|
||||
@@ -167,7 +167,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mob/M = usr
|
||||
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src))
|
||||
return attack_self(M)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/device/pda/attack_self(mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
|
||||
@@ -46,8 +46,11 @@
|
||||
tracking = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/camera_bug/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/camera_bug/interact(mob/user = usr)
|
||||
/obj/item/device/camera_bug/ui_interact(mob/user = usr)
|
||||
. = ..()
|
||||
var/datum/browser/popup = new(user, "camerabug","Camera Bug",nref=src)
|
||||
popup.set_content(menu(get_cameras()))
|
||||
popup.open()
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
/obj/effect/dummy/chameleon/attackby()
|
||||
master.disrupt()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/effect/dummy/chameleon/attack_hand()
|
||||
master.disrupt()
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/instrument/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/instrument/ui_interact(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
return
|
||||
|
||||
/obj/item/device/powersink/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(mode)
|
||||
if(DISCONNECTED)
|
||||
..()
|
||||
|
||||
@@ -27,13 +27,14 @@
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/device/electropack/attack_hand(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(src == C.back)
|
||||
to_chat(user, "<span class='warning'>You need help taking this off!</span>")
|
||||
return
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/device/electropack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
|
||||
@@ -86,6 +86,9 @@
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/intercom/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/intercom/interact(mob/user)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=75, MAT_GLASS=25)
|
||||
obj_flags = USES_TGUI
|
||||
|
||||
var/on = TRUE
|
||||
var/frequency = FREQ_COMMON
|
||||
@@ -105,6 +106,7 @@
|
||||
|
||||
/obj/item/device/radio/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
. = ..()
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio", name, 370, 220 + channels.len * 22, master_ui, state)
|
||||
@@ -144,6 +146,9 @@
|
||||
var/max = format_frequency(freerange ? MAX_FREE_FREQ : MAX_FREQ)
|
||||
tune = input("Tune frequency ([min]-[max]):", name, format_frequency(frequency)) as null|num
|
||||
if(!isnull(tune) && !..())
|
||||
if (tune < MIN_FREE_FREQ && tune <= MAX_FREE_FREQ / 10)
|
||||
// allow typing 144.7 to get 1447
|
||||
tune *= 10
|
||||
. = TRUE
|
||||
else if(adjust)
|
||||
tune = frequency + adjust * 10
|
||||
|
||||
@@ -531,4 +531,7 @@ GAS ANALYZER
|
||||
if (T.cores > 1)
|
||||
to_chat(user, "Multiple cores detected")
|
||||
to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]")
|
||||
if(T.effectmod)
|
||||
to_chat(user, "<span class='notice'>Core mutation in progress: [T.effectmod]</span>")
|
||||
to_chat(user, "<span_class = 'notice'>Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]</span>")
|
||||
to_chat(user, "========================")
|
||||
@@ -53,22 +53,21 @@
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
|
||||
@@ -90,7 +90,7 @@ effective or pretty fucking useless.
|
||||
spawn((wavelength+(intensity*4))*5)
|
||||
if(M)
|
||||
if(intensity >= 5)
|
||||
M.apply_effect(round(intensity/0.075), UNCONSCIOUS)
|
||||
M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS)
|
||||
M.rad_act(intensity*10)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
@@ -107,7 +107,10 @@ effective or pretty fucking useless.
|
||||
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/interact(mob/user)
|
||||
user.set_machine(src)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/ui_interact(mob/user)
|
||||
. = ..()
|
||||
|
||||
var/dat = "Irradiation: <A href='?src=[REF(src)];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
|
||||
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=[REF(src)];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
|
||||
|
||||
@@ -114,11 +114,13 @@
|
||||
/obj/item/toy/eightball/haunted/MakeHaunted()
|
||||
return FALSE
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/item/toy/eightball/haunted/attack_ghost(mob/user)
|
||||
if(!shaking)
|
||||
to_chat(user, "<span class='warning'>[src] is not currently being shaken.</span>")
|
||||
return
|
||||
interact(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/eightball/haunted/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
last_message = raw_message
|
||||
|
||||
@@ -54,7 +54,9 @@
|
||||
max_spawned = base.max_spawned
|
||||
icon_state = "[base_state]_active"
|
||||
active = TRUE
|
||||
walk_away(src,loc,rand(1,4))
|
||||
var/steps = rand(1,4)
|
||||
for(var/i in 1 to steps)
|
||||
step_away(src,loc)
|
||||
addtimer(CALLBACK(src, .proc/prime), rand(15,60))
|
||||
|
||||
/obj/item/grenade/clusterbuster/segment/prime()
|
||||
@@ -76,7 +78,9 @@
|
||||
if(istype(P))
|
||||
P.active = TRUE
|
||||
addtimer(CALLBACK(P, /obj/item/grenade/proc/prime), rand(15,60))
|
||||
walk_away(P,loc,rand(1,4))
|
||||
var/steps = rand(1,4)
|
||||
for(var/i in 1 to steps)
|
||||
step_away(src,loc)
|
||||
|
||||
/obj/effect/payload_spawner/random_slime
|
||||
var/volatile = FALSE
|
||||
@@ -85,10 +89,17 @@
|
||||
volatile = TRUE
|
||||
|
||||
/obj/item/slime_extract/proc/activate_slime()
|
||||
var/list/slime_chems = list("plasma","water","blood")
|
||||
for(var/i in 1 to slime_chems.len)
|
||||
if(!QDELETED(src))
|
||||
reagents.add_reagent(pick_n_take(slime_chems),5) //Add them in random order so we get all effects
|
||||
var/list/slime_chems = src.activate_reagents
|
||||
if(!QDELETED(src))
|
||||
var/chem = pick(slime_chems)
|
||||
var/amount = 5
|
||||
if(chem == "lesser plasma") //In the rare case we get another rainbow.
|
||||
chem = "plasma"
|
||||
amount = 4
|
||||
if(chem == "holy water and uranium")
|
||||
chem = "uranium"
|
||||
reagents.add_reagent("holywater")
|
||||
reagents.add_reagent(chem,amount)
|
||||
|
||||
/obj/effect/payload_spawner/random_slime/spawn_payload(type, numspawned)
|
||||
for(var/loop = numspawned ,loop > 0, loop--)
|
||||
@@ -96,7 +107,9 @@
|
||||
var/obj/item/slime_extract/P = new chosen(loc)
|
||||
if(volatile)
|
||||
addtimer(CALLBACK(P, /obj/item/slime_extract/proc/activate_slime), rand(15,60))
|
||||
walk_away(P,loc,rand(1,4))
|
||||
var/steps = rand(1,4)
|
||||
for(var/i in 1 to steps)
|
||||
step_away(src,loc)
|
||||
|
||||
//////////////////////////////////
|
||||
//Custom payload clusterbusters
|
||||
|
||||
@@ -108,10 +108,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
|
||||
/obj/item/grenade/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -310,6 +310,7 @@
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
|
||||
Crossed(user) //honk
|
||||
. = ..()
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/cyborg
|
||||
breakouttime = 20 // Cyborgs shouldn't have a strong restraint
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
|
||||
/obj/item/implantpad/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(case && user.is_holding(src))
|
||||
user.put_in_active_hand(case)
|
||||
|
||||
@@ -30,9 +33,6 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/implantpad/attackby(obj/item/implantcase/C, mob/user, params)
|
||||
if(istype(C, /obj/item/implantcase))
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
add_overlay("[locked ? "" : "un"]locked")
|
||||
|
||||
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
|
||||
. = ..()
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
usr.visible_message("<span class='notice'>[usr] unloads [src].</span>", \
|
||||
"<span class='notice'>You unload [src] onto [over_atom].</span>")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.Knockdown(100)
|
||||
M.apply_effect(STUTTER, 5)
|
||||
M.apply_effect(EFFECT_STUTTER, 5)
|
||||
|
||||
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
|
||||
|
||||
@@ -32,9 +32,11 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.removeTarget(user)
|
||||
..()
|
||||
|
||||
/obj/item/target/syndicate
|
||||
icon_state = "target_s"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
var/obj/item/clothing/shoes/magboots/M = H.shoes
|
||||
if(M.magpulse)
|
||||
continue
|
||||
H.apply_effect(20, KNOCKDOWN, 0)
|
||||
H.apply_effect(20, EFFECT_KNOCKDOWN, 0)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_self(mob/user)// to prevent the construction menu from ever happening
|
||||
to_chat(user, "<span class='warning'>You cannot crush the polycrystal in-hand, try breaking one off.</span>")
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
|
||||
@@ -99,7 +99,11 @@
|
||||
/obj/item/stack/attack_self(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/stack/interact(mob/user, recipes_sublist)
|
||||
/obj/item/stack/interact(mob/user, sublist)
|
||||
ui_interact(user, sublist)
|
||||
|
||||
/obj/item/stack/ui_interact(mob/user, recipes_sublist)
|
||||
. = ..()
|
||||
if (!recipes)
|
||||
return
|
||||
if (!src || get_amount() <= 0)
|
||||
@@ -222,16 +226,16 @@
|
||||
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(R.window_checks && !valid_window_location(usr.loc, usr.dir))
|
||||
to_chat(usr, "<span class='warning'>The [R.title] won't fit here!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
|
||||
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(R.on_floor && !isfloorturf(usr.loc))
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(R.placement_checks)
|
||||
switch(R.placement_checks)
|
||||
if(STACK_CHECK_CARDINALS)
|
||||
@@ -240,25 +244,26 @@
|
||||
step = get_step(usr, direction)
|
||||
if(locate(R.result_type) in step)
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must not be built directly adjacent to another!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(STACK_CHECK_ADJACENT)
|
||||
if(locate(R.result_type) in range(1, usr))
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed at least one tile away from others of its type!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
|
||||
if(zero_amount())
|
||||
return 0
|
||||
/obj/item/stack/use(used, transfer = FALSE, check = TRUE) // return 0 = borked; return 1 = had enough
|
||||
if(check && zero_amount())
|
||||
return FALSE
|
||||
if (is_cyborg)
|
||||
return source.use_charge(used * cost)
|
||||
if (amount < used)
|
||||
return 0
|
||||
return FALSE
|
||||
amount -= used
|
||||
zero_amount()
|
||||
if(check)
|
||||
zero_amount()
|
||||
update_icon()
|
||||
update_weight()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/tool_use_check(mob/living/user, amount)
|
||||
if(get_amount() < amount)
|
||||
@@ -315,13 +320,14 @@
|
||||
merge(AM)
|
||||
. = ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/stack/attack_hand(mob/user)
|
||||
if (user.get_inactive_held_item() == src)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
return change_stack(user,1)
|
||||
else
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
@@ -332,25 +338,28 @@
|
||||
if(zero_amount())
|
||||
return
|
||||
//get amount from user
|
||||
var/min = 0
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as num)
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
max = get_amount()
|
||||
stackmaterial = min(max, stackmaterial)
|
||||
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else
|
||||
change_stack(user,stackmaterial)
|
||||
change_stack(user, stackmaterial)
|
||||
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
|
||||
|
||||
/obj/item/stack/proc/change_stack(mob/user,amount)
|
||||
var/obj/item/stack/F = new type(user, amount, FALSE)
|
||||
/obj/item/stack/proc/change_stack(mob/user, amount)
|
||||
if(!use(amount, TRUE, FALSE))
|
||||
return FALSE
|
||||
var/obj/item/stack/F = new type(user? user : drop_location(), amount, FALSE)
|
||||
. = F
|
||||
F.copy_evidences(src)
|
||||
user.put_in_hands(F, merge_stacks=FALSE)
|
||||
add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
use(amount, TRUE)
|
||||
|
||||
|
||||
if(user)
|
||||
if(!user.put_in_hands(F, merge_stacks = FALSE))
|
||||
F.forceMove(user.drop_location())
|
||||
add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
zero_amount()
|
||||
|
||||
/obj/item/stack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, merge_type))
|
||||
|
||||
@@ -231,6 +231,12 @@
|
||||
icon_state = "shadyjim"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/shadyjims
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigpack_xeno
|
||||
name = "\improper Xeno Filtered packet"
|
||||
desc = "Loaded with 100% pure slime. And also nicotine."
|
||||
icon_state = "slime"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/xeno
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
desc = "A pack of Nanotrasen brand rolling papers."
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
L.Knockdown(stunforce)
|
||||
L.adjustStaminaLoss(stunforce*0.1)//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented.
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
L.apply_effect(EFFECT_STUTTER, stunforce)
|
||||
if(user)
|
||||
L.lastattacker = user.real_name
|
||||
L.lastattackerckey = user.ckey
|
||||
|
||||
@@ -75,16 +75,18 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/watertank/attack_hand(mob/user)
|
||||
if(src.loc == user)
|
||||
ui_action_click()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
..()
|
||||
if(loc == user)
|
||||
ui_action_click()
|
||||
|
||||
/obj/item/watertank/MouseDrop(obj/over_object)
|
||||
var/mob/M = src.loc
|
||||
var/mob/M = loc
|
||||
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
return ..()
|
||||
|
||||
/obj/item/watertank/attackby(obj/item/W, mob/user, params)
|
||||
if(W == noz)
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
. = ..()
|
||||
active_portal_pairs = list()
|
||||
|
||||
/obj/item/hand_tele/pre_attackby(atom/target, mob/user, params)
|
||||
/obj/item/hand_tele/pre_attack(atom/target, mob/user, params)
|
||||
if(try_dispel_portal(target, user))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -422,10 +422,11 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/prize/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(loc == user)
|
||||
attack_self(user)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/prize/ripley
|
||||
name = "toy Ripley"
|
||||
@@ -504,7 +505,7 @@
|
||||
|
||||
// Talking toys are language universal, and thus all species can use them
|
||||
/obj/item/toy/talking/attack_alien(mob/user)
|
||||
. = attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/toy/talking/attack_self(mob/user)
|
||||
if(!cooldown)
|
||||
@@ -653,7 +654,8 @@
|
||||
cards += "Ace of Clubs"
|
||||
cards += "Ace of Diamonds"
|
||||
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
//ATTACK HAND NOT CALLING PARENT
|
||||
/obj/item/toy/cards/deck/attack_hand(mob/user)
|
||||
if(user.lying)
|
||||
return
|
||||
@@ -721,6 +723,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/cards/deck/MouseDrop(atom/over_object)
|
||||
. = ..()
|
||||
var/mob/living/M = usr
|
||||
if(!istype(M) || usr.incapacitated() || usr.lying)
|
||||
return
|
||||
@@ -753,7 +756,8 @@
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/item/toy/cards/cardhand/interact(mob/user)
|
||||
/obj/item/toy/cards/cardhand/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat = "You have:<BR>"
|
||||
for(var/t in currenthand)
|
||||
dat += "<A href='?src=[REF(src)];pick=[t]'>A [t].</A><BR>"
|
||||
|
||||
@@ -178,9 +178,9 @@
|
||||
if(H != null)
|
||||
to_chat(user, "<span class='notice'>[src] is too cumbersome to carry in one hand!</span>")
|
||||
return
|
||||
if(src.loc != user)
|
||||
if(loc != user)
|
||||
wield(user)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/twohanded/required/equipped(mob/user, slot)
|
||||
..()
|
||||
|
||||
@@ -33,4 +33,4 @@
|
||||
if(charges[1] > 0)
|
||||
to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).")
|
||||
else
|
||||
to_chat(user, "It's empty!")
|
||||
to_chat(user, "It's empty!")
|
||||
@@ -240,6 +240,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
|
||||
//the obj is deconstructed into pieces, whether through careful disassembly or when destroyed.
|
||||
/obj/proc/deconstruct(disassembled = TRUE)
|
||||
SendSignal(COMSIG_OBJ_DECONSTRUCT, disassembled)
|
||||
qdel(src)
|
||||
|
||||
//what happens when the obj's health is below integrity_failure level.
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
var/list/req_one_access
|
||||
var/req_one_access_txt = "0"
|
||||
|
||||
|
||||
/obj/vv_edit_var(vname, vval)
|
||||
switch(vname)
|
||||
if("obj_flags")
|
||||
@@ -110,18 +109,18 @@
|
||||
return null
|
||||
|
||||
/obj/proc/updateUsrDialog()
|
||||
if(obj_flags & IN_USE)
|
||||
if((obj_flags & IN_USE) && !(obj_flags & USES_TGUI))
|
||||
var/is_in_use = 0
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
src.attack_hand(M)
|
||||
ui_interact(usr)
|
||||
if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr))
|
||||
if (!(usr in nearby))
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = 1
|
||||
src.attack_ai(usr)
|
||||
ui_interact(usr)
|
||||
|
||||
// check for TK users
|
||||
|
||||
@@ -131,7 +130,7 @@
|
||||
if(usr.client && usr.machine==src)
|
||||
if(H.dna.check_mutation(TK))
|
||||
is_in_use = 1
|
||||
src.attack_hand(usr)
|
||||
ui_interact(usr)
|
||||
if (is_in_use)
|
||||
obj_flags |= IN_USE
|
||||
else
|
||||
@@ -153,9 +152,10 @@
|
||||
|
||||
|
||||
/obj/attack_ghost(mob/user)
|
||||
if(ui_interact(user) != -1)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
..()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/proc/container_resist(mob/living/user)
|
||||
return
|
||||
@@ -195,10 +195,7 @@
|
||||
/obj/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/obj/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
return
|
||||
|
||||
/obj/get_dumping_location(obj/item/storage/source,mob/user)
|
||||
/obj/get_dumping_location(datum/component/storage/source,mob/user)
|
||||
return get_turf(src)
|
||||
|
||||
/obj/proc/CanAStarPass()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
pressure_resistance = 8
|
||||
max_integrity = 300
|
||||
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
|
||||
var/climb_time = 20
|
||||
var/climb_stun = 20
|
||||
var/climbable = FALSE
|
||||
@@ -26,16 +27,13 @@
|
||||
|
||||
/obj/structure/attack_hand(mob/user)
|
||||
. = ..()
|
||||
add_fingerprint(user)
|
||||
if(.)
|
||||
return
|
||||
if(structureclimber && structureclimber != user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
structureclimber.Knockdown(40)
|
||||
structureclimber.visible_message("<span class='warning'>[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].</span>")
|
||||
interact(user)
|
||||
|
||||
/obj/structure/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/ui_act(action, params)
|
||||
..()
|
||||
@@ -49,15 +47,14 @@
|
||||
if(user.canmove)
|
||||
climb_structure(user)
|
||||
return
|
||||
if ((!( istype(O, /obj/item) ) || user.get_active_held_item() != O))
|
||||
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
|
||||
return
|
||||
if(iscyborg(user))
|
||||
return
|
||||
if(!user.drop_all_held_items())
|
||||
if(!user.dropItemToGround(O))
|
||||
return
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
/obj/structure/proc/do_climb(atom/movable/A)
|
||||
if(climbable)
|
||||
|
||||
@@ -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