mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Removes network cards and printers from tablets (#70110)
This commit is contained in:
@@ -22,7 +22,9 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
var/screen_on = 1 // Whether the computer is active/opened/it's screen is on.
|
||||
var/device_theme = "ntos" // Sets the theme for the main menu, hardware config, and file browser apps. Overridden by certain non-NT devices.
|
||||
var/datum/computer_file/program/active_program = null // A currently active program running on the computer.
|
||||
var/hardware_flag = 0 // A flag that describes this device type
|
||||
///The type of device this computer is, as a flag
|
||||
var/hardware_flag = NONE
|
||||
// Options: PROGRAM_ALL PROGRAM_CONSOLE | | PROGRAM_LAPTOP | PROGRAM_TABLET
|
||||
var/last_power_usage = 0
|
||||
var/last_battery_percent = 0 // Used for deciding if battery percentage has chandged
|
||||
var/last_world_time = "00:00"
|
||||
@@ -80,6 +82,11 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
/// Stored pAI in the computer
|
||||
var/obj/item/pai_card/inserted_pai = null
|
||||
|
||||
///The amount of paper currently stored in the PDA
|
||||
var/stored_paper = 10
|
||||
///The max amount of paper that can be held at once.
|
||||
var/max_paper = 30
|
||||
|
||||
/obj/item/modular_computer/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -97,6 +104,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
update_appearance()
|
||||
register_context()
|
||||
init_network_id(NETWORK_TABLETS)
|
||||
Add_Messenger()
|
||||
|
||||
/obj/item/modular_computer/Destroy()
|
||||
@@ -229,6 +237,18 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/proc/print_text(text_to_print, paper_title = "")
|
||||
if(!stored_paper)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/paper/printed_paper = new /obj/item/paper(drop_location())
|
||||
printed_paper.add_raw_text(text_to_print)
|
||||
if(paper_title)
|
||||
printed_paper.name = paper_title
|
||||
printed_paper.update_appearance()
|
||||
stored_paper--
|
||||
return TRUE
|
||||
|
||||
/obj/item/modular_computer/InsertID(obj/item/inserting_item)
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
var/obj/item/computer_hardware/card_slot/card_slot2 = all_components[MC_CARD2]
|
||||
@@ -295,11 +315,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
else if(atom_integrity < max_integrity)
|
||||
. += span_warning("It is damaged.")
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
for(var/datum/computer_file/app_examine as anything in hdd.stored_files)
|
||||
if(app_examine.on_examine(src, user))
|
||||
. += app_examine.on_examine(src, user)
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
var/obj/item/computer_hardware/card_slot/card_slot2 = all_components[MC_CARD2]
|
||||
var/multiple_slots = istype(card_slot) && istype(card_slot2)
|
||||
@@ -316,12 +331,16 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
else
|
||||
. += "It has [multiple_slots ? "two slots" : "a slot"] installed for identification cards."
|
||||
|
||||
var/obj/item/computer_hardware/printer/printer_slot = all_components[MC_PRINT]
|
||||
if(printer_slot)
|
||||
. += "It has a printer installed."
|
||||
if(Adjacent(user))
|
||||
. += "The printer's paper levels are at: [printer_slot.stored_paper]/[printer_slot.max_paper].</span>"
|
||||
/obj/item/modular_computer/examine_more(mob/user)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/app_examine as anything in hdd.stored_files)
|
||||
if(app_examine.on_examine(src, user))
|
||||
. += app_examine.on_examine(src, user)
|
||||
|
||||
if(Adjacent(user))
|
||||
. += span_notice("Paper level: [stored_paper] / [max_paper].")
|
||||
|
||||
/obj/item/modular_computer/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = ..()
|
||||
@@ -492,13 +511,13 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
data["PC_showbatteryicon"] = battery_module ? 1 : 0
|
||||
|
||||
switch(get_ntnet_status())
|
||||
if(0)
|
||||
if(NTNET_NO_SIGNAL)
|
||||
data["PC_ntneticon"] = "sig_none.gif"
|
||||
if(1)
|
||||
if(NTNET_LOW_SIGNAL)
|
||||
data["PC_ntneticon"] = "sig_low.gif"
|
||||
if(2)
|
||||
if(NTNET_GOOD_SIGNAL)
|
||||
data["PC_ntneticon"] = "sig_high.gif"
|
||||
if(3)
|
||||
if(NTNET_ETHERNET_SIGNAL)
|
||||
data["PC_ntneticon"] = "sig_lan.gif"
|
||||
|
||||
if(length(idle_threads))
|
||||
@@ -574,18 +593,31 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
// Returns 0 for No Signal, 1 for Low Signal and 2 for Good Signal. 3 is for wired connection (always-on)
|
||||
/obj/item/modular_computer/proc/get_ntnet_status(specific_action = 0)
|
||||
var/obj/item/computer_hardware/network_card/network_card = all_components[MC_NET]
|
||||
if(network_card)
|
||||
return network_card.get_signal(specific_action)
|
||||
else
|
||||
return 0
|
||||
if(!SSnetworks.station_network || !SSnetworks.station_network.check_function(specific_action)) // NTNet is down and we are not connected via wired connection. No signal.
|
||||
return NTNET_NO_SIGNAL
|
||||
|
||||
|
||||
// computers are connected through ethernet
|
||||
if(hardware_flag & PROGRAM_CONSOLE)
|
||||
return NTNET_ETHERNET_SIGNAL
|
||||
|
||||
var/turf/current_turf = get_turf(src)
|
||||
if(!current_turf || !istype(current_turf))
|
||||
return NTNET_NO_SIGNAL
|
||||
if(is_station_level(current_turf.z))
|
||||
if(hardware_flag & PROGRAM_LAPTOP) //laptops can connect to ethernet but they have to be on station for that
|
||||
return NTNET_ETHERNET_SIGNAL
|
||||
return NTNET_GOOD_SIGNAL
|
||||
else if(is_mining_level(current_turf.z))
|
||||
return NTNET_LOW_SIGNAL
|
||||
|
||||
return NTNET_NO_SIGNAL
|
||||
|
||||
/obj/item/modular_computer/proc/add_log(text)
|
||||
if(!get_ntnet_status())
|
||||
return FALSE
|
||||
var/obj/item/computer_hardware/network_card/network_card = all_components[MC_NET]
|
||||
|
||||
return SSnetworks.add_log(text, network_card.network_id, network_card.hardware_id)
|
||||
return SSnetworks.add_log(text, network_id)
|
||||
|
||||
/obj/item/modular_computer/proc/shutdown_computer(loud = 1)
|
||||
kill_program(forced = TRUE)
|
||||
@@ -638,7 +670,77 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
/obj/item/modular_computer/proc/UpdateDisplay()
|
||||
name = "[saved_identification] ([saved_job])"
|
||||
|
||||
/obj/item/modular_computer/attackby(obj/item/attacking_item, mob/user, params)
|
||||
// Check for ID first
|
||||
if(isidcard(attacking_item) && InsertID(attacking_item))
|
||||
return
|
||||
|
||||
// Check for cash next
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
if(card_slot && iscash(attacking_item))
|
||||
var/obj/item/card/id/inserted_id = card_slot.GetID()
|
||||
if(inserted_id)
|
||||
inserted_id.attackby(attacking_item, user) // If we do, try and put that attacking object in
|
||||
return
|
||||
|
||||
// Inserting a pAI
|
||||
if(istype(attacking_item, /obj/item/pai_card) && !inserted_pai)
|
||||
if(!user.transferItemToLoc(attacking_item, src))
|
||||
return
|
||||
inserted_pai = attacking_item
|
||||
to_chat(user, span_notice("You slot \the [attacking_item] into [src]."))
|
||||
return
|
||||
|
||||
// Check if any Applications need it
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/item_holding_app as anything in hdd.stored_files)
|
||||
if(item_holding_app.try_insert(attacking_item, user))
|
||||
return
|
||||
|
||||
if(istype(attacking_item, /obj/item/paper))
|
||||
if(stored_paper >= max_paper)
|
||||
to_chat(user, span_warning("You try to add \the [attacking_item] into [src], but it can't hold any more!"))
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(attacking_item))
|
||||
return FALSE
|
||||
to_chat(user, span_notice("You insert \the [attacking_item] into [src]'s paper recycler."))
|
||||
qdel(attacking_item)
|
||||
stored_paper++
|
||||
return
|
||||
if(istype(attacking_item, /obj/item/paper_bin))
|
||||
var/obj/item/paper_bin/bin = attacking_item
|
||||
if(bin.total_paper <= 0)
|
||||
to_chat(user, span_notice("\The [bin] is empty!"))
|
||||
return
|
||||
var/papers_added //just to keep track
|
||||
while((bin.total_paper > 0) && (stored_paper < max_paper))
|
||||
papers_added++
|
||||
stored_paper++
|
||||
bin.remove_paper()
|
||||
if(!papers_added)
|
||||
return
|
||||
to_chat(user, span_notice("Added in [papers_added] new sheets. You now have [stored_paper] / [max_paper] printing paper stored."))
|
||||
bin.update_appearance()
|
||||
return
|
||||
|
||||
|
||||
// Insert items into the components
|
||||
for(var/h in all_components)
|
||||
var/obj/item/computer_hardware/H = all_components[h]
|
||||
if(H.try_insert(attacking_item, user))
|
||||
return
|
||||
|
||||
// Insert new hardware
|
||||
if(istype(attacking_item, /obj/item/computer_hardware) && upgradable)
|
||||
if(install_component(attacking_item, user))
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/screwdriver_act(mob/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(!deconstructable)
|
||||
return
|
||||
if(!length(all_components))
|
||||
@@ -650,97 +752,49 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
component_names.Add(H.name)
|
||||
|
||||
var/choice = tgui_input_list(user, "Component to uninstall", "Computer maintenance", sort_list(component_names))
|
||||
|
||||
if(isnull(choice))
|
||||
return
|
||||
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/H = find_hardware_by_name(choice)
|
||||
|
||||
if(!H)
|
||||
return
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
|
||||
tool.play_tool_sound(src, user, 20, volume=20)
|
||||
uninstall_component(H, user)
|
||||
return
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
|
||||
/obj/item/modular_computer/wrench_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(length(all_components))
|
||||
balloon_alert(user, "remove the other components!")
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
tool.play_tool_sound(src, user, 20, volume=20)
|
||||
new /obj/item/stack/sheet/iron(get_turf(loc), steel_sheet_cost)
|
||||
user.balloon_alert(user, "disassembled")
|
||||
relay_qdel()
|
||||
qdel(src)
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
|
||||
|
||||
/obj/item/modular_computer/attackby(obj/item/attacking_item, mob/user, params)
|
||||
// Check for ID first
|
||||
if(isidcard(attacking_item) && InsertID(attacking_item))
|
||||
return
|
||||
/obj/item/modular_computer/welder_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(atom_integrity == max_integrity)
|
||||
to_chat(user, span_warning("\The [src] does not require repairs."))
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
|
||||
// Insert a PAI.
|
||||
if(istype(attacking_item, /obj/item/pai_card) && !inserted_pai)
|
||||
if(!user.transferItemToLoc(attacking_item, src))
|
||||
return
|
||||
inserted_pai = attacking_item
|
||||
to_chat(user, span_notice("You slot \the [attacking_item] into [src]."))
|
||||
return
|
||||
if(!tool.tool_start_check(user, amount=1))
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
|
||||
var/obj/item/computer_hardware/hard_drive/hdd = all_components[MC_HDD]
|
||||
to_chat(user, span_notice("You begin repairing damage to \the [src]..."))
|
||||
if(!tool.use_tool(src, user, 20, volume=50, amount=1))
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
atom_integrity = max_integrity
|
||||
to_chat(user, span_notice("You repair \the [src]."))
|
||||
update_appearance()
|
||||
return TOOL_ACT_TOOLTYPE_SUCCESS
|
||||
|
||||
// Scan a photo.
|
||||
if(istype(attacking_item, /obj/item/photo))
|
||||
var/obj/item/photo/pic = attacking_item
|
||||
if(hdd)
|
||||
for(var/datum/computer_file/program/messenger/messenger in hdd.stored_files)
|
||||
saved_image = pic.picture
|
||||
messenger.ProcessPhoto()
|
||||
return
|
||||
|
||||
// Insert items into the components
|
||||
for(var/h in all_components)
|
||||
var/obj/item/computer_hardware/H = all_components[h]
|
||||
if(H.try_insert(attacking_item, user))
|
||||
return
|
||||
|
||||
// Insert items into applications
|
||||
for(var/datum/computer_file/item_holding_app as anything in hdd.stored_files)
|
||||
if(item_holding_app.try_insert(attacking_item, user))
|
||||
return
|
||||
|
||||
// Insert new hardware
|
||||
if(istype(attacking_item, /obj/item/computer_hardware) && upgradable)
|
||||
if(install_component(attacking_item, user))
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
return
|
||||
|
||||
if(attacking_item.tool_behaviour == TOOL_WRENCH)
|
||||
if(length(all_components))
|
||||
balloon_alert(user, "remove the other components!")
|
||||
return
|
||||
attacking_item.play_tool_sound(src, user, 20, volume=20)
|
||||
new /obj/item/stack/sheet/iron( get_turf(src.loc), steel_sheet_cost )
|
||||
user.balloon_alert(user,"disassembled")
|
||||
relay_qdel()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(attacking_item.tool_behaviour == TOOL_WELDER)
|
||||
if(atom_integrity == max_integrity)
|
||||
to_chat(user, span_warning("\The [src] does not require repairs."))
|
||||
return
|
||||
|
||||
if(!attacking_item.tool_start_check(user, amount=1))
|
||||
return
|
||||
|
||||
to_chat(user, span_notice("You begin repairing damage to \the [src]..."))
|
||||
if(attacking_item.use_tool(src, user, 20, volume=50, amount=1))
|
||||
atom_integrity = max_integrity
|
||||
to_chat(user, span_notice("You repair \the [src]."))
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
// Check to see if we have an ID inside, and a valid input for money
|
||||
if(card_slot?.GetID() && iscash(attacking_item))
|
||||
var/obj/item/card/id/id = card_slot.GetID()
|
||||
id.attackby(attacking_item, user) // If we do, try and put that attacking object in
|
||||
return
|
||||
..()
|
||||
|
||||
// Used by processor to relay qdel() to machinery type.
|
||||
/obj/item/modular_computer/proc/relay_qdel()
|
||||
|
||||
@@ -2,20 +2,15 @@
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(new /obj/item/computer_hardware/hard_drive)
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
install_programs()
|
||||
|
||||
|
||||
/obj/item/modular_computer/laptop/preset/proc/install_programs()
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/modular_computer/laptop/preset/civilian
|
||||
desc = "A low-end laptop often used for personal recreation."
|
||||
|
||||
|
||||
/obj/item/modular_computer/laptop/preset/civilian/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
machinery_computer.cpu = null
|
||||
machinery_computer.UnregisterSignal(src, COMSIG_ATOM_UPDATED_ICON)
|
||||
machinery_computer = null
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/processor/New(comp)
|
||||
..()
|
||||
|
||||
@@ -102,16 +102,12 @@
|
||||
/datum/computer_file/program/phys_scanner/chemistry,
|
||||
/datum/computer_file/program/signal_commander,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/heads/quartermaster/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/printer/mini)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/heads/quartermaster
|
||||
name = "quartermaster PDA"
|
||||
greyscale_config = /datum/greyscale_config/tablet/stripe_thick
|
||||
greyscale_colors = "#D6B328#6506CA#927444"
|
||||
inserted_item = /obj/item/pen/survival
|
||||
stored_paper = 20
|
||||
default_applications = list(
|
||||
/datum/computer_file/program/crew_manifest,
|
||||
/datum/computer_file/program/status,
|
||||
@@ -122,10 +118,6 @@
|
||||
/datum/computer_file/program/robocontrol,
|
||||
)
|
||||
|
||||
/obj/item/modular_computer/tablet/pda/heads/quartermaster/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/printer/mini)
|
||||
|
||||
/**
|
||||
* Security
|
||||
*/
|
||||
@@ -257,6 +249,7 @@
|
||||
/obj/item/modular_computer/tablet/pda/cargo
|
||||
name = "cargo technician PDA"
|
||||
greyscale_colors = "#D6B328#6506CA"
|
||||
stored_paper = 20
|
||||
default_applications = list(
|
||||
/datum/computer_file/program/shipping,
|
||||
/datum/computer_file/program/budgetorders,
|
||||
|
||||
@@ -174,8 +174,8 @@
|
||||
has_light = FALSE //tablet light button actually enables/disables the borg lamp
|
||||
comp_light_luminosity = 0
|
||||
has_variants = FALSE
|
||||
///Ref to the silicon we're installed in. Set by the borg during our creation.
|
||||
var/mob/living/silicon/borgo
|
||||
///Ref to the silicon we're installed in. Set by the silicon itself during its creation.
|
||||
var/mob/living/silicon/silicon_owner
|
||||
///Ref to the RoboTact app. Important enough to borgs to deserve a ref.
|
||||
var/datum/computer_file/program/robotact/robotact
|
||||
///IC log that borgs can view in their personal management app
|
||||
@@ -184,21 +184,38 @@
|
||||
/obj/item/modular_computer/tablet/integrated/Initialize(mapload)
|
||||
. = ..()
|
||||
vis_flags |= VIS_INHERIT_ID
|
||||
borgo = loc
|
||||
if(!istype(borgo))
|
||||
borgo = null
|
||||
silicon_owner = loc
|
||||
if(!istype(silicon_owner))
|
||||
silicon_owner = null
|
||||
stack_trace("[type] initialized outside of a borg, deleting.")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/Destroy()
|
||||
borgo = null
|
||||
silicon_owner = null
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/turn_on(mob/user, open_ui = FALSE)
|
||||
if(borgo?.stat != DEAD)
|
||||
if(silicon_owner?.stat != DEAD)
|
||||
return ..()
|
||||
return FALSE
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/get_ntnet_status(specific_action = 0)
|
||||
//No borg found
|
||||
if(!silicon_owner)
|
||||
return FALSE
|
||||
// no AIs/pAIs
|
||||
var/mob/living/silicon/robot/cyborg_check = silicon_owner
|
||||
if(!istype(cyborg_check))
|
||||
return ..()
|
||||
//lockdown restricts borg networking
|
||||
if(cyborg_check.lockcharge)
|
||||
return FALSE
|
||||
//borg cell dying restricts borg networking
|
||||
if(!cyborg_check.cell || cyborg_check.cell.charge == 0)
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Returns a ref to the RoboTact app, creating the app if need be.
|
||||
*
|
||||
@@ -210,44 +227,44 @@
|
||||
* RoboTact is supposed to be undeletable, so these will create runtime messages.
|
||||
*/
|
||||
/obj/item/modular_computer/tablet/integrated/proc/get_robotact()
|
||||
if(!borgo)
|
||||
if(!silicon_owner)
|
||||
return null
|
||||
if(!robotact)
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
robotact = hard_drive.find_file_by_name("robotact")
|
||||
if(!robotact)
|
||||
stack_trace("Cyborg [borgo] ( [borgo.type] ) was somehow missing their self-manage app in their tablet. A new copy has been created.")
|
||||
stack_trace("Cyborg [silicon_owner] ( [silicon_owner.type] ) was somehow missing their self-manage app in their tablet. A new copy has been created.")
|
||||
robotact = new(hard_drive)
|
||||
if(!hard_drive.store_file(robotact))
|
||||
qdel(robotact)
|
||||
robotact = null
|
||||
CRASH("Cyborg [borgo]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.")
|
||||
CRASH("Cyborg [silicon_owner]'s tablet hard drive rejected recieving a new copy of the self-manage app. To fix, check the hard drive's space remaining. Please make a bug report about this.")
|
||||
return robotact
|
||||
|
||||
//Makes the light settings reflect the borg's headlamp settings
|
||||
/obj/item/modular_computer/tablet/integrated/ui_data(mob/user)
|
||||
. = ..()
|
||||
.["has_light"] = TRUE
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
if(iscyborg(silicon_owner))
|
||||
var/mob/living/silicon/robot/robo = silicon_owner
|
||||
.["light_on"] = robo.lamp_enabled
|
||||
.["comp_light_color"] = robo.lamp_color
|
||||
|
||||
//Makes the flashlight button affect the borg rather than the tablet
|
||||
/obj/item/modular_computer/tablet/integrated/toggle_flashlight()
|
||||
if(!borgo || QDELETED(borgo))
|
||||
if(!silicon_owner || QDELETED(silicon_owner))
|
||||
return FALSE
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
if(iscyborg(silicon_owner))
|
||||
var/mob/living/silicon/robot/robo = silicon_owner
|
||||
robo.toggle_headlamp()
|
||||
return TRUE
|
||||
|
||||
//Makes the flashlight color setting affect the borg rather than the tablet
|
||||
/obj/item/modular_computer/tablet/integrated/set_flashlight_color(color)
|
||||
if(!borgo || QDELETED(borgo) || !color)
|
||||
if(!silicon_owner || QDELETED(silicon_owner) || !color)
|
||||
return FALSE
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
if(iscyborg(silicon_owner))
|
||||
var/mob/living/silicon/robot/robo = silicon_owner
|
||||
robo.lamp_color = color
|
||||
robo.toggle_headlamp(FALSE, TRUE)
|
||||
return TRUE
|
||||
@@ -264,8 +281,8 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/integrated/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
if(iscyborg(borgo))
|
||||
var/mob/living/silicon/robot/robo = borgo
|
||||
if(iscyborg(silicon_owner))
|
||||
var/mob/living/silicon/robot/robo = silicon_owner
|
||||
robo.lamp_color = COLOR_RED //Syndicate likes it red
|
||||
|
||||
// Round start tablets
|
||||
@@ -305,7 +322,6 @@
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/hard_drive/small)
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
install_component(new /obj/item/computer_hardware/card_slot)
|
||||
|
||||
if(!isnull(default_applications))
|
||||
|
||||
@@ -3,9 +3,3 @@
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(new /obj/item/computer_hardware/hard_drive/small/nukeops)
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
|
||||
//Borg Built-in tablet
|
||||
/obj/item/modular_computer/tablet/integrated/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/network_card/integrated)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/obj/machinery/modular_computer/console/preset
|
||||
// Can be changed to give devices specific hardware
|
||||
var/_has_second_id_slot = FALSE
|
||||
var/_has_printer = FALSE
|
||||
var/_has_battery = FALSE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/Initialize(mapload)
|
||||
@@ -12,8 +11,6 @@
|
||||
cpu.install_component(new /obj/item/computer_hardware/card_slot)
|
||||
if(_has_second_id_slot)
|
||||
cpu.install_component(new /obj/item/computer_hardware/card_slot/secondary)
|
||||
if(_has_printer)
|
||||
cpu.install_component(new /obj/item/computer_hardware/printer)
|
||||
if(_has_battery)
|
||||
cpu.install_component(new /obj/item/computer_hardware/battery(cpu, /obj/item/stock_parts/cell/computer/super))
|
||||
install_programs()
|
||||
@@ -55,7 +52,6 @@
|
||||
name = "command console"
|
||||
desc = "A stationary computer. This one comes preloaded with command programs."
|
||||
_has_second_id_slot = TRUE
|
||||
_has_printer = TRUE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/command/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
@@ -69,7 +65,6 @@
|
||||
name = "identification console"
|
||||
desc = "A stationary computer. This one comes preloaded with identification modification programs."
|
||||
_has_second_id_slot = TRUE
|
||||
_has_printer = TRUE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/id/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
@@ -106,7 +101,6 @@
|
||||
console_department = "Civilian"
|
||||
name = "curator console"
|
||||
desc = "A stationary computer. This one comes preloaded with art programs."
|
||||
_has_printer = TRUE
|
||||
|
||||
/obj/machinery/modular_computer/console/preset/curator/install_programs()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
. = ..()
|
||||
// User-built consoles start as empty frames.
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
var/obj/item/computer_hardware/hard_drive/network_card = cpu.all_components[MC_NET]
|
||||
qdel(hard_drive)
|
||||
qdel(network_card)
|
||||
|
||||
/obj/machinery/modular_computer/console/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -32,21 +30,8 @@
|
||||
if(battery_module)
|
||||
qdel(battery_module)
|
||||
|
||||
var/obj/item/computer_hardware/network_card/wired/network_card = new()
|
||||
|
||||
cpu.install_component(network_card)
|
||||
cpu.install_component(new /obj/item/computer_hardware/hard_drive/super) // Consoles generally have better HDDs due to lower space limitations
|
||||
|
||||
var/area/A = get_area(src)
|
||||
// Attempts to set this console's tag according to our area. Since some areas have stuff like "XX - YY" in their names we try to remove that too.
|
||||
if(A && console_department)
|
||||
network_card.identification_string = replacetext(replacetext(replacetext("[A.name] [console_department] Console", " ", "_"), "-", ""), "__", "_") // Replace spaces with "_"
|
||||
else if(A)
|
||||
network_card.identification_string = replacetext(replacetext(replacetext("[A.name] Console", " ", "_"), "-", ""), "__", "_")
|
||||
else if(console_department)
|
||||
network_card.identification_string = replacetext(replacetext(replacetext("[console_department] Console", " ", "_"), "-", ""), "__", "_")
|
||||
else
|
||||
network_card.identification_string = "Unknown Console"
|
||||
if(cpu)
|
||||
cpu.screen_on = 1
|
||||
cpu.screen_on = TRUE
|
||||
update_appearance()
|
||||
|
||||
Reference in New Issue
Block a user