CrazyLemon RPD changes

This commit is contained in:
Kyep
2018-08-15 22:36:53 -07:00
parent 7cebfc20c4
commit 1e894f11ee
6 changed files with 30 additions and 10 deletions
+20 -4
View File
@@ -192,11 +192,27 @@ var/list/pipemenu = list(
return
if(world.time < lastused + spawndelay)
return
var/turf/T = get_turf(target)
for(var/obj/machinery/shieldwall/S in T)
to_chat(user, "<span class='warning'>[S] blocks access!</span>")
return
target.rpd_act(user, src) //Handle RPD effects in separate procs
if(target != T)
// We only check the rpd_act of the target if it isn't the turf, because otherwise
// (A) blocked turfs can be acted on, and (B) unblocked turfs get acted on twice.
if(target.rpd_act(user, src) == TRUE)
// If the object we are clicking on has a valid RPD interaction for just that specific object, do that and nothing else.
// Example: clicking on a pipe with a RPD in rotate mode should rotate that pipe and ignore everything else on the tile.
return
// If we get this far, we have to check every object in the tile, to make sure that none of them block RPD usage on this tile.
// This is done by calling rpd_blocksusage on every /obj in the tile. If any block usage, fail at this point.
for(var/obj/O in T)
if(O.rpd_blocksusage() == TRUE)
to_chat(user, "<span class='warning'>[O] blocks the [src]!</span>")
return
// If we get here, then we're effectively acting on the turf, probably placing a pipe.
T.rpd_act(user, src)
#undef RPD_COOLDOWN_TIME
#undef RPD_WALLBUILD_TIME
-4
View File
@@ -71,10 +71,6 @@
SSnanoui.close_uis(src)
return ..()
/obj/rpd_act(mob/user, obj/item/rpd/our_rpd)
var/turf/T = get_turf(src) //This preserves RPD behaviour on specific turfs
T.rpd_act(user, our_rpd)
/obj/proc/process()
set waitfor = 0
processing_objects.Remove(src)