From 044766ef11f3fb6331777cb329010626a1780e5b Mon Sep 17 00:00:00 2001 From: DJSnapshot Date: Mon, 10 Mar 2014 15:52:01 -0700 Subject: [PATCH] quick fix for APCs related to IPC charging. --- code/modules/power/apc.dm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a98eb6a197..da6f562706 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -212,7 +212,7 @@ // update the APC icon to show the three base states // also add overlays for indicator lights /obj/machinery/power/apc/update_icon() - + if (!status_overlays) status_overlays = 1 status_overlays_lock = new @@ -230,9 +230,9 @@ status_overlays_lock[1] = image(icon, "apcox-0") // 0=blue 1=red status_overlays_lock[2] = image(icon, "apcox-1") - status_overlays_charging[1] = image(icon, "apco3-0") + status_overlays_charging[1] = image(icon, "apco3-0") status_overlays_charging[2] = image(icon, "apco3-1") - status_overlays_charging[3] = image(icon, "apco3-2") + status_overlays_charging[3] = image(icon, "apco3-2") status_overlays_equipment[1] = image(icon, "apco0-0") // 0=red, 1=green, 2=blue status_overlays_equipment[2] = image(icon, "apco0-1") @@ -243,13 +243,13 @@ status_overlays_lighting[2] = image(icon, "apco1-1") status_overlays_lighting[3] = image(icon, "apco1-2") status_overlays_lighting[4] = image(icon, "apco1-3") - + status_overlays_environ[1] = image(icon, "apco2-0") status_overlays_environ[2] = image(icon, "apco2-1") status_overlays_environ[3] = image(icon, "apco2-2") status_overlays_environ[4] = image(icon, "apco2-3") - + var/update = check_updates() //returns 0 if no need to update icons. // 1 if we need to update the icon_state @@ -275,7 +275,7 @@ icon_state = "apcemag" else if(update_state & UPSTATE_WIREEXP) icon_state = "apcewires" - + if(!(update_state & UPSTATE_ALLGOOD)) @@ -286,7 +286,7 @@ if(update & 2) - + if(overlays.len) overlays = 0 @@ -301,7 +301,7 @@ /obj/machinery/power/apc/proc/check_updates() - var/last_update_state = update_state + var/last_update_state = update_state var/last_update_overlay = update_overlay update_state = 0 update_overlay = 0 @@ -344,7 +344,7 @@ update_overlay |= APC_UPOVERLAY_EQUIPMENT1 else if(equipment == 2) update_overlay |= APC_UPOVERLAY_EQUIPMENT2 - + if(!lighting) update_overlay |= APC_UPOVERLAY_LIGHTING0 else if(lighting == 1) @@ -644,6 +644,7 @@ user << "\blue You slot your fingers into the APC interface and siphon off some of the stored charge for your own use." if(src.cell.charge < 0) src.cell.charge = 0 if(H.nutrition > 500) H.nutrition = 500 + src.charging = 1 else user << "\blue You are already fully charged."