mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Assorted bugfixes and tweaks + changelog
- Adds codersprites for tablet programs that are currently required. - Adds computer icons to some programs that missed them. - Temporarily removes separate keyboard icon states for consoles. They may be reimplemented in the future in a bit better way. - Rebalanced sizes of programs a bit - File manager is no longer downloadable, as it is part of each hard drive's ROM. - Fixed runtime error when vending a laptop - Adjusted some code segments as per Techhead's suggestions on github - Adds changelog.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// Modular microcomputer, currently only for tablets.
|
||||
// This is mostly modified copypaste of modular_computer.dm. It is necessary as
|
||||
// modular_computer MUST stay as machinery subtype, while this must be an item subtype
|
||||
// as it's portable.
|
||||
// This is the base type that does all the hardware stuff.
|
||||
// Other types expand it - tablets use a direct subtypes, and
|
||||
// consoles and laptops use "procssor" item that is held inside machinery piece
|
||||
/obj/item/modular_computer
|
||||
name = "Modular Microcomputer"
|
||||
desc = "A small portable microcomputer"
|
||||
@@ -77,16 +76,8 @@
|
||||
/obj/item/modular_computer/Destroy()
|
||||
kill_program(1)
|
||||
processing_objects.Remove(src)
|
||||
if(network_card)
|
||||
qdel(network_card)
|
||||
if(hard_drive)
|
||||
qdel(hard_drive)
|
||||
if(battery_module)
|
||||
qdel(battery_module)
|
||||
if(nano_printer)
|
||||
qdel(nano_printer)
|
||||
if(card_slot)
|
||||
qdel(card_slot)
|
||||
for(var/obj/item/weapon/computer_hardware/CH in src.get_all_components())
|
||||
qdel(CH)
|
||||
..()
|
||||
|
||||
/obj/item/modular_computer/update_icon()
|
||||
@@ -345,6 +336,9 @@
|
||||
return
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), steel_sheet_cost )
|
||||
src.visible_message("\The [src] has been disassembled by [user].")
|
||||
relay_qdel()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
var/list/all_components = get_all_components()
|
||||
@@ -374,6 +368,10 @@
|
||||
|
||||
..()
|
||||
|
||||
// Used by processor to relay qdel() to machinery type.
|
||||
/obj/item/modular_computer/proc/relay_qdel()
|
||||
return
|
||||
|
||||
// Attempts to install the hardware into apropriate slot.
|
||||
/obj/item/modular_computer/proc/try_install_component(var/mob/living/user, var/obj/item/weapon/computer_hardware/H, var/found = 0)
|
||||
// "USB" flash drive.
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
max_hardware_size = machinery_computer.max_hardware_size
|
||||
steel_sheet_cost = machinery_computer.steel_sheet_cost
|
||||
|
||||
/obj/item/modular_computer/processor/relay_qdel()
|
||||
qdel(machinery_computer)
|
||||
|
||||
/obj/item/modular_computer/processor/find_hardware_by_name(var/N)
|
||||
var/obj/item/weapon/computer_hardware/H = machinery_computer.find_hardware_by_name(N)
|
||||
if(H)
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
icon_state = null
|
||||
var/icon_state_unpowered = null // Icon state when the computer is turned off
|
||||
var/screen_icon_state_menu = "menu" // Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
|
||||
var/keyboard_icon_state_menu = "keyboard1" // Keyboard's icon state overlay when the computer is turned on and no program is loaded
|
||||
var/nokeyboard = 0 // Set to 1 to disable keyboard icons for this subtype.
|
||||
var/max_hardware_size = 0 // Maximal hardware size. Currently, tablets have 1, laptops 2 and consoles 3. Limits what hardware types can be installed.
|
||||
var/steel_sheet_cost = 10 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
|
||||
|
||||
@@ -37,12 +35,8 @@
|
||||
return
|
||||
if(cpu.active_program)
|
||||
overlays.Add(cpu.active_program.program_icon_state ? cpu.active_program.program_icon_state : screen_icon_state_menu)
|
||||
if(!nokeyboard)
|
||||
overlays.Add(cpu.active_program.keyboard_icon_state ? cpu.active_program.keyboard_icon_state : keyboard_icon_state_menu)
|
||||
else
|
||||
overlays.Add(screen_icon_state_menu)
|
||||
if(!nokeyboard)
|
||||
overlays.Add(keyboard_icon_state_menu)
|
||||
|
||||
// Eject ID card from computer, if it has ID slot with card inside.
|
||||
/obj/machinery/modular_computer/verb/eject_id()
|
||||
@@ -103,17 +97,9 @@
|
||||
battery_powered = 0
|
||||
|
||||
var/power_usage = cpu.screen_on ? base_active_power_usage : base_idle_power_usage
|
||||
if(cpu.network_card && cpu.network_card.enabled)
|
||||
power_usage += cpu.network_card.power_usage
|
||||
|
||||
if(cpu.hard_drive && cpu.hard_drive.enabled)
|
||||
power_usage += cpu.hard_drive.power_usage
|
||||
|
||||
if(cpu.nano_printer && cpu.nano_printer.enabled)
|
||||
power_usage += cpu.nano_printer.power_usage
|
||||
|
||||
if(cpu.card_slot && cpu.card_slot.enabled)
|
||||
power_usage += cpu.card_slot.power_usage
|
||||
for(var/obj/item/weapon/computer_hardware/CH in src.cpu.get_all_components())
|
||||
if(CH.enabled)
|
||||
power_usage += CH.power_usage
|
||||
|
||||
// Wireless APC connection exists.
|
||||
if(tesla_link && tesla_link.enabled)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
icon_state = "console"
|
||||
icon_state_unpowered = "console"
|
||||
screen_icon_state_menu = "menu"
|
||||
keyboard_icon_state_menu = "kb_menu"
|
||||
hardware_flag = PROGRAM_CONSOLE
|
||||
var/console_department = "" // Used in New() to set network tag according to our area.
|
||||
anchored = 1
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
icon_state_unpowered = "laptop-open" // Icon state when the computer is turned off
|
||||
icon = 'icons/obj/modular_laptop.dmi'
|
||||
icon_state = "laptop-open"
|
||||
nokeyboard = 1
|
||||
base_idle_power_usage = 25
|
||||
base_active_power_usage = 200
|
||||
max_hardware_size = 2
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
var/filedesc = "Unknown Program" // User-friendly name of this program.
|
||||
var/extended_desc = "N/A" // Short description of this program's function.
|
||||
var/program_icon_state = null // Program-specific screen icon state
|
||||
var/keyboard_icon_state = null // Program-specific keboard icon state, only supported on some devices.
|
||||
var/requires_ntnet = 0 // Set to 1 for program to require nonstop NTNet connection to run. If NTNet connection is lost program crashes.
|
||||
var/requires_ntnet_feature = 0 // Optional, if above is set to 1 checks for specific function of NTNet (currently NTNET_SOFTWAREDOWNLOAD, NTNET_PEERTOPEER, NTNET_SYSTEMCONTROL and NTNET_COMMUNICATION)
|
||||
var/ntnet_status = 1 // NTNet status, updated every tick by computer running this program. Don't use this for checks if NTNet works, computers do that. Use this for calculations, etc.
|
||||
@@ -62,29 +61,17 @@
|
||||
access_to_check = required_access
|
||||
if(!access_to_check) // No required_access, allow it.
|
||||
return 1
|
||||
if(istype(user, /mob/living/silicon)) // AI or robot. Allow it.
|
||||
return 1
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/weapon/card/id/I = H.wear_id
|
||||
var/obj/item/device/pda/P = H.wear_id
|
||||
if(P && istype(P)) // PDA. Try to grab the ID from it then.
|
||||
I = P.id
|
||||
if(!I) // No equipped ID, let's try checking active hand too
|
||||
I = H.get_active_hand()
|
||||
P = H.get_active_hand()
|
||||
if(P && istype(P))
|
||||
I = P.id
|
||||
if(!I || !istype(I)) // Still no ID.
|
||||
if(loud && computer)
|
||||
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
|
||||
return 0
|
||||
|
||||
if(access_to_check in I.access)
|
||||
return 1
|
||||
if(loud && computer)
|
||||
var/obj/item/weapon/card/id/I = user.GetIdCard()
|
||||
if(!I)
|
||||
if(loud)
|
||||
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
|
||||
return 0
|
||||
|
||||
if(access_to_check in I.access)
|
||||
return 1
|
||||
else if(loud)
|
||||
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
|
||||
return 0
|
||||
|
||||
// This attempts to retrieve header data for NanoUIs. If implementing completely new device of different type than existing ones
|
||||
// always include the device here in this proc. This proc basically relays the request to whatever is running the program.
|
||||
@@ -122,7 +109,7 @@
|
||||
if(!running) // Our program was closed. Close the ui if it exists.
|
||||
if(ui)
|
||||
ui.close()
|
||||
return 0
|
||||
return computer.ui_interact(user)
|
||||
if(istype(NM))
|
||||
NM.ui_interact(user, ui_key, null, force_open)
|
||||
return 0
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
nanomodule_path = /datum/nano_module/power_monitor/
|
||||
program_icon_state = "power_monitor"
|
||||
extended_desc = "This program connects to sensors around the station to provide information about electrical systems"
|
||||
keyboard_icon_state = "keyboard9"
|
||||
required_access = access_engine
|
||||
requires_ntnet = 1
|
||||
network_destination = "power monitoring system"
|
||||
size = 8
|
||||
size = 9
|
||||
|
||||
/datum/computer_file/program/alarm_monitor
|
||||
filename = "alarmmonitor"
|
||||
@@ -18,7 +17,6 @@
|
||||
nanomodule_path = /datum/nano_module/alarm_monitor/engineering
|
||||
program_icon_state = "alarm_monitor"
|
||||
extended_desc = "This program provides visual interface for station's alarm system."
|
||||
keyboard_icon_state = "keyboard4"
|
||||
requires_ntnet = 1
|
||||
network_destination = "alarm monitoring network"
|
||||
size = 5
|
||||
@@ -29,7 +27,6 @@
|
||||
nanomodule_path = /datum/nano_module/atmos_control
|
||||
program_icon_state = "atmos_control"
|
||||
extended_desc = "This program allows remote control of air alarms around the station"
|
||||
keyboard_icon_state = "keyboard4"
|
||||
required_access = access_atmospherics
|
||||
requires_ntnet = 1
|
||||
network_destination = "atmospheric control system"
|
||||
@@ -43,10 +40,9 @@
|
||||
nanomodule_path = /datum/nano_module/rcon
|
||||
program_icon_state = "generic"
|
||||
extended_desc = "This program allows remote control of power distribution systems around the station."
|
||||
keyboard_icon_state = "keyboard1"
|
||||
required_access = access_engine
|
||||
requires_ntnet = 1
|
||||
network_destination = "RCON remote control system"
|
||||
requires_ntnet_feature = NTNET_SYSTEMCONTROL
|
||||
usage_flags = PROGRAM_LAPTOP | PROGRAM_CONSOLE
|
||||
size = 25
|
||||
size = 19
|
||||
@@ -4,8 +4,7 @@
|
||||
nanomodule_path = /datum/nano_module/crew_monitor
|
||||
program_icon_state = "crew"
|
||||
extended_desc = "This program connects to life signs monitoring system to provide basic information on crew health."
|
||||
keyboard_icon_state = "keyboard7"
|
||||
required_access = access_medical
|
||||
requires_ntnet = 1
|
||||
network_destination = "crew lifesigns monitoring system"
|
||||
size = 20
|
||||
size = 11
|
||||
@@ -9,7 +9,7 @@
|
||||
program_icon_state = "generic"
|
||||
unsendable = 1
|
||||
undeletable = 1
|
||||
size = 2
|
||||
size = 4
|
||||
available_on_ntnet = 0
|
||||
requires_ntnet = 0
|
||||
nanomodule_path = /datum/nano_module/computer_configurator/
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
filedesc = "NTOS File Manager"
|
||||
extended_desc = "This program allows management of files."
|
||||
program_icon_state = "generic"
|
||||
size = 10
|
||||
size = 8
|
||||
requires_ntnet = 0
|
||||
available_on_ntnet = 1
|
||||
available_on_ntnet = 0
|
||||
undeletable = 1
|
||||
nanomodule_path = /datum/nano_module/computer_filemanager/
|
||||
var/open_file
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
extended_desc = "This program allows downloads of software from official NT repositories"
|
||||
unsendable = 1
|
||||
undeletable = 1
|
||||
size = 3
|
||||
size = 4
|
||||
requires_ntnet = 1
|
||||
requires_ntnet_feature = NTNET_SOFTWAREDOWNLOAD
|
||||
available_on_ntnet = 0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/datum/computer_file/program/ntnetmonitor
|
||||
filename = "ntmonitor"
|
||||
filedesc = "NTNet Diagnostics and Monitoring"
|
||||
program_icon_state = "generic"
|
||||
program_icon_state = "comm_monitor"
|
||||
extended_desc = "This program monitors stationwide NTNet network, provides access to logging systems, and allows for configuration changes"
|
||||
size = 7
|
||||
size = 12
|
||||
requires_ntnet = 1
|
||||
required_access = access_network
|
||||
available_on_ntnet = 1
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/datum/computer_file/program/chatclient
|
||||
filename = "ntnrc_client"
|
||||
filedesc = "NTNet Relay Chat Client"
|
||||
program_icon_state = "generic"
|
||||
program_icon_state = "command"
|
||||
extended_desc = "This program allows communication over NTNRC network"
|
||||
size = 10
|
||||
size = 8
|
||||
requires_ntnet = 1
|
||||
requires_ntnet_feature = NTNET_COMMUNICATION
|
||||
network_destination = "NTNRC server"
|
||||
|
||||
@@ -4,8 +4,8 @@ var/global/nttransfer_uid = 0
|
||||
filename = "nttransfer"
|
||||
filedesc = "NTNet P2P Transfer Client"
|
||||
extended_desc = "This program allows for simple file transfer via direct peer to peer connection."
|
||||
program_icon_state = "generic"
|
||||
size = 5
|
||||
program_icon_state = "comm_logs"
|
||||
size = 7
|
||||
requires_ntnet = 1
|
||||
requires_ntnet_feature = NTNET_PEERTOPEER
|
||||
network_destination = "other device via P2P tunnel"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
name = "Hardware"
|
||||
desc = "Unknown Hardware"
|
||||
icon = 'icons/obj/modular_components.dmi'
|
||||
// Following two variables reference the machine that holds this hardware
|
||||
// It is necessary to have two variables as we have modular_computer machine and item.
|
||||
var/obj/item/modular_computer/holder2 = null
|
||||
var/power_usage = 0 // If the hardware uses extra power, change this.
|
||||
var/enabled = 1 // If the hardware is turned off set this to 0.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// A vendor machine for modular computer portable devices - Laptops and Tablets
|
||||
|
||||
/obj/machinery/lapvend // This is now in place to correct compile errors.
|
||||
/obj/machinery/lapvend
|
||||
name = "computer vendor"
|
||||
desc = "A vending machine with microfabricator capable of dispensing various NT-branded computers"
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
@@ -53,14 +53,14 @@
|
||||
switch(dev_battery)
|
||||
if(1) // Basic(750C)
|
||||
if(fabricate)
|
||||
fabricated_tablet.battery_module = new/obj/item/weapon/computer_hardware/battery_module(fabricated_tablet)
|
||||
fabricated_laptop.cpu.battery_module = new/obj/item/weapon/computer_hardware/battery_module(fabricated_tablet)
|
||||
if(2) // Upgraded(1100C)
|
||||
if(fabricate)
|
||||
fabricated_tablet.battery_module = new/obj/item/weapon/computer_hardware/battery_module/advanced(fabricated_tablet)
|
||||
fabricated_laptop.cpu.battery_module = new/obj/item/weapon/computer_hardware/battery_module/advanced(fabricated_tablet)
|
||||
total_price += 199
|
||||
if(3) // Advanced(1500C)
|
||||
if(fabricate)
|
||||
fabricated_tablet.battery_module = new/obj/item/weapon/computer_hardware/battery_module/super(fabricated_tablet)
|
||||
fabricated_laptop.cpu.battery_module = new/obj/item/weapon/computer_hardware/battery_module/super(fabricated_tablet)
|
||||
total_price += 499
|
||||
switch(dev_disk)
|
||||
if(1) // Basic(128GQ)
|
||||
|
||||
Reference in New Issue
Block a user