Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions code/game/objects/items/cigs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ LIGHTERS ARE IN LIGHTERS.DM
body_parts_covered = null
attack_verb = null
container_type = INJECTABLE
new_attack_chain = TRUE
/// Is the cigarette lit?
var/lit = FALSE
/// Do we require special items to be lit?
Expand Down Expand Up @@ -642,7 +641,6 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = "holo_cigar"
lefthand_file = 'icons/mob/inhands/smoking_lefthand.dmi'
righthand_file = 'icons/mob/inhands/smoking_righthand.dmi'
new_attack_chain = TRUE
sprite_sheets = list(
"Vox" = 'icons/mob/clothing/species/vox/mask.dmi',
"Unathi" = 'icons/mob/clothing/species/unathi/mask.dmi',
Expand Down
8 changes: 6 additions & 2 deletions code/game/objects/items/devices/whistle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@
"Grey" = 'icons/mob/clothing/species/grey/mask.dmi'
)

/obj/item/clothing/mask/whistle/attack_self__legacy__attackchain(mob/user)
/obj/item/clothing/mask/whistle/activate_self(mob/user)
if(..())
return ITEM_INTERACT_COMPLETE

if(!COOLDOWN_FINISHED(src, whistle_cooldown))
return
return ITEM_INTERACT_COMPLETE

playsound(src, pick('sound/items/whistle1.ogg', 'sound/items/whistle2.ogg', 'sound/items/whistle3.ogg'), 25)
COOLDOWN_START(src, whistle_cooldown, 4 SECONDS)
return ITEM_INTERACT_COMPLETE
30 changes: 18 additions & 12 deletions code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -733,20 +733,26 @@
do_sparks(rand(1,6), 1, loc)
next_spark_time = world.time + 0.8 SECONDS

/obj/item/clothing/gloves/color/black/pyro_claws/attackby__legacy__attackchain(obj/item/I, mob/user, params)
if(istype(I, /obj/item/assembly/signaler/anomaly/pyro))
if(core)
to_chat(user, SPAN_NOTICE("[src] already has a [I]!"))
return
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
/obj/item/clothing/gloves/color/black/pyro_claws/wirecutter_act(mob/living/user, obj/item/I)
return

/obj/item/clothing/gloves/color/black/pyro_claws/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(!istype(used, /obj/item/assembly/signaler/anomaly/pyro))
return ..()

if(core)
to_chat(user, SPAN_NOTICE("[src] already has a [used]!"))
return ITEM_INTERACT_COMPLETE

if(!user.drop_item())
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

/obj/item/clothing/gloves/color/black/pyro_claws/proc/reboot()
on_cooldown = FALSE
set_nodrop(FALSE, loc)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/assembly/shock_kit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
148 changes: 86 additions & 62 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -261,20 +261,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
Expand Down Expand Up @@ -509,9 +509,10 @@

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)
/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

return ..()

Expand Down Expand Up @@ -641,52 +642,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.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)
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

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
return ITEM_INTERACT_COMPLETE

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 ..()

Expand Down Expand Up @@ -866,10 +888,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
Expand Down Expand Up @@ -1061,16 +1085,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 = ..()
Expand Down
32 changes: 16 additions & 16 deletions code/modules/clothing/gloves/colored_gloves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,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
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

return ..()

/obj/item/clothing/gloves/color/black/poisoner
desc = "A pair of thick black gloves. They're coated with a hydrophobic material that repels liquids."
Expand Down
29 changes: 16 additions & 13 deletions code/modules/clothing/gloves/misc_gloves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,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))
Expand Down
23 changes: 12 additions & 11 deletions code/modules/clothing/gloves/rings.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading