mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
[MDB IGNORE] Removes tablet cartridges + reworks a ton more (#66505)
- All tablets who previously had apps in a cartridge now has them built-into their tablet instead. This means it costs space for it. - Rebalances the sizes of several apps to help them fit on Command tablets (Cargo ordering costed 20!!) - Removes tablet cartridges, they've been reworked into a regular old portable disk (the same you use for toxins/borgs) - Removes Signaller (the module required to run the signaller app) from tablets (likely will remove more in the future) - Refactors the health/chem scanning app to not be as bad - Dehardcodes detomatix resistance - Ability to send PDA's to all is now tied to your access rather than a cartridge - Moves 'eject disk' button to the very top of the UI
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
var/alert_silenced = FALSE
|
||||
/// Whether to highlight our program in the main screen. Intended for alerts, but loosely available for any need to notify of changed conditions. Think Windows task bar highlighting. Available even if alerts are muted.
|
||||
var/alert_pending = FALSE
|
||||
/// How well this program will help combat detomatix viruses.
|
||||
var/detomatix_resistance = NONE
|
||||
|
||||
/datum/computer_file/program/New(obj/item/modular_computer/comp = null)
|
||||
..()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
program_icon_state = "alert-green"
|
||||
extended_desc = "This program provides visual interface for a station's alarm system."
|
||||
requires_ntnet = 1
|
||||
size = 5
|
||||
size = 4
|
||||
tgui_id = "NtosStationAlertConsole"
|
||||
program_icon = "bell"
|
||||
/// If there is any station alert
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
extended_desc = "Nanotrasen Internal Requisition Network interface for supply purchasing using a department budget account."
|
||||
requires_ntnet = TRUE
|
||||
usage_flags = PROGRAM_LAPTOP | PROGRAM_TABLET
|
||||
size = 20
|
||||
size = 10
|
||||
tgui_id = "NtosCargo"
|
||||
///Are you actually placing orders with it?
|
||||
var/requestonly = TRUE
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
size = 4
|
||||
tgui_id = "NtosCrewManifest"
|
||||
program_icon = "clipboard-list"
|
||||
detomatix_resistance = DETOMATIX_RESIST_MAJOR
|
||||
|
||||
/datum/computer_file/program/crew_manifest/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
to_chat(usr, span_notice("ERROR: Device has receiving disabled."))
|
||||
return
|
||||
if(sending_virus)
|
||||
var/obj/item/computer_hardware/hard_drive/role/virus/disk = computer.all_components[MC_HDD_JOB]
|
||||
var/obj/item/computer_hardware/hard_drive/portable/virus/disk = computer.all_components[MC_SDD]
|
||||
if(istype(disk))
|
||||
disk.send_virus(target, usr)
|
||||
return(UI_UPDATE)
|
||||
@@ -176,8 +176,6 @@
|
||||
/datum/computer_file/program/messenger/ui_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/role/disk = computer.all_components[MC_HDD_JOB]
|
||||
|
||||
data["owner"] = computer.saved_identification
|
||||
data["messages"] = messages
|
||||
data["ringer_status"] = ringer_status
|
||||
@@ -188,9 +186,14 @@
|
||||
data["isSilicon"] = is_silicon
|
||||
data["photo"] = photo_path
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD]
|
||||
if(card_slot)
|
||||
var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : ""
|
||||
data["canSpam"] = (ACCESS_LAWYER in id_card?.access)
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/portable/virus/disk = computer.all_components[MC_SDD]
|
||||
if(disk)
|
||||
data["canSpam"] = disk.CanSpam()
|
||||
data["virus_attach"] = istype(disk, /obj/item/computer_hardware/hard_drive/role/virus)
|
||||
data["virus_attach"] = istype(disk, /obj/item/computer_hardware/hard_drive/portable/virus)
|
||||
data["sending_virus"] = sending_virus
|
||||
|
||||
return data
|
||||
@@ -332,7 +335,7 @@
|
||||
L = get(holder.holder, /mob/living/silicon)
|
||||
|
||||
if(L && (L.stat == CONSCIOUS || L.stat == SOFT_CRIT))
|
||||
var/reply = "(<a href='byond://?src=[REF(src)];choice=[signal.data["rigged"] ? "Mess_us_up" : "Message"];skiprefresh=1;target=[signal.data["ref"]]'>Reply</a>)"
|
||||
var/reply = "(<a href='byond://?src=[REF(src)];choice=[signal.data["rigged"] ? "mess_us_up" : "Message"];skiprefresh=1;target=[signal.data["ref"]]'>Reply</a>)"
|
||||
var/hrefstart
|
||||
var/hrefend
|
||||
if (isAI(L))
|
||||
@@ -360,7 +363,7 @@
|
||||
switch(href_list["choice"])
|
||||
if("Message")
|
||||
send_message(usr, list(locate(href_list["target"])))
|
||||
if("Mess_us_up")
|
||||
if("mess_us_up")
|
||||
if(!HAS_TRAIT(src, TRAIT_PDA_CAN_EXPLODE))
|
||||
var/obj/item/modular_computer/tablet/comp = computer
|
||||
comp.explode(usr, from_message_menu = TRUE)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define TABLET_MEDICAL_MODE (1<<0)
|
||||
#define TABLET_CHEMISTRY_MODE (1<<1)
|
||||
|
||||
/datum/computer_file/program/phys_scanner
|
||||
filename = "phys_scanner"
|
||||
filedesc = "Physical Scanner"
|
||||
@@ -10,32 +13,32 @@
|
||||
program_icon = "barcode"
|
||||
|
||||
var/current_mode = 0
|
||||
var/available_modes = 0
|
||||
var/available_modes = NONE
|
||||
|
||||
var/last_record = ""
|
||||
|
||||
/datum/computer_file/program/phys_scanner/proc/ReadModes()
|
||||
var/reads = list()
|
||||
|
||||
if(available_modes & DISK_CHEM)
|
||||
if(available_modes & TABLET_CHEMISTRY_MODE)
|
||||
reads += "Reagent"
|
||||
|
||||
if(available_modes & DISK_MED)
|
||||
if(available_modes & TABLET_MEDICAL_MODE)
|
||||
reads += "Health"
|
||||
|
||||
return reads
|
||||
|
||||
/datum/computer_file/program/phys_scanner/proc/ReadCurrent()
|
||||
if(current_mode & DISK_CHEM)
|
||||
if(current_mode & TABLET_CHEMISTRY_MODE)
|
||||
return "Reagent"
|
||||
if(current_mode & DISK_MED)
|
||||
if(current_mode & TABLET_MEDICAL_MODE)
|
||||
return "Health"
|
||||
|
||||
/datum/computer_file/program/phys_scanner/tap(atom/A, mob/living/user, params)
|
||||
. = ..()
|
||||
|
||||
switch(current_mode)
|
||||
if(DISK_CHEM)
|
||||
if(TABLET_CHEMISTRY_MODE)
|
||||
if(!isnull(A.reagents))
|
||||
if(A.reagents.reagent_list.len > 0)
|
||||
var/reagents_length = A.reagents.reagent_list.len
|
||||
@@ -46,7 +49,7 @@
|
||||
last_record = "No active chemical agents found in [A]."
|
||||
else
|
||||
last_record = "No significant chemical agents found in [A]."
|
||||
if(DISK_MED)
|
||||
if(TABLET_MEDICAL_MODE)
|
||||
var/mob/living/carbon/carbon = A
|
||||
if(istype(carbon))
|
||||
carbon.visible_message(span_notice("[user] analyzes [A]'s vitals."))
|
||||
@@ -61,9 +64,9 @@
|
||||
if("selectMode")
|
||||
switch(params["newMode"])
|
||||
if("Reagent")
|
||||
current_mode = DISK_CHEM
|
||||
current_mode = TABLET_CHEMISTRY_MODE
|
||||
if("Health")
|
||||
current_mode = DISK_MED
|
||||
current_mode = TABLET_MEDICAL_MODE
|
||||
|
||||
return UI_UPDATE
|
||||
|
||||
@@ -76,3 +79,15 @@
|
||||
data["available_modes"] = ReadModes()
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/phys_scanner/medical
|
||||
available_modes = TABLET_MEDICAL_MODE
|
||||
|
||||
/datum/computer_file/program/phys_scanner/chemistry
|
||||
available_modes = TABLET_CHEMISTRY_MODE
|
||||
|
||||
/datum/computer_file/program/phys_scanner/all
|
||||
available_modes = TABLET_MEDICAL_MODE | TABLET_CHEMISTRY_MODE
|
||||
|
||||
#undef TABLET_MEDICAL_MODE
|
||||
#undef TABLET_CHEMISTRY_MODE
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
transfer_access = list(ACCESS_ENGINE)
|
||||
usage_flags = PROGRAM_CONSOLE
|
||||
requires_ntnet = 0
|
||||
size = 9
|
||||
size = 8
|
||||
tgui_id = "NtosPowerMonitor"
|
||||
program_icon = "plug"
|
||||
detomatix_resistance = DETOMATIX_RESIST_MINOR
|
||||
|
||||
var/has_alert = 0
|
||||
var/datum/weakref/attached_wire_ref
|
||||
|
||||
@@ -258,6 +258,7 @@
|
||||
available_on_ntnet = TRUE
|
||||
program_icon = "broom"
|
||||
size = 2
|
||||
detomatix_resistance = DETOMATIX_RESIST_MINOR
|
||||
|
||||
/datum/computer_file/program/radar/custodial_locator/find_atom()
|
||||
return locate(selected) in GLOB.janitor_devices
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
size = 4
|
||||
usage_flags = PROGRAM_TABLET | PROGRAM_LAPTOP
|
||||
available_on_ntnet = FALSE
|
||||
detomatix_resistance = DETOMATIX_RESIST_MINOR
|
||||
|
||||
var/mode
|
||||
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
program_icon_state = "robot"
|
||||
extended_desc = "A remote controller used for giving basic commands to non-sentient robots."
|
||||
requires_ntnet = TRUE
|
||||
size = 12
|
||||
size = 6
|
||||
tgui_id = "NtosRoboControl"
|
||||
program_icon = "robot"
|
||||
///Number of simple robots on-station.
|
||||
var/botcount = 0
|
||||
///Access granted by the used to summon robots.
|
||||
var/list/current_access = list()
|
||||
///Whether or not this is the cartridge program version.
|
||||
var/cart_mode = FALSE
|
||||
///List of all ping types you can annoy drones with.
|
||||
var/list/drone_ping_types = list(
|
||||
"Low",
|
||||
"Medium",
|
||||
@@ -29,23 +28,18 @@
|
||||
var/list/botlist = list()
|
||||
var/list/mulelist = list()
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/role/job_disk = computer ? computer.all_components[MC_HDD_JOB] : null
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = computer ? computer.all_components[MC_CARD] : null
|
||||
data["have_id_slot"] = !!card_slot
|
||||
if(computer)
|
||||
var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : ""
|
||||
data["id_owner"] = id_card
|
||||
if(cart_mode && job_disk)
|
||||
data["id_owner"] = "JOB DISK OVERRIDE"
|
||||
|
||||
botcount = 0
|
||||
|
||||
for(var/mob/living/simple_animal/bot/simple_bot as anything in GLOB.bots_list)
|
||||
if(simple_bot.z != zlevel || !(simple_bot.bot_mode_flags & BOT_MODE_REMOTE_ENABLED)) //Only non-emagged bots on the same Z-level are detected!
|
||||
continue
|
||||
if(computer && !simple_bot.check_access(user) && !cart_mode) // Only check Bots we can access)
|
||||
continue
|
||||
if(!(simple_bot.bot_type in job_disk.bot_access) && cart_mode)
|
||||
if(computer && !simple_bot.check_access(user)) // Only check Bots we can access)
|
||||
continue
|
||||
var/list/newbot = list(
|
||||
"name" = simple_bot.name,
|
||||
|
||||
+9
-26
@@ -1,4 +1,4 @@
|
||||
/datum/computer_file/program/signaler
|
||||
/datum/computer_file/program/signal_commander
|
||||
filename = "signaler"
|
||||
filedesc = "SignalCommander"
|
||||
category = PROGRAM_CATEGORY_MISC
|
||||
@@ -15,35 +15,18 @@
|
||||
/// Radio connection datum used by signalers.
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/datum/computer_file/program/signaler/run_program(mob/living/user)
|
||||
. = ..()
|
||||
if (!.)
|
||||
return
|
||||
var/obj/item/computer_hardware/hard_drive/role/signal/disk = computer?.get_modular_computer_part(MC_HDD_JOB)
|
||||
if(!(computer?.get_modular_computer_part(MC_SIGNALER) || istype(disk))) //Giving a clue to users why the program is spitting out zeros.
|
||||
to_chat(user, span_warning("\The [computer] flashes an error: \"hardware\\signal_hardware\\startup.bin -- file not found\"."))
|
||||
|
||||
|
||||
/datum/computer_file/program/signaler/ui_data(mob/user)
|
||||
/datum/computer_file/program/signal_commander/ui_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
var/obj/item/computer_hardware/radio_card/sensor = computer?.get_modular_computer_part(MC_SIGNALER)
|
||||
var/obj/item/computer_hardware/hard_drive/role/signal/disk = computer?.get_modular_computer_part(MC_HDD_JOB)
|
||||
if(sensor?.check_functionality() || istype(disk))
|
||||
data["frequency"] = signal_frequency
|
||||
data["code"] = signal_code
|
||||
data["minFrequency"] = MIN_FREE_FREQ
|
||||
data["maxFrequency"] = MAX_FREE_FREQ
|
||||
data["frequency"] = signal_frequency
|
||||
data["code"] = signal_code
|
||||
data["minFrequency"] = MIN_FREE_FREQ
|
||||
data["maxFrequency"] = MAX_FREE_FREQ
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/signaler/ui_act(action, list/params)
|
||||
/datum/computer_file/program/signal_commander/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/obj/item/computer_hardware/radio_card/sensor = computer?.get_modular_computer_part(MC_SIGNALER)
|
||||
var/obj/item/computer_hardware/hard_drive/role/signal/disk = computer?.get_modular_computer_part(MC_HDD_JOB)
|
||||
if(!(sensor?.check_functionality() || istype(disk)))
|
||||
playsound(src, 'sound/machines/scanbuzz.ogg', 100, FALSE)
|
||||
return
|
||||
switch(action)
|
||||
if("signal")
|
||||
INVOKE_ASYNC(src, .proc/signal)
|
||||
@@ -63,7 +46,7 @@
|
||||
signal_code = initial(signal_code)
|
||||
. = TRUE
|
||||
|
||||
/datum/computer_file/program/signaler/proc/signal()
|
||||
/datum/computer_file/program/signal_commander/proc/signal()
|
||||
if(!radio_connection)
|
||||
return
|
||||
|
||||
@@ -78,7 +61,7 @@
|
||||
var/datum/signal/signal = new(list("code" = signal_code), logging_data = logging_data)
|
||||
radio_connection.post_signal(computer, signal)
|
||||
|
||||
/datum/computer_file/program/signaler/proc/set_frequency(new_frequency)
|
||||
/datum/computer_file/program/signal_commander/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(computer, signal_frequency)
|
||||
signal_frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(computer, signal_frequency, RADIO_SIGNALER)
|
||||
@@ -4,7 +4,7 @@
|
||||
program_icon = "signal"
|
||||
program_icon_state = "generic"
|
||||
requires_ntnet = TRUE
|
||||
size = 4
|
||||
size = 1
|
||||
|
||||
extended_desc = "An app used to change the message on the station status displays."
|
||||
tgui_id = "NtosStatus"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
program_icon_state = "research"
|
||||
extended_desc = "Connect to the internal science server in order to assist in station research efforts."
|
||||
requires_ntnet = TRUE
|
||||
size = 16
|
||||
size = 10
|
||||
tgui_id = "NtosTechweb"
|
||||
program_icon = "atom"
|
||||
required_access = list(ACCESS_HEADS, ACCESS_RND)
|
||||
|
||||
Reference in New Issue
Block a user