Adds battery status icon to NTOS

- Laptops now have status icon which shows status of their internal battery.
- Adds support for "status bar" - allows more status icons in future (such as, network connection? time? whatever), status bar icons should be 16x16px
This commit is contained in:
Atlantiscze
2014-07-20 15:15:29 +02:00
parent 69ab22896b
commit c127fee6b4
9 changed files with 38 additions and 0 deletions

View File

@@ -449,6 +449,16 @@
overlays += kb
name = initial(name) + " (orange screen of death)"
//Returns percentage of battery charge remaining. Returns -1 if no battery is installed.
proc/check_battery_status()
if (battery)
var/obj/item/weapon/cell/B = battery
return round(B.charge / (B.maxcharge / 100))
else
return -1
/obj/machinery/computer3/wall_comp
name = "terminal"
icon = 'icons/obj/computer3.dmi'