From 880fb89ab4e95cf294bc4b42dd9f5a5341b152d4 Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Fri, 22 Apr 2016 11:37:14 +0100 Subject: [PATCH 1/6] Wormhole lifebuoy (chasm protection) :cl: coiax rscadd: As a sign of friendship between the Free Golems and Centcom, they have developed the wormhole lifebuoy, a modified jaunter to be worn around a user's waist, which will save them from falling to their death in a chasm. experiment: The lifebuoy's limited warranty does not cover exposure to powerful electromagnetic fields. tweak: Renamed hivelord stabilizer to legion's heart stabilizer. /:cl: --- code/modules/mining/equipment_locker.dm | 63 +++++++++++++++++-------- code/modules/mining/mine_turfs.dm | 9 ++++ 2 files changed, 53 insertions(+), 19 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 12ec53f1011..0c5f6a8f468 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -291,6 +291,7 @@ new /datum/data/mining_equipment("GAR scanners", /obj/item/clothing/glasses/meson/gar, 500), new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600), new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 600), + new /datum/data/mining_equipment("Wormhole Lifebuoy", /obj/item/device/wormhole_jaunter/lifebuoy, 1000), new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750), new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800), new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000), @@ -492,20 +493,43 @@ return else user.visible_message("[user.name] activates the [src.name]!") - var/list/L = list() - for(var/obj/item/device/radio/beacon/B in world) - var/turf/T = get_turf(B) - if(T.z == ZLEVEL_STATION) - L += B - if(!L.len) - user << "The [src.name] failed to create a wormhole." - return - var/chosen_beacon = pick(L) - var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100) - J.target = chosen_beacon - try_move_adjacent(J) - playsound(src,'sound/effects/sparks4.ogg',50,1) - qdel(src) + activate(user) + +/obj/item/device/wormhole_jaunter/proc/activate(mob/user) + var/list/L = list() + for(var/obj/item/device/radio/beacon/B in world) + var/turf/T = get_turf(B) + if(T.z == ZLEVEL_STATION) + L += B + if(!L.len) + user << "The [src.name] failed to create a wormhole." + return + var/chosen_beacon = pick(L) + var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100) + J.target = chosen_beacon + try_move_adjacent(J) + playsound(src,'sound/effects/sparks4.ogg',50,1) + qdel(src) + + +/obj/item/device/wormhole_jaunter/lifebuoy + name = "wormhole lifebuoy" + desc = "A single use device using similar technology to the wormhole jaunter. In addition, this belt has velocity and depth sensors that will trigger the device automatically if the user falls into a chasm, saving them from their trip into the darkness. Must be worn around the users waist in order to function in this way." + slot_flags = SLOT_BELT + +/obj/item/device/wormhole_jaunter/lifebuoy/emp_act(power) + var/triggered = FALSE + if(power == 1) + triggered = TRUE + else if(power == 2 && prob(50)) + triggered = TRUE + if(triggered) + usr.visible_message("The [src] overloads and activates!") + activate(usr) + +/obj/item/device/wormhole_jaunter/lifebuoy/proc/chasm_protect() + usr.visible_message("[usr]'s [src] activates, saving them from the chasm!") + activate(usr) /obj/effect/portal/wormhole/jaunt_tunnel name = "jaunt tunnel" @@ -518,6 +542,7 @@ return if(istype(M, /atom/movable)) if(do_teleport(M, target, 6)) + playsound(M,'sound/weapons/resonator_blast.ogg',50,1) if(iscarbon(M)) var/mob/living/carbon/L = M L.Weaken(3) @@ -1019,20 +1044,20 @@ /*********************Hivelord stabilizer****************/ /obj/item/weapon/hivelordstabilizer - name = "hivelord stabilizer" + name = "legion's heart stabilizer" icon = 'icons/obj/chemical.dmi' icon_state = "bottle19" - desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely." + desc = "Inject a legion's heart with this stabilizer to preserve its healing powers indefinitely." w_class = 1 origin_tech = "biotech=1" /obj/item/weapon/hivelordstabilizer/afterattack(obj/item/organ/internal/M, mob/user) var/obj/item/organ/internal/hivelord_core/C = M if(!istype(C, /obj/item/organ/internal/hivelord_core)) - user << "The stabilizer only works on hivelord cores." + user << "The stabilizer only works on legion's hearts." return ..() C.preserved = 1 - user << "You inject the hivelord core with the stabilizer. It will no longer go inert." + user << "You inject the [M] with the stabilizer. It will no longer go inert." qdel(src) @@ -1110,4 +1135,4 @@ component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - RefreshParts() \ No newline at end of file + RefreshParts() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 3d5f72946dd..63124de3a3f 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -563,12 +563,21 @@ /turf/open/chasm/Entered(atom/movable/AM) if(istype(AM, /obj/singularity) || istype(AM, /obj/item/projectile)) return + if(istype(AM, /obj/effect/portal)) + // Portals aren't affected by gravity. Probably. + return // Flies right over the chasm if(istype(AM, /mob/living/simple_animal)) // apparently only simple_animals can fly?? var/mob/living/simple_animal/SA = AM if(SA.flying) return + if(istype(AM, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = AM + if(istype(H.belt, /obj/item/device/wormhole_jaunter/lifebuoy)) + var/obj/item/device/wormhole_jaunter/lifebuoy/L = H.belt + L.chasm_protect() + return drop(AM) From a304ec0e459badb03ff40d221687bba419e4334b Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Sat, 23 Apr 2016 12:51:14 +0100 Subject: [PATCH 2/6] Regular jaunters now save you from chasms --- code/modules/mining/equipment_locker.dm | 68 +++++++++++++++++-------- code/modules/mining/mine_turfs.dm | 11 ++-- 2 files changed, 54 insertions(+), 25 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 0c5f6a8f468..58f3812fb20 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -291,7 +291,6 @@ new /datum/data/mining_equipment("GAR scanners", /obj/item/clothing/glasses/meson/gar, 500), new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600), new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 600), - new /datum/data/mining_equipment("Wormhole Lifebuoy", /obj/item/device/wormhole_jaunter/lifebuoy, 1000), new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750), new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800), new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000), @@ -476,7 +475,7 @@ /obj/item/device/wormhole_jaunter name = "wormhole jaunter" - desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least." + desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least.\nThanks to modifications provided by the Free Golems, this jaunter can be worn on the belt to provide protection from chasms." icon = 'icons/obj/mining.dmi' icon_state = "Jaunter" item_state = "electronic" @@ -485,24 +484,46 @@ throw_speed = 3 throw_range = 5 origin_tech = "bluespace=2" + slot_flags = SLOT_BELT /obj/item/device/wormhole_jaunter/attack_self(mob/user) + user.visible_message("[user.name] activates the [src.name]!") + activate(user) + +/obj/item/device/wormhole_jaunter/proc/turf_check(mob/user) var/turf/device_turf = get_turf(user) - if(!device_turf||device_turf.z==2||device_turf.z>=7) - user << "You're having difficulties getting the [src.name] to work." - return + var/status = 0 + // doesn't work if + // - you're in nullspace (HOW?) + if(!device_turf) + status = 182 + // - you're on centcom + if(device_turf.z == 2) + status = 274 + // - you're on a z level higher than you could normally reach + // (we currently have 9 legal z levels, should be a way of determining + // that programatically) + if(device_turf.z >= 10) + status = 1483 + + if(status != 0) + usr << "\icon[src] INVALID LOCATION: ERROR CODE [status]" + // turf_check returns 0 if failure, so it's false if broken + return 0 else - user.visible_message("[user.name] activates the [src.name]!") - activate(user) + return 1 /obj/item/device/wormhole_jaunter/proc/activate(mob/user) + if(!turf_check(user)) + return + var/list/L = list() for(var/obj/item/device/radio/beacon/B in world) var/turf/T = get_turf(B) if(T.z == ZLEVEL_STATION) L += B if(!L.len) - user << "The [src.name] failed to create a wormhole." + user << "The [src.name] found no beacons in the world to anchor a wormhole to." return var/chosen_beacon = pick(L) var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100) @@ -511,25 +532,27 @@ playsound(src,'sound/effects/sparks4.ogg',50,1) qdel(src) - -/obj/item/device/wormhole_jaunter/lifebuoy - name = "wormhole lifebuoy" - desc = "A single use device using similar technology to the wormhole jaunter. In addition, this belt has velocity and depth sensors that will trigger the device automatically if the user falls into a chasm, saving them from their trip into the darkness. Must be worn around the users waist in order to function in this way." - slot_flags = SLOT_BELT - -/obj/item/device/wormhole_jaunter/lifebuoy/emp_act(power) +/obj/item/device/wormhole_jaunter/emp_act(power) var/triggered = FALSE - if(power == 1) - triggered = TRUE - else if(power == 2 && prob(50)) - triggered = TRUE + + if(usr.get_item_by_slot(slot_belt) == src) + if(power == 1) + triggered = TRUE + else if(power == 2 && prob(50)) + triggered = TRUE + if(triggered) usr.visible_message("The [src] overloads and activates!") activate(usr) -/obj/item/device/wormhole_jaunter/lifebuoy/proc/chasm_protect() - usr.visible_message("[usr]'s [src] activates, saving them from the chasm!") - activate(usr) +/obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user) + if(user.get_item_by_slot(slot_belt) == src) + user.visible_message("[user]'s [src] activates, saving them from the chasm!") + activate(user) + else + // TIME TO TAUNT THEM + user.visible_message("The [src] is not attached to [user]'s belt, preventing it from saving them from the chasm. RIP.") + /obj/effect/portal/wormhole/jaunt_tunnel name = "jaunt tunnel" @@ -542,6 +565,7 @@ return if(istype(M, /atom/movable)) if(do_teleport(M, target, 6)) + // KERPLUNK playsound(M,'sound/weapons/resonator_blast.ogg',50,1) if(iscarbon(M)) var/mob/living/carbon/L = M diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 63124de3a3f..d66c6689214 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -574,9 +574,14 @@ return if(istype(AM, /mob/living/carbon/human)) var/mob/living/carbon/human/H = AM - if(istype(H.belt, /obj/item/device/wormhole_jaunter/lifebuoy)) - var/obj/item/device/wormhole_jaunter/lifebuoy/L = H.belt - L.chasm_protect() + // If we have more than one type of chasm reacting item, then + // should change this to some sort of flag on /obj/item and check + // the mob's contents. But for now this will do. + if(istype(H.belt, /obj/item/device/wormhole_jaunter)) + var/obj/item/device/wormhole_jaunter/J = H.belt + // This also does the belt check in case it's ever transformed + // to be more general. + J.chasm_react(H) return drop(AM) From fe17fd395b83984de192b5f6699eb970881446ca Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Sat, 23 Apr 2016 12:53:16 +0100 Subject: [PATCH 3/6] Changed stabilizer name to stabilizing serum --- code/modules/mining/equipment_locker.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 58f3812fb20..21d1a0faf87 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -1068,10 +1068,10 @@ /*********************Hivelord stabilizer****************/ /obj/item/weapon/hivelordstabilizer - name = "legion's heart stabilizer" + name = "stabilizing serum" icon = 'icons/obj/chemical.dmi' icon_state = "bottle19" - desc = "Inject a legion's heart with this stabilizer to preserve its healing powers indefinitely." + desc = "Inject certain types of monster organs with this stabilizer to preserve their healing powers indefinitely." w_class = 1 origin_tech = "biotech=1" @@ -1130,7 +1130,7 @@ new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300), new /datum/data/mining_equipment("Monkey Cube", /obj/item/weapon/reagent_containers/food/snacks/monkeycube, 300), new /datum/data/mining_equipment("Toolbelt", /obj/item/weapon/storage/belt/utility, 350), - new /datum/data/mining_equipment("Hivelord Stabilizer", /obj/item/weapon/hivelordstabilizer, 400), + new /datum/data/mining_equipment("Stabilizing Serum", /obj/item/weapon/hivelordstabilizer, 400), new /datum/data/mining_equipment("Shelter Capsule", /obj/item/weapon/survivalcapsule, 400), new /datum/data/mining_equipment("GAR scanners", /obj/item/clothing/glasses/meson/gar, 500), new /datum/data/mining_equipment("Sulphuric Acid", /obj/item/weapon/reagent_containers/glass/beaker/sulphuric, 500), From 97b5e3918c3df404edb324a2547e3779d9d3f5e6 Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Sat, 23 Apr 2016 17:39:05 +0100 Subject: [PATCH 4/6] Removed comments --- code/modules/mining/equipment_locker.dm | 25 ++++--------------------- code/modules/mining/mine_turfs.dm | 5 ----- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 21d1a0faf87..488c768428e 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -492,26 +492,10 @@ /obj/item/device/wormhole_jaunter/proc/turf_check(mob/user) var/turf/device_turf = get_turf(user) - var/status = 0 - // doesn't work if - // - you're in nullspace (HOW?) - if(!device_turf) - status = 182 - // - you're on centcom - if(device_turf.z == 2) - status = 274 - // - you're on a z level higher than you could normally reach - // (we currently have 9 legal z levels, should be a way of determining - // that programatically) - if(device_turf.z >= 10) - status = 1483 - - if(status != 0) - usr << "\icon[src] INVALID LOCATION: ERROR CODE [status]" - // turf_check returns 0 if failure, so it's false if broken - return 0 - else - return 1 + if(!device_turf||device_turf.z==2||device_turf.z>=7) + user << "You're having difficulties getting the [src.name] to work." + return FALSE + return TRUE /obj/item/device/wormhole_jaunter/proc/activate(mob/user) if(!turf_check(user)) @@ -550,7 +534,6 @@ user.visible_message("[user]'s [src] activates, saving them from the chasm!") activate(user) else - // TIME TO TAUNT THEM user.visible_message("The [src] is not attached to [user]'s belt, preventing it from saving them from the chasm. RIP.") diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index d66c6689214..17b9ceaeecb 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -574,13 +574,8 @@ return if(istype(AM, /mob/living/carbon/human)) var/mob/living/carbon/human/H = AM - // If we have more than one type of chasm reacting item, then - // should change this to some sort of flag on /obj/item and check - // the mob's contents. But for now this will do. if(istype(H.belt, /obj/item/device/wormhole_jaunter)) var/obj/item/device/wormhole_jaunter/J = H.belt - // This also does the belt check in case it's ever transformed - // to be more general. J.chasm_react(H) return drop(AM) From 1f2c405763337587d117fdd81c1907a63b831df3 Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Sun, 24 Apr 2016 15:59:57 +0100 Subject: [PATCH 5/6] Changes messages, based on feedback --- code/modules/mining/equipment_locker.dm | 6 +++--- code/modules/mining/mine_turfs.dm | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 488c768428e..6d19f786131 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -531,10 +531,10 @@ /obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user) if(user.get_item_by_slot(slot_belt) == src) - user.visible_message("[user]'s [src] activates, saving them from the chasm!") + user << "Your [src] activates, saving you from the chasm!") activate(user) else - user.visible_message("The [src] is not attached to [user]'s belt, preventing it from saving them from the chasm. RIP.") + user << "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP.") /obj/effect/portal/wormhole/jaunt_tunnel @@ -1061,7 +1061,7 @@ /obj/item/weapon/hivelordstabilizer/afterattack(obj/item/organ/internal/M, mob/user) var/obj/item/organ/internal/hivelord_core/C = M if(!istype(C, /obj/item/organ/internal/hivelord_core)) - user << "The stabilizer only works on legion's hearts." + user << "The stabilizer only works on certain types of monster organs, generally regenerative in nature." return ..() C.preserved = 1 user << "You inject the [M] with the stabilizer. It will no longer go inert." diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 17b9ceaeecb..491db033ef7 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -576,6 +576,8 @@ var/mob/living/carbon/human/H = AM if(istype(H.belt, /obj/item/device/wormhole_jaunter)) var/obj/item/device/wormhole_jaunter/J = H.belt + // To freak out any bystanders + visible_message("[H] falls into [src]!") J.chasm_react(H) return drop(AM) From c29f8478d7a66c2363e497c023a2d712fd6dd789 Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Sun, 24 Apr 2016 16:08:36 +0100 Subject: [PATCH 6/6] Compiles now --- code/modules/mining/equipment_locker.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 6d19f786131..aea31a8d9cf 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -531,10 +531,10 @@ /obj/item/device/wormhole_jaunter/proc/chasm_react(mob/user) if(user.get_item_by_slot(slot_belt) == src) - user << "Your [src] activates, saving you from the chasm!") + user << "Your [src] activates, saving you from the chasm!" activate(user) else - user << "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP.") + user << "The [src] is not attached to your belt, preventing it from saving you from the chasm. RIP." /obj/effect/portal/wormhole/jaunt_tunnel