mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-12 02:32:10 +00:00
removes materials list from items, uses custom_materials instead. This might introduce some bugs so we should testmerge this for a while (and Ill test stuff locally as much as I can) this also adds material crafting to sheets. Test case being chairs. In the future we can add stuff like tables, walls, doors etc. also applies materials to everything, with fixes, which can close #46299
56 lines
2.3 KiB
Plaintext
56 lines
2.3 KiB
Plaintext
/obj/machinery/modular_computer/console
|
|
name = "console"
|
|
desc = "A stationary computer."
|
|
|
|
icon = 'icons/obj/modular_console.dmi'
|
|
icon_state = "console"
|
|
icon_state_powered = "console"
|
|
icon_state_unpowered = "console-off"
|
|
screen_icon_state_menu = "menu"
|
|
hardware_flag = PROGRAM_CONSOLE
|
|
density = TRUE
|
|
base_idle_power_usage = 100
|
|
base_active_power_usage = 500
|
|
max_hardware_size = 4
|
|
steel_sheet_cost = 10
|
|
light_strength = 2
|
|
max_integrity = 300
|
|
integrity_failure = 0.5
|
|
var/console_department = "" // Used in New() to set network tag according to our area.
|
|
|
|
/obj/machinery/modular_computer/console/buildable/Initialize()
|
|
. = ..()
|
|
// 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]
|
|
var/obj/item/computer_hardware/hard_drive/recharger = cpu.all_components[MC_CHARGE]
|
|
qdel(recharger)
|
|
qdel(network_card)
|
|
qdel(hard_drive)
|
|
|
|
/obj/machinery/modular_computer/console/Initialize()
|
|
. = ..()
|
|
var/obj/item/computer_hardware/battery/battery_module = cpu.all_components[MC_CELL]
|
|
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/recharger/APC)
|
|
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
|
|
update_icon()
|