Computer manager and more (#1406)

The downloader and the file manager no longer come default on any device.
A client enrollment app comes now with every console
The user has to select weather the device is a private or company device and select a software preset if its a work console
Work devices are locked down to a specific set of programs
Private devices get the downloader and the file manager to install programs as usual.
Threw out the backup of the old-old camera monitor.
Made software presets a generic thing that are not dependant on the form factor of a device.
Ported holowarrants from bay
Ported wall mounted consoles from bay
Ported various computer fixes from bay
Vending machines spawn now with the holowarrant "client"
Mapping changes:

CE and HoS dont get a modular computer with command preset (they did not have that before bay merge, so why should they now)
Added a modular computer with command preset to the head of staff briefing room
Replaced the camera monitoring console in the Engine Control room with a modular computer
Replaced the cam monitor in the CE´s office with a wall mounted console
Switched places of the bar sink and console
Replaced the consoles with obj/item consoles
Mapped in the ERT and Merc Console (Merc Shuttle, ERT Area)
Fixed the "border" at the heisters base
Also waiting for CCIA on a design for the warrants.
But that can be changed with a follow up pull
This commit is contained in:
Werner
2017-01-20 21:45:53 +02:00
committed by skull132
parent 58dc6dde9e
commit 9d134d8e15
56 changed files with 2095 additions and 1727 deletions
@@ -15,7 +15,7 @@
desc = "An advanced power cell, often used in most laptops. It is too large to be fitted into smaller devices. It's rating is 1100."
icon_state = "battery_advanced"
origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2)
hardware_size = 2
hardware_size = 3
battery_rating = 1100
/obj/item/weapon/computer_hardware/battery_module/super
@@ -23,7 +23,7 @@
desc = "A very advanced power cell, often used in high-end devices, or as uninterruptable power supply for important consoles or servers. It's rating is 1500."
icon_state = "battery_super"
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
hardware_size = 2
hardware_size = 3
battery_rating = 1500
/obj/item/weapon/computer_hardware/battery_module/ultra
@@ -71,4 +71,4 @@
/obj/item/weapon/computer_hardware/battery_module/proc/charge_to_full()
if(battery)
battery.charge = battery.maxcharge
battery.charge = battery.maxcharge
@@ -3,7 +3,7 @@
desc = "A small power efficient solid state drive, with 128GQ of storage capacity for use in basic computers where power efficiency is desired."
power_usage = 25 // SSD or something with low power usage
icon_state = "hdd_normal"
hardware_size = 1
hardware_size = 2
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
var/max_capacity = 128
var/used_capacity = 0
@@ -17,7 +17,7 @@
origin_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
power_usage = 50 // Hybrid, medium capacity and medium power storage
icon_state = "hdd_advanced"
hardware_size = 2
hardware_size = 3
/obj/item/weapon/computer_hardware/hard_drive/super
name = "super hard drive"
@@ -26,7 +26,7 @@
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
power_usage = 100 // High-capacity but uses lots of power, shortening battery life. Best used with APC link.
icon_state = "hdd_super"
hardware_size = 2
hardware_size = 3
/obj/item/weapon/computer_hardware/hard_drive/cluster
name = "cluster hard drive"
@@ -88,8 +88,7 @@
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/weapon/computer_hardware/hard_drive/proc/install_default_programs()
store_file(new/datum/computer_file/program/computerconfig(src)) // Computer configuration utility, allows hardware control and displays more info than status bar
store_file(new/datum/computer_file/program/ntnetdownload(src)) // NTNet Downloader Utility, allows users to download more software from NTNet repository
store_file(new/datum/computer_file/program/filemanager(src)) // File manager, allows text editor functions and basic file manipulation.
store_file(new/datum/computer_file/program/clientmanager(src)) // Client Manager to Enroll the Device
// Use this proc to remove file from the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
@@ -16,27 +16,27 @@
/obj/item/weapon/computer_hardware/attackby(var/obj/item/W as obj, var/mob/living/user as mob)
// Multitool. Runs diagnostics
if(istype(W, /obj/item/device/multitool))
user << "***** DIAGNOSTICS REPORT *****"
to_chat(user, "***** DIAGNOSTICS REPORT *****")
diagnostics(user)
user << "******************************"
to_chat(user, "******************************")
return 1
// Nanopaste. Repair all damage if present for a single unit.
var/obj/item/stack/S = W
if(istype(S, /obj/item/stack/nanopaste))
if(!damage)
user << "\The [src] doesn't seem to require repairs."
to_chat(user, "\The [src] doesn't seem to require repairs.")
return 1
if(S.use(1))
user << "You apply a bit of \the [W] to \the [src]. It immediately repairs all damage."
to_chat(user, "You apply a bit of \the [W] to \the [src]. It immediately repairs all damage.")
damage = 0
return 1
// Cable coil. Works as repair method, but will probably require multiple applications and more cable.
if(istype(S, /obj/item/stack/cable_coil))
if(!damage)
user << "\The [src] doesn't seem to require repairs."
to_chat(user, "\The [src] doesn't seem to require repairs.")
return 1
if(S.use(1))
user << "You patch up \the [src] with a bit of \the [W]."
to_chat(user, "You patch up \the [src] with a bit of \the [W].")
take_damage(-10)
return 1
return ..()
@@ -44,15 +44,10 @@
// Called on multitool click, prints diagnostic information to the user.
/obj/item/weapon/computer_hardware/proc/diagnostics(var/mob/user)
user << "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]"
to_chat(user, "Hardware Integrity Test... (Corruption: [damage]/[max_damage]) [damage > damage_failure ? "FAIL" : damage > damage_malfunction ? "WARN" : "PASS"]")
/obj/item/weapon/computer_hardware/New(var/obj/L)
w_class = hardware_size
if(istype(L, /obj/machinery/modular_computer))
var/obj/machinery/modular_computer/C = L
if(C.cpu)
holder2 = C.cpu
return
if(istype(L, /obj/item/modular_computer))
holder2 = L
return
@@ -63,6 +58,9 @@
// Handles damage checks
/obj/item/weapon/computer_hardware/proc/check_functionality()
// Turned off
if(!enabled)
return 0
// Too damaged to work at all.
if(damage > damage_failure)
return 0
@@ -76,11 +74,11 @@
/obj/item/weapon/computer_hardware/examine(var/mob/user)
. = ..()
if(damage > damage_failure)
user << "<span class='danger'>It seems to be severely damaged!</span>"
to_chat(user, "<span class='danger'>It seems to be severely damaged!</span>")
else if(damage > damage_malfunction)
user << "<span class='notice'>It seems to be damaged!</span>"
to_chat(user, "<span class='notice'>It seems to be damaged!</span>")
else if(damage)
user << "It seems to be slightly damaged."
to_chat(user, "It seems to be slightly damaged.")
// Damages the component. Contains necessary checks. Negative damage "heals" the component.
/obj/item/weapon/computer_hardware/proc/take_damage(var/amount)
@@ -35,16 +35,16 @@ var/global/ntnet_card_uid = 1
desc = "An advanced network card for usage with standard NTNet frequencies. It's transmitter is strong enough to connect even off-station."
long_range = 1
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 2)
power_usage = 100 // Better range but higher power usage.
power_usage = 150 // Better range but higher power usage.
icon_state = "netcard_advanced"
hardware_size = 1
hardware_size = 2
/obj/item/weapon/computer_hardware/network_card/wired
name = "wired NTNet network card"
desc = "An advanced network card for usage with standard NTNet frequencies. This one also supports wired connection."
ethernet = 1
origin_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 3)
power_usage = 100 // Better range but higher power usage.
power_usage = 150 // Better range but higher power usage.
icon_state = "netcard_ethernet"
hardware_size = 3
@@ -92,4 +92,4 @@ var/global/ntnet_card_uid = 1
/obj/item/weapon/computer_hardware/network_card/Destroy()
if(holder2 && (holder2.network_card == src))
holder2.network_card = null
..()
..()
@@ -6,7 +6,7 @@
desc = "A standard CPU used in most computers. It can run up to three programs simultaneously."
icon_state = "cpu_normal"
hardware_size = 2
power_usage = 50
power_usage = 75
critical = 1
malfunction_probability = 1
origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2)
@@ -36,6 +36,6 @@
desc = "An advanced miniaturised CPU for use in portable devices. It uses photonic core instead of regular circuitry. It can run up to three programs simultaneously."
icon_state = "cpu_small_photonic"
hardware_size = 1
power_usage = 75
power_usage = 100
max_idle_programs = 2
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3)
origin_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3)
@@ -4,17 +4,12 @@
critical = 0
enabled = 1
icon_state = "teslalink"
hardware_size = 2 // Can't be installed into tablets
hardware_size = 2
origin_tech = list(TECH_DATA = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
var/obj/machinery/modular_computer/holder
/obj/item/weapon/computer_hardware/tesla_link/New(var/obj/L)
if(istype(L, /obj/machinery/modular_computer))
holder = L
return
..(L)
var/passive_charging_rate = 250 // W
/obj/item/weapon/computer_hardware/tesla_link/Destroy()
if(holder && (holder.tesla_link == src))
holder.tesla_link = null
..()
if(holder2 && (holder2.tesla_link == src))
holder2.tesla_link = null
..()