mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] usr to user up to player effects (#9552)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a7e4ef7dad
commit
0180cc74c5
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/structure/noticeboard/attackby(obj/item/I, mob/user)
|
||||
if(I.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/choice = tgui_input_list(usr, "Which direction do you wish to place the noticeboard?", "Noticeboard Offset", list("North", "South", "East", "West", "No Offset"))
|
||||
var/choice = tgui_input_list(user, "Which direction do you wish to place the noticeboard?", "Noticeboard Offset", list("North", "South", "East", "West", "No Offset"))
|
||||
if(choice && Adjacent(user) && I.loc == user && !user.incapacitated())
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
switch(choice)
|
||||
@@ -133,7 +133,7 @@
|
||||
data["notices"] = tgui_notices
|
||||
return data
|
||||
|
||||
/obj/structure/noticeboard/tgui_act(action, params)
|
||||
/obj/structure/noticeboard/tgui_act(action, params, datum/tgui/ui)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
@@ -141,36 +141,36 @@
|
||||
if("read")
|
||||
var/obj/item/paper/P = locate(params["ref"])
|
||||
if(P && P.loc == src)
|
||||
P.show_content(usr)
|
||||
P.show_content(ui.user)
|
||||
. = TRUE
|
||||
|
||||
if("look")
|
||||
var/obj/item/photo/P = locate(params["ref"])
|
||||
if(P && P.loc == src)
|
||||
P.show(usr)
|
||||
P.show(ui.user)
|
||||
. = TRUE
|
||||
|
||||
if("remove")
|
||||
if(!in_range(src, usr))
|
||||
if(!in_range(src, ui.user))
|
||||
return FALSE
|
||||
var/obj/item/I = locate(params["ref"])
|
||||
remove_paper(I)
|
||||
if(istype(I))
|
||||
usr.put_in_hands(I)
|
||||
add_fingerprint(usr)
|
||||
ui.user.put_in_hands(I)
|
||||
add_fingerprint(ui.user)
|
||||
. = TRUE
|
||||
|
||||
if("write")
|
||||
if(!in_range(src, usr))
|
||||
if(!in_range(src, ui.user))
|
||||
return FALSE
|
||||
var/obj/item/P = locate(params["ref"])
|
||||
if((P && P.loc == src)) //if the paper's on the board
|
||||
var/mob/living/M = usr
|
||||
var/mob/living/M = ui.user
|
||||
if(istype(M))
|
||||
var/obj/item/pen/E = M.get_type_in_hands(/obj/item/pen)
|
||||
if(E)
|
||||
add_fingerprint(M)
|
||||
P.attackby(E, usr)
|
||||
P.attackby(E, ui.user)
|
||||
else
|
||||
to_chat(M, span_notice("You'll need something to write with!"))
|
||||
. = TRUE
|
||||
|
||||
Reference in New Issue
Block a user