diff --git a/baystation12.dme b/baystation12.dme index c20a1002eba..eda42d4746c 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -820,6 +820,7 @@ #include "code\modules\maps\reader.dm" #include "code\modules\maps\swapmaps.dm" #include "code\modules\maps\writer.dm" +#include "code\modules\mining\abandonedcrates.dm" #include "code\modules\mining\machine_input_output_plates.dm" #include "code\modules\mining\machine_processing.dm" #include "code\modules\mining\machine_stacking.dm" diff --git a/baystation12.int b/baystation12.int index b82874fded5..d24808c633e 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,6 +1,11 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 +WINDOW: code\modules\research\designs.dm;code\game\objects\items\devices\PDA\PDA.dm;code\game\objects\items\weapons\implants\implantfreedom.dm;code\modules\clothing\under\chameleon.dm;code\modules\mining\abandonedcrates.dm;code\modules\mining\mine_turfs.dm +LAST_COMPILE_VERSION: 501.1217 +DIR: code code\ATMOSPHERICS code\game code\game\objects code\game\objects\closets code\game\objects\items code\game\objects\items\devices code\game\objects\items\devices\PDA code\game\objects\items\devices\radio code\game\objects\items\weapons code\game\objects\items\weapons\implants code\modules code\modules\clothing code\modules\clothing\spacesuits code\modules\clothing\under code\modules\mining code\modules\reagents code\modules\reagents\reagent_containers code\modules\research +FILE: code\modules\mining\abandonedcrates.dm +LAST_COMPILE_TIME: 1384930775 AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm new file mode 100644 index 00000000000..d55c7e329ac --- /dev/null +++ b/code/modules/mining/abandonedcrates.dm @@ -0,0 +1,134 @@ +/obj/structure/closet/crate/secure/loot + name = "abandoned crate" + desc = "What could be inside?" + icon_state = "securecrate" + icon_opened = "securecrateopen" + icon_closed = "securecrate" + var/code = null + var/lastattempt = null + var/attempts = 3 + locked = 1 + var/min = 1 + var/max = 10 + +/obj/structure/closet/crate/secure/loot/New() + ..() + code = rand(min,max) + var/loot = rand(1,30) + switch(loot) + if(1) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src) + new/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src) + new/obj/item/weapon/lighter/zippo(src) + if(2) + new/obj/item/weapon/pickaxe/drill(src) + new/obj/item/device/taperecorder(src) + new/obj/item/clothing/suit/space/rig(src) + new/obj/item/clothing/head/helmet/space/rig(src) + if(3) + for(var/i = 0, i < 12, i++) + new/obj/item/weapon/coin/diamond(src) + if(4) + new/obj/item/weapon/bananapeel(src) + if(5) + for(var/i = 0, i < 6, i++) + new/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake(src) + new/obj/item/weapon/lighter/zippo(src) + if(7) + new/obj/item/weapon/reagent_containers/glass/beaker/bluespace(src) + if(9 to 10) + for(var/i = 0, i < 10, i++) + new/obj/item/weapon/ore/diamond(src) + if(11) + return + if(12) + new/obj/item/seeds/deathberryseed(src) + new/obj/item/seeds/deathnettleseed(src) + if(13) + new/obj/machinery/hydroponics(src) + if(14) + new/obj/item/seeds/cashseed(src) + if(15) + for(var/i = 0, i < 3, i++) + new/obj/item/weapon/reagent_containers/glass/beaker/noreact(src) + if(16 to 17) + for(var/i = 0, i < 9, i++) + new/obj/item/bluespace_crystal(src) + if(19) + for(var/i = 0, i < 4, i++) + new/obj/item/weapon/melee/classic_baton(src) + if(20) + new/obj/item/weapon/storage/lockbox/clusterbang(src) + if(21) + new/obj/item/weapon/aiModule/robocop(src) + if(22) + new/obj/item/clothing/under/chameleon(src) + for(var/i = 0, i < 7, i++) + new/obj/item/clothing/tie/horrible(src) + if(23) + new/obj/item/clothing/under/shorts(src) + new/obj/item/clothing/under/shorts/red(src) + new/obj/item/clothing/under/shorts/blue(src) + //Dummy crates start here. + if(24 to 29) + return + if(8) + return + if(6) + return + if(18) + return + //Dummy crates end here. + if(30) + for(var/i = 0, i < 4, i++) + new/obj/item/weapon/melee/baton(src) + +/obj/structure/closet/crate/secure/loot/attack_hand(mob/user as mob) + if(locked) + user << "The crate is locked with a Deca-code lock." + var/input = input(usr, "Enter digit from [min] to [max].", "Deca-Code Lock", "") as num + if(in_range(src, user)) + input = Clamp(input, 0, 10) + if (input == code) + user << "The crate unlocks!" + locked = 0 + else if (input == null || input > max || input < min) + user << "You leave the crate alone." + else + user << "A red light flashes." + lastattempt = input + attempts-- + if (attempts == 0) + user << "The crate's anti-tamper system activates!" + var/turf/T = get_turf(src.loc) + explosion(T, 0, 1, 2, 1) + del(src) + return + else + user << "You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out." + return + else + return ..() + +/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(locked) + if (istype(W, /obj/item/weapon/card/emag)) + user << "The crate unlocks!" + locked = 0 + if (istype(W, /obj/item/device/multitool)) + user << "DECA-CODE LOCK REPORT:" + if (attempts == 1) + user << "* Anti-Tamper Bomb will activate on next failed access attempt." + else + user << "* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts." + if (lastattempt == null) + user << " has been made to open the crate thus far." + return + // hot and cold + if (code > lastattempt) + user << "* Last access attempt lower than expected code." + else + user << "* Last access attempt higher than expected code." + else ..() + else ..() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 83077154a84..c410a51c00b 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -486,7 +486,11 @@ commented out in r5061, I left it because of the shroom thingies var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid) N.fullUpdateMineralOverlays() - + var/crate = rand(1,30) + switch(crate) + if(1) + visible_message("After digging, you find an old dusty crate buried within!") + new/obj/structure/closet/crate/secure/loot(src) return /turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 40e27519cca..b9d25c2677b 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1756,6 +1756,7 @@ datum/design/cart_security build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/security" + locked = 1 datum/design/cart_janitor name = "CustodiPRO Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1796,6 +1797,7 @@ datum/design/cart_quartermaster build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/quartermaster" + locked = 1 datum/design/cart_hop name = "Human Resources 9001 Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1804,6 +1806,7 @@ datum/design/cart_hop build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/hop" + locked = 1 datum/design/cart_hos name = "R.O.B.U.S.T. DELUXE Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1812,6 +1815,7 @@ datum/design/cart_hos build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/hos" + locked = 1 datum/design/cart_ce name = "Power-On DELUXE Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1820,6 +1824,7 @@ datum/design/cart_ce build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/ce" + locked = 1 datum/design/cart_cmo name = "Med-U DELUXE Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1828,6 +1833,7 @@ datum/design/cart_cmo build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/cmo" + locked = 1 datum/design/cart_rd name = "Signal Ace DELUXE Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1836,6 +1842,7 @@ datum/design/cart_rd build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/rd" + locked = 1 datum/design/cart_captain name = "Value-PAK Cartridge" desc = "A data cartridge for portable microcomputers." @@ -1844,11 +1851,4 @@ datum/design/cart_captain build_type = PROTOLATHE materials = list("$metal" = 50, "$glass" = 50) build_path = "/obj/item/weapon/cartridge/captain" -datum/design/cart_traitor - name = "Detomatix Cart" - desc = "A data cartridge for portable microcomputers." - id = "cart_traitor" - req_tech = list("syndicate" = 2, "powerstorage" = 3) - build_type = PROTOLATHE - materials = list("$metal" = 50, "$glass" = 50) - build_path = "/obj/item/weapon/cartridge/syndicate" + locked = 1