mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Adds Syndicate tablets, replaces the pinpointer used by Nuke Ops (#51386)
* Synux * cleanup * I bet this merge conflicts we hate tgui.bundle * extra bits * Syndix * small fixes * Summary (required) * this linter drives me up the wall * final touchups * Forgot this thing
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
var/enabled = 0 // Whether the computer is turned on.
|
||||
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
|
||||
var/last_power_usage = 0
|
||||
@@ -194,13 +195,22 @@
|
||||
turn_on(user)
|
||||
|
||||
/obj/item/modular_computer/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>\The [src] was already emagged.</span>")
|
||||
return 0
|
||||
else
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='notice'>You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.</span>")
|
||||
return 1
|
||||
if(!enabled)
|
||||
to_chat(user, "<span class='warning'>You'd need to turn the [src] on first.</span>")
|
||||
return FALSE
|
||||
obj_flags |= EMAGGED //Mostly for consistancy purposes; the programs will do their own emag handling
|
||||
var/newemag = FALSE
|
||||
var/obj/item/computer_hardware/hard_drive/drive = all_components[MC_HDD]
|
||||
for(var/datum/computer_file/program/app in drive.stored_files)
|
||||
if(!istype(app))
|
||||
continue
|
||||
if(app.run_emag())
|
||||
newemag = TRUE
|
||||
if(newemag)
|
||||
to_chat(user, "<span class='notice'>You swipe \the [src]. A console window momentarily fills the screen, with white text rapidly scrolling past.</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You swipe \the [src]. A console window fills the screen, but it quickly closes itself after only a few lines are written to it.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/modular_computer/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -307,6 +317,8 @@
|
||||
/obj/item/modular_computer/proc/get_header_data()
|
||||
var/list/data = list()
|
||||
|
||||
data["PC_device_theme"] = device_theme
|
||||
|
||||
var/obj/item/computer_hardware/battery/battery_module = all_components[MC_CELL]
|
||||
var/obj/item/computer_hardware/recharger/recharger = all_components[MC_CHARGE]
|
||||
|
||||
|
||||
@@ -39,13 +39,20 @@
|
||||
assets.send(user)
|
||||
assets = get_asset_datum(/datum/asset/simple/arcade)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "NtosMain", "NtOS Main menu", 400, 500, master_ui, state)
|
||||
var/headername
|
||||
switch(device_theme)
|
||||
if("ntos")
|
||||
headername = "NtOS Main Menu"
|
||||
if("syndicate")
|
||||
headername = "Syndix Main Menu"
|
||||
ui = new(user, src, ui_key, "NtosMain", headername, 400, 500, master_ui, state)
|
||||
ui.open()
|
||||
ui.set_autoupdate(state = 1)
|
||||
|
||||
|
||||
/obj/item/modular_computer/ui_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
data["device_theme"] = device_theme
|
||||
data["programs"] = list()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = all_components[MC_HDD]
|
||||
for(var/datum/computer_file/program/P in hard_drive.stored_files)
|
||||
|
||||
@@ -33,3 +33,17 @@
|
||||
slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT
|
||||
comp_light_luminosity = 6.3
|
||||
has_variants = FALSE
|
||||
|
||||
/// Given to Nuke Ops members.
|
||||
/obj/item/modular_computer/tablet/nukeops
|
||||
icon_state = "tablet-syndicate"
|
||||
comp_light_luminosity = 6.3
|
||||
has_variants = FALSE
|
||||
device_theme = "syndicate"
|
||||
|
||||
/obj/item/modular_computer/tablet/nukeops/emag_act(mob/user)
|
||||
if(!enabled)
|
||||
to_chat(user, "<span class='warning'>You'd need to turn the [src] on first.</span>")
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You swipe \the [src]. It's screen briefly shows a message reading \"MEMORY CODE INJECTION DETECTED AND SUCCESSFULLY QUARANTINED\".</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -46,3 +46,11 @@
|
||||
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/printer/mini)
|
||||
|
||||
/// Given to Nuke Ops members.
|
||||
/obj/item/modular_computer/tablet/nukeops/Initialize()
|
||||
. = ..()
|
||||
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)
|
||||
|
||||
@@ -48,7 +48,10 @@
|
||||
cpu.attack_ghost(user)
|
||||
|
||||
/obj/machinery/modular_computer/emag_act(mob/user)
|
||||
return cpu ? cpu.emag_act(user) : 1
|
||||
if(!cpu)
|
||||
to_chat(user, "<span class='warning'>You'd need to turn the [src] on first.</span>")
|
||||
return FALSE
|
||||
return (cpu.emag_act(user))
|
||||
|
||||
/obj/machinery/modular_computer/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
Reference in New Issue
Block a user