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:
Atlantis
2015-12-30 02:55:11 +01:00
parent 605b78d377
commit 9e1168ae9c
20 changed files with 61 additions and 80 deletions
@@ -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