mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-14 09:27:45 +01:00
Modular PDAs: The End of an Era (#10319)
PDAs are dead, long live PDAs. All trace of old PDAs has been scoured from the codebase, and in its place are modular computer PDAs that are feature-equivalent. Essentially every PDA function except the Syndicate detonation feature and Notepad has been ported over, and battery life for handheld computers has been boosted alongside the addition of charging cables to make things easier.
This commit is contained in:
@@ -69,6 +69,21 @@
|
||||
continue
|
||||
hard_drive.store_file(prog)
|
||||
|
||||
/obj/item/modular_computer/proc/handle_verbs()
|
||||
if(card_slot)
|
||||
if(card_slot.stored_card)
|
||||
verbs += /obj/item/modular_computer/proc/eject_id
|
||||
if(card_slot.stored_item)
|
||||
verbs += /obj/item/modular_computer/proc/eject_item
|
||||
if(portable_drive)
|
||||
verbs += /obj/item/modular_computer/proc/eject_usb
|
||||
if(battery_module && battery_module.hotswappable)
|
||||
verbs += /obj/item/modular_computer/proc/eject_battery
|
||||
if(ai_slot && ai_slot.stored_card)
|
||||
verbs += /obj/item/modular_computer/proc/eject_ai
|
||||
if(personal_ai)
|
||||
verbs += /obj/item/modular_computer/proc/eject_personal_ai
|
||||
|
||||
/obj/item/modular_computer/Initialize()
|
||||
. = ..()
|
||||
listener = new(LISTENER_MODULAR_COMPUTER, src)
|
||||
@@ -76,7 +91,9 @@
|
||||
install_default_hardware()
|
||||
if(hard_drive)
|
||||
install_default_programs()
|
||||
handle_verbs()
|
||||
update_icon()
|
||||
initial_name = name
|
||||
|
||||
/obj/item/modular_computer/Destroy()
|
||||
kill_program(TRUE)
|
||||
@@ -87,6 +104,11 @@
|
||||
QDEL_NULL(listener)
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/CouldUseTopic(var/mob/user)
|
||||
..()
|
||||
if(iscarbon(user))
|
||||
playsound(src, 'sound/machines/pda_click.ogg', 20)
|
||||
|
||||
/obj/item/modular_computer/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(computer_emagged)
|
||||
to_chat(user, SPAN_WARNING("\The [src] has already been emagged."))
|
||||
@@ -155,10 +177,11 @@
|
||||
|
||||
// Relays kill program request to currently active program. Use this to quit current program.
|
||||
/obj/item/modular_computer/proc/kill_program(var/forced = FALSE)
|
||||
if(active_program)
|
||||
active_program.kill_program(forced)
|
||||
if(active_program && active_program.kill_program(forced))
|
||||
src.vueui_transfer(active_program)
|
||||
active_program = null
|
||||
else
|
||||
return FALSE
|
||||
var/mob/user = usr
|
||||
if(user && istype(user) && !forced)
|
||||
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
|
||||
@@ -195,14 +218,14 @@
|
||||
enabled = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/modular_computer/proc/enable_computer(var/mob/user)
|
||||
/obj/item/modular_computer/proc/enable_computer(var/mob/user, var/ar_forced=FALSE)
|
||||
enabled = TRUE
|
||||
update_icon()
|
||||
|
||||
// Autorun feature
|
||||
var/datum/computer_file/data/autorun = hard_drive ? hard_drive.find_file_by_name("autorun") : null
|
||||
if(istype(autorun))
|
||||
run_program(autorun.stored_data, user)
|
||||
run_program(autorun.stored_data, user, ar_forced)
|
||||
|
||||
for(var/s in enabled_services)
|
||||
var/datum/computer_file/program/service = s
|
||||
@@ -227,7 +250,7 @@
|
||||
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
|
||||
|
||||
|
||||
/obj/item/modular_computer/proc/run_program(prog, mob/user)
|
||||
/obj/item/modular_computer/proc/run_program(prog, mob/user, var/forced=FALSE)
|
||||
var/datum/computer_file/program/P = null
|
||||
if(!istype(user))
|
||||
user = usr
|
||||
@@ -255,7 +278,7 @@
|
||||
to_chat(user, SPAN_WARNING("\The [src] displays, \"Maximal CPU load reached. Unable to run another program.\"."))
|
||||
return
|
||||
|
||||
if(P.requires_ntnet && !get_ntnet_status(P.requires_ntnet_feature)) // The program requires NTNet connection, but we are not connected to NTNet.
|
||||
if(P.requires_ntnet && !get_ntnet_status(P.requires_ntnet_feature) && !forced) // The program requires NTNet connection, but we are not connected to NTNet.
|
||||
to_chat(user, FONT_SMALL(SPAN_WARNING("\The [src] displays, \"NETWORK ERROR - Unable to connect to NTNet. Please retry. If problem persists contact your system administrator.\".")))
|
||||
return
|
||||
|
||||
@@ -353,11 +376,10 @@
|
||||
if(S in enabled_services)
|
||||
return
|
||||
|
||||
enabled_services += S
|
||||
|
||||
// Start service
|
||||
S.service_activate()
|
||||
S.service_state = PROGRAM_STATE_ACTIVE
|
||||
if(S.service_activate())
|
||||
enabled_services += S
|
||||
S.service_state = PROGRAM_STATE_ACTIVE
|
||||
|
||||
|
||||
/obj/item/modular_computer/proc/disable_service(service, mob/user, var/datum/computer_file/program/S = null)
|
||||
@@ -383,3 +405,73 @@
|
||||
to_chat(user, message)
|
||||
return
|
||||
audible_message(message, hearing_distance = message_range)
|
||||
|
||||
// TODO: Make pretty much everything use these helpers.
|
||||
/obj/item/modular_computer/proc/output_notice(var/message, var/message_range)
|
||||
message = "[icon2html(src, viewers(message_range, get_turf(src)))][src]: " + message
|
||||
output_message(SPAN_NOTICE(message), message_range)
|
||||
|
||||
/obj/item/modular_computer/proc/output_error(var/message, var/message_range)
|
||||
message = "[icon2html(src, viewers(message_range, get_turf(src)))][src]: " + message
|
||||
output_message(SPAN_WARNING(message), message_range)
|
||||
|
||||
/obj/item/modular_computer/proc/get_notification(var/message, var/message_range = 1, var/atom/source)
|
||||
if(silent)
|
||||
return
|
||||
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 20, 1)
|
||||
message = "[icon2html(src, viewers(message_range, get_turf(src)))][src]: [SPAN_DANGER("-!-")] Notification from [source]: " + message
|
||||
output_message(FONT_SMALL(SPAN_BOLD(message)), message_range)
|
||||
|
||||
/obj/item/modular_computer/proc/register_account(var/datum/computer_file/program/PRG = null)
|
||||
var/obj/item/card/id/id = GetID()
|
||||
if(PRG)
|
||||
output_message(SPAN_NOTICE("\The [src] shows a notice: \"[PRG.filedesc] requires a registered NTNRC account. Registering automatically...\""))
|
||||
if(!istype(id))
|
||||
output_message(SPAN_WARNING("\The [src] shows an error: \"No ID card found!\""))
|
||||
return FALSE
|
||||
if(id.chat_registered)
|
||||
output_message(SPAN_WARNING("\The [src] shows an error: \"This card is already registered to another account!\""))
|
||||
return FALSE
|
||||
|
||||
id.chat_registered = TRUE
|
||||
registered_id = id
|
||||
output_message(SPAN_NOTICE("\The [src] beeps: \"Registration successful!\""))
|
||||
playsound(get_turf(src), 'sound/machines/ping.ogg', 20, 0)
|
||||
return registered_id
|
||||
|
||||
/obj/item/modular_computer/proc/unregister_account()
|
||||
if(!registered_id)
|
||||
return FALSE
|
||||
|
||||
registered_id.chat_registered = FALSE
|
||||
registered_id = null
|
||||
|
||||
if(hard_drive)
|
||||
var/datum/computer_file/program/P = hard_drive.find_file_by_name("ntnrc_client")
|
||||
P.event_unregistered()
|
||||
|
||||
output_message(SPAN_NOTICE("\The [src] beeps: \"Successfully unregistered ID!\""))
|
||||
playsound(get_turf(src), 'sound/machines/ping.ogg', 20, 0)
|
||||
return TRUE
|
||||
|
||||
/obj/item/modular_computer/proc/set_autorun(var/fname)
|
||||
if(!fname)
|
||||
return FALSE
|
||||
|
||||
var/datum/computer_file/data/autorun = hard_drive.find_file_by_name("autorun")
|
||||
|
||||
if(istype(autorun) && autorun.stored_data == fname)
|
||||
autorun.stored_data = null
|
||||
return -1
|
||||
|
||||
autorun = new /datum/computer_file/data(src)
|
||||
autorun.filename = "autorun"
|
||||
autorun.stored_data = fname
|
||||
hard_drive.store_file(autorun)
|
||||
return TRUE
|
||||
|
||||
/obj/item/modular_computer/proc/silence_notifications()
|
||||
for (var/datum/computer_file/program/P in hard_drive.stored_files)
|
||||
if (istype(P))
|
||||
P.event_silentmode()
|
||||
silent = !silent
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
return
|
||||
found = TRUE
|
||||
portable_drive = H
|
||||
verbs += /obj/item/modular_computer/proc/eject_usb
|
||||
else if(istype(H, /obj/item/computer_hardware/hard_drive))
|
||||
if(hard_drive)
|
||||
to_chat(user, SPAN_WARNING("\The [src]'s hard drive slot is already occupied by \the [hard_drive]."))
|
||||
@@ -39,6 +40,8 @@
|
||||
return
|
||||
found = TRUE
|
||||
battery_module = H
|
||||
if(battery_module.hotswappable)
|
||||
verbs += /obj/item/modular_computer/proc/eject_battery
|
||||
else if(istype(H, /obj/item/computer_hardware/processor_unit))
|
||||
if(processor_unit)
|
||||
to_chat(user, SPAN_WARNING("\The [src]'s processor slot is already occupied by \the [processor_unit]."))
|
||||
@@ -51,6 +54,7 @@
|
||||
return
|
||||
found = TRUE
|
||||
ai_slot = H
|
||||
verbs += /obj/item/modular_computer/proc/eject_ai
|
||||
else if(istype(H, /obj/item/computer_hardware/tesla_link))
|
||||
if(tesla_link)
|
||||
to_chat(user, SPAN_WARNING("\The [src]'s tesla link slot is already occupied by \the [tesla_link]."))
|
||||
@@ -63,6 +67,7 @@
|
||||
return
|
||||
personal_ai = H
|
||||
to_chat(user, SPAN_NOTICE("You install \the [H] into \the [src]."))
|
||||
verbs += /obj/item/modular_computer/proc/eject_personal_ai
|
||||
personal_ai.pai.parent_computer = src
|
||||
personal_ai.pai.verbs += /mob/living/silicon/pai/proc/personal_computer_interact
|
||||
to_chat(personal_ai.pai, SPAN_NOTICE("You gain access to \the [src]'s computronics."))
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Eject ID card from computer, if it has ID slot with card inside.
|
||||
/obj/item/modular_computer/verb/eject_id()
|
||||
/obj/item/modular_computer/proc/eject_id()
|
||||
set name = "Eject ID"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
@@ -7,49 +6,12 @@
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
proc_eject_id(usr)
|
||||
|
||||
// Eject ID card from computer, if it has ID slot with card inside.
|
||||
/obj/item/modular_computer/verb/eject_usb()
|
||||
set name = "Eject Portable Storage"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
proc_eject_usb(usr)
|
||||
|
||||
/obj/item/modular_computer/verb/eject_ai()
|
||||
set name = "Eject AI Storage"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
proc_eject_ai(usr)
|
||||
|
||||
/obj/item/modular_computer/verb/eject_personal_ai()
|
||||
set name = "Eject Personal AI"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
proc_eject_personal_ai(usr)
|
||||
|
||||
/obj/item/modular_computer/proc/proc_eject_id(mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
|
||||
if(!card_slot)
|
||||
to_chat(user, SPAN_WARNING("\The [src] does not have an ID card slot."))
|
||||
to_chat(usr, SPAN_WARNING("\The [src] does not have an ID card slot."))
|
||||
return
|
||||
|
||||
if(!card_slot.stored_card)
|
||||
to_chat(user, SPAN_WARNING("There is no card in \the [src]."))
|
||||
to_chat(usr, SPAN_WARNING("There is no card in \the [src]."))
|
||||
return
|
||||
|
||||
if(active_program)
|
||||
@@ -57,57 +19,155 @@
|
||||
|
||||
for(var/datum/computer_file/program/P in idle_threads)
|
||||
P.event_idremoved(TRUE)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(card_slot.stored_card)
|
||||
else
|
||||
card_slot.stored_card.forceMove(get_turf(src))
|
||||
card_slot.stored_card = null
|
||||
|
||||
card_slot.eject_id(usr)
|
||||
|
||||
update_uis()
|
||||
to_chat(user, SPAN_NOTICE("You remove the card from \the [src]."))
|
||||
to_chat(usr, SPAN_NOTICE("You remove the card from \the [src]."))
|
||||
|
||||
|
||||
/obj/item/modular_computer/proc/proc_eject_usb(mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
/obj/item/modular_computer/proc/eject_usb()
|
||||
set name = "Eject Portable Storage"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!portable_drive)
|
||||
to_chat(user, SPAN_WARNING("There is no portable drive connected to \the [src]."))
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
uninstall_component(user, portable_drive, put_in_hands = TRUE)
|
||||
if(!portable_drive)
|
||||
to_chat(usr, SPAN_WARNING("There is no portable drive connected to \the [src]."))
|
||||
return
|
||||
|
||||
uninstall_component(usr, portable_drive, put_in_hands = TRUE)
|
||||
verbs -= /obj/item/modular_computer/proc/eject_usb
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/proc/proc_eject_ai(mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
/obj/item/modular_computer/proc/eject_item()
|
||||
set name = "Eject Stored Item"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
if(!card_slot)
|
||||
to_chat(usr, SPAN_WARNING("\The [src] does not have an ID card slot."))
|
||||
return
|
||||
|
||||
if(!card_slot.stored_item)
|
||||
to_chat(usr, SPAN_WARNING("There is no item stored in \the [src]."))
|
||||
return
|
||||
|
||||
var/I = card_slot.stored_item.name
|
||||
|
||||
if(ishuman(usr))
|
||||
usr.put_in_hands(card_slot.stored_item)
|
||||
else
|
||||
card_slot.stored_item.forceMove(get_turf(src))
|
||||
|
||||
card_slot.stored_item = null
|
||||
update_uis()
|
||||
verbs -= /obj/item/modular_computer/proc/eject_item
|
||||
to_chat(usr, SPAN_NOTICE("You remove \the [I] from \the [src]."))
|
||||
|
||||
/obj/item/modular_computer/proc/eject_battery(mob/usr = usr)
|
||||
set name = "Eject Battery"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
if(!battery_module)
|
||||
to_chat(usr, SPAN_WARNING("\The [src] doesn't have a battery installed."))
|
||||
return
|
||||
|
||||
if(!battery_module.hotswappable)
|
||||
to_chat(usr, SPAN_WARNING("\The [src]'s battery isn't removable without tools!"))
|
||||
return
|
||||
|
||||
uninstall_component(usr, battery_module, put_in_hands = TRUE)
|
||||
verbs -= /obj/item/modular_computer/proc/eject_battery
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/proc/eject_ai()
|
||||
set name = "Eject AI Storage"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
if(!ai_slot)
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't have an intellicard slot."))
|
||||
to_chat(usr, SPAN_WARNING("\The [src] doesn't have an intellicard slot."))
|
||||
return
|
||||
|
||||
if(!ai_slot.stored_card)
|
||||
to_chat(user, SPAN_WARNING("There is no intellicard connected to \the [src]."))
|
||||
to_chat(usr, SPAN_WARNING("There is no intellicard connected to \the [src]."))
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(ai_slot.stored_card)
|
||||
if(ishuman(usr))
|
||||
usr.put_in_hands(ai_slot.stored_card)
|
||||
else
|
||||
ai_slot.stored_card.forceMove(get_turf(src))
|
||||
ai_slot.stored_card = null
|
||||
ai_slot.update_power_usage()
|
||||
verbs -= /obj/item/modular_computer/proc/eject_ai
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/proc/proc_eject_personal_ai(mob/user)
|
||||
if(!personal_ai)
|
||||
to_chat(user, SPAN_WARNING("There is no personal AI connected to \the [src]."))
|
||||
/obj/item/modular_computer/proc/eject_personal_ai()
|
||||
set name = "Eject Personal AI"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(use_check_and_message(usr))
|
||||
return
|
||||
|
||||
personal_ai.pai.verbs -= /mob/living/silicon/pai/proc/personal_computer_interact
|
||||
personal_ai.pai.parent_computer = null
|
||||
to_chat(personal_ai.pai, SPAN_NOTICE("You lose access to \the [src]'s computronics."))
|
||||
uninstall_component(user, personal_ai, put_in_hands = TRUE)
|
||||
if(!personal_ai)
|
||||
to_chat(usr, SPAN_WARNING("There is no personal AI connected to \the [src]."))
|
||||
return
|
||||
|
||||
uninstall_component(usr, personal_ai, put_in_hands = TRUE)
|
||||
verbs -= /obj/item/modular_computer/proc/eject_personal_ai
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/AltClick(var/mob/user)
|
||||
if(use_check_and_message(user, 32))
|
||||
return
|
||||
|
||||
if(!card_slot)
|
||||
to_chat(user, SPAN_WARNING("\The [src] does not have an ID card slot."))
|
||||
return
|
||||
|
||||
if(card_slot.stored_card)
|
||||
eject_id()
|
||||
else if(card_slot.stored_item)
|
||||
eject_item()
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [src] does not have a card or item stored in the card slot."))
|
||||
|
||||
/obj/item/modular_computer/attack(mob/living/M, mob/living/user)
|
||||
if(scan_mode == SCANNER_MEDICAL)
|
||||
health_scan_mob(M, user, TRUE)
|
||||
|
||||
/obj/item/modular_computer/afterattack(atom/A, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(!proximity_flag)
|
||||
return
|
||||
if(scan_mode == SCANNER_REAGENT)
|
||||
if(!isobj(A) || isnull(A.reagents))
|
||||
return
|
||||
if(A.reagents.reagent_list.len)
|
||||
var/reagents_length = A.reagents.reagent_list.len
|
||||
to_chat(user, SPAN_NOTICE("[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found."))
|
||||
for(var/re in A.reagents.reagent_list)
|
||||
to_chat(user, SPAN_NOTICE(" [re]"))
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("No active chemical agents found in [A]."))
|
||||
|
||||
else if(scan_mode == SCANNER_GAS)
|
||||
analyze_gases(A, user)
|
||||
|
||||
/obj/item/modular_computer/attack_ghost(var/mob/abstract/observer/user)
|
||||
if(enabled)
|
||||
ui_interact(user)
|
||||
@@ -152,15 +212,29 @@
|
||||
if(!card_slot)
|
||||
to_chat(user, SPAN_WARNING("You try to insert \the [I] into \the [src], but it does not have an ID card slot installed."))
|
||||
return
|
||||
if(card_slot.stored_card)
|
||||
to_chat(user, SPAN_WARNING("You try to insert \the [I] into \the [src], but its ID card slot is occupied."))
|
||||
return
|
||||
|
||||
user.drop_from_inventory(I, src)
|
||||
card_slot.stored_card = I
|
||||
if(card_slot.stored_card)
|
||||
eject_id()
|
||||
|
||||
card_slot.insert_id(I)
|
||||
update_uis()
|
||||
to_chat(user, SPAN_NOTICE("You insert \the [I] into \the [src]."))
|
||||
return
|
||||
if(is_type_in_list(W, card_slot?.allowed_items))
|
||||
if(!card_slot)
|
||||
to_chat(user, SPAN_WARNING("You try to insert \the [W] into \the [src], but it does not have an ID card slot installed."))
|
||||
return
|
||||
if(card_slot.stored_item)
|
||||
to_chat(user, SPAN_WARNING("You try to insert \the [W] into \the [src], but its storage slot is occupied."))
|
||||
return
|
||||
|
||||
user.drop_from_inventory(W, src)
|
||||
card_slot.stored_item = W
|
||||
update_uis()
|
||||
verbs += /obj/item/modular_computer/proc/eject_item
|
||||
to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]."))
|
||||
return
|
||||
if(istype(W, /obj/item/paper))
|
||||
if(!nano_printer)
|
||||
return
|
||||
@@ -230,6 +304,8 @@
|
||||
var/mob/M = usr
|
||||
if(use_check_and_message(M))
|
||||
return
|
||||
if(istype(over_object, /obj/machinery/power/apc) && tesla_link)
|
||||
return over_object.attackby(src, M)
|
||||
if(!istype(over_object, /obj/screen) && !(over_object == src))
|
||||
return attack_self(M)
|
||||
|
||||
|
||||
@@ -92,9 +92,9 @@
|
||||
if(!istype(P) || P.program_state == PROGRAM_STATE_KILLED)
|
||||
return
|
||||
|
||||
P.kill_program(TRUE)
|
||||
if(P.kill_program())
|
||||
to_chat(user, SPAN_NOTICE("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed."))
|
||||
update_uis()
|
||||
to_chat(user, SPAN_NOTICE("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed."))
|
||||
|
||||
if(href_list["PC_runprogram"] )
|
||||
. = run_program(href_list["PC_runprogram"], usr)
|
||||
@@ -103,16 +103,14 @@
|
||||
if(href_list["PC_setautorun"])
|
||||
if(!hard_drive)
|
||||
return
|
||||
var/datum/computer_file/data/autorun = hard_drive.find_file_by_name("autorun")
|
||||
if(!istype(autorun))
|
||||
autorun = new /datum/computer_file/data()
|
||||
autorun.filename = "autorun"
|
||||
hard_drive.store_file(autorun)
|
||||
if(autorun.stored_data == href_list["PC_setautorun"])
|
||||
autorun.stored_data = null
|
||||
else
|
||||
autorun.stored_data = href_list["PC_setautorun"]
|
||||
|
||||
set_autorun(href_list["PC_setautorun"])
|
||||
|
||||
if(href_list["PC_register"])
|
||||
if(registered_id)
|
||||
unregister_account()
|
||||
else if(GetID())
|
||||
register_account()
|
||||
|
||||
if( href_list["PC_toggleservice"] )
|
||||
toggle_service(href_list["PC_toggleservice"], usr)
|
||||
return 1
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// This is the base type that handles everything. Subtypes can be easily created by tweaking variables in this file to your liking.
|
||||
|
||||
/obj/item/modular_computer
|
||||
name = "Modular Computer"
|
||||
desc = "A modular computer. You shouldn't see this."
|
||||
@@ -21,6 +22,12 @@
|
||||
var/_app_preset_type // Used for specifying the software preset of the console
|
||||
var/ambience_last_played // Last time sound was played
|
||||
var/pAI_lock = FALSE // Toggles whether pAI can interact with the modular computer while installed in it
|
||||
var/obj/item/card/id/registered_id = null // ID used for chat client registering
|
||||
var/scan_mode = null // Mode used for health/reagent scanners
|
||||
var/silent = FALSE
|
||||
var/doorcode = "smindicate"
|
||||
var/hidden = FALSE
|
||||
var/initial_name
|
||||
|
||||
// Modular computers can run on various devices. Each DEVICE (Laptop, Console, Tablet,..)
|
||||
// must have it's own DMI file. Icon states must be called exactly the same in all files, but may look differently
|
||||
|
||||
Reference in New Issue
Block a user