mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
Migrates /obj/item/clothing to the New Attack Chain (#31421)
* the beginning of my torment * This was a very small piece of torment * God agghhghhhh the suffering * pain and suffering and destruction * Update bot_construction.dm * Update heretic_necks.dm * Update heretic_armor.dm * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> * Apply suggestion from @DGamerL Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Signed-off-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -116,10 +116,14 @@
|
||||
if(slot == ITEM_SLOT_OUTER_SUIT) //we only give the mob the ability to activate the vest if he's actually wearing it.
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/suit/storage/void_cloak/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/suit/storage/void_cloak/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!IS_HERETIC(user))
|
||||
to_chat(user, SPAN_HIEROPHANT("You lack the forbidden knowledge to access this cloaks potential."))
|
||||
return
|
||||
to_chat(user, SPAN_HIEROPHANT("You lack the forbidden knowledge to access this cloak's potential."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(cloak_invisible)
|
||||
make_visible()
|
||||
else
|
||||
@@ -127,7 +131,7 @@
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/C = loc
|
||||
C.update_inv_wear_suit()
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/storage/void_cloak/proc/hide_item(atom/movable/source, obj/item/item, slot)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "An amber focusing glass that provides a link to the world beyond. The necklace seems to twitch, but only when you look at it from the corner of your eye."
|
||||
icon_state = "eldritch_necklace"
|
||||
resistance_flags = FIRE_PROOF
|
||||
new_attack_chain = TRUE
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/clothing/species/vox/neck.dmi',
|
||||
"Kidan" = 'icons/mob/clothing/species/kidan/neck.dmi',
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/shock_kit/attack_self__legacy__attackchain(mob/user as mob)
|
||||
part1.attack_self__legacy__attackchain(user, status)
|
||||
part1.activate_self(user)
|
||||
part2.attack_self__legacy__attackchain(user, status)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
integrity_failure = 80
|
||||
resistance_flags = FLAMMABLE
|
||||
permeability_coefficient = 0.8
|
||||
new_attack_chain = TRUE
|
||||
/// Only these species can wear this kit.
|
||||
var/list/species_restricted
|
||||
/// If set to a sprite path, replaces the sprite for monitor heads
|
||||
@@ -199,7 +200,6 @@
|
||||
var/over_mask = FALSE //Whether or not the eyewear is rendered above the mask. Purely cosmetic.
|
||||
/// If TRUE, will hide the wearer's examines from other players.
|
||||
var/hide_examine = FALSE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/*
|
||||
* SEE_SELF // can see self, no matter what
|
||||
@@ -262,20 +262,20 @@
|
||||
/obj/item/clothing/gloves/proc/Touch(atom/A, proximity)
|
||||
return // return TRUE to cancel attack_hand()
|
||||
|
||||
/obj/item/clothing/gloves/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(!clipped)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message(SPAN_WARNING("[user] snips the fingertips off [src]."),SPAN_WARNING("You snip the fingertips off [src]."))
|
||||
clipped = TRUE
|
||||
name = "mangled [name]"
|
||||
desc = "[desc] They have had the fingertips cut off of them."
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("[src] have already been clipped!"))
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
/obj/item/clothing/gloves/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(clipped)
|
||||
to_chat(user, SPAN_NOTICE("[src] have already been clipped!"))
|
||||
return TRUE
|
||||
|
||||
playsound(src.loc, I.usesound, 100, 1)
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] snips the fingertips off [src]."),
|
||||
SPAN_WARNING("You snip the fingertips off [src].")
|
||||
)
|
||||
clipped = TRUE
|
||||
name = "mangled [name]"
|
||||
desc = "[desc] They have had the fingertips cut off of them."
|
||||
update_icon()
|
||||
|
||||
//////////////////////////////
|
||||
// MARK: SUIT SENSORS
|
||||
@@ -534,13 +534,16 @@
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/head/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/clothing/head) && can_have_hats)
|
||||
attach_hat(I, user, TRUE)
|
||||
else if(istype(I, /obj/item/clothing/mask) && can_have_mask)
|
||||
var/obj/item/clothing/mask/M = I
|
||||
/obj/item/clothing/head/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/clothing/head) && can_have_hats)
|
||||
attach_hat(used, user, TRUE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(used, /obj/item/clothing/mask) && can_have_mask)
|
||||
var/obj/item/clothing/mask/M = used
|
||||
if(M.can_attach_to_hat)
|
||||
attach_mask(M, user, TRUE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -731,52 +734,73 @@
|
||||
if(H.get_item_by_slot(ITEM_SLOT_SHOES) == src)
|
||||
REMOVE_TRAIT(H, TRAIT_NOSLIP, UID())
|
||||
|
||||
/obj/item/clothing/shoes/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/match) && src.loc == user)
|
||||
var/obj/item/match/M = I
|
||||
/obj/item/clothing/shoes/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(cut_open)
|
||||
to_chat(user, SPAN_WARNING("[src] have already had [p_their()] toes cut open!"))
|
||||
return TRUE
|
||||
|
||||
if(can_cut_open)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] cuts open the toes of [src]."),
|
||||
SPAN_WARNING("You cut open the toes of [src].")
|
||||
)
|
||||
cut_open = TRUE
|
||||
update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/shoes/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/match) && src.loc == user)
|
||||
var/obj/item/match/M = used
|
||||
if(!M.lit && !M.burnt) // Match isn't lit, but isn't burnt.
|
||||
user.visible_message(SPAN_WARNING("[user] strikes a [M] on the bottom of [src], lighting it."),SPAN_WARNING("You strike [M] on the bottom of [src] to light it."))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] strikes a [M] on the bottom of [src], lighting it."),
|
||||
SPAN_NOTICE("You strike [M] on the bottom of [src] to light it."),
|
||||
SPAN_NOTICE("You hear a match being lit.")
|
||||
)
|
||||
M.matchignite()
|
||||
playsound(user.loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, 1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(M.lit && !M.burnt && M.w_class <= WEIGHT_CLASS_SMALL)
|
||||
user.visible_message(SPAN_WARNING("[user] crushes [M] into the bottom of [src], extinguishing it."),SPAN_WARNING("You crush [M] into the bottom of [src], extinguishing it."))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] crushes [M] into the bottom of [src], extinguishing it."),
|
||||
SPAN_NOTICE("You crush [M] into the bottom of [src], extinguishing it."),
|
||||
SPAN_WARNING("You hear a thin wooden snap!")
|
||||
)
|
||||
M.dropped()
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
if(can_cut_open)
|
||||
if(!cut_open)
|
||||
playsound(src.loc, I.usesound, 100, 1)
|
||||
user.visible_message(SPAN_WARNING("[user] cuts open the toes of [src]."),SPAN_WARNING("You cut open the toes of [src]."))
|
||||
cut_open = TRUE
|
||||
update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("[src] have already had [p_their()] toes cut open!"))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/kitchen/knife/combat))
|
||||
if(istype(used, /obj/item/kitchen/knife/combat))
|
||||
if(!knife_slot)
|
||||
to_chat(user, SPAN_NOTICE("There is no place to put [I] in [src]!"))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("There is no place to put [used] in [src]!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(hidden_blade)
|
||||
to_chat(user, SPAN_NOTICE("There is already something in [src]!"))
|
||||
return
|
||||
if(!user.drop_item_to_ground(I))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!user.drop_item_to_ground(used))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(45) && user.get_item_by_slot(ITEM_SLOT_SHOES) == src)
|
||||
|
||||
var/stabbed_foot = pick("l_foot", "r_foot")
|
||||
user.visible_message(SPAN_NOTICE("[user] tries to place [I] into [src] but stabs their own foot!"), \
|
||||
SPAN_WARNING("You go to put [I] into [src], but miss the boot and stab your own foot!"))
|
||||
user.apply_damage(I.force, BRUTE, stabbed_foot)
|
||||
user.drop_item(I)
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("[user] places [I] into their [name]!"), \
|
||||
SPAN_NOTICE("You place [I] into the side of your [name]!"))
|
||||
I.forceMove(src)
|
||||
hidden_blade = I
|
||||
return
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] tries to place [used] into [src] but stabs their own foot!"),
|
||||
SPAN_WARNING("You go to put [used] into [src], but miss the boot and stab your own foot!")
|
||||
)
|
||||
user.apply_damage(used.force, BRUTE, stabbed_foot)
|
||||
user.drop_item(used)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] places [used] into their [name]!"),
|
||||
SPAN_NOTICE("You place [used] into the side of your [name]!")
|
||||
)
|
||||
used.forceMove(src)
|
||||
hidden_blade = used
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -956,10 +980,12 @@
|
||||
else
|
||||
..() //This is required in order to ensure that the UI buttons for items that have alternate functions tied to UI buttons still work.
|
||||
|
||||
/obj/item/clothing/suit/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/smithed_item/insert))
|
||||
SEND_SIGNAL(src, COMSIG_INSERT_ATTACH, I, user)
|
||||
/obj/item/clothing/suit/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/smithed_item/insert))
|
||||
SEND_SIGNAL(src, COMSIG_INSERT_ATTACH, used, user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/proc/detach_insert(atom/source, mob/user)
|
||||
SIGNAL_HANDLER // COMSIG_CLICK_ALT
|
||||
@@ -1153,16 +1179,16 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/under/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/clothing/accessory))
|
||||
attach_accessory(I, user, TRUE)
|
||||
/obj/item/clothing/under/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/clothing/accessory))
|
||||
attach_accessory(used, user, TRUE)
|
||||
|
||||
if(length(accessories))
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
A.attackby__legacy__attackchain(I, user, params)
|
||||
return TRUE
|
||||
A.item_interaction(user, used, modifiers)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/serialize()
|
||||
var/data = ..()
|
||||
|
||||
@@ -56,22 +56,22 @@
|
||||
/obj/item/clothing/gloves/color/black/thief
|
||||
pickpocket = 1
|
||||
|
||||
/obj/item/clothing/gloves/color/black/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
|
||||
var/confirm = tgui_alert(user, "Do you want to cut off the gloves fingertips? Warning: It might destroy their functionality.", "Cut tips?", list("Yes","No"))
|
||||
if(get_dist(user, src) > 1)
|
||||
to_chat(user, "You have moved too far away.")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
to_chat(user, SPAN_NOTICE("You snip the fingertips off of [src]."))
|
||||
playsound(user.loc, W.usesound, rand(10,50), 1)
|
||||
var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc)
|
||||
if(pickpocket)
|
||||
F.pickpocket = FALSE
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
/obj/item/clothing/gloves/color/black/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(!can_be_cut || icon_state != initial(icon_state)) // Only if not dyed
|
||||
return ..()
|
||||
|
||||
var/confirm = tgui_alert(user, "Do you want to cut off the gloves fingertips? Warning: It might destroy their functionality.", "Cut tips?", list("Yes","No"))
|
||||
if(get_dist(user, src) > 1)
|
||||
to_chat(user, "You have moved too far away.")
|
||||
return TRUE
|
||||
if(confirm == "Yes")
|
||||
to_chat(user, SPAN_NOTICE("You snip the fingertips off of [src]."))
|
||||
playsound(user.loc, I.usesound, rand(10,50), 1)
|
||||
var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc)
|
||||
if(pickpocket)
|
||||
F.pickpocket = FALSE
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/gloves/color/black/poisoner
|
||||
desc = "A pair of thick black gloves. They're coated with a hydrophobic material that repels liquids."
|
||||
|
||||
@@ -171,21 +171,24 @@
|
||||
if(cell)
|
||||
. += "gloves_cell"
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/stun/attackby__legacy__attackchain(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(!cell)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, SPAN_WARNING("[W] is stuck to you!"))
|
||||
return
|
||||
W.forceMove(src)
|
||||
cell = W
|
||||
to_chat(user, SPAN_NOTICE("You attach [W] to [src]."))
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("[src] already has a cell."))
|
||||
else
|
||||
/obj/item/clothing/gloves/color/yellow/stun/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stock_parts/cell))
|
||||
return ..()
|
||||
|
||||
if(cell)
|
||||
to_chat(user, SPAN_WARNING("[src] already has a cell!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!user.drop_item())
|
||||
to_chat(user, SPAN_WARNING("[used] is stuck to you!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
used.forceMove(src)
|
||||
cell = used
|
||||
to_chat(user, SPAN_NOTICE("You attach [used] to [src]."))
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/gloves/color/yellow/stun/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
|
||||
@@ -24,17 +24,18 @@
|
||||
if(stud)
|
||||
. += "It is adorned with a single gem."
|
||||
|
||||
/obj/item/clothing/gloves/ring/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/diamond))
|
||||
var/obj/item/stack/sheet/mineral/diamond/D = I
|
||||
if(stud)
|
||||
to_chat(usr, SPAN_NOTICE("[src] already has a gem."))
|
||||
else
|
||||
if(D.amount >= 1)
|
||||
D.use(1)
|
||||
stud = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(usr, SPAN_NOTICE("You socket the diamond into [src]."))
|
||||
/obj/item/clothing/gloves/ring/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stack/sheet/mineral/diamond))
|
||||
return ..()
|
||||
|
||||
var/obj/item/stack/sheet/mineral/diamond/D = used
|
||||
if(stud)
|
||||
to_chat(usr, SPAN_NOTICE("[src] already has a gem."))
|
||||
else if(D.use(1))
|
||||
stud = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(usr, SPAN_NOTICE("You socket the diamond into [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
// s'pensive
|
||||
/obj/item/clothing/gloves/ring/silver
|
||||
|
||||
@@ -18,8 +18,12 @@
|
||||
/// Determines used sprites: hardhat[on]_[hat_color]
|
||||
var/hat_color = "yellow"
|
||||
|
||||
/obj/item/clothing/head/hardhat/attack_self__legacy__attackchain(mob/living/user)
|
||||
/obj/item/clothing/head/hardhat/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
toggle_helmet_light(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/hardhat/proc/toggle_helmet_light(mob/living/user)
|
||||
on = !on
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
)
|
||||
permeability_coefficient = 0.4
|
||||
|
||||
/obj/item/clothing/head/helmet/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/helmet/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(can_toggle && !user.incapacitated())
|
||||
if(world.time > cooldown + toggle_cooldown)
|
||||
cooldown = world.time
|
||||
@@ -38,6 +41,7 @@
|
||||
sleep(15)
|
||||
if(toggle_sound)
|
||||
playsound(src.loc, "[toggle_sound]", 100, FALSE, 4)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/helmet/visor
|
||||
name = "visor helmet"
|
||||
|
||||
@@ -255,8 +255,12 @@
|
||||
. = ..()
|
||||
AddElement(/datum/element/clothing_adjustment/monitor_headgear, 0, 1)
|
||||
|
||||
/obj/item/clothing/head/fedora/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/fedora/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
tip_fedora(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/fedora/item_action_slot_check(slot)
|
||||
if(slot == ITEM_SLOT_HEAD)
|
||||
@@ -472,8 +476,12 @@
|
||||
sprite_sheets = list("Grey" = 'icons/mob/clothing/species/grey/head.dmi')
|
||||
actions_types = list(/datum/action/item_action/caw)
|
||||
|
||||
/obj/item/clothing/head/griffin/attack_self__legacy__attackchain()
|
||||
/obj/item/clothing/head/griffin/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
caw()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/griffin/proc/caw()
|
||||
if(cooldown < world.time - 20) // A cooldown, to stop people being jerks
|
||||
|
||||
@@ -34,8 +34,12 @@
|
||||
"Grey" = 'icons/mob/clothing/species/grey/helmet.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/welding/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/welding/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
weldingvisortoggle(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/welding/flamedecal
|
||||
name = "flame decal welding helmet"
|
||||
@@ -82,9 +86,13 @@
|
||||
if(isturf(location))
|
||||
location.hotspot_expose(700, 1)
|
||||
|
||||
/obj/item/clothing/head/cakehat/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/cakehat/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(status > 1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
onfire = !onfire
|
||||
if(onfire)
|
||||
force = 3
|
||||
@@ -95,7 +103,7 @@
|
||||
force = null
|
||||
damtype = BRUTE
|
||||
icon_state = "cake0"
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/*
|
||||
* Soviet Hats
|
||||
@@ -113,13 +121,17 @@
|
||||
"Vox" = 'icons/mob/clothing/species/vox/head.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/ushanka/attack_self__legacy__attackchain(mob/user as mob)
|
||||
/obj/item/clothing/head/ushanka/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(icon_state == "ushankadown")
|
||||
icon_state = "ushankaup"
|
||||
to_chat(user, "You raise the ear flaps on the ushanka.")
|
||||
else
|
||||
icon_state = "ushankadown"
|
||||
to_chat(user, "You lower the ear flaps on the ushanka.")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/sovietsidecap
|
||||
name = "\improper Soviet side cap"
|
||||
|
||||
@@ -27,8 +27,12 @@
|
||||
/obj/item/clothing/head/soft/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][flipped ? "_flipped" : ""]"
|
||||
|
||||
/obj/item/clothing/head/soft/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/soft/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
flip(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/soft/proc/flip(mob/user)
|
||||
flipped = !flipped
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
"Drask" = 'icons/mob/clothing/species/drask/mask.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/balaclava/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/balaclava/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
adjustmask(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/luchador
|
||||
name = "luchador mask"
|
||||
|
||||
@@ -20,8 +20,12 @@
|
||||
"Plasmaman" = 'icons/mob/clothing/species/plasmaman/mask.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/breath/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/breath/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
adjustmask(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/breath/AltClick(mob/user)
|
||||
..()
|
||||
@@ -49,8 +53,9 @@
|
||||
desc = "A weirdly-shaped breath mask, this one seems to designed for a vox beak."
|
||||
icon_state = "voxmask2"
|
||||
|
||||
/obj/item/clothing/mask/breath/vox/attack_self__legacy__attackchain(mob/user)
|
||||
return
|
||||
/obj/item/clothing/mask/breath/vox/activate_self(mob/user)
|
||||
. = ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/breath/vox/AltClick(mob/user)
|
||||
return
|
||||
|
||||
@@ -46,8 +46,12 @@
|
||||
"Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/mask.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/gas/welding/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/gas/welding/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
weldingvisortoggle(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer
|
||||
name = "explorer gas mask"
|
||||
@@ -70,8 +74,12 @@
|
||||
/obj/item/clothing/mask/gas/explorer/marines
|
||||
name = "military gas mask"
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/gas/explorer/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
adjustmask(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/gas/explorer/adjustmask(user)
|
||||
..()
|
||||
@@ -125,7 +133,10 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
dog_fashion = /datum/dog_fashion/head/clown
|
||||
|
||||
/obj/item/clothing/mask/gas/clown_hat/attack_self__legacy__attackchain(mob/living/user)
|
||||
/obj/item/clothing/mask/gas/clown_hat/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/list/mask_type = list("True Form" = /obj/item/clothing/mask/gas/clown_hat,
|
||||
"The Feminist" = /obj/item/clothing/mask/gas/clown_hat/sexy,
|
||||
"The Madman" = /obj/item/clothing/mask/gas/clown_hat/joker,
|
||||
@@ -138,14 +149,16 @@
|
||||
var/picked_mask = mask_type[mask_choice]
|
||||
|
||||
if(QDELETED(src) || !picked_mask)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user.stat || !in_range(user, src))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/clothing/mask/gas/clown_hat/new_mask = new picked_mask(get_turf(user))
|
||||
qdel(src)
|
||||
user.put_in_active_hand(new_mask)
|
||||
to_chat(user, SPAN_NOTICE("Your Clown Mask has now morphed into its new form, all praise the Honk Mother!"))
|
||||
return TRUE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/gas/clown_hat/sexy
|
||||
name = "sexy-clown wig and mask"
|
||||
@@ -225,8 +238,12 @@
|
||||
/obj/item/clothing/mask/gas/owl_mask/super_hero
|
||||
flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | NODROP
|
||||
|
||||
/obj/item/clothing/mask/gas/owl_mask/attack_self__legacy__attackchain()
|
||||
/obj/item/clothing/mask/gas/owl_mask/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
hoot()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/gas/owl_mask/proc/hoot()
|
||||
if(cooldown < world.time - 35) // A cooldown, to stop people being jerks
|
||||
@@ -346,13 +363,11 @@
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("It's broken."))
|
||||
|
||||
/obj/item/clothing/mask/gas/sechailer/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(aggressiveness != 5)
|
||||
to_chat(user, SPAN_WARNING("You broke it!"))
|
||||
aggressiveness = 5
|
||||
return
|
||||
. = ..()
|
||||
/obj/item/clothing/mask/gas/sechailer/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(aggressiveness != 5)
|
||||
to_chat(user, SPAN_WARNING("You broke it!"))
|
||||
aggressiveness = 5
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/mask/gas/sechailer/screwdriver_act(mob/living/user, obj/item/I)
|
||||
switch(aggressiveness)
|
||||
@@ -376,8 +391,12 @@
|
||||
to_chat(user, SPAN_WARNING("You adjust the restrictor but nothing happens, probably because its broken."))
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/mask/gas/sechailer/attack_self__legacy__attackchain()
|
||||
/obj/item/clothing/mask/gas/sechailer/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
halt()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user as mob)
|
||||
if(safety)
|
||||
|
||||
@@ -108,23 +108,26 @@
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/assembly/signaler) || istype(W, /obj/item/assembly/voice))
|
||||
/obj/item/clothing/mask/muzzle/safety/shock/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/assembly/signaler) || istype(used, /obj/item/assembly/voice))
|
||||
if(istype(trigger, /obj/item/assembly/signaler) || istype(trigger, /obj/item/assembly/voice))
|
||||
to_chat(user, SPAN_NOTICE("Something is already attached to [src]."))
|
||||
return FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!user.drop_item())
|
||||
to_chat(user, SPAN_WARNING("You are unable to insert [W] into [src]."))
|
||||
return FALSE
|
||||
trigger = W
|
||||
to_chat(user, SPAN_WARNING("You are unable to insert [used] into [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
trigger = used
|
||||
trigger.forceMove(src)
|
||||
trigger.master = src
|
||||
trigger.holder = src
|
||||
to_chat(user, SPAN_NOTICE("You attach [W] to [src]."))
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/assembly))
|
||||
to_chat(user, SPAN_NOTICE("You attach [used] to [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(used, /obj/item/assembly))
|
||||
to_chat(user, SPAN_NOTICE("That won't fit in [src]. Perhaps a signaler or voice analyzer would?"))
|
||||
return FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -194,8 +197,12 @@
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_ANTI_VIRAL, "inherent")
|
||||
|
||||
/obj/item/clothing/mask/surgical/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/surgical/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
adjustmask(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache
|
||||
name = "completely real moustache"
|
||||
@@ -214,8 +221,12 @@
|
||||
"Drask" = 'icons/mob/clothing/species/drask/mask.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/fakemoustache/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
pontificate(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/item_action_slot_check(slot)
|
||||
if(slot == ITEM_SLOT_MASK)
|
||||
@@ -356,9 +367,13 @@
|
||||
)
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
|
||||
/obj/item/clothing/mask/bandana/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/mask/bandana/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(slot_flags & ITEM_SLOT_MASK || slot_flags & ITEM_SLOT_HEAD)
|
||||
adjustmask(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/bandana/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -39,30 +39,37 @@
|
||||
icon_state = "stethoscope"
|
||||
materials = list(MAT_METAL = 500)
|
||||
|
||||
/obj/item/clothing/neck/stethoscope/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user)
|
||||
if(!ishuman(M) || !isliving(user))
|
||||
return ..(M, user)
|
||||
/obj/item/clothing/neck/stethoscope/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!ishuman(target) || !isliving(user))
|
||||
return ..()
|
||||
|
||||
if(user == M)
|
||||
user.visible_message("[user] places [src] against [user.p_their()] chest and listens attentively.", "You place [src] against your chest...")
|
||||
if(user == target)
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] places [src] against [user.p_their()] chest and listens attentively."),
|
||||
SPAN_NOTICE("You place [src] against your chest...")
|
||||
)
|
||||
else
|
||||
user.visible_message("[user] places [src] against [M]'s chest and listens attentively.", "You place [src] against [M]'s chest...")
|
||||
var/datum/organ/heart/heart_datum = M.get_int_organ_datum(ORGAN_DATUM_HEART)
|
||||
var/datum/organ/lungs/lung_datum = M.get_int_organ_datum(ORGAN_DATUM_LUNGS)
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] places [src] against [target]'s chest and listens attentively."),
|
||||
SPAN_NOTICE("You place [src] against [target]'s chest...")
|
||||
)
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/datum/organ/heart/heart_datum = H.get_int_organ_datum(ORGAN_DATUM_HEART)
|
||||
var/datum/organ/lungs/lung_datum = H.get_int_organ_datum(ORGAN_DATUM_LUNGS)
|
||||
if(!lung_datum || !heart_datum)
|
||||
to_chat(user, SPAN_WARNING("You don't hear anything."))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/organ/internal/H = heart_datum.linked_organ
|
||||
var/obj/item/organ/internal/L = lung_datum.linked_organ
|
||||
if(!M.pulse || (!H || !(L && !HAS_TRAIT(M, TRAIT_NOBREATH))))
|
||||
var/obj/item/organ/internal/heart = heart_datum.linked_organ
|
||||
var/obj/item/organ/internal/lungs = lung_datum.linked_organ
|
||||
if(!H.pulse || (!heart || !(lungs && !HAS_TRAIT(H, TRAIT_NOBREATH))))
|
||||
to_chat(user, SPAN_WARNING("You don't hear anything."))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/color = "notice"
|
||||
if(H)
|
||||
if(heart)
|
||||
var/heart_sound
|
||||
switch(H.damage)
|
||||
switch(heart.damage)
|
||||
if(0 to 1)
|
||||
heart_sound = "healthy"
|
||||
if(1 to 25)
|
||||
@@ -75,9 +82,9 @@
|
||||
color = "warning"
|
||||
to_chat(user, "<span class='[color]'>You hear \an [heart_sound] pulse.</span>")
|
||||
|
||||
if(L)
|
||||
if(lungs)
|
||||
var/lung_sound
|
||||
switch(L.damage)
|
||||
switch(lungs.damage)
|
||||
if(0 to 1)
|
||||
lung_sound = "healthy respiration"
|
||||
if(1 to 25)
|
||||
@@ -89,6 +96,7 @@
|
||||
lung_sound = "gurgling"
|
||||
color = "warning"
|
||||
to_chat(user, "<span class='[color]'>You hear [lung_sound].</span>")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/neck/neckerchief
|
||||
name = "white neckerchief"
|
||||
|
||||
@@ -26,16 +26,44 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/clothing/neck/necklace/locket/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/neck/necklace/locket/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
operate_locket(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/neck/necklace/locket/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/paper) && !istype(used, /obj/item/photo))
|
||||
to_chat(user, SPAN_WARNING("Only photographs and papers will fit inside [src]!"))
|
||||
return ..()
|
||||
|
||||
if(!open)
|
||||
to_chat(user, SPAN_WARNING("You have to open [src] first."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(held)
|
||||
to_chat(user, SPAN_WARNING("[src] already has something inside it."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You slip [used] into [src]."))
|
||||
user.drop_item()
|
||||
var/obj/item/thing = used
|
||||
thing.forceMove(src)
|
||||
held = used
|
||||
operate_locket(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/neck/necklace/locket/proc/operate_locket(mob/living/user)
|
||||
if(!base_icon)
|
||||
base_icon = icon_state
|
||||
|
||||
if(!("[base_icon]_open" in icon_states(icon)))
|
||||
to_chat(user, "[src] doesn't seem to open.")
|
||||
return
|
||||
to_chat(user, SPAN_WARNING("[src] doesn't seem to open."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
open = !open
|
||||
to_chat(user, "You flip [src] [open ? "open" : "closed"].")
|
||||
to_chat(user, SPAN_NOTICE("You flip [src] [open ? "open" : "closed"]."))
|
||||
if(open)
|
||||
icon_state = "[base_icon]_open"
|
||||
if(held)
|
||||
@@ -45,22 +73,6 @@
|
||||
else
|
||||
icon_state = "[base_icon]"
|
||||
|
||||
/obj/item/clothing/neck/necklace/locket/attackby__legacy__attackchain(obj/item/O, mob/user)
|
||||
if(!open)
|
||||
to_chat(user, "You have to open it first.")
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo))
|
||||
if(held)
|
||||
to_chat(usr, "[src] already has something inside it.")
|
||||
else
|
||||
to_chat(usr, "You slip [O] into [src].")
|
||||
user.drop_item()
|
||||
O.forceMove(src)
|
||||
held = O
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/neck/necklace/locket/silver
|
||||
name = "silver locket"
|
||||
desc = "A silver locket that seems to have space for a photo within."
|
||||
|
||||
@@ -77,19 +77,25 @@
|
||||
QDEL_NULL(shackles)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/orange/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/shoes/orange/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(shackles)
|
||||
user.put_in_hands(shackles)
|
||||
shackles = null
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
icon_state = "orange"
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/shoes/orange/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/restraints/handcuffs) && !shackles)
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
shackles = I
|
||||
slowdown = 15
|
||||
icon_state = "orange1"
|
||||
return
|
||||
/obj/item/clothing/shoes/orange/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/restraints/handcuffs) || shackles)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user.drop_item())
|
||||
used.forceMove(src)
|
||||
shackles = used
|
||||
slowdown = 15
|
||||
icon_state = "orange1"
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
@@ -35,8 +35,12 @@
|
||||
return
|
||||
check_mag_pulse(user, removing = TRUE)
|
||||
|
||||
/obj/item/clothing/shoes/magboots/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/shoes/magboots/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
toggle_magpulse(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/shoes/magboots/proc/toggle_magpulse(mob/user, no_message)
|
||||
if(magpulse) //magpulse and no_slip will always be the same value unless VV happens
|
||||
@@ -271,31 +275,36 @@
|
||||
cell = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/shoes/magboots/gravity/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stock_parts/cell))
|
||||
/obj/item/clothing/shoes/magboots/gravity/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/stock_parts/cell))
|
||||
if(cell)
|
||||
to_chat(user, SPAN_WARNING("[src] already has a cell!"))
|
||||
return
|
||||
if(!user.drop_item_to_ground(I))
|
||||
return
|
||||
I.forceMove(src)
|
||||
cell = I
|
||||
to_chat(user, SPAN_NOTICE("You install [I] into [src]."))
|
||||
update_icon()
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(I, /obj/item/assembly/signaler/anomaly/grav))
|
||||
if(!user.drop_item_to_ground(used))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
used.forceMove(src)
|
||||
cell = used
|
||||
to_chat(user, SPAN_NOTICE("You install [used] into [src]."))
|
||||
update_icon()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(used, /obj/item/assembly/signaler/anomaly/grav))
|
||||
if(core)
|
||||
to_chat(user, SPAN_NOTICE("[src] already has a [I]!"))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("[src] already has a [used]!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!user.drop_item())
|
||||
to_chat(user, SPAN_WARNING("[I] is stuck to your hand!"))
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("You insert [I] into [src], and [src] starts to warm up."))
|
||||
I.forceMove(src)
|
||||
core = I
|
||||
else
|
||||
return ..()
|
||||
to_chat(user, SPAN_WARNING("[used] is stuck to your hand!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You insert [used] into [src], and [src] starts to warm up."))
|
||||
used.forceMove(src)
|
||||
core = used
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/magboots/gravity/equipped(mob/user, slot)
|
||||
..()
|
||||
|
||||
@@ -184,21 +184,23 @@
|
||||
sprite_sheets = list("Vox" = 'icons/mob/clothing/species/vox/feet.dmi')
|
||||
multiple_icons = FALSE
|
||||
|
||||
/obj/item/clothing/shoes/magboots/vox/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/shoes/magboots/vox/activate_self(mob/user)
|
||||
if(!ishuman(user))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(magpulse)
|
||||
set_nodrop(FALSE, loc)
|
||||
to_chat(user, "You relax your deathgrip on the flooring.")
|
||||
to_chat(user, SPAN_NOTICE("You relax your deathgrip on the flooring."))
|
||||
else
|
||||
//make sure these can only be used when equipped.
|
||||
if(!ishuman(user))
|
||||
return
|
||||
//make sure these can only be turned on when equipped.
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.shoes != src)
|
||||
to_chat(user, SPAN_WARNING("You will have to put on [src] before you can do that."))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
set_nodrop(TRUE, loc) //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.")
|
||||
to_chat(user, "It would be hard to take off [src] without relaxing your grip first.")
|
||||
to_chat(user, SPAN_NOTICE("You dig your claws deeply into the flooring, bracing yourself."))
|
||||
to_chat(user, SPAN_NOTICE("It would be hard to take off [src] without relaxing your grip first."))
|
||||
return ..()
|
||||
|
||||
//In case they somehow come off while enabled.
|
||||
|
||||
@@ -26,11 +26,15 @@
|
||||
register_camera(wearer)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(camera || !has_camera)
|
||||
..(user)
|
||||
else
|
||||
register_camera(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/proc/register_camera(mob/wearer)
|
||||
if(camera || !has_camera)
|
||||
|
||||
@@ -41,8 +41,12 @@
|
||||
suit = null
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
toggle_light(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/proc/toggle_light(mob/user)
|
||||
on = !on
|
||||
@@ -171,23 +175,27 @@
|
||||
W.suit = src
|
||||
helmet = W
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/attack_self__legacy__attackchain(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
..()
|
||||
/obj/item/clothing/suit/space/hardsuit/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/tank/jetpack/suit))
|
||||
if(jetpack)
|
||||
to_chat(user, SPAN_WARNING("[src] already has a jetpack installed."))
|
||||
return
|
||||
if(src == user.get_item_by_slot(ITEM_SLOT_OUTER_SUIT)) //Make sure the player is not wearing the suit before applying the upgrade.
|
||||
to_chat(user, SPAN_WARNING("You cannot install the upgrade to [src] while wearing it."))
|
||||
return
|
||||
if(user.transfer_item_to(I, src))
|
||||
jetpack = I
|
||||
to_chat(user, SPAN_NOTICE("You successfully install the jetpack into [src]."))
|
||||
return
|
||||
return ..()
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/tank/jetpack/suit))
|
||||
return ..()
|
||||
|
||||
if(jetpack)
|
||||
to_chat(user, SPAN_WARNING("[src] already has a jetpack installed."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(src == user.get_item_by_slot(ITEM_SLOT_OUTER_SUIT)) //Make sure the player is not wearing the suit before applying the upgrade.
|
||||
to_chat(user, SPAN_WARNING("You cannot install the upgrade to [src] while wearing it."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(user.transfer_item_to(used, src))
|
||||
jetpack = used
|
||||
to_chat(user, SPAN_NOTICE("You successfully install the jetpack into [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
@@ -256,10 +264,14 @@
|
||||
linkedsuit = null
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/attack_self__legacy__attackchain(mob/user) //Toggle Helmet
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, SPAN_WARNING("You cannot toggle your helmet while in this [user.loc]!") )
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
on = !on
|
||||
if(on)
|
||||
to_chat(user, SPAN_NOTICE("You switch your hardsuit to EVA mode, sacrificing speed for space protection."))
|
||||
@@ -287,6 +299,7 @@
|
||||
var/mob/living/carbon/C = user
|
||||
C.head_update(src, forced = 1)
|
||||
update_action_buttons()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/proc/toggle_hardsuit_mode(mob/user) //Helmet Toggles Suit Mode
|
||||
if(linkedsuit)
|
||||
|
||||
@@ -123,13 +123,17 @@
|
||||
. = ..()
|
||||
. += SPAN_NOTICE("Use in hand to toggle the hat's beard.")
|
||||
|
||||
/obj/item/clothing/head/helmet/space/santahat/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/helmet/space/santahat/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(icon_state == "santahat")
|
||||
icon_state = "santahat_beard"
|
||||
to_chat(user, "Santa's beard expands out from the hat!")
|
||||
else
|
||||
icon_state = "santahat"
|
||||
to_chat(user, "The beard slinks back into the hat...")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/space/santa
|
||||
name = "Santa's suit"
|
||||
|
||||
@@ -64,8 +64,12 @@
|
||||
else if(on)
|
||||
. += light_icon
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
toggle_light(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/proc/toggle_light(mob/user, update_light)
|
||||
if(!update_light)
|
||||
|
||||
@@ -46,21 +46,25 @@
|
||||
desc = "A Level II soft armor vest used by Nanotrasen corporate security. Offers light protection against kinetic impacts and lasers, and has a clip for a holobadge."
|
||||
var/obj/item/clothing/accessory/holobadge/attached_badge
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/security/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/clothing/accessory/holobadge))
|
||||
if(user.transfer_item_to(I, src))
|
||||
add_fingerprint(user)
|
||||
attached_badge = I
|
||||
var/datum/action/A = new /datum/action/item_action/remove_badge(src)
|
||||
A.Grant(user)
|
||||
icon_state = "armorsec"
|
||||
user.update_inv_wear_suit()
|
||||
desc = "A Level II soft armor vest used by Nanotrasen corporate security, offering light protection against kinetic impacts and lasers. This one has [attached_badge] attached to it."
|
||||
to_chat(user, SPAN_NOTICE("You attach [attached_badge] to [src]."))
|
||||
return
|
||||
..()
|
||||
/obj/item/clothing/suit/armor/vest/security/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/clothing/accessory/holobadge))
|
||||
return ..()
|
||||
|
||||
if(user.transfer_item_to(used, src))
|
||||
add_fingerprint(user)
|
||||
attached_badge = used
|
||||
var/datum/action/A = new /datum/action/item_action/remove_badge(src)
|
||||
A.Grant(user)
|
||||
icon_state = "armorsec"
|
||||
user.update_inv_wear_suit()
|
||||
desc = "A Level II soft armor vest used by Nanotrasen corporate security, offering light protection against kinetic impacts and lasers. This one has [attached_badge] attached to it."
|
||||
to_chat(user, SPAN_NOTICE("You attach [attached_badge] to [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/security/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/security/attack_self__legacy__attackchain(mob/user)
|
||||
if(attached_badge)
|
||||
add_fingerprint(user)
|
||||
user.put_in_hands(attached_badge)
|
||||
@@ -72,9 +76,7 @@
|
||||
desc = "A Level II soft armor vest used by Nanotrasen corporate security. Offers light protection against kinetic impacts and lasers, and has a clip for a holobadge."
|
||||
to_chat(user, SPAN_NOTICE("You remove [attached_badge] from [src]."))
|
||||
attached_badge = null
|
||||
|
||||
return
|
||||
..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/street_judge
|
||||
name = "judge's security armor"
|
||||
@@ -414,11 +416,15 @@
|
||||
. += "Outside of the strange effects caused by the anomaly core, the armor provides no protection against conventional attacks. \
|
||||
Nanotrasen cannot be held liable for injury and/or death due to misuse or proper operation of the reactive armor."
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/suit/armor/reactive/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
active = !(active)
|
||||
if(disabled)
|
||||
to_chat(user, SPAN_WARNING("[src] is disabled and rebooting!"))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(active)
|
||||
to_chat(user, SPAN_NOTICE("[src] is now active."))
|
||||
icon_state = "reactive"
|
||||
@@ -428,6 +434,7 @@
|
||||
add_fingerprint(user)
|
||||
user.update_inv_wear_suit()
|
||||
update_action_buttons()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/emp_act(severity)
|
||||
var/emp_power = 5 + (severity-1 ? 0 : 5)
|
||||
|
||||
@@ -1287,13 +1287,17 @@
|
||||
icon_state = "griffin_wings"
|
||||
inhand_icon_state = null
|
||||
|
||||
/obj/item/clothing/suit/toggle/attack_self__legacy__attackchain()
|
||||
/obj/item/clothing/suit/toggle/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(icon_state == initial(icon_state))
|
||||
icon_state = icon_state + "_t"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
usr.update_inv_wear_suit()
|
||||
update_action_buttons()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/lordadmiral
|
||||
name = "lord admiral's coat"
|
||||
@@ -1485,9 +1489,13 @@
|
||||
to_chat(L, SPAN_NOTICE("You are now wearing \a [choice]. Allahu Akbar!"))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/suit/hooded/abaya/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/suit/hooded/abaya/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
. = ..()
|
||||
reskin_abaya(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/suit/hooded/abaya/red
|
||||
name = "red abaya"
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
pockets.show_to(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/storage/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/clothing/suit/storage/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
// Inserts shouldn't be added into the inventory of the pockets if they're attaching.
|
||||
if(istype(W, /obj/item/smithed_item/insert) && length(inserts) != insert_max)
|
||||
return ..()
|
||||
..()
|
||||
return pockets?.attackby__legacy__attackchain(W, user, params)
|
||||
if(istype(used, /obj/item/smithed_item/insert) && length(inserts) != insert_max)
|
||||
return NONE
|
||||
|
||||
return pockets?.attackby__legacy__attackchain(used, user, modifiers)
|
||||
|
||||
/obj/item/clothing/suit/storage/emp_act(severity)
|
||||
..()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if(ishuman(helmet.loc))
|
||||
var/mob/living/carbon/H = helmet.loc
|
||||
if(helmet.on)
|
||||
helmet.attack_self__legacy__attackchain(H)
|
||||
helmet.activate_self(H)
|
||||
H.transfer_item_to(helmet, src, force = TRUE)
|
||||
H.update_inv_wear_suit()
|
||||
to_chat(H, SPAN_NOTICE("The helmet on the hardsuit disengages."))
|
||||
|
||||
@@ -226,8 +226,5 @@
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
magical = TRUE
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/wizard/attack_self__legacy__attackchain(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/wizard/arch
|
||||
desc = "A truly protective helmet."
|
||||
|
||||
@@ -74,38 +74,45 @@
|
||||
user.put_in_hands(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/clothing/accessory/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/user)
|
||||
// This code lets you put accessories on other people by attacking their sprite with the accessory
|
||||
if(istype(H) && !ismonkeybasic(H)) //Monkeys are a snowflake because you can't remove accessories once added
|
||||
if(H.wear_suit && H.wear_suit.flags_inv & HIDEJUMPSUIT)
|
||||
to_chat(user, "[H]'s body is covered, and you cannot attach \the [src].")
|
||||
return TRUE
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(istype(U))
|
||||
if(user == H)
|
||||
U.attach_accessory(src, user, TRUE)
|
||||
return
|
||||
user.visible_message(SPAN_NOTICE("[user] is putting a [src.name] on [H]'s [U.name]!"), SPAN_NOTICE("You begin to put a [src.name] on [H]'s [U.name]..."))
|
||||
if(do_after(user, 4 SECONDS, target = H) && H.w_uniform == U)
|
||||
if(U.attach_accessory(src, user, TRUE))
|
||||
user.visible_message(SPAN_NOTICE("[user] puts a [src.name] on [H]'s [U.name]!"), SPAN_NOTICE("You finish putting a [src.name] on [H]'s [U.name]."))
|
||||
after_successful_nonself_attach(H, user)
|
||||
else
|
||||
to_chat(user, "[H] is not wearing anything to attach \the [src] to.")
|
||||
return TRUE
|
||||
return ..()
|
||||
/obj/item/clothing/accessory/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
// This code lets you put accessories on other people by attacking their sprite with the accessory.
|
||||
// Monkeys are a snowflake because you can't remove accessories once added.
|
||||
if(!ishuman(target) || ismonkeybasic(target))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.wear_suit && H.wear_suit.flags_inv & HIDEJUMPSUIT)
|
||||
to_chat(user, "[H]'s body is covered, and you cannot attach [src].")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(!istype(U))
|
||||
to_chat(user, "[H] is not wearing anything to attach [src] to.")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user == H)
|
||||
U.attach_accessory(src, user, TRUE)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] is putting \a [src.name] on [H]'s [U.name]!"),
|
||||
SPAN_NOTICE("You begin to put \a [src.name] on [H]'s [U.name]...")
|
||||
)
|
||||
if(do_after(user, 4 SECONDS, target = H) && H.w_uniform == U)
|
||||
if(U.attach_accessory(src, user, TRUE))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] puts a [src.name] on [H]'s [U.name]!"),
|
||||
SPAN_NOTICE("You finish putting a [src.name] on [H]'s [U.name].")
|
||||
)
|
||||
after_successful_nonself_attach(H, user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/proc/after_successful_nonself_attach(mob/living/carbon/human/H, mob/living/user)
|
||||
return
|
||||
|
||||
//default attackby behaviour
|
||||
/obj/item/clothing/accessory/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
..()
|
||||
|
||||
//default attack_hand behaviour
|
||||
/obj/item/clothing/accessory/attack_hand(mob/user as mob)
|
||||
if(has_suit)
|
||||
return //we aren't an object on the ground so don't call parent
|
||||
return // We aren't an object on the ground so don't call parent
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/proc/attached_unequip(mob/user) // If we need to do something special when clothing is removed from the user
|
||||
@@ -141,11 +148,14 @@
|
||||
if(channel)
|
||||
. += SPAN_NOTICE("The tiny radio inside seems to be [try_announce ? "active" : "inactive"].")
|
||||
|
||||
/obj/item/clothing/accessory/medal/attack_self__legacy__attackchain(mob/user)
|
||||
. = ..()
|
||||
/obj/item/clothing/accessory/medal/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(channel)
|
||||
try_announce = !try_announce
|
||||
to_chat(user, SPAN_NOTICE("You silently [try_announce ? "enable" : "disable"] the radio in [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/medal/after_successful_nonself_attach(mob/living/carbon/human/H, mob/living/user)
|
||||
if(!channel || !try_announce)
|
||||
@@ -343,34 +353,39 @@
|
||||
"Kidan" = 'icons/mob/clothing/species/kidan/neck.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/accessory/holobadge/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!stored_name)
|
||||
to_chat(user, "Waving around a badge before swiping an ID would be pretty pointless.")
|
||||
return
|
||||
if(isliving(user))
|
||||
user.visible_message(SPAN_WARNING("[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security."),
|
||||
SPAN_WARNING("You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], Nanotrasen Security."),
|
||||
SPAN_WARNING("You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], Nanotrasen Security.")
|
||||
)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/obj/item/card/id/id_card = null
|
||||
/obj/item/clothing/accessory/holobadge/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/card/id) && !istype(used, /obj/item/pda))
|
||||
return ..()
|
||||
|
||||
if(istype(I, /obj/item/card/id))
|
||||
id_card = I
|
||||
else
|
||||
var/obj/item/pda/pda = I
|
||||
id_card = pda.id
|
||||
var/obj/item/card/id/id_card
|
||||
if(istype(used, /obj/item/card/id))
|
||||
id_card = used
|
||||
else
|
||||
var/obj/item/pda/pda = used
|
||||
id_card = pda.id
|
||||
|
||||
if((ACCESS_SEC_DOORS in id_card.access) || emagged)
|
||||
to_chat(user, SPAN_NOTICE("You imprint your ID details onto the badge."))
|
||||
stored_name = id_card.registered_name
|
||||
name = "holobadge ([stored_name])"
|
||||
desc = "This glowing blue badge marks [stored_name] as THE LAW."
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("[src] rejects your insufficient access rights."))
|
||||
return
|
||||
..()
|
||||
if((ACCESS_SEC_DOORS in id_card.access) || emagged)
|
||||
to_chat(user, SPAN_NOTICE("You imprint your ID details onto the badge."))
|
||||
stored_name = id_card.registered_name
|
||||
name = "holobadge ([stored_name])"
|
||||
desc = "This glowing blue badge marks [stored_name] as THE LAW."
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("[src] rejects your insufficient access rights."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/emag_act(mob/user)
|
||||
if(emagged)
|
||||
@@ -380,12 +395,14 @@
|
||||
to_chat(user, SPAN_WARNING("You swipe the card and crack the holobadge security checks."))
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/accessory/holobadge/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/user)
|
||||
if(H != user)
|
||||
user.visible_message(SPAN_WARNING("[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently."),
|
||||
SPAN_WARNING("You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are THE LAW!"))
|
||||
return
|
||||
..()
|
||||
/obj/item/clothing/accessory/holobadge/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(target == user || !ismob(target))
|
||||
return ..()
|
||||
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] invades [target]'s personal space, thrusting [src] into [target.p_their()] face insistently."),
|
||||
SPAN_WARNING("You invade [target]'s personal space, thrusting [src] into [target.p_their()] face insistently. You are THE LAW!"))
|
||||
return CONTINUE_ATTACK // Physically press it into their face!
|
||||
|
||||
//////////////
|
||||
//OBJECTION!//
|
||||
@@ -398,17 +415,27 @@
|
||||
var/cached_bubble_icon = null
|
||||
var/what_you_are = "THE LAW"
|
||||
|
||||
/obj/item/clothing/accessory/legal_badge/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/accessory/legal_badge/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(prob(1))
|
||||
user.say("The testimony contradicts the evidence!")
|
||||
user.visible_message(SPAN_NOTICE("[user] shows [user.p_their()] [name]."), SPAN_NOTICE("You show your [name]."))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] shows [user.p_their()] [name]."),
|
||||
SPAN_NOTICE("You show your [name].")
|
||||
)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/legal_badge/attack__legacy__attackchain(mob/living/carbon/human/H, mob/living/user)
|
||||
if(H != user)
|
||||
user.visible_message(SPAN_WARNING("[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently."),
|
||||
SPAN_WARNING("You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are [what_you_are]!"))
|
||||
return
|
||||
..()
|
||||
/obj/item/clothing/accessory/legal_badge/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(target == user || !ismob(target))
|
||||
return ..()
|
||||
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] invades [target]'s personal space, thrusting [src] into [target.p_their()] face insistently."),
|
||||
SPAN_WARNING("You invade [target]'s personal space, thrusting [src] into [target.p_their()] face insistently. You are [what_you_are]!")
|
||||
)
|
||||
return CONTINUE_ATTACK
|
||||
|
||||
/obj/item/clothing/accessory/legal_badge/on_attached(obj/item/clothing/under/S, mob/user)
|
||||
..()
|
||||
@@ -583,17 +610,21 @@
|
||||
var/image/pin_icon = image(icon, icon_state = flag_types[current_pin])
|
||||
flag_icons[current_pin] = pin_icon
|
||||
|
||||
/obj/item/clothing/accessory/pin/pride/attack_self__legacy__attackchain(mob/user)
|
||||
. = ..()
|
||||
/obj/item/clothing/accessory/pin/pride/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/chosen_pin = show_radial_menu(user, src, flag_icons, require_near = TRUE)
|
||||
if(!chosen_pin)
|
||||
to_chat(user, SPAN_NOTICE("You decide not to change [src]."))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/pin_icon_state = flag_types[chosen_pin]
|
||||
to_chat(user, SPAN_NOTICE("You change [src] to show [chosen_pin]."))
|
||||
|
||||
icon_state = pin_icon_state
|
||||
inv_overlay = mutable_appearance('icons/obj/clothing/accessories_overlay.dmi', icon_state)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/proc/english_accessory_list(obj/item/clothing/under/U)
|
||||
if(!istype(U) || !length(U.accessories))
|
||||
|
||||
@@ -23,12 +23,16 @@
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/accessory/holster/attack_self__legacy__attackchain()
|
||||
/obj/item/clothing/accessory/holster/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/holsteritem = usr.get_active_hand()
|
||||
if(!holstered)
|
||||
holster(holsteritem, usr)
|
||||
else
|
||||
unholster(usr)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/holster/proc/holster(obj/item/I, mob/user as mob)
|
||||
if(holstered)
|
||||
@@ -79,8 +83,8 @@
|
||||
|
||||
..(user)
|
||||
|
||||
/obj/item/clothing/accessory/holster/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
holster(W, user)
|
||||
/obj/item/clothing/accessory/holster/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
holster(used, user)
|
||||
|
||||
/obj/item/clothing/accessory/holster/emp_act(severity)
|
||||
if(holstered)
|
||||
|
||||
@@ -32,8 +32,11 @@
|
||||
if(hold.handle_mousedrop(usr, over_object))
|
||||
..(over_object)
|
||||
|
||||
/obj/item/clothing/accessory/storage/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params)
|
||||
return hold.attackby__legacy__attackchain(W, user, params)
|
||||
/obj/item/clothing/accessory/storage/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!hold.item_interaction(user, used, modifiers))
|
||||
return hold.attackby__legacy__attackchain(used, user, modifiers)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/storage/emp_act(severity)
|
||||
..()
|
||||
@@ -61,7 +64,10 @@
|
||||
L += G.gift:return_inv()
|
||||
return L
|
||||
|
||||
/obj/item/clothing/accessory/storage/attack_self__legacy__attackchain(mob/user as mob)
|
||||
/obj/item/clothing/accessory/storage/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(has_suit) //if we are part of a suit
|
||||
hold.open(user)
|
||||
else
|
||||
@@ -71,6 +77,7 @@
|
||||
for(var/obj/item/I in hold.contents)
|
||||
hold.remove_from_storage(I, T)
|
||||
src.add_fingerprint(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/accessory/storage/webbing
|
||||
name = "webbing"
|
||||
|
||||
@@ -39,18 +39,19 @@
|
||||
new /obj/effect/particle_effect/water(get_turf(H))
|
||||
return FALSE
|
||||
|
||||
/obj/item/clothing/under/plasmaman/attackby__legacy__attackchain(obj/item/E, mob/user, params)
|
||||
if(istype(E, /obj/item/extinguisher_refill))
|
||||
if(extinguishes_left == 5)
|
||||
to_chat(user, SPAN_NOTICE("The inbuilt extinguisher is full."))
|
||||
return
|
||||
else
|
||||
extinguishes_left = 5
|
||||
to_chat(user, SPAN_NOTICE("You refill the suit's built-in extinguisher, using up the cartridge."))
|
||||
qdel(E)
|
||||
else
|
||||
/obj/item/clothing/under/plasmaman/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/extinguisher_refill))
|
||||
return ..()
|
||||
|
||||
if(extinguishes_left == 5)
|
||||
to_chat(user, SPAN_NOTICE("The inbuilt extinguisher is full."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
extinguishes_left = 5
|
||||
to_chat(user, SPAN_NOTICE("You refill the suit's built-in extinguisher, using up the cartridge."))
|
||||
qdel(used)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/extinguisher_refill
|
||||
name = "envirosuit extinguisher cartridge"
|
||||
desc = "A cartridge loaded with a compressed extinguisher mix, used to refill the automatic extinguisher on plasma envirosuits."
|
||||
|
||||
@@ -708,7 +708,7 @@
|
||||
var/state = "Soldier Up"
|
||||
icon_monitor = null
|
||||
|
||||
/obj/item/clothing/head/helmet/fluff/merchant_sallet/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/helmet/fluff/merchant_sallet/activate_self(mob/user)
|
||||
if(!user.incapacitated() && (world.time > cooldown + toggle_cooldown) && Adjacent(user))
|
||||
var/list/options = list()
|
||||
options["Soldier Up"] = list(
|
||||
@@ -741,7 +741,9 @@
|
||||
to_chat(user, "You adjust the helmet.")
|
||||
playsound(src.loc, "[toggle_sound]", 100, FALSE, 4)
|
||||
user.update_inv_head()
|
||||
return 1
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/// V-Force_Bomber: E.L.O.
|
||||
/obj/item/clothing/head/fluff/elo
|
||||
@@ -778,7 +780,10 @@
|
||||
actions_types = list(/datum/action/item_action/openclose)
|
||||
adjust_flavour = "unbutton"
|
||||
|
||||
/obj/item/clothing/suit/jacket/miljacket/patch/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/suit/jacket/miljacket/patch/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/list/options = list()
|
||||
options["purple"] = "shazjacket_purple"
|
||||
options["purple light"] = "shazjacket_purple_light"
|
||||
@@ -811,9 +816,7 @@
|
||||
to_chat(user, "You turn your coat inside out and now it's [choice]!")
|
||||
name = "custom [choice] military jacket"
|
||||
user.update_inv_wear_suit()
|
||||
return 1
|
||||
|
||||
. = ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/// ComputerlessCitizen: Screech
|
||||
/obj/item/clothing/suit/fluff/dusty_jacket
|
||||
@@ -1428,7 +1431,10 @@
|
||||
icon_monitor = null
|
||||
icon_state = "classic_witch"
|
||||
|
||||
/obj/item/clothing/head/wizard/fake/fluff/dreamy/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/head/wizard/fake/fluff/dreamy/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/list/options = list()
|
||||
options["Classic"] = "classic_witch"
|
||||
options["Good"] = "good_witch"
|
||||
@@ -1448,8 +1454,7 @@
|
||||
if(choice && !user.stat && in_range(user, src))
|
||||
icon_state = options[choice]
|
||||
to_chat(user, "Your strange witch hat has now shapeshifted into it's [choice] form!")
|
||||
return 1
|
||||
..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/// phantasmicdream : Zeke Varloss
|
||||
/obj/item/fluff/zekemirror
|
||||
@@ -1668,8 +1673,8 @@
|
||||
/obj/item/clothing/gloves/ring/fluff/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/clothing/gloves/ring/fluff/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params)
|
||||
return
|
||||
/obj/item/clothing/gloves/ring/fluff/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
return NONE
|
||||
|
||||
/// Benjaminfallout: Pretzel Brassheart
|
||||
/obj/item/clothing/gloves/ring/fluff/benjaminfallout
|
||||
|
||||
@@ -36,8 +36,11 @@
|
||||
if(obj_integrity < 90)
|
||||
Die()
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
return O.attack_obj__legacy__attackchain(src, user, params)
|
||||
/obj/item/clothing/mask/facehugger/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!attack_obj(src, user, modifiers))
|
||||
return used.attack_obj__legacy__attackchain(src, user, modifiers)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(mob/user)
|
||||
if((stat != DEAD && !sterile) && !isalien(user))
|
||||
@@ -45,10 +48,12 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack__legacy__attackchain(mob/living/M, mob/user)
|
||||
..()
|
||||
/obj/item/clothing/mask/facehugger/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!ishuman(target))
|
||||
return ..()
|
||||
|
||||
user.drop_item_to_ground(src)
|
||||
Attach(M)
|
||||
Attach(target)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
I.in_storage = TRUE
|
||||
if(ITEM_SLOT_ACCESSORY)
|
||||
var/obj/item/clothing/under/uniform = src.w_uniform
|
||||
uniform.attackby__legacy__attackchain(I, src)
|
||||
uniform.item_interaction(src, I)
|
||||
else
|
||||
to_chat(src, SPAN_WARNING("You are trying to equip this item to an unsupported inventory slot. Report this to a coder!"))
|
||||
|
||||
|
||||
@@ -432,22 +432,21 @@
|
||||
var/build_step = 0
|
||||
var/robot_arm = /obj/item/robot_parts/l_arm
|
||||
|
||||
/obj/item/clothing/head/helmet/attackby__legacy__attackchain(obj/item/assembly/signaler/S, mob/user, params)
|
||||
..()
|
||||
if(!issignaler(S))
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/head/helmet/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!issignaler(used))
|
||||
return ..()
|
||||
var/obj/item/assembly/signaler/S
|
||||
if(S.secured)
|
||||
to_chat(user, SPAN_NOTICE("[S] is secured."))
|
||||
return
|
||||
qdel(S)
|
||||
to_chat(user, SPAN_WARNING("[S] is secured!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
qdel(used)
|
||||
var/obj/item/secbot_assembly/A = new /obj/item/secbot_assembly
|
||||
user.put_in_hands(A)
|
||||
to_chat(user, SPAN_NOTICE("You add the signaler to the helmet."))
|
||||
to_chat(user, SPAN_NOTICE("You add [used] to the helmet."))
|
||||
user.unequip(src, force = TRUE)
|
||||
qdel(src)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/secbot_assembly/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
..()
|
||||
|
||||
@@ -185,17 +185,22 @@
|
||||
. = ..()
|
||||
mod_link?.end_call()
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/clothing/neck/link_scryer/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/new_label = reject_bad_text(tgui_input_text(user, "Change the visible name", "Set Name", label, MAX_NAME_LEN))
|
||||
if(!user.is_holding(src))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!new_label)
|
||||
to_chat(user, SPAN_WARNING("That name is invalid!"))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
label = new_label
|
||||
to_chat(user, SPAN_NOTICE("You set the name as [label]."))
|
||||
update_appearance(UPDATE_NAME)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/multitool_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
@@ -247,16 +252,22 @@
|
||||
return
|
||||
cell.use(50)
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/attackby__legacy__attackchain(obj/item/O, mob/user, params)
|
||||
. = ..()
|
||||
if(cell || !istype(O, /obj/item/stock_parts/cell))
|
||||
return
|
||||
/obj/item/clothing/neck/link_scryer/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stock_parts/cell))
|
||||
return ..()
|
||||
|
||||
if(cell)
|
||||
to_chat(user, SPAN_WARNING("[src] already has a cell!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!user.drop_item())
|
||||
to_chat(user, SPAN_WARNING("[O] is stuck to your hand!"))
|
||||
return
|
||||
O.forceMove(src)
|
||||
cell = O
|
||||
to_chat(user, SPAN_NOTICE("You load [O] into [src]."))
|
||||
to_chat(user, SPAN_WARNING("[used] is stuck to your hand!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
used.forceMove(src)
|
||||
cell = used
|
||||
to_chat(user, SPAN_NOTICE("You load [used] into [src]."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/update_name(updates)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user