Refactor floodlights

- Fixes #9543
- Removes ugly floodlight/proc/updateicon() and replaces it with proper floodlight/update_icon() which is standard on all objects/items. Does the same refactor for power cells and adjusts the proc call in relevant files (hence the amount of 1-line changes in various files)
- Makes floodlights properly use CELLRATE. Their load is 200 watts. Cell adjusted accordingly, it starts with 1k cell, which is enough for ~40 minutes (roughly)
- Floodlights with almost discharged cell (less than 10%) ocassionally "flicker", dimming for few seconds. This serves as indicator that the power cell is running low.
- Floodlight luminosity adjusted. They now shine slightly more, espicially closer to the floodlight.
This commit is contained in:
Atlantis
2015-05-28 21:45:54 +02:00
parent 928722c08a
commit 30e4550e2e
11 changed files with 94 additions and 69 deletions
@@ -194,7 +194,7 @@
wrapped = A.cell
A.cell.add_fingerprint(user)
A.cell.updateicon()
A.cell.update_icon()
A.cell.loc = src
A.cell = null
@@ -211,7 +211,7 @@
wrapped = A.cell
A.cell.add_fingerprint(user)
A.cell.updateicon()
A.cell.update_icon()
A.updateicon()
A.cell.loc = src
A.cell = null
@@ -746,7 +746,7 @@
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
var/datum/robot_component/cell_component = components["power cell"]
if(cell)
cell.updateicon()
cell.update_icon()
cell.add_fingerprint(user)
user.put_in_active_hand(cell)
user << "You remove \the [cell]."
+1 -1
View File
@@ -714,7 +714,7 @@
if(cell)
user.put_in_hands(cell)
cell.add_fingerprint(user)
cell.updateicon()
cell.update_icon()
src.cell = null
user.visible_message("<span class='warning'>[user.name] removes the power cell from [src.name]!</span>",\
+2 -2
View File
@@ -8,7 +8,7 @@
/obj/item/weapon/cell/initialize()
..()
updateicon()
update_icon()
/obj/item/weapon/cell/drain_power(var/drain_check, var/surge, var/power = 0)
@@ -22,7 +22,7 @@
return use(cell_amt) / CELLRATE
/obj/item/weapon/cell/proc/updateicon()
/obj/item/weapon/cell/update_icon()
overlays.Cut()
if(charge < 0.01)
@@ -159,7 +159,7 @@
else if(cell)
cell.loc = loc
cell.add_fingerprint(user)
cell.updateicon()
cell.update_icon()
icon_state = "suspension0"
cell = null