Computer tweaks (#1285)

Pulling in some computer changes from bay.
This commit is contained in:
Werner
2016-12-25 14:19:50 +02:00
committed by skull132
parent 93143a8e45
commit 5df9509435
94 changed files with 2682 additions and 989 deletions
@@ -5,7 +5,8 @@
desc = "A standard power cell, commonly seen in high-end portable microcomputers or low-end laptops. It's rating is 750."
icon_state = "battery_normal"
critical = 1
malfunction_probability = 1
origin_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1)
var/battery_rating = 750
var/obj/item/weapon/cell/battery = null
@@ -13,6 +14,7 @@
name = "advanced battery"
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
battery_rating = 1100
@@ -20,6 +22,7 @@
name = "super battery"
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
battery_rating = 1500
@@ -27,6 +30,7 @@
name = "ultra battery"
desc = "A very advanced large power cell. It's often used as uninterruptable power supply for critical consoles or servers. It's rating is 2000."
icon_state = "battery_ultra"
origin_tech = list(TECH_POWER = 5, TECH_ENGINEERING = 4)
hardware_size = 3
battery_rating = 2000
@@ -34,12 +38,14 @@
name = "micro battery"
desc = "A small power cell, commonly seen in most portable microcomputers. It's rating is 500."
icon_state = "battery_micro"
origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2)
battery_rating = 500
/obj/item/weapon/computer_hardware/battery_module/nano
name = "nano battery"
desc = "A tiny power cell, commonly seen in low-end portable microcomputers. It's rating is 300."
icon_state = "battery_nano"
origin_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1)
battery_rating = 300
// This is not intended to be obtainable in-game. Intended for adminbus and debugging purposes.
@@ -49,11 +55,20 @@
icon_state = "battery_lambda"
hardware_size = 1
battery_rating = 1000000
/obj/item/weapon/computer_hardware/battery_module/lambda/New()
..()
battery = new/obj/item/weapon/cell/infinite(src)
/obj/item/weapon/computer_hardware/battery_module/diagnostics(var/mob/user)
..()
user << "Internal battery charge: [battery.charge]/[battery.maxcharge] CU"
/obj/item/weapon/computer_hardware/battery_module/New()
battery = new/obj/item/weapon/cell(src)
battery.maxcharge = battery_rating
battery.charge = battery_rating
..()
battery.charge = 0
..()
/obj/item/weapon/computer_hardware/battery_module/proc/charge_to_full()
if(battery)
battery.charge = battery.maxcharge