Files
Yogstation/code/modules/modular_computers/computers/_modular_computer_shared.dm
nmajask 407122e347 Adds modular PDA and Telescreen and cleans up some of the preset code (#12685)
* Added modular PDA and telescreen

They kinda work

* Adds a telescreen to box

* Cleans up some stuff

Left some code in from when I was working on something else, causing the checks to fail. This removes it.

* More clean up and an untested fix for computers so they dont runtime if they have an initial program

Hope this works.

* Hopefully fixes the failed check

Forgot about that var.

* Makes telescreens machines and more PDA sprites

Makes modular telescreens machines, adds more pda program icons, and fixes stuff.

* Adds telescreens to more maps and fixes the one on box

* Fixes the failed check and cleans up some commented out stuff

Forgot about this stuff

* Replaces engi and atmos tech phones with modular PDAs

Seams reasonable. May atomize it out if people want me to.

* Forgot the commit the atmos preset

*sigh

* Moves telescreens to the machine folder and adds a medical telescreen

Moves telescreens to the machine mod pc folder because they are no longer items and adds a medical telescreen that starts with the crew monitor program, though its not on maps yet.

* Removed the old telescreen file that didnt get removed

thanks github desktop

* Forgot about the CMO's computer

Though I did this with the medical preset

* Adds medical telescreens to most maps

* Readds the changes

* Forgot to uncomment this

*scream

* Adds telescreens to mining base and brig infirmary

* Everyone gets a telescreen

* Forgot the lights

* Symmetry

* Adds the fixes for delta
2021-12-27 17:24:30 -05:00

67 lines
2.7 KiB
Plaintext

/obj/proc/is_modular_computer()
return
/obj/proc/get_modular_computer_part(part_type)
return null
/obj/item/modular_computer/is_modular_computer()
return TRUE
/obj/item/modular_computer/get_modular_computer_part(part_type)
if(!part_type)
stack_trace("get_modular_computer_part() called without a valid part_type")
return null
return all_components[part_type]
/obj/machinery/modular_computer/is_modular_computer()
return TRUE
/obj/machinery/modular_computer/get_modular_computer_part(part_type)
if(!part_type)
stack_trace("get_modular_computer_part() called without a valid part_type")
return null
return cpu?.all_components[part_type]
/obj/proc/get_modular_computer_parts_examine(mob/user)
. = list()
if(!is_modular_computer())
return
var/user_is_adjacent = Adjacent(user) //don't reveal full details unless they're close enough to see it on the screen anyway.
var/obj/item/computer_hardware/ai_slot/ai_slot = get_modular_computer_part(MC_AI)
if(ai_slot)
if(ai_slot.stored_card)
if(user_is_adjacent)
. += "It has a slot installed for an intelliCard which contains: [ai_slot.stored_card.name]"
else
. += "It has a slot installed for an intelliCard, which appears to be occupied."
. += span_info("Alt-click to eject the intelliCard.")
else
. += "It has a slot installed for an intelliCard."
var/obj/item/computer_hardware/card_slot/card_slot = get_modular_computer_part(MC_CARD)
var/obj/item/computer_hardware/card_slot/card_slot2 = get_modular_computer_part(MC_CARD2)
var/multiple_slots = istype(card_slot) && istype(card_slot2)
if(card_slot)
if(card_slot.stored_card || (istype(card_slot2) && card_slot2.stored_card))
var/obj/item/card/id/first_ID = card_slot.stored_card
var/obj/item/card/id/second_ID = card_slot2.stored_card
var/multiple_cards = istype(first_ID) && istype(second_ID)
if(user_is_adjacent)
. += "It has [multiple_slots ? "two slots" : "a slot"] for identification cards installed[multiple_cards ? " which contain [first_ID] and [second_ID]" : ", one of which contains [first_ID ? first_ID : second_ID]"]."
else
. += "It has [multiple_slots ? "two slots" : "a slot"] for identification cards installed, [multiple_cards ? "both of which appear" : "and one of them appears"] to be occupied."
. += span_info("Alt-click [src] to eject the identification card[multiple_cards ? "s":""].")
else
. += "It has [multiple_slots ? "two slots" : "a slot"] installed for identification cards."
var/obj/item/computer_hardware/printer/printer_slot = get_modular_computer_part(MC_PRINT)
if(printer_slot)
. += "It has a printer installed."
if(user_is_adjacent)
. += "The printer's paper levels are at: [printer_slot.stored_paper]/[printer_slot.max_paper].</span>]"