diff --git a/baystation12.dme b/baystation12.dme index 295f8b8e9c6..2b8a08d419a 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1323,6 +1323,7 @@ #include "code\modules\mob\new_player\skill.dm" #include "code\modules\mob\new_player\sprite_accessories.dm" #include "code\modules\modular_computers\computers\modular_computer.dm" +#include "code\modules\modular_computers\computers\modular_console.dm" #include "code\modules\modular_computers\file_system\computer_file.dm" #include "code\modules\modular_computers\file_system\data.dm" #include "code\modules\modular_computers\file_system\program.dm" diff --git a/code/modules/modular_computers/computers/modular_computer.dm b/code/modules/modular_computers/computers/modular_computer.dm index a74e8a75b2a..d50b0934032 100644 --- a/code/modules/modular_computers/computers/modular_computer.dm +++ b/code/modules/modular_computers/computers/modular_computer.dm @@ -54,10 +54,12 @@ /obj/machinery/modular_computer/ name = "laptop computer" desc = "A portable computer." + var/open = 1 // Whether the laptop is open. var/enabled = 1 // Whether the laptop is turned on. var/datum/computer_file/program/active_program = null // A currently active program running on the computer. var/obj/item/laptop/portable = null // Portable version of this computer, dropped on alt-click to allow transport. Used by laptops. + var/battery_powered = 1 // Whether computer shuold be battery powered. use_power = 0 icon = 'icons/obj/computer3.dmi' @@ -254,9 +256,11 @@ else data["PC_batteryicon"] = "batt_5.gif" data["PC_batterypercent"] = "[round(battery.percent())] %" + data["PC_showbatteryicon"] = 1 else // Computer without battery shouldn't work at all, but in case we implement computers without batteries in future that run solely on APC network, it's here. data["PC_batteryicon"] = "batt_5.gif" data["PC_batterypercent"] = "N/C" + data["PC_showbatteryicon"] = battery_powered switch(get_ntnet_status()) if(0) diff --git a/code/modules/modular_computers/computers/modular_console.dm b/code/modules/modular_computers/computers/modular_console.dm new file mode 100644 index 00000000000..a19ba7a55ee --- /dev/null +++ b/code/modules/modular_computers/computers/modular_console.dm @@ -0,0 +1,28 @@ +// Console itself +/obj/machinery/modular_computer/console/ + name = "console" + desc = "A stationary computer." + enabled = 1 + icon = 'icons/obj/computer3.dmi' + icon_state = "console" + icon_state_unpowered = "console" + icon_state_menu = "menu" + battery_powered = 0 + anchored = 1 + density = 1 + +/obj/machinery/modular_computer/console/New() + ..() + battery = null + tesla_link.enabled = 1 + +/obj/machinery/modular_computer/console/update_icon() + icon_state = icon_state_unpowered + + overlays.Cut() + if(!enabled) + return + if(active_program) + overlays.Add(active_program.laptop_icon_state ? active_program.laptop_icon_state : icon_state_menu) + else + overlays.Add(icon_state_menu) \ No newline at end of file diff --git a/icons/obj/computer3.dmi b/icons/obj/computer3.dmi index d4408f5037c..8a902c09d68 100644 Binary files a/icons/obj/computer3.dmi and b/icons/obj/computer3.dmi differ diff --git a/nano/templates/layout_default.tmpl b/nano/templates/layout_default.tmpl index 97550c0ba00..c7f2bbc01a4 100644 --- a/nano/templates/layout_default.tmpl +++ b/nano/templates/layout_default.tmpl @@ -2,10 +2,10 @@
| {{:data.PC_batterypercent}} {{/if}} {{if data.PC_ntneticon}} |