From 4e8851a1c7c53ed2778fbc0ebbd392ed08b31a6c Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Fri, 11 Mar 2011 22:38:08 +0000 Subject: [PATCH] Yet another wonderful design from R&D! Dubbed the "Bag of Holding", this latest wonder is a backpack that has had the interior filled with a Bluespace generator. This allows for unmatched item storage potential! The generator has proven perfectly reliable under light use, but heavy loads have been proven to cause strain, eventually leading to total failure and loss of any stored items. Additionally, the generator does NOT play nice with other applications of Bluespace, do not wear or carry the device while attempting to teleport, or attempt to place one into the Bluespace pocket of a second device. The Bluespace interface has been observed to destabilize gravitational singularities. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1176 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/teleporter.dm | 25 ++++++++ code/game/objects/storage/backpack.dm | 61 ++++++++++++++++++- code/game/research/designs.dm | 14 +++++ code/modules/power/singularity/singularity.dm | 5 ++ config/admins.txt | 5 +- data/mode.txt | 2 +- tgstation.dme | 1 - 7 files changed, 105 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index c9f8532563d..a4aa56e376f 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -182,6 +182,31 @@ P.show_message(text("\red The [] bounces off of the portal!", M.name), 1) return +//Bags of Holding cause bluespace teleportation to go funky. --NeoFite + if (istype(M, /mob)) + var/mob/MM = M + if(MM.check_contents_for(/obj/item/weapon/storage/backpack/holding)) + MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!" + precision = rand(1,100) + if (istype(M, /obj/item/weapon/storage/backpack/holding)) + precision = rand(1,100) + for (var/atom/O in M.contents) //I'm pretty sure this accounts for the maximum amount of container in container stacking. --NeoFite + if (istype(O, /obj/item/weapon/storage) || istype(O, /obj/item/weapon/gift)) + for (var/obj/OO in O.contents) + if (istype(OO, /obj/item/weapon/storage) || istype(OO, /obj/item/weapon/gift)) + for (var/obj/OOO in OO.contents) + if (istype(OOO, /obj/item/weapon/storage/backpack/holding)) + precision = rand(1,100) + if (istype(OO, /obj/item/weapon/storage/backpack/holding)) + precision = rand(1,100) + if (istype(O, /obj/item/weapon/storage/backpack/holding)) + precision = rand(1,100) + if (istype(O, /mob)) + var/mob/MM = O + if(MM.check_contents_for(/obj/item/weapon/storage/backpack/holding)) + precision = rand(1,100) + + var/turf/destturf = get_turf(destination) var/tx = destturf.x + rand(precision * -1, precision) diff --git a/code/game/objects/storage/backpack.dm b/code/game/objects/storage/backpack.dm index b0ef44e0d50..9ad0abf9b7d 100644 --- a/code/game/objects/storage/backpack.dm +++ b/code/game/objects/storage/backpack.dm @@ -1,6 +1,6 @@ /obj/item/weapon/storage/backpack/New() - - new /obj/item/weapon/storage/box( src ) + if (!istype(src, /obj/item/weapon/storage/backpack/holding)) + new /obj/item/weapon/storage/box( src ) ..() return @@ -63,3 +63,60 @@ O.show_message(text("\blue [] has added [] to []!", user, W, src), 1) //Foreach goto(206) return + +/obj/item/weapon/storage/backpack/holding + name = "Bag of Holding" + desc = "A backpack that opens into a localized pocket of Blue Space." + origin_tech = "bluespace=4" + + New() + ..() + return + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(crit_fail) + user << "\red The Bluespace generator isn't working." + return + + if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail) + user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!" + del(W) + new /obj/machinery/singularity (get_turf(src)) + del(src) + return + + if (src.contents.len >= 7) + user << "\red The Bluespace interface currently does not allow for more than 7 items to be stored. We're working on it! --R&D" + return + if (W.w_class > 3 || src.loc == W) + if(!failcheck(user)) + return + var/t + for(var/obj/item/weapon/O in src) + t += O.w_class + //Foreach goto(46) + t += W.w_class + if (t > 20) + if(!failcheck(user)) + return + playsound(src.loc, "rustle", 50, 1, -5) + user.u_equip(W) + W.loc = src + if ((user.client && user.s_active != src)) + user.client.screen -= W + src.orient2hud(user) + W.dropped(user) + if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY + add_fingerprint(user) + for(var/mob/O in viewers(user, null)) + O.show_message(text("\blue [] has added [] to []!", user, W, src), 1) + + proc/failcheck(mob/user as mob) + if (prob(src.reliability)) return 1 //No failure + if (prob(src.reliability)) + user << "\red The Bluespace portal resists your attempt to add another item." //light failure + else + user << "\red The Bluespace generator malfunctions!" + for (var/obj/O in src.contents) //it broke, delete what was in it + del(O) + crit_fail = 1 diff --git a/code/game/research/designs.dm b/code/game/research/designs.dm index 67cb6dace0c..c725df69b2a 100644 --- a/code/game/research/designs.dm +++ b/code/game/research/designs.dm @@ -785,6 +785,20 @@ datum reliability_base = 79 build_path = "/obj/item/weapon/chem_grenade/large" +///////////////////////////////////////// +//////////////Blue Space///////////////// +///////////////////////////////////////// + + bag_holding + name = "Bag of Holding" + desc = "A backpack that opens into a localized pocket of Blue Space." + id = "bag_holding" + req_tech = list("bluespace" = 4) + build_type = PROTOLATHE + materials = list("$gold" = 1000, "$diamond" = 500, "$uranium" = 250) + reliability_base = 80 + build_path = "/obj/item/weapon/storage/backpack/holding" + ///////////////////////////////////////// //////////////////Test/////////////////// ///////////////////////////////////////// diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index bcd1a37f504..0b9b3daea3e 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -214,6 +214,11 @@ var/global/list/uneatable = list( consume(var/atom/A) + if (istype(A,/obj/item/weapon/storage/backpack/holding)) + del(A) + explosion(src.loc,10,15,20,40) + if(src) del(src) + return var/gain = 0 if(is_type_in_list(A, uneatable)) return 0 diff --git a/config/admins.txt b/config/admins.txt index 4fcb5fd4271..2989e68b087 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -1,9 +1,6 @@ deuryn - Host tle - Host - -uhangi - Host - -uristmcdorf - Host +neofite - Host mport2004 - Coder \ No newline at end of file diff --git a/data/mode.txt b/data/mode.txt index ef18df98db4..bd81a61cbfd 100644 --- a/data/mode.txt +++ b/data/mode.txt @@ -1 +1 @@ -extended +traitor diff --git a/tgstation.dme b/tgstation.dme index a7d6956c473..aa6f4cb3662 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -429,7 +429,6 @@ #include "code\game\mecha\mecha_control_console.dm" #include "code\game\mecha\mecha_wreckage.dm" #include "code\game\mecha\combat\combat.dm" -#include "code\game\mecha\combat\durand.dm" #include "code\game\mecha\combat\gygax.dm" #include "code\game\mecha\combat\honker.dm" #include "code\game\mecha\combat\marauder.dm"