From 6a0b00ead6a187f7c2d09c0c54159037f79a8887 Mon Sep 17 00:00:00 2001 From: Robustin Date: Tue, 14 Nov 2017 15:12:41 -0500 Subject: [PATCH 1/2] Tesla no longer NOTHING PERSONNEL's the power beacon --- code/game/machinery/syndicatebeacon.dm | 136 ++++++++++++++++++++++++ code/modules/power/tesla/energy_ball.dm | 2 +- 2 files changed, 137 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 79d000a6ec..81f3f1c423 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD //////////////////////////////////////// //Singularity beacon //////////////////////////////////////// @@ -131,3 +132,138 @@ desc = "A label on it reads: Warning: Activating this device will send a power draining device to your location." droptype = /obj/item/device/powersink origin_tech = "bluespace=4;syndicate=5" +======= +//////////////////////////////////////// +//Singularity beacon +//////////////////////////////////////// +/obj/machinery/power/singularity_beacon + name = "ominous beacon" + desc = "This looks suspicious..." + icon = 'icons/obj/singularity.dmi' + icon_state = "beacon" + + anchored = FALSE + density = TRUE + layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS + stat = 0 + verb_say = "states" + var/cooldown = 0 + + var/active = 0 + var/icontype = "beacon" + + +/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null) + if(surplus() < 1500) + if(user) + to_chat(user, "The connected wire doesn't have enough current.") + return + for(var/obj/singularity/singulo in GLOB.singularities) + if(singulo.z == z) + singulo.target = src + icon_state = "[icontype]1" + active = 1 + if(user) + to_chat(user, "You activate the beacon.") + + +/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null) + for(var/obj/singularity/singulo in GLOB.singularities) + if(singulo.target == src) + singulo.target = null + icon_state = "[icontype]0" + active = 0 + if(user) + to_chat(user, "You deactivate the beacon.") + + +/obj/machinery/power/singularity_beacon/attack_ai(mob/user) + return + + +/obj/machinery/power/singularity_beacon/attack_hand(mob/user) + if(anchored) + return active ? Deactivate(user) : Activate(user) + else + to_chat(user, "You need to screw the beacon to the floor first!") + return + + +/obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/screwdriver)) + if(active) + to_chat(user, "You need to deactivate the beacon first!") + return + + if(anchored) + anchored = FALSE + to_chat(user, "You unscrew the beacon from the floor.") + disconnect_from_network() + return + else + if(!connect_to_network()) + to_chat(user, "This device must be placed over an exposed, powered cable node!") + return + anchored = TRUE + to_chat(user, "You screw the beacon to the floor and attach the cable.") + return + else + return ..() + +/obj/machinery/power/singularity_beacon/Destroy() + if(active) + Deactivate() + return ..() + +//stealth direct power usage +/obj/machinery/power/singularity_beacon/process() + if(!active) + return + + if(surplus() > 1500) + add_load(1500) + if(cooldown <= world.time) + cooldown = world.time + 80 + for(var/obj/singularity/singulo in GLOB.singularities) + if(singulo.z == z) + say("[singulo] is now [get_dist(src,singulo)] standard lengths away to the [dir2text(get_dir(src,singulo))]") + else + Deactivate() + say("Insufficient charge detected - powering down") + + +/obj/machinery/power/singularity_beacon/syndicate + icontype = "beaconsynd" + icon_state = "beaconsynd0" + +// SINGULO BEACON SPAWNER +/obj/item/device/sbeacondrop + name = "suspicious beacon" + icon = 'icons/obj/radio.dmi' + icon_state = "beacon" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + desc = "A label on it reads: Warning: Activating this device will send a special beacon to your location." + origin_tech = "bluespace=6;syndicate=5" + w_class = WEIGHT_CLASS_SMALL + var/droptype = /obj/machinery/power/singularity_beacon/syndicate + + +/obj/item/device/sbeacondrop/attack_self(mob/user) + if(user) + to_chat(user, "Locked In.") + new droptype( user.loc ) + playsound(src, 'sound/effects/pop.ogg', 100, 1, 1) + qdel(src) + return + +/obj/item/device/sbeacondrop/bomb + desc = "A label on it reads: Warning: Activating this device will send a high-ordinance explosive to your location." + droptype = /obj/machinery/syndicatebomb + origin_tech = "bluespace=5;syndicate=5" + +/obj/item/device/sbeacondrop/powersink + desc = "A label on it reads: Warning: Activating this device will send a power draining device to your location." + droptype = /obj/item/device/powersink + origin_tech = "bluespace=4;syndicate=5" +>>>>>>> eeb3e97... Tesla no longer NOTHING PERSONNEL's the power beacon (#32714) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 9d527560fc..4a26950217 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -78,7 +78,7 @@ var/move_bias = pick(GLOB.alldirs) for(var/i in 0 to move_amount) var/move_dir = pick(GLOB.alldirs + move_bias) //ensures large-ball teslas don't just sit around - if(target && prob(60)) + if(target && prob(10)) move_dir = get_dir(src,target) var/turf/T = get_step(src, move_dir) if(can_move(T)) From 66445eb80ba29ac9e109c776d67899e02568d6ae Mon Sep 17 00:00:00 2001 From: LetterJay Date: Tue, 14 Nov 2017 16:07:26 -0600 Subject: [PATCH 2/2] Update syndicatebeacon.dm --- code/game/machinery/syndicatebeacon.dm | 136 ------------------------- 1 file changed, 136 deletions(-) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 81f3f1c423..f8f980a1ee 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -1,138 +1,3 @@ -<<<<<<< HEAD -//////////////////////////////////////// -//Singularity beacon -//////////////////////////////////////// -/obj/machinery/power/singularity_beacon - name = "ominous beacon" - desc = "This looks suspicious..." - icon = 'icons/obj/singularity.dmi' - icon_state = "beacon" - - anchored = FALSE - density = TRUE - layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS - stat = 0 - verb_say = "states" - var/cooldown = 0 - - var/active = 0 - var/icontype = "beacon" - - -/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null) - if(surplus() < 1500) - if(user) - to_chat(user, "The connected wire doesn't have enough current.") - return - for(var/obj/singularity/singulo in GLOB.singularities) - if(singulo.z == z) - singulo.target = src - icon_state = "[icontype]1" - active = 1 - if(user) - to_chat(user, "You activate the beacon.") - - -/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null) - for(var/obj/singularity/singulo in GLOB.singularities) - if(singulo.target == src) - singulo.target = null - icon_state = "[icontype]0" - active = 0 - if(user) - to_chat(user, "You deactivate the beacon.") - - -/obj/machinery/power/singularity_beacon/attack_ai(mob/user) - return - - -/obj/machinery/power/singularity_beacon/attack_hand(mob/user) - if(anchored) - return active ? Deactivate(user) : Activate(user) - else - to_chat(user, "You need to screw the beacon to the floor first!") - return - - -/obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/screwdriver)) - if(active) - to_chat(user, "You need to deactivate the beacon first!") - return - - if(anchored) - anchored = FALSE - to_chat(user, "You unscrew the beacon from the floor.") - disconnect_from_network() - return - else - if(!connect_to_network()) - to_chat(user, "This device must be placed over an exposed, powered cable node!") - return - anchored = TRUE - to_chat(user, "You screw the beacon to the floor and attach the cable.") - return - else - return ..() - -/obj/machinery/power/singularity_beacon/Destroy() - if(active) - Deactivate() - return ..() - -//stealth direct power usage -/obj/machinery/power/singularity_beacon/process() - if(!active) - return - - if(surplus() > 1500) - add_load(1500) - if(cooldown <= world.time) - cooldown = world.time + 100 - for(var/obj/singularity/singulo in GLOB.singularities) - if(singulo.z == z) - say("The [singulo] is now [get_dist(src,singulo)] standard lengths away to the [dir2text(get_dir(src,singulo))]") - else - Deactivate() - say("Insufficient charge detected - powering down") - - -/obj/machinery/power/singularity_beacon/syndicate - icontype = "beaconsynd" - icon_state = "beaconsynd0" - -// SINGULO BEACON SPAWNER -/obj/item/device/sbeacondrop - name = "suspicious beacon" - icon = 'icons/obj/radio.dmi' - icon_state = "beacon" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - desc = "A label on it reads: Warning: Activating this device will send a special beacon to your location." - origin_tech = "bluespace=6;syndicate=5" - w_class = WEIGHT_CLASS_SMALL - var/droptype = /obj/machinery/power/singularity_beacon/syndicate - - -/obj/item/device/sbeacondrop/attack_self(mob/user) - if(user) - to_chat(user, "Locked In.") - new droptype( user.loc ) - playsound(src, 'sound/effects/pop.ogg', 100, 1, 1) - qdel(src) - return - -/obj/item/device/sbeacondrop/bomb - desc = "A label on it reads: Warning: Activating this device will send a high-ordinance explosive to your location." - droptype = /obj/machinery/syndicatebomb - origin_tech = "bluespace=5;syndicate=5" - -/obj/item/device/sbeacondrop/powersink - desc = "A label on it reads: Warning: Activating this device will send a power draining device to your location." - droptype = /obj/item/device/powersink - origin_tech = "bluespace=4;syndicate=5" -======= //////////////////////////////////////// //Singularity beacon //////////////////////////////////////// @@ -266,4 +131,3 @@ desc = "A label on it reads: Warning: Activating this device will send a power draining device to your location." droptype = /obj/item/device/powersink origin_tech = "bluespace=4;syndicate=5" ->>>>>>> eeb3e97... Tesla no longer NOTHING PERSONNEL's the power beacon (#32714)