Fixes a few bugs here and there

This commit is contained in:
Heroman
2022-10-09 06:24:56 +10:00
parent a637852c29
commit cbe0765e12
4 changed files with 14 additions and 7 deletions
+7 -4
View File
@@ -110,7 +110,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
if(!authenticated)
return
switch(action)
if("send")
if(copyitem)
@@ -132,7 +132,11 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
return TRUE
/obj/machinery/photocopier/faxmachine/attackby(obj/item/O as obj, mob/user as mob)
if(O.is_multitool() && panel_open)
if(istype(O, /obj/item/weapon/card/id) && !scan)
user.drop_from_inventory(O)
O.forceMove(src)
scan = O
else if(O.is_multitool() && panel_open)
var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department))
if(!input)
to_chat(usr, "No input found. Please hang up and try your call again.")
@@ -253,7 +257,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
var/faxid = export_fax(sent)
message_chat_admins(sender, faxname, sent, faxid, font_colour)
// VoreStation Edit End
// Webhooks don't parse the HTML on the paper, so we gotta strip them out so it's still readable.
var/summary = make_summary(sent)
summary = paper_html_to_plaintext(summary)
@@ -273,4 +277,3 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
"body" = summary
)
)
+2 -2
View File
@@ -165,7 +165,7 @@
. += "<span class='notice'>You have to go closer if you want to read it.</span>"
/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow=0)
if(!(istype(user, /mob/living/carbon/human) || istype(user, /mob/observer/dead) || istype(user, /mob/living/silicon) || user.universal_understand) && !forceshow)
if(!(forceshow || (istype(user, /mob/living/carbon/human) || istype(user, /mob/observer/dead) || istype(user, /mob/living/silicon) || (istype(user) && user.universal_understand))))
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(user, "[name]")
else
@@ -434,7 +434,7 @@
var/raw = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE, prevent_enter = TRUE)
if(!raw)
return
var/t = sanitize(raw, MAX_PAPER_MESSAGE_LEN, extra = 0)
if(!t)
return