Merge remote-tracking branch 'upstream/master' into diagonal-movement

This commit is contained in:
Couls
2019-06-02 21:59:58 -04:00
parent cdb867456e
commit 5979166f54
526 changed files with 97898 additions and 5530 deletions
+20 -15
View File
@@ -49,7 +49,6 @@
use_power = NO_POWER_USE
req_access = list(access_engine_equip)
siemens_strength = 1
var/spooky=0
var/area/area
var/areastring = null
var/obj/item/stock_parts/cell/cell
@@ -117,10 +116,13 @@
lighting = 0
operating = 0
/obj/machinery/power/apc/noalarm
report_power_alarm = 0
/obj/machinery/power/apc/syndicate //general syndicate access
req_access = list(access_syndicate)
report_power_alarm = 0
/obj/item/apc_electronics
name = "power control module"
desc = "Heavy-duty switching circuits for power control."
@@ -248,9 +250,9 @@
// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/update_icon()
/obj/machinery/power/apc/update_icon(force_update = FALSE)
if(!status_overlays)
if(!status_overlays || force_update)
status_overlays = 1
status_overlays_lock = new
status_overlays_charging = new
@@ -291,10 +293,10 @@
var/update = check_updates() //returns 0 if no need to update icons.
// 1 if we need to update the icon_state
// 2 if we need to update the overlays
if(!update)
if(!update && !force_update)
return
if(update & 1) // Updating the icon state
if(force_update || update & 1) // Updating the icon state
if(update_state & UPSTATE_ALLGOOD)
icon_state = "apc0"
else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2))
@@ -322,7 +324,7 @@
if(update & 2)
if(force_update || update & 2)
if(overlays.len)
overlays.len = 0
@@ -412,14 +414,17 @@
update_icon()
updating_icon = 0
/obj/machinery/power/apc/proc/spookify()
if(spooky) return // Fuck you we're already spooky
spooky=1
update_icon()
spawn(10)
spooky=0
update_icon()
/obj/machinery/power/apc/get_spooked(second_pass = FALSE)
if(opened || wiresexposed)
return
if(stat & (NOPOWER | BROKEN))
return
if(!second_pass) //The first time, we just cut overlays
addtimer(CALLBACK(src, .get_spooked, TRUE), 1)
cut_overlays()
else
flick("apcemag", src) //Second time we cause the APC to update its icon, then add a timer to update icon later
addtimer(CALLBACK(src, .proc/update_icon, TRUE), 10)
//attack with an item - open/close cover, insert cell, or (un)lock interface
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params)
-3
View File
@@ -63,7 +63,6 @@ By design, d1 is the smallest direction and d2 is the highest
. = ..()
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
var/dash = findtext(icon_state, "-")
d1 = text2num(copytext( icon_state, 1, dash ))
d2 = text2num(copytext( icon_state, dash+1 ))
@@ -73,14 +72,12 @@ By design, d1 is the smallest direction and d2 is the highest
hide(T.intact)
LAZYADD(GLOB.cable_list, src) //add it to the global cable list
/obj/structure/cable/Destroy() // called when a cable is deleted
if(powernet)
cut_cable_from_powernet() // update the powernets
LAZYREMOVE(GLOB.cable_list, src) //remove it from global cable list
return ..() // then go ahead and delete the cable
/obj/structure/cable/deconstruct(disassembled = TRUE)
var/turf/T = get_turf(src)
if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long
-24
View File
@@ -1,24 +0,0 @@
/turf/simulated/floor/engine/attack_hand(var/mob/user as mob)
user.Move_Pulled(src)
/turf/simulated/floor/engine/ex_act(severity)
switch(severity)
if(1.0)
ChangeTurf(/turf/space)
qdel(src)
return
if(2.0)
if(prob(50))
ChangeTurf(/turf/space)
qdel(src)
return
else
return
/turf/simulated/floor/engine/blob_act()
if(prob(25))
ChangeTurf(/turf/space)
qdel(src)
return
return
+3
View File
@@ -232,6 +232,9 @@
on = FALSE
return
/obj/machinery/light/get_spooked()
flicker()
// update the icon_state and luminosity of the light depending on its state
/obj/machinery/light/proc/update(var/trigger = TRUE)
switch(status)