mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
This commit is contained in:
@@ -30,7 +30,10 @@
|
||||
watchowner = null
|
||||
return
|
||||
|
||||
/obj/item/deadringer/attack_self(var/mob/living/user as mob)
|
||||
/obj/item/deadringer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/mob/living/H = src.loc
|
||||
if (!ishuman(H))
|
||||
to_chat(H, span_blue("You have no clue what to do with this thing."))
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
|
||||
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
|
||||
|
||||
///var used for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/assembly/proc/holder_movement()
|
||||
return
|
||||
|
||||
@@ -89,11 +92,15 @@
|
||||
else
|
||||
. += "\The [src] can be attached!"
|
||||
|
||||
/obj/item/assembly/attack_self(mob/user as mob)
|
||||
/obj/item/assembly/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(!user)
|
||||
return 0
|
||||
return FALSE
|
||||
tgui_interact(user)
|
||||
return 1
|
||||
|
||||
/obj/item/assembly/tgui_state(mob/user)
|
||||
return GLOB.tgui_deep_inventory_state
|
||||
|
||||
@@ -125,8 +125,11 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/assembly_holder/attack_self(var/mob/user)
|
||||
src.add_fingerprint(user)
|
||||
/obj/item/assembly_holder/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
add_fingerprint(user)
|
||||
if(src.secured)
|
||||
if(!a_left || !a_right)
|
||||
to_chat(user, span_warning(" BUG:Assembly part missing, please report this!"))
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
secured = 1
|
||||
wires = WIRE_RECEIVE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/assembly/igniter/activate()
|
||||
if(!..())
|
||||
@@ -32,7 +33,10 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/assembly/igniter/attack_self(var/mob/user)
|
||||
/obj/item/assembly/igniter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
origin_tech = list(TECH_COMBAT = 1)
|
||||
matter = list(MAT_STEEL = 100)
|
||||
var/armed = 0
|
||||
special_handling = TRUE
|
||||
|
||||
|
||||
/obj/item/assembly/mousetrap/examine(var/mob/user)
|
||||
@@ -49,7 +50,10 @@
|
||||
update_icon()
|
||||
pulse(0)
|
||||
|
||||
/obj/item/assembly/mousetrap/attack_self(var/mob/living/user)
|
||||
/obj/item/assembly/mousetrap/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!armed)
|
||||
to_chat(user, span_notice("You arm [src]."))
|
||||
else
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
var/obj/item/radio/electropack/part2 = null
|
||||
var/status = 0
|
||||
w_class = ITEMSIZE_HUGE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/assembly/shock_kit/Destroy()
|
||||
qdel(part1)
|
||||
@@ -33,7 +34,10 @@
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/attack_self(mob/user as mob)
|
||||
/obj/item/assembly/shock_kit/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
part1.attack_self(user, status)
|
||||
part2.attack_self(user, status)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
matter = list(MAT_STEEL = 500, MAT_GLASS = 50)
|
||||
var/listening = 0
|
||||
var/recorded //the activation message
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/assembly/voice/hear_talk(mob/M, list/message_pieces, verb)
|
||||
var/msg = multilingual_to_message(message_pieces)
|
||||
@@ -27,6 +28,9 @@
|
||||
|
||||
|
||||
/obj/item/assembly/voice/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!user)
|
||||
return FALSE
|
||||
activate()
|
||||
|
||||
@@ -84,14 +84,16 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/blobcore_chunk/attack_self(var/mob/user)
|
||||
/obj/item/blobcore_chunk/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(blob_type && world.time > active_ability_cooldown + last_active_use)
|
||||
last_active_use = world.time
|
||||
to_chat(user, span_alien("[icon2html(src, user.client)] \The [src] gesticulates."))
|
||||
blob_type.on_chunk_use(src, user)
|
||||
else
|
||||
to_chat(user, span_notice("\The [src] doesn't seem to respond."))
|
||||
..()
|
||||
|
||||
/obj/item/blobcore_chunk/process()
|
||||
if(blob_type && should_tick && world.time > passive_ability_cooldown + last_passive_use)
|
||||
|
||||
@@ -253,6 +253,9 @@
|
||||
icon_state = "roulette_ball_glass"
|
||||
|
||||
/obj/item/roulette_ball/hollow/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!trapped)
|
||||
to_chat(user, span_notice("\The [src] is empty!"))
|
||||
return
|
||||
|
||||
@@ -239,6 +239,9 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
points_stored = max(0, points_stored += amount)
|
||||
|
||||
/obj/item/cataloguer/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
interact(user)
|
||||
|
||||
/obj/item/cataloguer/interact(mob/user)
|
||||
|
||||
@@ -476,6 +476,7 @@
|
||||
var/breath_masked = FALSE
|
||||
var/obj/item/clothing/mask/breath/breathmask
|
||||
actions_types = list(/datum/action/item_action/pull_on_gaiter)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/gaiter/update_clothing_icon()
|
||||
. = ..()
|
||||
@@ -504,6 +505,9 @@
|
||||
item_flags |= FLEXIBLEMATERIAL
|
||||
|
||||
/obj/item/clothing/accessory/gaiter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/gaiterstring = "You pull [src] "
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]_up"
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
icon_state = "collar_blk"
|
||||
var/writtenon = 0
|
||||
var/icon_previous_override
|
||||
special_handling = TRUE
|
||||
///Var for attack_self chain
|
||||
var/special_collar = FALSE
|
||||
|
||||
//Forces different sprite sheet on equip
|
||||
/obj/item/clothing/accessory/collar/Initialize(mapload)
|
||||
@@ -111,7 +114,7 @@
|
||||
return
|
||||
|
||||
/obj/item/clothing/accessory/collar/bell/proc/jingledreset()
|
||||
jingled = 0
|
||||
jingled = 0
|
||||
|
||||
/obj/item/clothing/accessory/collar/shock
|
||||
name = "Shock collar"
|
||||
@@ -123,6 +126,7 @@
|
||||
var/frequency = AMAG_ELE_FREQ
|
||||
var/code = 2
|
||||
var/datum/radio_frequency/radio_connection
|
||||
special_collar = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/collar/shock/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -138,7 +142,10 @@
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
/obj/item/clothing/accessory/collar/shock/attack_self(mob/user as mob, flag1)
|
||||
/obj/item/clothing/accessory/collar/shock/attack_self(mob/user, flag1)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!ishuman(user))
|
||||
return
|
||||
tgui_interact(user)
|
||||
@@ -259,7 +266,12 @@
|
||||
/obj/item/clothing/accessory/collar/holo/indigestible/digest_act(var/atom/movable/item_storage = null)
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/accessory/collar/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/collar/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_collar)
|
||||
return FALSE
|
||||
if(istype(src,/obj/item/clothing/accessory/collar/holo))
|
||||
to_chat(user,span_notice("[name]'s interface is projected onto your hand."))
|
||||
else
|
||||
@@ -629,8 +641,14 @@
|
||||
var/sentientprizeflavor = null //Description to show on the SPASM
|
||||
var/sentientprizeooc = null //OOC text to show on the SPASM
|
||||
var/sentientprizeitemtf = FALSE //Whether the person opted in to allowing themselves to be item TF'd as a prize
|
||||
special_handling = TRUE
|
||||
special_collar = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/collar/casinosentientprize/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/collar/casinosentientprize/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
return TRUE
|
||||
//keeping it blank so people don't tag and reset collar status
|
||||
|
||||
/obj/item/clothing/accessory/collar/casinosentientprize_fake
|
||||
@@ -693,6 +711,7 @@
|
||||
icon_state = "roughcloak"
|
||||
item_state = "roughcloak"
|
||||
actions_types = list(/datum/action/item_action/adjust_cloak)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/poncho/roles/cloak/half/update_clothing_icon()
|
||||
. = ..()
|
||||
@@ -700,7 +719,10 @@
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/accessory/poncho/roles/cloak/half/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/poncho/roles/cloak/half/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]_open"
|
||||
src.item_state = "[item_state]_open"
|
||||
@@ -964,6 +986,7 @@
|
||||
icon_state = "neo_ranger"
|
||||
item_state = "neo_ranger"
|
||||
actions_types = list(/datum/action/item_action/adjust_poncho)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/poncho/roles/neo_ranger/update_clothing_icon()
|
||||
. = ..()
|
||||
@@ -971,7 +994,10 @@
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/accessory/poncho/roles/neo_ranger/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/poncho/roles/neo_ranger/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]_open"
|
||||
src.item_state = "[item_state]_open"
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
|
||||
var/stored_name
|
||||
var/badge_string = "Corporate Security"
|
||||
special_handling = TRUE
|
||||
///var for attack_self chain
|
||||
var/sheriff_badge = FALSE
|
||||
///Another var for attack_self chain
|
||||
var/fluff_badge = FALSE
|
||||
var/holo = FALSE
|
||||
|
||||
/obj/item/clothing/accessory/badge/proc/set_name(var/new_name)
|
||||
stored_name = new_name
|
||||
@@ -20,9 +26,20 @@
|
||||
|
||||
/obj/item/clothing/accessory/badge/proc/set_desc(var/mob/living/carbon/human/H)
|
||||
|
||||
/obj/item/clothing/accessory/badge/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/badge/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(sheriff_badge)
|
||||
return FALSE
|
||||
if(fluff_badge)
|
||||
return FALSE
|
||||
if(!stored_name)
|
||||
to_chat(user, "You polish your old badge fondly, shining up the surface.")
|
||||
if(holo)
|
||||
to_chat(user, "Waving around a holobadge before swiping an ID would be pretty pointless.")
|
||||
return
|
||||
else
|
||||
to_chat(user, "You polish your old badge fondly, shining up the surface.")
|
||||
set_name(user.real_name)
|
||||
return
|
||||
|
||||
@@ -81,17 +98,12 @@
|
||||
icon_state = "holobadge"
|
||||
var/emagged //Emagging removes Sec check.
|
||||
var/valid_access = list(ACCESS_SECURITY) //Default access is security, to be overriden or expanded as desired
|
||||
holo = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/cord
|
||||
icon_state = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE | SLOT_BELT
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
to_chat(user, "Waving around a holobadge before swiping an ID would be pretty pointless.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/accessory/badge/holo/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (emagged)
|
||||
to_chat(user, span_danger("\The [src] is already cracked."))
|
||||
@@ -188,8 +200,13 @@
|
||||
desc = "This town ain't big enough for the two of us, pardner."
|
||||
icon_state = "sheriff_toy"
|
||||
item_state = "sheriff_toy"
|
||||
special_handling = TRUE
|
||||
sheriff_badge = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/badge/sheriff/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/badge/sheriff/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.visible_message("[user] shows their sheriff badge. There's a new sheriff in town!",\
|
||||
"You flash the sheriff badge to everyone around you!")
|
||||
|
||||
|
||||
@@ -10,8 +10,12 @@
|
||||
var/base_icon
|
||||
var/open
|
||||
var/obj/item/held //Item inside locket.
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/locket/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!base_icon)
|
||||
base_icon = icon_state
|
||||
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
w_class = ITEMSIZE_TINY
|
||||
slot = ACCESSORY_SLOT_MEDAL
|
||||
var/owner = 0 //To prevent people from just renaming the thing if they steal it
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/permit/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/accessory/permit/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(isliving(user))
|
||||
if(!owner)
|
||||
set_name(user.name)
|
||||
|
||||
@@ -27,8 +27,12 @@
|
||||
name = "engagement ring"
|
||||
desc = "An engagement ring. It certainly looks expensive."
|
||||
icon_state = "diamond"
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/ring/engagement/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.visible_message(span_warning("\The [user] gets down on one knee, presenting \the [src]."),span_warning("You get down on one knee, presenting \the [src]."))
|
||||
|
||||
/obj/item/clothing/accessory/ring/cti
|
||||
@@ -97,8 +101,12 @@
|
||||
desc = "A signet ring, for when you're too sophisticated to sign letters."
|
||||
icon_state = "seal-signet"
|
||||
var/nameset = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/ring/seal/signet/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(nameset)
|
||||
to_chat(user, span_notice("The [src] has already been claimed!"))
|
||||
return
|
||||
@@ -118,8 +126,12 @@
|
||||
icon_state = "wedring_g"
|
||||
item_state = "wedring_g"
|
||||
var/partnername = ""
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/ring/wedding/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/input = tgui_input_text(user, "Would you like to change the holoengraving on the ring?", "Name your spouse", "Bae", MAX_NAME_LEN)
|
||||
if(!input)
|
||||
return
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
on_rolled = list("down" = "none")
|
||||
var/hide_on_roll = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -38,6 +39,9 @@
|
||||
return hold.attackby(W, user)
|
||||
|
||||
/obj/item/clothing/accessory/storage/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, span_notice("You empty [src]."))
|
||||
var/turf/T = get_turf(src)
|
||||
hold.hide_from(user)
|
||||
|
||||
@@ -478,16 +478,20 @@
|
||||
)
|
||||
drop_sound = 'sound/items/drop/hat.ogg'
|
||||
pickup_sound = 'sound/items/pickup/hat.ogg'
|
||||
helmet_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/attack_self(mob/user)
|
||||
/obj/item/clothing/head/attack_self(mob/user, callback)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling && !callback)
|
||||
return FALSE
|
||||
if(light_range)
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, "You cannot toggle the light while in this [user.loc]")
|
||||
return
|
||||
update_flashlight(user)
|
||||
to_chat(user, "You [light_on ? "enable" : "disable"] the helmet light.")
|
||||
else
|
||||
return ..(user)
|
||||
|
||||
/obj/item/clothing/head/proc/update_flashlight(var/mob/user = null)
|
||||
set_light_on(!light_on)
|
||||
@@ -855,7 +859,10 @@
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_shoes()
|
||||
|
||||
/obj/item/clothing/shoes/attack_self(var/mob/user)
|
||||
/obj/item/clothing/shoes/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
for(var/mob/M in src)
|
||||
if(isvoice(M)) //Don't knock voices out!
|
||||
continue
|
||||
@@ -863,8 +870,6 @@
|
||||
to_chat(M, span_warning("[user] shakes you out of \the [src]!"))
|
||||
to_chat(user, span_notice("You shake [M] out of \the [src]!"))
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/container_resist(mob/living/micro)
|
||||
var/mob/living/carbon/human/macro = loc
|
||||
if(isvoice(micro)) //Voices shouldn't be able to resist but we have this here just in case.
|
||||
|
||||
@@ -45,6 +45,8 @@ BLIND // can't see anything
|
||||
SPECIES_XENOCHIMERA = 'icons/inventory/eyes/mob_tajaran.dmi'
|
||||
)
|
||||
var/glasses_layer_above = FALSE
|
||||
///Var for attack_self chain
|
||||
var/specialty_goggles = FALSE
|
||||
|
||||
/obj/item/clothing/glasses/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
@@ -85,6 +87,11 @@ BLIND // can't see anything
|
||||
user.recalculate_vis()
|
||||
|
||||
/obj/item/clothing/glasses/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(specialty_goggles)
|
||||
return FALSE
|
||||
if(toggleable)
|
||||
if(!can_toggle(user))
|
||||
to_chat(user, span_warning("You don't seem to be able to toggle \the [src] here."))
|
||||
@@ -94,7 +101,6 @@ BLIND // can't see anything
|
||||
to_chat(user, span_notice("You activate the optical matrix on the [src]."))
|
||||
else
|
||||
to_chat(user, span_notice("You deactivate the optical matrix on the [src]."))
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/meson
|
||||
name = "optical meson scanner"
|
||||
@@ -389,8 +395,12 @@ BLIND // can't see anything
|
||||
var/up = 0
|
||||
flash_protection = FLASH_PROTECTION_MAJOR
|
||||
tint = TINT_HEAVY
|
||||
specialty_goggles = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/welding/attack_self()
|
||||
/obj/item/clothing/glasses/welding/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle()
|
||||
|
||||
/obj/item/clothing/glasses/welding/verb/toggle()
|
||||
@@ -496,8 +506,12 @@ BLIND // can't see anything
|
||||
var/on = 1
|
||||
toggleable = 1
|
||||
activation_sound = 'sound/effects/pop.ogg'
|
||||
specialty_goggles = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/sechud/aviator/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(toggleable && !user.incapacitated())
|
||||
on = !on
|
||||
if(on)
|
||||
@@ -611,8 +625,12 @@ BLIND // can't see anything
|
||||
item_flags = AIRTIGHT
|
||||
body_parts_covered = EYES
|
||||
species_restricted = list(SPECIES_TESHARI)
|
||||
specialty_goggles = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/aerogelgoggles/attack_self()
|
||||
/obj/item/clothing/glasses/aerogelgoggles/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle()
|
||||
|
||||
/obj/item/clothing/glasses/aerogelgoggles/verb/toggle()
|
||||
|
||||
@@ -91,7 +91,9 @@
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/sechud/tactical_sec_vis/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
@@ -104,7 +106,6 @@
|
||||
user.update_inv_glasses()
|
||||
user.update_mob_action_buttons()
|
||||
to_chat(user, span_notice("Your [src] now displays [choice] ."))
|
||||
return 1
|
||||
|
||||
/*---Tajaran-specific Eyewear---*/
|
||||
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
plane_slots = list(slot_glasses)
|
||||
var/ar_toggled = TRUE //Used for toggle_ar_planes() verb
|
||||
var/can_shade = TRUE
|
||||
specialty_goggles = TRUE
|
||||
var/hud_goggles = FALSE
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -130,8 +132,13 @@
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!ishuman(user))
|
||||
return
|
||||
return FALSE
|
||||
if(hud_goggles)
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.glasses || !(H.glasses == src))
|
||||
@@ -283,11 +290,15 @@
|
||||
vision_flags = SEE_TURFS //but they can spot breaches. Due to the way HUDs work, they don't provide darkvision up-close the way mesons do.
|
||||
flash_protection = 0 //it's an open, single-eye retinal projector. there's no way it protects your eyes from flashes or welders.
|
||||
can_shade = FALSE
|
||||
specialty_goggles = TRUE
|
||||
hud_goggles = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/eng/meson/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!active)
|
||||
toggleprojector()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/eng/meson/verb/toggleprojector()
|
||||
set name = "Toggle projector"
|
||||
|
||||
@@ -65,8 +65,12 @@
|
||||
siemens_coefficient = 0.7
|
||||
valid_accessory_slots = null
|
||||
actions_types = list(/datum/action/item_action/toggle_visor)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/helmet/riot/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/head/helmet/riot/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the visor on the riot helmet.")
|
||||
|
||||
@@ -40,8 +40,12 @@
|
||||
|
||||
var/base_state
|
||||
var/up = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/helmet/combat/bedevere/attack_self()
|
||||
/obj/item/clothing/head/helmet/combat/bedevere/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle()
|
||||
|
||||
/obj/item/clothing/head/helmet/combat/bedevere/verb/toggle()
|
||||
@@ -93,8 +97,12 @@
|
||||
|
||||
var/base_state
|
||||
var/up = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/helmet/combat/bedevere_costume/attack_self()
|
||||
/obj/item/clothing/head/helmet/combat/bedevere_costume/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle()
|
||||
|
||||
/obj/item/clothing/head/helmet/combat/bedevere_costume/verb/toggle()
|
||||
|
||||
@@ -31,8 +31,12 @@
|
||||
tint = TINT_HEAVY
|
||||
drop_sound = 'sound/items/drop/helm.ogg'
|
||||
pickup_sound = 'sound/items/pickup/helm.ogg'
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/welding/attack_self()
|
||||
/obj/item/clothing/head/welding/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle()
|
||||
|
||||
|
||||
@@ -126,6 +130,7 @@
|
||||
icon_state = "cake0"
|
||||
var/onfire = 0
|
||||
body_parts_covered = HEAD
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/cakehat/process()
|
||||
if(!onfire)
|
||||
@@ -141,7 +146,10 @@
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 1)
|
||||
|
||||
/obj/item/clothing/head/cakehat/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/head/cakehat/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
onfire = !(onfire)
|
||||
if (onfire)
|
||||
force = 3
|
||||
@@ -163,8 +171,12 @@
|
||||
desc = "Perfect for those cold winter nights."
|
||||
icon_state = "ushankadown"
|
||||
flags_inv = HIDEEARS
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/ushanka/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/head/ushanka/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the ear flaps on the ushanka.")
|
||||
|
||||
@@ -187,8 +187,12 @@
|
||||
desc = "Standard pilot gear. Protects the head from impacts. This one has a retractable visor"
|
||||
icon_state = "pilot_helmet2"
|
||||
actions_types = list(/datum/action/item_action/toggle_visor)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/pilot/alt/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/head/pilot/alt/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the visor on the pilot helmet.")
|
||||
|
||||
@@ -9,8 +9,12 @@
|
||||
max_heat_protection_temperature = HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
actions_types = list(/datum/action/item_action/toggle_visor)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/pilot_vr/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/head/pilot_vr/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the visor on the pilot helmet.")
|
||||
@@ -25,15 +29,6 @@
|
||||
icon_state = "pilot2"
|
||||
actions_types = list(/datum/action/item_action/toggle_visor)
|
||||
|
||||
/obj/item/clothing/head/pilot_vr/alt/attack_self(mob/user as mob)
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the visor on the pilot helmet.")
|
||||
else
|
||||
src.icon_state = initial(icon_state)
|
||||
to_chat(user, "You lower the visor on the pilot helmet.")
|
||||
update_clothing_icon() //so our mob-overlays update
|
||||
|
||||
//////////Talon Pilot Headgear//////////
|
||||
|
||||
/obj/item/clothing/head/pilot_vr/talon
|
||||
@@ -42,15 +37,6 @@
|
||||
icon_state = "pilot3"
|
||||
actions_types = list(/datum/action/item_action/toggle_visor)
|
||||
|
||||
/obj/item/clothing/head/pilot_vr/talon/attack_self(mob/user as mob)
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the visor on the pilot helmet.")
|
||||
else
|
||||
src.icon_state = initial(icon_state)
|
||||
to_chat(user, "You lower the visor on the pilot helmet.")
|
||||
update_clothing_icon() //so our mob-overlays update
|
||||
|
||||
//////////Major Bill's Pilot Headgear//////////
|
||||
|
||||
/obj/item/clothing/head/pilot_vr/mbill
|
||||
@@ -59,12 +45,3 @@
|
||||
icon_state = "pilot3"
|
||||
catalogue_data = list(/datum/category_item/catalogue/information/organization/major_bills)
|
||||
actions_types = list(/datum/action/item_action/toggle_visor)
|
||||
|
||||
/obj/item/clothing/head/pilot_vr/mbill/attack_self(mob/user as mob)
|
||||
if(src.icon_state == initial(icon_state))
|
||||
src.icon_state = "[icon_state]up"
|
||||
to_chat(user, "You raise the visor on the pilot helmet.")
|
||||
else
|
||||
src.icon_state = initial(icon_state)
|
||||
to_chat(user, "You lower the visor on the pilot helmet.")
|
||||
update_clothing_icon() //so our mob-overlays update
|
||||
|
||||
@@ -6,13 +6,17 @@
|
||||
var/flipped = 0
|
||||
siemens_coefficient = 0.9
|
||||
body_parts_covered = 0
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/head/soft/dropped(mob/user)
|
||||
icon_state = initial(icon_state)
|
||||
flipped=0
|
||||
flipped = FALSE
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/soft/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
flipped = !flipped
|
||||
if(flipped)
|
||||
icon_state = "[icon_state]_flipped"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
actions_types = list(/datum/action/item_action/adjust_breath_mask)
|
||||
pickup_sound = 'sound/items/pickup/component.ogg'
|
||||
drop_sound = 'sound/items/drop/component.ogg'
|
||||
special_handling = TRUE
|
||||
|
||||
|
||||
/obj/item/clothing/mask/breath/proc/adjust_mask(mob/user)
|
||||
@@ -32,6 +33,9 @@
|
||||
update_clothing_icon()
|
||||
|
||||
/obj/item/clothing/mask/breath/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
adjust_mask(user)
|
||||
|
||||
/obj/item/clothing/mask/breath/verb/toggle()
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
filtered_gases = list(GAS_O2, GAS_N2O)
|
||||
var/mask_open = FALSE // Controls if the Vox can eat through this mask
|
||||
actions_types = list(/datum/action/item_action/toggle_feeding_port)
|
||||
helmet_handling = TRUE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/mask/gas/swat/vox/proc/feeding_port(mob/user)
|
||||
if(user.canmove && !user.stat)
|
||||
@@ -105,8 +107,10 @@
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/gas/swat/vox/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
feeding_port(user)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/gas/zaddat
|
||||
name = "Zaddat Veil"
|
||||
|
||||
@@ -324,6 +324,7 @@
|
||||
icon_state = "papermask"
|
||||
actions_types = list(/datum/action/item_action/hands_free/redraw_design)
|
||||
var/list/papermask_designs = list()
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/mask/paper/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -356,7 +357,9 @@
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/paper/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
@@ -377,7 +380,6 @@
|
||||
user.update_inv_wear_mask()
|
||||
user.update_mob_action_buttons()
|
||||
to_chat(user, span_notice("Your paper mask now is now [choice]."))
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/mask/emotions
|
||||
name = "emotional mask"
|
||||
@@ -387,6 +389,7 @@
|
||||
icon_state = "joy"
|
||||
actions_types = list(/datum/action/item_action/hands_free/redraw_design)
|
||||
var/static/list/joymask_designs = list()
|
||||
special_handling = TRUE
|
||||
|
||||
|
||||
/obj/item/clothing/mask/emotions/Initialize(mapload)
|
||||
@@ -399,7 +402,9 @@
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/emotions/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
@@ -412,7 +417,6 @@
|
||||
user.update_inv_wear_mask()
|
||||
user.update_mob_action_buttons()
|
||||
to_chat(user, span_notice("Your [src] now displays a [choice] emotion."))
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/mask/mouthwheat
|
||||
name = "mouth wheat"
|
||||
|
||||
@@ -111,8 +111,10 @@
|
||||
icon_state = "orange"
|
||||
chained = null
|
||||
|
||||
/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
|
||||
..()
|
||||
/obj/item/clothing/shoes/orange/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
remove_cuffs(user)
|
||||
|
||||
/obj/item/clothing/shoes/orange/attackby(H as obj, mob/user as mob)
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
preserve_item = 1
|
||||
var/magpulse = 0
|
||||
var/icon_base = "magboots"
|
||||
///The message that gets shown when we enable the magboots.
|
||||
var/mag_enable = "You enable the mag-pulse traction system."
|
||||
///The message that gets shown when we disable the magboots.
|
||||
var/mag_disable = "You disable the mag-pulse traction system."
|
||||
///If the magboots can be removed when enabled or not.
|
||||
var/unremovable_when_enabled = FALSE
|
||||
actions_types = list(/datum/action/item_action/toggle_magboots)
|
||||
step_volume_mod = 1.3
|
||||
drop_sound = 'sound/items/drop/metalboots.ogg'
|
||||
@@ -24,21 +30,36 @@
|
||||
slowdown += 3
|
||||
|
||||
/obj/item/clothing/shoes/magboots/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(magpulse)
|
||||
item_flags &= ~NOSLIP
|
||||
magpulse = 0
|
||||
magpulse = FALSE
|
||||
set_slowdown()
|
||||
force = 3
|
||||
if(icon_base) icon_state = "[icon_base]0"
|
||||
to_chat(user, "You disable the mag-pulse traction system.")
|
||||
to_chat(user, mag_disable)
|
||||
if(unremovable_when_enabled)
|
||||
canremove = TRUE
|
||||
else
|
||||
//Checks to ensure if they're unremovable we're actually wearing them when we turn them on.
|
||||
if(unremovable_when_enabled)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.shoes != src)
|
||||
to_chat(user, "You will have to put on the [src] before you can do that.")
|
||||
return
|
||||
canremove = FALSE
|
||||
|
||||
item_flags |= NOSLIP
|
||||
magpulse = 1
|
||||
magpulse = TRUE
|
||||
set_slowdown()
|
||||
force = 5
|
||||
if(icon_base) icon_state = "[icon_base]1"
|
||||
playsound(src, 'sound/effects/magnetclamp.ogg', 20)
|
||||
to_chat(user, "You enable the mag-pulse traction system.")
|
||||
to_chat(user, mag_enable)
|
||||
user.update_inv_shoes() //so our mob-overlays update
|
||||
user.update_mob_action_buttons()
|
||||
|
||||
@@ -91,31 +112,14 @@
|
||||
name = "vox magclaws"
|
||||
item_state = "boots-vox"
|
||||
icon_state = "boots-vox"
|
||||
icon_base = null
|
||||
mag_enable = "You dig your claws deeply into the flooring, bracing yourself."
|
||||
mag_disable = "You relax your deathgrip on the flooring."
|
||||
unremovable_when_enabled = TRUE
|
||||
flags = PHORONGUARD
|
||||
species_restricted = list(SPECIES_VOX)
|
||||
actions_types = list(/datum/action/item_action/toggle_magclaws)
|
||||
|
||||
/obj/item/clothing/shoes/magboots/vox/attack_self(mob/user)
|
||||
if(src.magpulse)
|
||||
item_flags &= ~NOSLIP
|
||||
magpulse = 0
|
||||
canremove = TRUE
|
||||
to_chat(user, "You relax your deathgrip on the flooring.")
|
||||
else
|
||||
//make sure these can only be used when equipped.
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if (H.shoes != src)
|
||||
to_chat(user, "You will have to put on the [src] before you can do that.")
|
||||
return
|
||||
|
||||
item_flags |= NOSLIP
|
||||
magpulse = 1
|
||||
canremove = FALSE //kinda hard to take off magclaws when you are gripping them tightly.
|
||||
to_chat(user, "You dig your claws deeply into the flooring, bracing yourself.")
|
||||
user.update_mob_action_buttons()
|
||||
|
||||
//In case they somehow come off while enabled.
|
||||
/obj/item/clothing/shoes/magboots/vox/dropped(mob/user)
|
||||
..(user)
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
blood_overlay_type = "armor"
|
||||
slowdown = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(prob(50))
|
||||
@@ -197,8 +198,11 @@
|
||||
return PROJECTILE_FORCE_MISS
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user as mob)
|
||||
active = !( active )
|
||||
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
active = !active
|
||||
if (active)
|
||||
to_chat(user, span_blue("The reactive armor is now active."))
|
||||
icon_state = "reactive"
|
||||
|
||||
@@ -1059,24 +1059,29 @@
|
||||
body_parts_covered = CHEST
|
||||
attack_verb = list("warned", "cautioned", "smashed")
|
||||
armor = list("melee" = 5, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/suit/caution/attack_self()
|
||||
toggle()
|
||||
/obj/item/clothing/suit/caution/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle(user)
|
||||
|
||||
/obj/item/clothing/suit/caution/click_alt()
|
||||
toggle()
|
||||
/obj/item/clothing/suit/caution/click_alt(mob/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/item/clothing/suit/caution/proc/toggle()
|
||||
if(!usr || usr.stat || usr.lying || usr.restrained() || !Adjacent(usr)) return
|
||||
else if(src.icon_state == "caution")
|
||||
src.icon_state = "caution_blinking"
|
||||
src.item_state = "caution_blinking"
|
||||
usr.show_message("You turn the wet floor sign on.")
|
||||
/obj/item/clothing/suit/caution/proc/toggle(mob/user)
|
||||
if(!user || user.stat || user.lying || user.restrained() || !Adjacent(user))
|
||||
return
|
||||
else if(icon_state == "caution")
|
||||
icon_state = "caution_blinking"
|
||||
item_state = "caution_blinking"
|
||||
user.show_message("You turn the wet floor sign on.")
|
||||
playsound(src.loc, 'sound/machines/button.ogg', 30, 1)
|
||||
else
|
||||
src.icon_state = "caution"
|
||||
src.item_state = "caution"
|
||||
usr.show_message("You turn the wet floor sign off.")
|
||||
icon_state = "caution"
|
||||
item_state = "caution"
|
||||
user.show_message("You turn the wet floor sign off.")
|
||||
update_clothing_icon()
|
||||
|
||||
//Ruin Marine (Doom Marine)
|
||||
|
||||
@@ -47,11 +47,16 @@
|
||||
///The cooldown itself of the reactive armor for when it can activate again.
|
||||
var/reactivearmor_cooldown = 0
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/update_icon()
|
||||
. = ..()
|
||||
icon_state = "reactive[active ? null : "off"]"
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
active = !active
|
||||
to_chat(user, span_notice("[src] is now [active ? "active" : "inactive"]."))
|
||||
update_icon()
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
var/rope_mode = SHIBARI_NONE
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
|
||||
/obj/item/clothing/suit/shibari/attack_hand(mob/living/user as mob)
|
||||
if(ishuman(user))
|
||||
@@ -23,6 +25,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/shibari/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
rope_mode = tgui_input_list(user, "Which limbs would you like to restrain with the bindings?", "Shibari", list(SHIBARI_NONE, SHIBARI_ARMS, SHIBARI_LEGS, SHIBARI_BOTH))
|
||||
if(!rope_mode)
|
||||
rope_mode = SHIBARI_NONE
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/obj/item/stored_item = null
|
||||
|
||||
|
||||
/obj/item/evidencebag/MouseDrop(var/obj/item/I)
|
||||
if (!ishuman(usr))
|
||||
return
|
||||
@@ -72,8 +73,11 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/evidencebag/attack_self(mob/user as mob)
|
||||
if(contents.len)
|
||||
/obj/item/evidencebag/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(LAZYLEN(contents))
|
||||
var/obj/item/I = contents[1]
|
||||
user.visible_message("[user] takes [I] out of [src]", "You take [I] out of [src].",\
|
||||
"You hear someone rustle around in a plastic bag, and remove something.")
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
var/on_fire = 0
|
||||
var/burn_time = 20 //if the rag burns for too long it turns to ashes
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -37,7 +38,10 @@
|
||||
STOP_PROCESSING(SSobj, src) //so we don't continue turning to ash while gc'd
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/attack_self(mob/user as mob)
|
||||
/obj/item/reagent_containers/glass/rag/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(on_fire)
|
||||
user.visible_message(span_warning("\The [user] stamps out [src]."), span_warning("You stamp out [src]."))
|
||||
user.unEquip(src)
|
||||
|
||||
@@ -61,7 +61,10 @@
|
||||
icon_state = "fingerprint0"
|
||||
item_state = "paper"
|
||||
|
||||
/obj/item/sample/print/attack_self(var/mob/user)
|
||||
/obj/item/sample/print/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(evidence && evidence.len)
|
||||
return
|
||||
if(!ishuman(user))
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/uv_light/attack_self(var/mob/user)
|
||||
/obj/item/uv_light/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
on = !on
|
||||
if(on)
|
||||
set_light(range, 2, "#007fff")
|
||||
|
||||
@@ -73,7 +73,10 @@
|
||||
D.wrapped = R
|
||||
D.name = "small parcel - 'EFTPOS access code'"
|
||||
|
||||
/obj/item/eftpos/attack_self(mob/user as mob)
|
||||
/obj/item/eftpos/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(get_dist(src,user) <= 1)
|
||||
var/dat = span_bold("[eftpos_name]") + "<br>"
|
||||
dat += "<i>This terminal is</i> [machine_id]. <i>Report this code when contacting IT Support</i><br>"
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
var/worth = 0
|
||||
drop_sound = 'sound/items/drop/paper.ogg'
|
||||
pickup_sound = 'sound/items/pickup/paper.ogg'
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/spacecash/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -84,6 +86,9 @@
|
||||
return worth
|
||||
|
||||
/obj/item/spacecash/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/amount = tgui_input_number(user, "How many [initial_name]s do you want to take? (0 to [src.worth])", "Take Money", 20, src.worth)
|
||||
if(!src || QDELETED(src))
|
||||
return
|
||||
@@ -167,8 +172,12 @@
|
||||
drop_sound = 'sound/items/drop/card.ogg'
|
||||
pickup_sound = 'sound/items/pickup/card.ogg'
|
||||
var/owner_name = "" //So the ATM can set it so the EFTPOS can put a valid name on transactions.
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/spacecash/ewallet/attack_self() return //Don't act
|
||||
/obj/item/spacecash/ewallet/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
/obj/item/spacecash/ewallet/attackby() return //like actual
|
||||
/obj/item/spacecash/ewallet/update_icon() return //space cash
|
||||
|
||||
|
||||
@@ -112,6 +112,9 @@
|
||||
return worth
|
||||
|
||||
/obj/item/spacecasinocash/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/amount = tgui_input_number(user, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20, src.worth)
|
||||
if(!src || QDELETED(src))
|
||||
return
|
||||
@@ -196,7 +199,10 @@
|
||||
throw_range = 2
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
/obj/item/casino_platinum_chip/attack_self(mob/user as mob)
|
||||
/obj/item/casino_platinum_chip/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(result == 1)
|
||||
@@ -287,6 +293,9 @@
|
||||
return worth
|
||||
|
||||
/obj/item/spacecasinocash_fake/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/amount = tgui_input_number(user, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20, src.worth)
|
||||
if(!src || QDELETED(src))
|
||||
return
|
||||
|
||||
@@ -146,7 +146,10 @@
|
||||
balloon_alert(user, "string detached")
|
||||
else ..()
|
||||
|
||||
/obj/item/coin/attack_self(mob/user as mob)
|
||||
/obj/item/coin/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(result == 1)
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
value = 20
|
||||
|
||||
|
||||
/obj/item/aliencoin/attack_self(mob/user as mob)
|
||||
/obj/item/aliencoin/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(result == 1)
|
||||
|
||||
@@ -768,9 +768,6 @@
|
||||
/obj/item/reagent_containers/food/snacks/slice/vegetablepizza
|
||||
price_tag = 1
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/
|
||||
|
||||
|
||||
// Baked Goods //
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/poppypretzel
|
||||
|
||||
@@ -51,7 +51,10 @@
|
||||
src.pixel_y = 0
|
||||
|
||||
|
||||
/obj/item/retail_scanner/attack_self(mob/user as mob)
|
||||
/obj/item/retail_scanner/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
|
||||
@@ -185,7 +185,10 @@
|
||||
advice = pick(advice_list)
|
||||
pisces = "[stars] [prediction] [advice]"
|
||||
|
||||
/obj/item/entrepreneur/horoscope/attack_self(var/mob/user)
|
||||
/obj/item/entrepreneur/horoscope/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/zodiac = tgui_input_list(user, "Which of todays zodiacs do you want to read?", "Zodiac", zodiacs)
|
||||
if(zodiac)
|
||||
switch(zodiac)
|
||||
@@ -289,7 +292,10 @@
|
||||
icon = 'icons/obj/entrepreneur.dmi'
|
||||
icon_state = "dumbbell"
|
||||
|
||||
/obj/item/entrepreneur/dumbbell/attack_self(var/mob/user)
|
||||
/obj/item/entrepreneur/dumbbell/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/mob/living/M = user
|
||||
if(M.nutrition <= 100)
|
||||
to_chat(user, span_notice("You are too hungry to exercise right now."))
|
||||
@@ -312,7 +318,10 @@
|
||||
var/turf/last_used = 0
|
||||
var/emf_change = 0
|
||||
|
||||
/obj/item/entrepreneur/emf/attack_self(var/mob/user)
|
||||
/obj/item/entrepreneur/emf/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!last_used)
|
||||
emf = rand(1,100)
|
||||
last_used = get_turf(user)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
var/icon_on = 0
|
||||
|
||||
/obj/item/generic_item/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(activatable_hand)
|
||||
if(!on)
|
||||
if(delay_time)
|
||||
@@ -87,7 +90,6 @@
|
||||
if(user)
|
||||
user.visible_message(span_notice("[text_deactivated]"))
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/client/proc/generic_item()
|
||||
set category = "Fun.Event Kit"
|
||||
|
||||
@@ -116,7 +116,10 @@
|
||||
"a bottle", "a boat", "a spaceship",
|
||||
"Nanotrasen logo", "a geometric-looking letter S", "a dodecahedron")
|
||||
|
||||
/obj/item/firework_star/aesthetic/configurable/attack_self(var/mob/user)
|
||||
/obj/item/firework_star/aesthetic/configurable/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/choice = tgui_alert(user, "What setting do you want to adjust?", "Firework Star", list("Color", "Shape", "Nothing"))
|
||||
if(src.loc != user)
|
||||
return
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
var/list/accepted_mobs = list(/mob/living/simple_mob/animal/passive/fish)
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/material/fishing_net/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
@@ -58,7 +61,12 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/material/fishing_net/attack_self(var/mob/user)
|
||||
/obj/item/material/fishing_net/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
for(var/mob/M in src)
|
||||
M.forceMove(get_turf(src))
|
||||
user.visible_message(span_notice("[user] releases [M] from \the [src]."), span_notice("You release [M] from \the [src]."))
|
||||
@@ -129,6 +137,8 @@
|
||||
|
||||
accepted_mobs = list(/mob/living/simple_mob/animal/sif/glitterfly, /mob/living/carbon/human)
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/material/fishing_net/butterfly_net/afterattack(var/atom/A, var/mob/user, var/proximity)
|
||||
if(get_dist(get_turf(src), A) > reach)
|
||||
return
|
||||
@@ -168,7 +178,10 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/material/fishing_net/butterfly_net/attack_self(var/mob/user)
|
||||
/obj/item/material/fishing_net/butterfly_net/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
for(var/mob/living/M in src)
|
||||
if(!user.get_inactive_hand()) //Check if the inactive hand is empty
|
||||
M.forceMove(get_turf(src))
|
||||
|
||||
@@ -6,8 +6,12 @@
|
||||
pickup_sound = 'sound/items/pickup/soda.ogg'
|
||||
cant_chance = 1 //arbitrarily high for april fools; if it's not reverted in its entirety I suggest rolling it down to 2% or something
|
||||
var/shaken = 0 // How many times this can has been shaken.
|
||||
is_can = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/cans/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.a_intent == I_HURT && !is_open_container())
|
||||
to_chat(user, span_warning("You shake [src]."))
|
||||
if(!shaken)
|
||||
@@ -16,7 +20,6 @@
|
||||
return
|
||||
if(HAS_TRAIT(user, TRAIT_UNLUCKY) && prob(10)) // Because it's always funny
|
||||
shaken += 10
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/cans/open(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
/obj/item/reagent_containers/food/condiment/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/condiment/attack_self(var/mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/condiment/attack(var/mob/M as mob, var/mob/user as mob, var/def_zone)
|
||||
if(standard_feed_mob(user, M))
|
||||
return
|
||||
|
||||
@@ -16,9 +16,14 @@
|
||||
var/cant_open = 0
|
||||
var/cant_chance = 0
|
||||
|
||||
var/is_can = FALSE
|
||||
|
||||
/// Yims
|
||||
food_can_insert_micro = TRUE
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/Initialize(mapload)
|
||||
. = ..()
|
||||
if (prob(cant_chance))
|
||||
@@ -127,8 +132,13 @@
|
||||
/obj/item/reagent_containers/food/drinks/on_rag_wipe(var/obj/item/reagent_containers/glass/rag/R)
|
||||
wash(CLEAN_SCRUB)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/attack_self(mob/user as mob)
|
||||
if(!is_open_container())
|
||||
/obj/item/reagent_containers/food/drinks/attack_self(mob/user, special_pass)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling && !special_pass)
|
||||
return FALSE
|
||||
if(!is_open_container() && !(is_can && user.a_intent == I_HURT))
|
||||
open(user)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/proc/open(mob/user)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/obj/item/reagent_containers/glass/rag/rag = null
|
||||
var/rag_underlay = "rag"
|
||||
var/violent_throw = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/on_reagent_change() return // To suppress price updating. Bottles have their own price tags.
|
||||
|
||||
@@ -120,11 +121,14 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/attack_self(mob/user)
|
||||
/obj/item/reagent_containers/food/drinks/bottle/attack_self(mob/user, special_pass)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(rag)
|
||||
remove_rag(user)
|
||||
else
|
||||
..()
|
||||
..(user, TRUE)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/proc/insert_rag(obj/item/reagent_containers/glass/rag/R, mob/user)
|
||||
if(!isGlass || rag) return
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
/// Yems.
|
||||
food_can_insert_micro = TRUE
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/Initialize(mapload)
|
||||
. = ..()
|
||||
if(nutriment_amt)
|
||||
@@ -87,7 +90,12 @@
|
||||
eater.put_in_hands(TrashItem)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/attack_self(mob/user as mob)
|
||||
/obj/item/reagent_containers/food/snacks/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(package && !user.incapacitated())
|
||||
unpackage(user)
|
||||
|
||||
@@ -1264,13 +1272,17 @@
|
||||
desc = "The food of choice for the veteran. Do <B>NOT</B> overconsume."
|
||||
filling_color = "#6D6D00"
|
||||
heated_reagents = list(REAGENT_ID_DOCTORSDELIGHT = 5, REAGENT_ID_HYPERZINE = 0.75, REAGENT_ID_SYNAPTIZINE = 0.25)
|
||||
var/has_been_heated = 0
|
||||
var/has_been_heated = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/donkpocket/sinpocket/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(has_been_heated)
|
||||
to_chat(user, span_notice("The heating chemicals have already been spent."))
|
||||
return
|
||||
has_been_heated = 1
|
||||
has_been_heated = TRUE
|
||||
user.visible_message(span_notice("[user] crushes \the [src] package."), "You crush \the [src] package and feel a comfortable heat build up. Now just to wait for it to be ready.")
|
||||
spawn(200)
|
||||
if(!QDELETED(src))
|
||||
@@ -1953,12 +1965,16 @@
|
||||
|
||||
var/wrapped = 0
|
||||
var/monkey_type = "Monkey"
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/Initialize(mapload)
|
||||
. = ..()
|
||||
reagents.add_reagent(REAGENT_ID_PROTEIN, 10)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/attack_self(mob/user as mob)
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(wrapped)
|
||||
Unwrap(user)
|
||||
|
||||
@@ -4189,8 +4205,10 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/pizzabox/attack_self( mob/user as mob )
|
||||
|
||||
/obj/item/pizzabox/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if( boxes.len > 0 )
|
||||
return
|
||||
|
||||
@@ -4201,7 +4219,7 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob )
|
||||
/obj/item/pizzabox/attackby(obj/item/I, mob/user)
|
||||
if( istype(I, /obj/item/pizzabox/) )
|
||||
var/obj/item/pizzabox/box = I
|
||||
|
||||
|
||||
@@ -305,6 +305,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/deck/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
shuffle(user)
|
||||
|
||||
|
||||
@@ -388,7 +391,10 @@
|
||||
pickup_sound = 'sound/items/pickup/paper.ogg'
|
||||
|
||||
|
||||
/obj/item/pack/attack_self(var/mob/user as mob)
|
||||
/obj/item/pack/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.visible_message(span_danger("[user] rips open \the [src]!"))
|
||||
var/obj/item/hand/H = new()
|
||||
|
||||
@@ -451,7 +457,10 @@
|
||||
if(!cards.len)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/hand/attack_self(var/mob/user as mob)
|
||||
/obj/item/hand/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
concealed = !concealed
|
||||
update_icon()
|
||||
user.visible_message(span_notice("\The [user] [concealed ? "conceals" : "reveals"] their hand."))
|
||||
|
||||
@@ -92,6 +92,9 @@
|
||||
result = 10
|
||||
|
||||
/obj/item/dice/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
rollDice(user, 0)
|
||||
|
||||
/obj/item/dice/proc/rollDice(mob/user, silent = FALSE)
|
||||
@@ -194,8 +197,12 @@
|
||||
can_hold = list(
|
||||
/obj/item/dice,
|
||||
)
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/storage/dicecup/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.visible_message(span_notice("[user] shakes [src]."), \
|
||||
span_notice("You shake [src]."), \
|
||||
span_notice("You hear dice rolling."))
|
||||
|
||||
@@ -327,7 +327,10 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/holo/esword/attack_self(mob/living/user as mob)
|
||||
/obj/item/holo/esword/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
active = !active
|
||||
if (active)
|
||||
force = 30
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
hide_device()
|
||||
|
||||
/obj/item/mapping_unit/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -414,6 +417,9 @@
|
||||
icon_state = initial(icon_state) + in_list ? "_on" : ""
|
||||
|
||||
/obj/item/holomap_beacon/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!in_list)
|
||||
in_list = TRUE
|
||||
GLOB.mapping_beacons += src
|
||||
|
||||
@@ -290,7 +290,10 @@
|
||||
icon = 'icons/obj/apiary_bees_etc.dmi'
|
||||
icon_state = "apiary"
|
||||
|
||||
/obj/item/beehive_assembly/attack_self(var/mob/user)
|
||||
/obj/item/beehive_assembly/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, span_notice("You start assembling \the [src]..."))
|
||||
if(do_after(user, 3 SECONDS, target = src))
|
||||
user.visible_message(span_notice("[user] constructs a beehive."), span_notice("You construct a beehive."))
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/plantname
|
||||
var/datum/seed/seed
|
||||
var/potency = -1
|
||||
special_handling = TRUE
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/Initialize(mapload, var/planttype)
|
||||
@@ -273,8 +274,10 @@
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user as mob)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!seed)
|
||||
return
|
||||
|
||||
|
||||
@@ -13,8 +13,11 @@
|
||||
pixel_x = rand(-5,5)
|
||||
pixel_y = rand(-5,5)
|
||||
|
||||
/obj/item/disk/botany/attack_self(var/mob/user as mob)
|
||||
if(genes.len)
|
||||
/obj/item/disk/botany/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(LAZYLEN(genes))
|
||||
var/choice = tgui_alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", list("No", "Yes"))
|
||||
if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src)))
|
||||
to_chat(user, span_filter_notice("You wipe the disk data."))
|
||||
|
||||
@@ -30,12 +30,16 @@
|
||||
var/list/last_reagents
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/analyzer/plant_analyzer/Destroy()
|
||||
. = ..()
|
||||
QDEL_NULL(last_seed)
|
||||
|
||||
/obj/item/analyzer/plant_analyzer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/analyzer/plant_analyzer/tgui_interact(mob/user, datum/tgui/ui)
|
||||
|
||||
@@ -36,11 +36,14 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/instrument/attack_self(mob/M)
|
||||
if(!M.IsAdvancedToolUser())
|
||||
/obj/item/instrument/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
|
||||
tgui_interact(M)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/instrument/tgui_interact(mob/user, datum/tgui/ui)
|
||||
return song.tgui_interact(user)
|
||||
|
||||
@@ -408,6 +408,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/electronic_assembly/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!check_interactivity(user))
|
||||
return
|
||||
if(opened)
|
||||
|
||||
@@ -60,13 +60,18 @@
|
||||
return IC.attackby(I, user)
|
||||
|
||||
/obj/item/clothing/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(helmet_handling)
|
||||
return FALSE
|
||||
if(IC)
|
||||
if(IC.opened)
|
||||
IC.attack_self(user)
|
||||
else
|
||||
action_circuit.do_work()
|
||||
else
|
||||
..()
|
||||
|
||||
// Does most of the repeatative setup.
|
||||
/obj/item/clothing/proc/setup_integrated_circuit(new_type)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
var/obj/item/electronic_assembly/device/EA
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/assembly/electronic_assembly/Initialize(mapload)
|
||||
. = ..()
|
||||
EA = new(src)
|
||||
@@ -35,7 +37,10 @@
|
||||
if(opened)
|
||||
icon_state = icon_state + "-open"
|
||||
|
||||
/obj/item/assembly/electronic_assembly/attack_self(mob/user as mob)
|
||||
/obj/item/assembly/electronic_assembly/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(EA)
|
||||
EA.attack_self(user)
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/integrated_electronics/detailer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
// Leaving this commented out in case someone decides that this would be better as an "any color" selection system
|
||||
|
||||
@@ -124,7 +124,10 @@
|
||||
dirty_items = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_circuit_printer/attack_self(var/mob/user)
|
||||
/obj/item/integrated_circuit_printer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/integrated_circuit_printer/tgui_state(mob/user)
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
return
|
||||
|
||||
/obj/item/integrated_electronics/wirer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
switch(mode)
|
||||
if(WIRE)
|
||||
mode = UNWIRE
|
||||
@@ -114,6 +117,9 @@
|
||||
var/accepting_refs = 0
|
||||
|
||||
/obj/item/integrated_electronics/debugger/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
|
||||
if(!CanInteract(user, GLOB.tgui_physical_state))
|
||||
return
|
||||
@@ -172,14 +178,6 @@
|
||||
var/datum/integrated_io/selected_io = null
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/multitool/attack_self(mob/user)
|
||||
if(selected_io)
|
||||
selected_io = null
|
||||
to_chat(user, span_notice("You clear the wired connection from the multitool."))
|
||||
else
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/multitool/update_icon()
|
||||
if(selected_io)
|
||||
if(buffer || connecting || connectable)
|
||||
|
||||
@@ -46,7 +46,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user)
|
||||
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(installed_gun)
|
||||
installed_gun.forceMove(get_turf(src))
|
||||
to_chat(user, span_notice("You slide \the [installed_gun] out of the firing mechanism."))
|
||||
@@ -191,7 +194,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/grenade/attack_self(var/mob/user)
|
||||
/obj/item/integrated_circuit/manipulation/grenade/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(attached_grenade)
|
||||
user.visible_message(span_warning("\The [user] removes \an [attached_grenade] from \the [src]!"), span_notice("You remove \the [attached_grenade] from \the [src]."))
|
||||
user.put_in_any_hand_if_possible(attached_grenade) || attached_grenade.dropInto(loc)
|
||||
|
||||
@@ -91,6 +91,9 @@
|
||||
return
|
||||
|
||||
/obj/item/integrated_circuit/memory/constant/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
|
||||
if(!CanInteract(user, GLOB.tgui_physical_state))
|
||||
|
||||
@@ -182,20 +182,30 @@ Book Cart End
|
||||
var/title // The real name of the book.
|
||||
var/carved = 0 // Has the book been hollowed out for use as a secret storage item?
|
||||
var/obj/item/store //What's in the book?
|
||||
var/occult_tier = 0 //If the book is an occult book or not and how strong it is. Used for attack_self
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
drop_sound = 'sound/items/drop/book.ogg'
|
||||
pickup_sound = 'sound/items/pickup/book.ogg'
|
||||
|
||||
/obj/item/book/attack_self(var/mob/user)
|
||||
/obj/item/book/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(occult_tier)
|
||||
return FALSE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(carved)
|
||||
if(store)
|
||||
to_chat(user, span_notice("[store] falls out of [title]!"))
|
||||
store.loc = get_turf(src.loc)
|
||||
store.forceMove(get_turf(src.loc))
|
||||
store = null
|
||||
return
|
||||
else
|
||||
to_chat(user, span_notice("The pages of [title] have been cut out!"))
|
||||
return
|
||||
if(src.dat)
|
||||
if(dat)
|
||||
display_content(user)
|
||||
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
|
||||
playsound(src, 'sound/bureaucracy/bookopen.ogg', 50, 1)
|
||||
@@ -309,6 +319,7 @@ Book Cart End
|
||||
/obj/item/book/bundle
|
||||
var/page = 1 //current page
|
||||
var/list/pages = list() //the contents of each page
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/book/bundle/proc/show_content(mob/user)
|
||||
if(!pages.len)
|
||||
@@ -350,6 +361,9 @@ Book Cart End
|
||||
user << browse(dat, "window=[name]")
|
||||
|
||||
/obj/item/book/bundle/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
src.show_content(user)
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
@@ -388,6 +402,9 @@ Book Cart End
|
||||
var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory
|
||||
|
||||
/obj/item/barcodescanner/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
mode += 1
|
||||
if(mode > 3)
|
||||
mode = 0
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
var/static/list/codex_tree_keys = list() // static list linking codexes to the correct codex_tree.
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/book/codex/Initialize(mapload)
|
||||
tree = codex_tree_keys["[root_type]"]
|
||||
if(!tree)
|
||||
@@ -19,6 +21,9 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/book/codex/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!tree)
|
||||
tree = codex_tree_keys["[root_type]"]
|
||||
if(!tree)
|
||||
|
||||
@@ -11,8 +11,12 @@
|
||||
throw_range = 20
|
||||
can_weld = TRUE
|
||||
no_variants = FALSE
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/tile/maintenance_panel/attack_self(var/mob/user)
|
||||
/obj/item/stack/tile/maintenance_panel/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/turf/T = user.loc
|
||||
if(!user || (loc != user && !isrobot(user)) || user.stat || user.loc != T)
|
||||
return FALSE
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
desc = "<font color='[colour]'>Nail polish,</font> " + initial(desc)
|
||||
update_icon()
|
||||
|
||||
/obj/item/nailpolish/attack_self(var/mob/user)
|
||||
/obj/item/nailpolish/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
open = !open
|
||||
to_chat(user, span_notice("You [open ? "open" : "close"] \the [src]."))
|
||||
update_icon()
|
||||
@@ -100,7 +103,10 @@
|
||||
icon_state = "nailpolishremover"
|
||||
var/open = FALSE
|
||||
|
||||
/obj/item/nailpolish_remover/attack_self(var/mob/user)
|
||||
/obj/item/nailpolish_remover/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
open = !open
|
||||
to_chat(user, span_notice("You [open ? "open" : "close"] \the [src]."))
|
||||
update_icon()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/apply_colour //temp pending icon rewrite
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/material/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -90,9 +91,12 @@
|
||||
M.update_strings()
|
||||
return transfer
|
||||
|
||||
/obj/item/stack/material/attack_self(var/mob/user)
|
||||
/obj/item/stack/material/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!material.build_windows(user, src))
|
||||
..()
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/stack/material/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
|
||||
@@ -158,9 +158,13 @@
|
||||
desc = "A collar made out of pliable material."
|
||||
icon_state = "collar_handmade"
|
||||
var/given_name
|
||||
special_handling = TRUE
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/whiteblindfold/craftable
|
||||
name = "handmade blindfold"
|
||||
desc = "A handmade blindfold that covers the eyes, preventing sight."
|
||||
|
||||
/obj/item/clothing/accessory/collar/craftable/attack_self(mob/living/user)
|
||||
/obj/item/clothing/accessory/collar/craftable/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
given_name = sanitizeSafe(tgui_input_text(user, "What would you like to label the collar?", "Collar Labelling", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
|
||||
@@ -75,12 +75,15 @@
|
||||
else if(loc == L) // at least they're holding it
|
||||
to_chat(L, span_warning("Turn on the [src] first."))
|
||||
|
||||
/obj/item/walkpod/attack_self(mob/living/L)
|
||||
if(!istype(L) || loc != L)
|
||||
/obj/item/walkpod/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!istype(user) || loc != user)
|
||||
return
|
||||
if(!listener)
|
||||
set_listener(L)
|
||||
tgui_interact(L)
|
||||
set_listener(user)
|
||||
tgui_interact(user)
|
||||
|
||||
// Process ticks to ensure our listener remains valid and we do music-ing
|
||||
/obj/item/walkpod/process()
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
var/range = 2
|
||||
var/exact = FALSE
|
||||
|
||||
/obj/item/mining_scanner/attack_self(mob/user as mob)
|
||||
/obj/item/mining_scanner/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, span_notice("You begin sweeping \the [src] about, scanning for metal deposits."))
|
||||
playsound(src, 'sound/items/goggles_charge.ogg', 50, 1, -6)
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
. += "It has [uses_left] use\s remaining."
|
||||
|
||||
/obj/item/extraction_pack/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/possible_beacons = list()
|
||||
for(var/obj/structure/extraction_point/EP as anything in GLOB.total_extraction_beacons)
|
||||
if(EP.beacon_network in beacon_networks)
|
||||
@@ -142,6 +145,11 @@
|
||||
icon_state = "subspace_amplifier"
|
||||
|
||||
/obj/item/fulton_core/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/turf/T = get_turf(user)
|
||||
var/outdoors = T.is_outdoors()
|
||||
if(do_after(user, 1.5 SECONDS, target = user) && !QDELETED(src))
|
||||
new /obj/structure/extraction_point(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
@@ -246,6 +246,9 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/kinetic_crusher/machete/gauntlets/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
ready_toggle()
|
||||
|
||||
/obj/item/kinetic_crusher/machete/gauntlets/process()
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
var/upright = 0
|
||||
var/base_state
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/flag/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -251,7 +252,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/stack/flag/attack_self(mob/user as mob)
|
||||
/obj/item/stack/flag/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
|
||||
var/obj/item/stack/flag/F = locate() in get_turf(src)
|
||||
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
fieldsactive--
|
||||
|
||||
/obj/item/resonator/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
switch(tgui_alert(user, "Change Detonation Time or toggle Cascading?","Setting", list("Toggle Cascade", "Resonance Time")))
|
||||
if("Resonance Time")
|
||||
if(burst_time == 50)
|
||||
|
||||
@@ -179,6 +179,9 @@ GLOBAL_LIST_EMPTY(unique_deployable)
|
||||
. += temp_info
|
||||
|
||||
/obj/item/survivalcapsule/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
//Can't grab when capsule is New() because templates aren't loaded then
|
||||
get_template()
|
||||
if(!used)
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
var/obj/item/radio/headset/mmi_radio/radio = null//Let's give it a radio.
|
||||
var/mob/living/body_backup = null //add reforming
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/mmi/Initialize(mapload)
|
||||
. = ..()
|
||||
radio = new(src)//Spawns a radio inside the MMI.
|
||||
@@ -98,7 +101,12 @@
|
||||
..()
|
||||
|
||||
//TODO: ORGAN REMOVAL UPDATE. Make the brain remain in the MMI so it doesn't lose organ data.
|
||||
/obj/item/mmi/attack_self(mob/user as mob)
|
||||
/obj/item/mmi/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(!brainmob)
|
||||
to_chat(user, span_warning("You upend the MMI, but there's nothing in it."))
|
||||
else if(locked)
|
||||
@@ -187,6 +195,9 @@
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
var/ghost_query_type = null
|
||||
var/datum/ghost_query/Q //This is used so we can unregister ourself.
|
||||
special_handling = TRUE
|
||||
///Var for attack_self chain
|
||||
var/is_digital_robot = FALSE
|
||||
|
||||
/obj/item/mmi/digital/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -226,7 +237,12 @@
|
||||
H.mind.transfer_to(brainmob)
|
||||
return
|
||||
|
||||
/obj/item/mmi/digital/attack_self(mob/user as mob)
|
||||
/obj/item/mmi/digital/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(is_digital_robot)
|
||||
return FALSE
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
to_chat(user, span_blue("You carefully locate the manual activation switch and start the [src]'s boot process."))
|
||||
@@ -288,6 +304,7 @@
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4)
|
||||
ghost_query_type = /datum/ghost_query/drone_brain
|
||||
is_digital_robot = TRUE
|
||||
|
||||
/obj/item/mmi/digital/robot/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -11,9 +11,13 @@
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
locked = 0
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
is_digital_robot = TRUE
|
||||
|
||||
|
||||
/obj/item/mmi/digital/posibrain/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
to_chat(user, span_blue("You carefully locate the manual activation switch and start the positronic brain's boot process."))
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "mainboard"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4)
|
||||
is_digital_robot = TRUE
|
||||
|
||||
/obj/item/mmi/digital/robot/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -18,6 +19,3 @@
|
||||
brainmob.mind.assigned_role = JOB_ROBOTIC_INTELLIGENCE
|
||||
to_chat(brainmob, span_notify("You feel slightly disoriented. That's normal when you're little more than a complex circuit."))
|
||||
return
|
||||
|
||||
/obj/item/mmi/digital/robot/attack_self(mob/user)
|
||||
return //This object is technically a brain, and should not be dumping brains out of itself like its parent object does.
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
msg += "[p_Theyre()] very short!"
|
||||
|
||||
if (src.stat || (status_flags & FAKEDEATH))
|
||||
msg += span_warning("[p_Theyre()] not responding to anything around [p_they()] and seems to be asleep.")
|
||||
msg += span_warning("[p_Theyre()] not responding to anything around [p_them()] and seems to be asleep.")
|
||||
var/obj/item/organ/internal/lungs/L = internal_organs_by_name[O_LUNGS]
|
||||
if(((stat == DEAD || losebreath || !L || (status_flags & FAKEDEATH)) && get_dist(user, src) <= 3))
|
||||
msg += span_warning("[p_They()] [user.p_do()] not appear to be breathing.")
|
||||
|
||||
@@ -130,7 +130,10 @@
|
||||
icon_state = "face"
|
||||
var/mob/living/homunculus = 0
|
||||
|
||||
/obj/item/glamour_face/attack_self(var/mob/user)
|
||||
/obj/item/glamour_face/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!homunculus)
|
||||
var/list/targets = list()
|
||||
for(var/mob/living/carbon/human/M in GLOB.mob_list)
|
||||
@@ -357,6 +360,9 @@
|
||||
)
|
||||
|
||||
/obj/item/glamour_unstable/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/mob/living/M = user
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/borg/cloak/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
set_cloak_level(user)
|
||||
|
||||
/obj/item/borg/cloak/item_ctrl_click(mob/user)
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
flags = NOBLUDGEON
|
||||
|
||||
/obj/item/self_repair_system/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(repairing)
|
||||
return
|
||||
var/mob/living/silicon/robot/R = user
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
flags = NOBLUDGEON //No more attack messages
|
||||
|
||||
/obj/item/boop_module/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if (!( istype(user.loc, /turf) ))
|
||||
return
|
||||
|
||||
@@ -130,6 +133,9 @@
|
||||
flags = NOBLUDGEON //No more attack messages
|
||||
|
||||
/obj/item/robot_tongue/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.emagged || R.emag_items)
|
||||
emagged = !emagged
|
||||
@@ -210,6 +216,9 @@
|
||||
flags = NOBLUDGEON
|
||||
|
||||
/obj/item/pupscrubber/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!enabled)
|
||||
R.scrubbing = TRUE
|
||||
@@ -227,9 +236,12 @@
|
||||
uses = 10
|
||||
var/cooldown = 0
|
||||
var/datum/matter_synth/glass = null
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/lightreplacer/dogborg/attack_self(mob/user)//Recharger refill is so last season. Now we recycle without magic!
|
||||
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/choice = tgui_alert(user, "Do you wish to check the reserves or change the color?", "Selection List", list("Reserves", "Color"))
|
||||
if(!choice)
|
||||
return
|
||||
@@ -314,6 +326,9 @@
|
||||
flags = NOBLUDGEON
|
||||
|
||||
/obj/item/dogborg/pounce/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.leap(bluespace)
|
||||
|
||||
|
||||
@@ -223,8 +223,9 @@
|
||||
hound.cell.charge = hound.cell.charge - amt
|
||||
|
||||
/obj/item/dogborg/sleeper/attack_self(mob/user)
|
||||
if(..())
|
||||
return
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/dogborg/sleeper/tgui_state(mob/user)
|
||||
|
||||
@@ -148,9 +148,13 @@
|
||||
desc = "A black ink printing attachment with a paper naming mode."
|
||||
name = "Printing Pen"
|
||||
var/mode = 1
|
||||
special_handling = TRUE
|
||||
|
||||
|
||||
/obj/item/pen/robopen/attack_self(mob/user)
|
||||
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/choice = tgui_alert(user, "Would you like to change colour or mode?", "Change What?", list("Colour","Mode","Cancel"))
|
||||
if(!choice || choice == "Cancel")
|
||||
return
|
||||
@@ -213,6 +217,9 @@
|
||||
deploy_paper(user)
|
||||
|
||||
/obj/item/form_printer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
deploy_paper(user)
|
||||
|
||||
/obj/item/form_printer/proc/deploy_paper(mob/user)
|
||||
@@ -490,6 +497,9 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/borg/combat/shield/attack_self(var/mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
set_shield_level()
|
||||
|
||||
/obj/item/borg/combat/shield/process()
|
||||
@@ -562,6 +572,9 @@
|
||||
. += "It is set to deploy [mode ? "doors" : "walls"]"
|
||||
|
||||
/obj/item/inflatable_dispenser/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
mode = !mode
|
||||
to_chat(user, span_filter_notice("You set \the [src] to deploy [mode ? "doors" : "walls"]."))
|
||||
|
||||
@@ -643,7 +656,7 @@
|
||||
icon_state = "setup_device_box"
|
||||
|
||||
/obj/item/robo_dice/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
var/DI = 'icons/obj/dice.dmi'
|
||||
var/dice_options = list(
|
||||
"roll a custom die" = image(icon = 'icons/obj/integrated_electronics/electronic_setups.dmi', icon_state = "setup_device_box"),
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
|
||||
|
||||
/obj/item/robotic_multibelt/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!cyborg_integrated_tools || !LAZYLEN(cyborg_integrated_tools))
|
||||
to_chat(user, "Your multibelt is empty!")
|
||||
return
|
||||
@@ -107,8 +110,6 @@
|
||||
cut_overlays()
|
||||
assume_selected_item(integrated_tools_by_name[choice])
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/robotic_multibelt/proc/assume_selected_item(obj/item/chosen_item)
|
||||
if(!chosen_item)
|
||||
return
|
||||
@@ -219,8 +220,12 @@
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_costs = list(1)
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
set_colour(user)
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/proc/set_colour(mob/user)
|
||||
@@ -560,6 +565,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/storage/internal/gripper
|
||||
max_w_class = ITEMSIZE_HUGE
|
||||
max_storage_space = ITEMSIZE_COST_HUGE
|
||||
@@ -662,6 +670,11 @@
|
||||
photo_images["[pocket_to_check.name]" + "[pocket_content.name]"] = pocket_image
|
||||
|
||||
/obj/item/gripper/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
var/busy = is_in_use()
|
||||
if(busy)
|
||||
to_chat(user, span_danger("[busy]"))
|
||||
@@ -1097,9 +1110,14 @@
|
||||
|
||||
can_hold = list(EXOSUIT_GRIPPER)
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item
|
||||
|
||||
/obj/item/gripper/no_use/attack_self(mob/user as mob)
|
||||
/obj/item/gripper/no_use/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
return
|
||||
|
||||
/obj/item/gripper/no_use/loader //This is used to disallow building with metal.
|
||||
|
||||
@@ -172,7 +172,10 @@
|
||||
|
||||
origin_tech = list(TECH_BIO = 10)
|
||||
|
||||
/obj/item/royal_spider_egg/attack_self(mob/user as mob)
|
||||
/obj/item/royal_spider_egg/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/response = tgui_alert(user, "Are you sure you want to release the royal spiderling right now? It appears ready to imprint the moment its born.", "Royal Spider Egg", list("Yes", "No"))
|
||||
|
||||
if(response == "Yes")
|
||||
|
||||
@@ -12,11 +12,14 @@
|
||||
movement_cooldown = 5
|
||||
universal_understand = 1
|
||||
|
||||
/obj/item/holder/mouse/attack_self(var/mob/U)
|
||||
/obj/item/holder/mouse/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
for(var/mob/living/simple_mob/M in contents)
|
||||
if((I_HELP) && U.checkClickCooldown()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects
|
||||
U.setClickCooldown(U.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this
|
||||
U.visible_message(span_notice("[U] [M.response_help] \the [M]."))
|
||||
if((I_HELP) && user.checkClickCooldown()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects
|
||||
user.setClickCooldown(user.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this
|
||||
user.visible_message(span_notice("[user] [M.response_help] \the [M]."))
|
||||
|
||||
//Jank grabber that uses the 'attack_hand' insead of 'MouseDrop'
|
||||
/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/user)
|
||||
@@ -60,6 +63,9 @@
|
||||
. = ..(mapload, TRUE)
|
||||
|
||||
/obj/item/holder/mouse/attack_self(mob/living/carbon/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.setClickCooldown(user.get_attack_speed())
|
||||
for(var/L in contents)
|
||||
if(isanimal(L))
|
||||
|
||||
@@ -277,7 +277,10 @@ var/list/_cat_default_emotes = list(
|
||||
icon_state = "box"
|
||||
var/cattype = /mob/living/simple_mob/animal/passive/cat
|
||||
|
||||
/obj/item/cat_box/attack_self(var/mob/user)
|
||||
/obj/item/cat_box/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/turf/catturf = get_turf(src)
|
||||
to_chat(user, span_notice("You peek into \the [name]-- and a cat jumps out!"))
|
||||
new cattype(catturf)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user