From a80286a5849d2b523889a9ea7d40744af632466e Mon Sep 17 00:00:00 2001 From: uporotiy Date: Mon, 23 May 2011 17:42:17 +0000 Subject: [PATCH] Mining Fixed a small mapping mistake. Also, the locker is still chef-access only. Whoops. Singularity Singularities now can "target" something, which makes them aim towards it instead of wandering around. Added an adminspawnable singularity beacon which automatically targets all singularities on itself. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1612 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/spacecraft/syndicatebeacon.dm | 15 +++++++++++++++ code/modules/power/singularity/singularity.dm | 6 ++++++ maps/tgstation.2.0.7.dmm | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/code/game/spacecraft/syndicatebeacon.dm b/code/game/spacecraft/syndicatebeacon.dm index b55228fc673..14cebc2977b 100644 --- a/code/game/spacecraft/syndicatebeacon.dm +++ b/code/game/spacecraft/syndicatebeacon.dm @@ -97,3 +97,18 @@ proc/selfdestruct() selfdestructing = 1 spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10) + +/obj/machinery/singularity_beacon //not the best place for it but it's a hack job anyway -- Urist + name = "ominous beacon" + desc = "This looks suspicious..." + icon = 'device.dmi' + icon_state = "syndbeacon" + + anchored = 1 + density = 1 + + New(loc) + ..() + + for(var/obj/machinery/singularity/singulo in world) + singulo.target = src \ No newline at end of file diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index d3841582a85..f5291048f5c 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -26,6 +26,7 @@ var/global/list/uneatable = list( grav_pull = 4 //How many tiles out do we pull? consume_range = 0 //How many tiles out do we eat event_chance = 15 //Prob for event each tick + target = null //its target. moves towards the target if it has one New(loc, var/starting_energy = 50, var/temp = 0) @@ -34,6 +35,9 @@ var/global/list/uneatable = list( spawn(temp) del(src) ..() + for(var/obj/machinery/singularity_beacon/singubeacon in world) + target = singubeacon + break return @@ -252,6 +256,8 @@ var/global/list/uneatable = list( return 0 if(!(movement_dir in cardinal)) movement_dir = pick(NORTH, SOUTH, EAST, WEST) + if(target) + movement_dir = get_dir(src,target) //moves to a singulo beacon, if there is one if(current_size >= 9)//The superlarge one does not care about things in its way spawn(0) step(src, movement_dir) diff --git a/maps/tgstation.2.0.7.dmm b/maps/tgstation.2.0.7.dmm index b788c8be122..983d958273d 100644 --- a/maps/tgstation.2.0.7.dmm +++ b/maps/tgstation.2.0.7.dmm @@ -7665,7 +7665,7 @@ "cRu" = (/obj/machinery/door/airlock/glass{name = "Emergency Sleeper Room"},/obj/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/turf/simulated/floor{icon_state = "white"; dir = 8},/area/mine/lobby) "cRv" = (/obj/grille,/obj/window/reinforced,/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/mine/lobby) "cRw" = (/obj/grille,/obj/window/reinforced,/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/mine/lobby) -"cRx" = (/obj/grille,/obj/window/reinforced,/obj/window/reinforced{dir = 4},/obj/window/reinforced{dir = 1},/turf/simulated/floor/plating,/area/mine/lobby) +"cRx" = (/obj/grille,/obj/window/reinforced,/obj/window/reinforced{dir = 4},/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/mine/lobby) "cRy" = (/obj/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/obj/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = "90Curve"},/turf/simulated/floor,/area/mine/production) "cRz" = (/obj/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = "Streight"},/turf/simulated/floor{dir = 8; icon_state = "loadingarea"; tag = "loading"},/area/mine/production) "cRA" = (/obj/machinery/conveyor{dir = 8; id = "1"},/obj/plasticflaps,/obj/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = "Streight"},/turf/simulated/floor,/area/mine/production)