mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Removes CPU, Sensors and Identify ModPC parts. (#66924)
Removes CPU, Sensors and Identify parts from modulra computers. This is in effort to simplify how tablets and tablet apps are, while removing barriers to download specific apps. Limiting apps needed for your job, through hardware, is a terrible idea, and just limits departmental stuff to being there roundstart/latejoin, punishing people who job change through the in-game HoP system, devaluing the job as a whole.
This commit is contained in:
@@ -45,6 +45,9 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
var/max_hardware_size = 0 // Maximal hardware w_class. Tablets/PDAs have 1, laptops 2, consoles 4.
|
||||
var/steel_sheet_cost = 5 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
|
||||
|
||||
/// Amount of programs that can be ran at once
|
||||
var/max_idle_programs = 2
|
||||
|
||||
/// List of "connection ports" in this computer and the components with which they are plugged
|
||||
var/list/all_components = list()
|
||||
/// Lazy List of extra hardware slots that can be used modularly.
|
||||
@@ -69,14 +72,14 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
var/datum/picture/saved_image // the saved image used for messaging purpose like come on dude
|
||||
|
||||
var/obj/item/paicard/pai = null
|
||||
/// Stored pAI in the computer
|
||||
var/obj/item/paicard/inserted_pai = null
|
||||
|
||||
var/datum/action/item_action/toggle_computer_light/light_butt
|
||||
|
||||
/obj/item/modular_computer/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
var/obj/item/computer_hardware/identifier/id = all_components[MC_IDENTIFY]
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(!physical)
|
||||
physical = src
|
||||
@@ -84,8 +87,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
idle_threads = list()
|
||||
if(looping_sound)
|
||||
soundloop = new(src, enabled)
|
||||
if(id)
|
||||
id.UpdateDisplay()
|
||||
UpdateDisplay()
|
||||
if(has_light)
|
||||
light_butt = new(src)
|
||||
update_appearance()
|
||||
@@ -106,8 +108,8 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
QDEL_NULL(soundloop)
|
||||
Remove_Messenger()
|
||||
|
||||
if(istype(pai))
|
||||
QDEL_NULL(pai)
|
||||
if(istype(inserted_pai))
|
||||
QDEL_NULL(inserted_pai)
|
||||
if(istype(light_butt))
|
||||
QDEL_NULL(light_butt)
|
||||
|
||||
@@ -361,7 +363,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
if(recharger)
|
||||
recharger.enabled = 1
|
||||
|
||||
if(all_components[MC_CPU] && use_power()) // use_power() checks if the PC is powered
|
||||
if(use_power()) // use_power() checks if the PC is powered
|
||||
if(issynth)
|
||||
to_chat(user, span_notice("You send an activation signal to \the [src], turning it on."))
|
||||
else
|
||||
@@ -585,6 +587,9 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
/obj/item/modular_computer/proc/UpdateDisplay()
|
||||
name = "[saved_identification] ([saved_job])"
|
||||
|
||||
/obj/item/modular_computer/screwdriver_act(mob/user, obj/item/tool)
|
||||
if(!deconstructable)
|
||||
return
|
||||
@@ -620,11 +625,11 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
return
|
||||
|
||||
// Insert a PAI.
|
||||
if(istype(W, /obj/item/paicard) && !pai)
|
||||
if(istype(W, /obj/item/paicard) && !inserted_pai)
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
pai = W
|
||||
pai.slotted = TRUE
|
||||
inserted_pai = W
|
||||
inserted_pai.slotted = TRUE
|
||||
to_chat(user, span_notice("You slot \the [W] into [src]."))
|
||||
return
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
data["has_light"] = has_light
|
||||
data["light_on"] = light_on
|
||||
data["comp_light_color"] = comp_light_color
|
||||
data["pai"] = pai
|
||||
data["pai"] = inserted_pai
|
||||
return data
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return TRUE
|
||||
if("PC_minimize")
|
||||
var/mob/user = usr
|
||||
if(!active_program || !all_components[MC_CPU])
|
||||
if(!active_program)
|
||||
return
|
||||
|
||||
idle_threads.Add(active_program)
|
||||
@@ -179,9 +179,7 @@
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
var/obj/item/computer_hardware/processor_unit/PU = all_components[MC_CPU]
|
||||
|
||||
if(idle_threads.len > PU.max_idle_programs)
|
||||
if(idle_threads.len > max_idle_programs)
|
||||
to_chat(user, span_danger("\The [src] displays a \"Maximal CPU load reached. Unable to run another program.\" error."))
|
||||
return
|
||||
|
||||
@@ -240,26 +238,24 @@
|
||||
playsound(src, 'sound/machines/card_slide.ogg', 50)
|
||||
if("PC_Imprint_ID")
|
||||
var/obj/item/computer_hardware/card_slot/cardholder = all_components[MC_CARD]
|
||||
var/obj/item/computer_hardware/identifier/id_hardware = all_components[MC_IDENTIFY]
|
||||
if(!cardholder)
|
||||
return
|
||||
|
||||
saved_identification = cardholder.current_identification
|
||||
saved_job = cardholder.current_job
|
||||
|
||||
if(id_hardware)
|
||||
id_hardware.UpdateDisplay()
|
||||
UpdateDisplay()
|
||||
|
||||
playsound(src, 'sound/machines/terminal_processing.ogg', 15, TRUE)
|
||||
if("PC_Pai_Interact")
|
||||
switch(params["option"])
|
||||
if("eject")
|
||||
usr.put_in_hands(pai)
|
||||
pai.slotted = FALSE
|
||||
pai = null
|
||||
to_chat(usr, span_notice("You remove the pAI from the [name]."))
|
||||
usr.put_in_hands(inserted_pai)
|
||||
to_chat(usr, span_notice("You remove [inserted_pai] from the [name]."))
|
||||
inserted_pai.slotted = FALSE
|
||||
inserted_pai = null
|
||||
if("interact")
|
||||
pai.attack_self(usr)
|
||||
inserted_pai.attack_self(usr)
|
||||
return UI_UPDATE
|
||||
else
|
||||
return
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
hardware_flag = PROGRAM_LAPTOP
|
||||
max_hardware_size = 2
|
||||
max_idle_programs = 3
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_bays = 4
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj/item/modular_computer/laptop/preset/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
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)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
hardware_flag = machinery_computer.hardware_flag
|
||||
max_hardware_size = machinery_computer.max_hardware_size
|
||||
steel_sheet_cost = machinery_computer.steel_sheet_cost
|
||||
max_idle_programs = machinery_computer.max_idle_programs
|
||||
update_integrity(machinery_computer.get_integrity())
|
||||
max_integrity = machinery_computer.max_integrity
|
||||
integrity_failure = machinery_computer.integrity_failure
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
worn_icon_state = "tablet"
|
||||
hardware_flag = PROGRAM_TABLET
|
||||
max_hardware_size = 1
|
||||
max_idle_programs = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
max_bays = 3
|
||||
steel_sheet_cost = 2
|
||||
@@ -312,12 +313,9 @@
|
||||
/obj/item/modular_computer/tablet/pda/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/hard_drive/small)
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/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)
|
||||
install_component(new /obj/item/computer_hardware/identifier)
|
||||
install_component(new /obj/item/computer_hardware/sensorpackage)
|
||||
|
||||
if(!isnull(default_applications))
|
||||
var/obj/item/computer_hardware/hard_drive/small/hard_drive = find_hardware_by_name("solid state drive")
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
/obj/item/modular_computer/tablet/preset/cheap/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer/micro))
|
||||
install_component(new /obj/item/computer_hardware/hard_drive/small)
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
@@ -13,7 +12,6 @@
|
||||
// Alternative version, an average one, for higher ranked positions mostly
|
||||
/obj/item/modular_computer/tablet/preset/advanced/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
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)
|
||||
install_component(new /obj/item/computer_hardware/network_card)
|
||||
@@ -23,7 +21,6 @@
|
||||
/obj/item/modular_computer/tablet/preset/science/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/small/hard_drive = new
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(hard_drive)
|
||||
install_component(new /obj/item/computer_hardware/card_slot)
|
||||
@@ -33,7 +30,6 @@
|
||||
/obj/item/modular_computer/tablet/preset/cargo/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/small/hard_drive = new
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
install_component(new /obj/item/computer_hardware/battery(src, /obj/item/stock_parts/cell/computer))
|
||||
install_component(hard_drive)
|
||||
install_component(new /obj/item/computer_hardware/card_slot)
|
||||
@@ -54,7 +50,6 @@
|
||||
/obj/item/modular_computer/tablet/preset/advanced/atmos/Initialize(mapload) //This will be defunct and will be replaced when NtOS PDAs are done
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/small/hard_drive = find_hardware_by_name("solid state drive")
|
||||
install_component(new /obj/item/computer_hardware/sensorpackage)
|
||||
hard_drive.store_file(new /datum/computer_file/program/alarm_monitor)
|
||||
hard_drive.store_file(new /datum/computer_file/program/atmosscan)
|
||||
|
||||
@@ -83,7 +78,6 @@
|
||||
/obj/item/modular_computer/tablet/preset/advanced/command/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/computer_hardware/hard_drive/small/hard_drive = find_hardware_by_name("solid state drive")
|
||||
install_component(new /obj/item/computer_hardware/sensorpackage)
|
||||
install_component(new /obj/item/computer_hardware/card_slot/secondary)
|
||||
hard_drive.store_file(new /datum/computer_file/program/budgetorders)
|
||||
hard_drive.store_file(new /datum/computer_file/program/science)
|
||||
@@ -97,7 +91,6 @@
|
||||
/// Given to Nuke Ops members.
|
||||
/obj/item/modular_computer/tablet/nukeops/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
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)
|
||||
@@ -105,6 +98,5 @@
|
||||
//Borg Built-in tablet
|
||||
/obj/item/modular_computer/tablet/integrated/Initialize(mapload)
|
||||
. = ..()
|
||||
install_component(new /obj/item/computer_hardware/processor_unit/small)
|
||||
install_component(new /obj/item/computer_hardware/recharger/cyborg)
|
||||
install_component(new /obj/item/computer_hardware/network_card/integrated)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
. = ..()
|
||||
if(!cpu)
|
||||
return
|
||||
cpu.install_component(new /obj/item/computer_hardware/processor_unit)
|
||||
|
||||
cpu.install_component(new /obj/item/computer_hardware/card_slot)
|
||||
if(_has_second_id_slot)
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
var/hardware_flag = 0
|
||||
///Power usage during last tick
|
||||
var/last_power_usage = 0
|
||||
/// Amount of programs that can be ran at once
|
||||
var/max_idle_programs = 4
|
||||
|
||||
|
||||
///Icon state when the computer is turned off.
|
||||
@@ -124,7 +126,7 @@
|
||||
|
||||
// Modular computers can have battery in them, we handle power in previous proc, so prevent this from messing it up for us.
|
||||
/obj/machinery/modular_computer/power_change()
|
||||
if(cpu?.use_power()) // If MC_CPU still has a power source, PC wouldn't go offline.
|
||||
if(cpu?.use_power()) // If it still has a power source, PC wouldn't go offline.
|
||||
set_machine_stat(machine_stat & ~NOPOWER)
|
||||
update_appearance()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user