mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 15:02:29 +00:00
[MIRROR] Refactors janitor cartridge to a tablet app [MDB IGNORE] (#12563)
* Refactors janitor cartridge to a tablet app * e Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
@@ -248,6 +248,48 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
///Tracks all janitor equipment
|
||||
/datum/computer_file/program/radar/custodial_locator
|
||||
filename = "custodiallocator"
|
||||
filedesc = "Custodial Locator"
|
||||
extended_desc = "This program allows for tracking of custodial equipment."
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = list(ACCESS_JANITOR)
|
||||
available_on_ntnet = TRUE
|
||||
program_icon = "broom"
|
||||
size = 2
|
||||
|
||||
/datum/computer_file/program/radar/custodial_locator/find_atom()
|
||||
return locate(selected) in GLOB.janitor_devices
|
||||
|
||||
/datum/computer_file/program/radar/custodial_locator/scan()
|
||||
if(world.time < next_scan)
|
||||
return
|
||||
next_scan = world.time + (2 SECONDS)
|
||||
objects = list()
|
||||
for(var/obj/custodial_tools as anything in GLOB.janitor_devices)
|
||||
if(!trackable(custodial_tools))
|
||||
continue
|
||||
var/tool_name = custodial_tools.name
|
||||
|
||||
if(istype(custodial_tools, /obj/item/mop))
|
||||
var/obj/item/mop/wet_mop = custodial_tools
|
||||
tool_name = "[wet_mop.reagents.total_volume ? "Wet" : "Dry"] [wet_mop.name]"
|
||||
|
||||
if(istype(custodial_tools, /obj/structure/janitorialcart))
|
||||
var/obj/structure/janitorialcart/janicart = custodial_tools
|
||||
tool_name = "[janicart.name] - Water level: [janicart.reagents.total_volume] / [janicart.reagents.maximum_volume]"
|
||||
|
||||
if(istype(custodial_tools, /mob/living/simple_animal/bot/cleanbot))
|
||||
var/mob/living/simple_animal/bot/cleanbot/cleanbots = custodial_tools
|
||||
tool_name = "[cleanbots.name] - [cleanbots.bot_mode_flags & BOT_MODE_ON ? "Online" : "Offline"]"
|
||||
|
||||
var/list/tool_information = list(
|
||||
ref = REF(custodial_tools),
|
||||
name = tool_name,
|
||||
)
|
||||
objects += list(tool_information)
|
||||
|
||||
////////////////////////
|
||||
//Nuke Disk Finder App//
|
||||
////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user