[MIRROR] Removes a ton of unused tablet vars, re-organizes the rest [MDB IGNORE] (#17014)

* Removes a ton of unused tablet vars, re-organizes the rest (#70344)

* Removes a ton of unused vars, re-organizes the rest

Removes a ton of unused vars from Modular computers
Re-organizes the rest, and adds autodoc comments to most of them
Moved 2 vars (saved_image and invisible) from the tablet to the messenger app, since that's where it was used. I didn't see the point of having these vars be on every computer anyways, only PDAs have the app.
Renames Clown's honk virus var
Makes Messenger app's saved image, actually used.

* static list and NODECONSTRUCT_1 check

* oops

* Removes a ton of unused tablet vars, re-organizes the rest

* cryopod

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
SkyratBot
2022-10-20 08:28:27 +02:00
committed by GitHub
parent b15516b1ee
commit 58752b0969
11 changed files with 98 additions and 66 deletions
@@ -27,7 +27,9 @@
/// even more wisdom from PDA.dm - "no everyone spamming" (prevents people from spamming the same message over and over)
var/last_text_everyone
/// Scanned photo for sending purposes.
var/datum/picture/picture
var/datum/picture/saved_image
/// Whether the user is invisible to the message list.
var/invisible = FALSE
/// Whether or not we allow emojis to be sent by the user.
var/allow_emojis = FALSE
/// Whether or not we're currently looking at the message list.
@@ -53,7 +55,7 @@
if(!istype(attacking_item, /obj/item/photo))
return FALSE
var/obj/item/photo/pic = attacking_item
computer.saved_image = pic.picture
saved_image = pic.picture
ProcessPhoto()
return TRUE
@@ -86,7 +88,7 @@
if(!drive)
continue
for(var/datum/computer_file/program/messenger/app in drive.stored_files)
if(!P.saved_identification || !P.saved_job || P.invisible || app.monitor_hidden)
if(!P.saved_identification || !P.saved_job || app.invisible || app.monitor_hidden)
continue
dictionary += P
@@ -96,8 +98,8 @@
return "[messenger.saved_identification] ([messenger.saved_job])"
/datum/computer_file/program/messenger/proc/ProcessPhoto()
if(computer.saved_image)
var/icon/img = computer.saved_image.picture_image
if(saved_image)
var/icon/img = saved_image.picture_image
var/deter_path = "tmp_msg_photo[rand(0, 99999)].png"
usr << browse_rsc(img, deter_path) // funny random assignment for now, i'll make an actual key later
photo_path = deter_path
@@ -194,7 +196,7 @@
return UI_UPDATE
if("PDA_clearPhoto")
computer.saved_image = null
saved_image = null
photo_path = null
return UI_UPDATE