diff --git a/code/game/objects/items/mountable_frames/apc_frame.dm b/code/game/objects/items/mountable_frames/apc_frame.dm index 330ee8c7da2..5e092638707 100644 --- a/code/game/objects/items/mountable_frames/apc_frame.dm +++ b/code/game/objects/items/mountable_frames/apc_frame.dm @@ -9,7 +9,6 @@ if(..()) var/turf/turf_loc = get_turf(user) var/area/area_loc = turf_loc.loc - if(istype(area_loc,/area/mine)) return if (area_loc.get_apc()) user << "This area already has an APC." return //only one APC per area diff --git a/code/game/objects/items/mountable_frames/frames.dm b/code/game/objects/items/mountable_frames/frames.dm index bf28b84add1..d40bb2572fe 100644 --- a/code/game/objects/items/mountable_frames/frames.dm +++ b/code/game/objects/items/mountable_frames/frames.dm @@ -19,7 +19,9 @@ if (src.mount_reqs.Find("simfloor") && !istype(turf_loc, /turf/simulated/floor)) user << "[src] cannot be placed on this spot." return - if (src.mount_reqs.Find("nospace") && (areaMaster.requires_power == 0 || istype(areaMaster,/area/space))) - user << "[src] cannot be placed in this area." - return - return 1 \ No newline at end of file + if (src.mount_reqs.Find("nospace")) + var/area/my_area = turf_loc.loc + if(!istype(my_area) || (my_area.requires_power == 0 || istype(my_area,/area/space))) + user << "[src] cannot be placed in this area." + return + return 1 diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index a93e982e850..c66ebbe6557 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -404,8 +404,11 @@ return null /area/proc/get_apc() - var/obj/machinery/power/apc/FINDME = locate() in src - if (FINDME) + // This was a simple locate() in src, but an unresolved BYOND bug causes trying to locate() in an + // area to take an inconceivably long time, especially for large areas. + // See: http://www.byond.com/forum/?post=1860571 + var/obj/machinery/power/apc/FINDME + for(FINDME in src) return FINDME