[MIRROR] Begin clickcode attack_self fix (#12173)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-12-29 15:51:44 -05:00
committed by GitHub
co-authored by Cameron Lennox
parent 063cf6cf48
commit 3cac28f9ad
361 changed files with 2676 additions and 998 deletions
+3
View File
@@ -68,6 +68,9 @@
to_chat(user, span_notice("You clip the [P] onto \the [src]."))
/obj/item/clipboard/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/dat = "<title>Clipboard</title>"
if(haspen)
dat += "<A href='byond://?src=\ref[src];pen=1'>Remove Pen</A><BR><HR>"
+4 -1
View File
@@ -82,7 +82,10 @@
update_icon()
to_chat(user, span_notice("You tuck the [P] into \the [src]."))
/obj/item/folder/attack_self(mob/user as mob)
/obj/item/folder/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/dat = "<title>[name]</title>"
for(var/obj/item/paper/P in src)
+4 -1
View File
@@ -67,7 +67,10 @@
span_notice("You label [A] as [label]."))
A.name = "[A.name] ([label])"
/obj/item/hand_labeler/attack_self(mob/user as mob)
/obj/item/hand_labeler/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
mode = !mode
icon_state = "labeler[mode]"
if(mode)
+9 -1
View File
@@ -36,6 +36,9 @@
var/age = 0
var/last_modified_ckey
///Occult check. Used for do_after
var/occult = FALSE
var/was_maploaded = FALSE // This tracks if the paper was created on mapload.
var/const/deffont = "Verdana"
@@ -174,7 +177,12 @@
add_fingerprint(usr)
return
/obj/item/paper/attack_self(mob/living/user as mob)
/obj/item/paper/attack_self(mob/living/user)
. = ..(user)
if(.)
return TRUE
if(occult)
return
if(user.a_intent == I_HURT)
if(icon_state == "scrap")
user.show_message(span_warning("\The [src] is already crumpled."))
+3
View File
@@ -139,6 +139,9 @@
+ "</body></html>", "window=[name]")
/obj/item/paper_bundle/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
src.show_content(user)
add_fingerprint(user)
update_icon()
+3
View File
@@ -45,6 +45,9 @@
add_overlay(stampoverlay)
/obj/item/paperplane/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
to_chat(user, span_notice("You unfold [src]."))
var/atom/movable/internal_paper_tmp = internalPaper
internal_paper_tmp.forceMove(loc)
+22 -1
View File
@@ -31,10 +31,21 @@
pressure_resistance = 2
drop_sound = 'sound/items/drop/accessory.ogg'
pickup_sound = 'sound/items/pickup/accessory.ogg'
var/can_click = TRUE
/obj/item/pen/attack_self(var/mob/user)
///Var for attack_self chain
var/special_handling = FALSE
/obj/item/pen/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(special_handling)
return FALSE
if(!user.checkClickCooldown())
return
if(!can_click)
return
user.setClickCooldown(1 SECOND)
to_chat(user, span_notice("Click."))
playsound(src, 'sound/items/penclick.ogg', 50, 1)
@@ -99,6 +110,7 @@
desc = "It's a pen with multiple colors of ink!"
var/selectedColor = 1
var/colors = list("black","blue","red")
special_handling = TRUE
/obj/item/pen/click_alt(mob/user)
if(!Adjacent(user))
@@ -107,6 +119,9 @@
playsound(src, 'sound/items/penclick.ogg', 50, 1)
/obj/item/pen/multi/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(++selectedColor > 3)
selectedColor = 1
@@ -270,8 +285,12 @@
*/
/obj/item/pen/chameleon
var/signature = ""
special_handling = TRUE
/obj/item/pen/chameleon/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
/*
// Limit signatures to official crew members
var/personnel_list[] = list()
@@ -338,6 +357,8 @@
var/colourName = "red" //for updateIcon purposes
drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg'
can_click = FALSE
special_handling = TRUE
/obj/item/pen/crayon/Initialize(mapload)
. = ..()
+8 -2
View File
@@ -41,7 +41,10 @@ GLOBAL_VAR_INIT(photo_count, 0)
. = ..()
id = GLOB.photo_count++
/obj/item/photo/attack_self(mob/user as mob)
/obj/item/photo/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
user.examinate(src)
/obj/item/photo/attackby(obj/item/P as obj, mob/user as mob)
@@ -148,7 +151,10 @@ GLOBAL_VAR_INIT(photo_count, 0)
/obj/item/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/camera/attack_self(mob/user as mob)
/obj/item/camera/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
on = !on
if(on)
src.icon_state = icon_on
+4 -1
View File
@@ -102,7 +102,10 @@
icon_state = "stamp-zenghu"
// Syndicate stamp to forge documents.
/obj/item/stamp/chameleon/attack_self(mob/user as mob)
/obj/item/stamp/chameleon/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
var/list/stamp_types = typesof(/obj/item/stamp) - src.type // Get all stamp types except our own
var/list/stamps = list()