mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Verb cleanup (#22224)
* Verb cleanup * rest of the object verbs * little more object cleanup * more changes * last of it * this too * tgui * code review * time to go
This commit is contained in:
@@ -27,9 +27,7 @@
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/clipboard/verb/removePen(mob/user)
|
||||
set category = "Object"
|
||||
set name = "Remove clipboard pen"
|
||||
/obj/item/clipboard/proc/removePen(mob/user)
|
||||
if(!ishuman(user) || user.incapacitated())
|
||||
return
|
||||
penPlacement(user, containedpen, FALSE)
|
||||
@@ -42,6 +40,7 @@
|
||||
|
||||
/obj/item/clipboard/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='info'><b>Alt-Click</b> to remove its pen.</span>"
|
||||
if(in_range(user, src) && toppaper)
|
||||
. += toppaper.examine(user)
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
GLOB.allfaxes -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='info'><b>Alt-Click</b> [src] to remove its currently stored ID.</span>"
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/update_network()
|
||||
if(department != "Unknown")
|
||||
if(!(("[department]" in GLOB.alldepartments) || ("[department]" in GLOB.hidden_departments) || ("[department]" in GLOB.admin_departments) || ("[department]" in GLOB.hidden_admin_departments)))
|
||||
@@ -267,22 +271,19 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
scan = card
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/verb/eject_id()
|
||||
set category = null
|
||||
set name = "Eject ID Card"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
/obj/machinery/photocopier/faxmachine/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
|
||||
if(scan)
|
||||
to_chat(usr, "You remove [scan] from [src].")
|
||||
scan.forceMove(get_turf(src))
|
||||
if(!usr.get_active_hand() && Adjacent(usr))
|
||||
usr.put_in_hands(scan)
|
||||
to_chat(user, "<span class='notice'>You remove [scan] from [src].</span>")
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(scan)
|
||||
else if(!user.put_in_inactive_hand(scan))
|
||||
scan.forceMove(get_turf(src))
|
||||
scan = null
|
||||
else
|
||||
to_chat(usr, "There is nothing to remove from [src].")
|
||||
to_chat(user, "<span class='notice'>There is nothing to remove from [src].</span>")
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/sendfax(destination, mob/sender)
|
||||
use_power(active_power_consumption)
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
/obj/item/paper/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='info'><b>Alt-Click</b> [src] with a pen in hand to rename it.</span>"
|
||||
if(user.is_literate())
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
show_content(user)
|
||||
@@ -91,16 +92,22 @@
|
||||
popup.open()
|
||||
return data
|
||||
|
||||
/obj/item/paper/verb/rename()
|
||||
set name = "Rename paper"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(HAS_TRAIT(usr, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(usr, "<span class='warning'>You cut yourself on the paper.</span>")
|
||||
/obj/item/paper/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
if(!usr.is_literate())
|
||||
to_chat(usr, "<span class='notice'>You don't know how to read.</span>")
|
||||
|
||||
if(is_pen(user.get_active_hand()))
|
||||
rename(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/paper/proc/rename(mob/user)
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You cut yourself on the paper.</span>")
|
||||
return
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You don't know how to read.</span>")
|
||||
return
|
||||
var/n_name = rename_interactive(usr)
|
||||
if(isnull(n_name))
|
||||
@@ -109,8 +116,7 @@
|
||||
desc = "This is a paper titled '" + name + "'."
|
||||
else
|
||||
desc = initial(desc)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/paper/attack_self(mob/living/user as mob)
|
||||
user.examinate(src)
|
||||
|
||||
@@ -103,6 +103,8 @@
|
||||
|
||||
/obj/item/paper_bundle/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='info'><b>Alt-Click</b> [src] with a pen in hand to rename it.</span>"
|
||||
. += "<span class='info'><b>Alt-Shift-Click</b> [src] to undo the paper bundle.</span>"
|
||||
if(in_range(user, src))
|
||||
show_content(user)
|
||||
else
|
||||
@@ -199,38 +201,31 @@
|
||||
/obj/item/paper_bundle/AltClick(mob/user)
|
||||
if(in_range(user, src) && !user.incapacitated())
|
||||
if(is_pen(user.get_active_hand()))
|
||||
rename()
|
||||
rename(user)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/paper_bundle/verb/rename()
|
||||
set name = "Rename bundle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/n_name = sanitize(copytext(input(usr, "What would you like to label the bundle?", "Bundle Labelling", name) as text, 1, MAX_MESSAGE_LEN))
|
||||
if((loc == usr && usr.stat == 0))
|
||||
/obj/item/paper_bundle/proc/rename(mob/user)
|
||||
var/n_name = sanitize(copytext(input(user, "What would you like to label the bundle?", "Bundle Labelling", name) as text, 1, MAX_MESSAGE_LEN))
|
||||
if((loc == user && !user.stat))
|
||||
name = "[(n_name ? "[n_name]" : "paper bundle")]"
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/paper_bundle/AltShiftClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
|
||||
|
||||
/obj/item/paper_bundle/verb/remove_all()
|
||||
set name = "Loose bundle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
to_chat(usr, "<span class='notice'>You loosen the bundle.</span>")
|
||||
to_chat(user, "<span class='notice'>You loosen the bundle.</span>")
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = usr.loc
|
||||
O.forceMove(get_turf(user))
|
||||
O.layer = initial(O.layer)
|
||||
O.plane = initial(O.plane)
|
||||
O.add_fingerprint(usr)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
usr.unEquip(src)
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/paper_bundle/update_desc()
|
||||
|
||||
@@ -76,6 +76,16 @@
|
||||
show(user)
|
||||
else
|
||||
. += "<span class='notice'>It is too far away.</span>"
|
||||
. += "<span class='info'><b>Alt-Click</b> [src] with a pen in hand to rename it.</span>"
|
||||
|
||||
/obj/item/photo/AltClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
|
||||
if(is_pen(user.get_active_hand()))
|
||||
rename(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/photo/proc/show(mob/user as mob)
|
||||
var/icon/img_shown = new/icon(img)
|
||||
@@ -94,20 +104,13 @@
|
||||
+ "[scribble ? "<br>Written on the back:<br><i>[scribble]</i>" : ""]"\
|
||||
+ "</body></html>", "window=Photo[UID()];size=[64*photo_size]x[scribble ? 400 : 64*photo_size]")
|
||||
onclose(usr, "Photo[UID()]")
|
||||
return
|
||||
|
||||
/obj/item/photo/verb/rename()
|
||||
set name = "Rename photo"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/n_name = sanitize(copytext(input(usr, "What would you like to label the photo?", "Photo Labelling", name) as text, 1, MAX_MESSAGE_LEN))
|
||||
/obj/item/photo/proc/rename(mob/user)
|
||||
var/n_name = sanitize(copytext(input(user, "What would you like to label the photo?", "Photo Labelling", name) as text, 1, MAX_MESSAGE_LEN))
|
||||
//loc.loc check is for making possible renaming photos in clipboards
|
||||
if(( (loc == usr || (loc.loc && loc.loc == usr)) && usr.stat == 0))
|
||||
if(( (loc == user || (loc.loc && loc.loc == user)) && !user.stat))
|
||||
name = "[(n_name ? "[n_name]" : "photo")]"
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/**************
|
||||
* photo album *
|
||||
@@ -186,6 +189,7 @@
|
||||
. = ..()
|
||||
if(!digital)
|
||||
. += "<span class='notice'>There is [pictures_left] photos left.</span>"
|
||||
. += "<span class='info'><b>Alt-Click</b> [src] to change the photo size.</span>"
|
||||
|
||||
/obj/item/camera/spooky/CheckParts(list/parts_list)
|
||||
..()
|
||||
@@ -205,18 +209,16 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
see_ghosts = TRUE
|
||||
|
||||
/obj/item/camera/AltClick(mob/user)
|
||||
if(in_range(user, src) && !user.incapacitated())
|
||||
change_size()
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/camera/verb/change_size()
|
||||
set name = "Set Photo Focus"
|
||||
set category = "Object"
|
||||
change_size(user)
|
||||
|
||||
/obj/item/camera/proc/change_size(mob/user)
|
||||
var/nsize = input("Photo Size","Pick a size of resulting photo.") as null|anything in list(1,3,5,7)
|
||||
if(nsize)
|
||||
size = nsize
|
||||
to_chat(usr, "<span class='notice'>Camera will now take [size]x[size] photos.</span>")
|
||||
to_chat(user, "<span class='notice'>Camera will now take [size]x[size] photos.</span>")
|
||||
|
||||
/obj/item/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
return
|
||||
@@ -518,36 +520,38 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
var/datum/picture/P = createpicture(target, user, turfs, mobs, flag)
|
||||
saved_pictures += P
|
||||
|
||||
/obj/item/camera/digital/verb/print_picture()
|
||||
set name = "Print picture"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
/obj/item/camera/digital/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='info'><b>Alt-Shift-Click</b> [src] to print a specific photo.</span>"
|
||||
. += "<span class='info'><b>Ctrl-Shift-Click</b> [src] to delete a specific photo.</span>"
|
||||
|
||||
if(saved_pictures.len == 0)
|
||||
to_chat(usr, "<span class='userdanger'>No images saved.</span>")
|
||||
/obj/item/camera/digital/AltShiftClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
if(pictures_left == 0)
|
||||
to_chat(usr, "<span class='userdanger'>There is no film left to print.</span>")
|
||||
if(!length(saved_pictures))
|
||||
to_chat(user, "<span class='userdanger'>No images saved.</span>")
|
||||
return
|
||||
if(!pictures_left)
|
||||
to_chat(user, "<span class='userdanger'>There is no film left to print.</span>")
|
||||
return
|
||||
|
||||
var/datum/picture/P = null
|
||||
P = input("Select image to print:",P) as null|anything in saved_pictures
|
||||
if(P)
|
||||
printpicture(usr,P)
|
||||
var/datum/picture/picture
|
||||
picture = input("Select image to print:", picture) as null|anything in saved_pictures
|
||||
if(picture)
|
||||
printpicture(user, picture)
|
||||
pictures_left --
|
||||
|
||||
/obj/item/camera/digital/verb/delete_picture()
|
||||
set name = "Delete picture"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(saved_pictures.len == 0)
|
||||
to_chat(usr, "<span class='userdanger'>No images saved</span>")
|
||||
/obj/item/camera/digital/CtrlShiftClick(mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
|
||||
return
|
||||
var/datum/picture/P = null
|
||||
P = input("Select image to delete:",P) as null|anything in saved_pictures
|
||||
if(P)
|
||||
saved_pictures -= P
|
||||
|
||||
if(!length(saved_pictures))
|
||||
to_chat(user, "<span class='userdanger'>No images saved</span>")
|
||||
return
|
||||
var/datum/picture/picture
|
||||
picture = input("Select image to delete:", picture) as null|anything in saved_pictures
|
||||
if(picture)
|
||||
saved_pictures -= picture
|
||||
|
||||
/**************
|
||||
*video camera *
|
||||
|
||||
Reference in New Issue
Block a user