diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 3e6edebb53..9514be618c 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -22,6 +22,11 @@ Mineral Sheets /obj/item/stack/sheet/mineral icon = 'icons/obj/mining.dmi' +/obj/item/stack/sheet/mineral/Initialize(mapload) + pixel_x = rand(-4, 4) + pixel_y = rand(-4, 4) + . = ..() + /* * Sandstone */ @@ -31,9 +36,7 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \ new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("aesthetic volcanic floor tile", /obj/item/stack/tile/basalt, 2, 2, 4, 20), \ new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("Breakdown into sand", /obj/item/weapon/ore/glass, 1, one_per_turf = 0, on_floor = 1), \ -/* new/datum/stack_recipe("sandstone wall", ???), \ - new/datum/stack_recipe("sandstone floor", ???),\ */ + new/datum/stack_recipe("Breakdown into sand", /obj/item/weapon/ore/glass, 1, one_per_turf = 0, on_floor = 1) \ )) /obj/item/stack/sheet/mineral/sandstone @@ -49,9 +52,7 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \ /obj/item/stack/sheet/mineral/sandstone/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.sandstone_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /obj/item/stack/sheet/mineral/sandstone/thirty amount = 30 @@ -74,9 +75,24 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \ /obj/item/stack/sheet/mineral/sandbags/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.sandbag_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() + +/obj/item/weapon/emptysandbag + name = "empty sandbag" + desc = "A bag to be filled with sand." + icon = 'icons/obj/items.dmi' + icon_state = "sandbag" + w_class = WEIGHT_CLASS_TINY + +/obj/item/weapon/emptysandbag/attackby(obj/item/W, mob/user, params) + if(istype(W,/obj/item/weapon/ore/glass)) + to_chat(user, "You fill the sandbag.") + var/obj/item/stack/sheet/mineral/sandbags/I = new /obj/item/stack/sheet/mineral/sandbags + qdel(src) + user.put_in_hands(I) + qdel(W) + else + return ..() /* * Diamond @@ -99,9 +115,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \ /obj/item/stack/sheet/mineral/diamond/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.diamond_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* * Uranium @@ -123,9 +137,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \ /obj/item/stack/sheet/mineral/uranium/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.uranium_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* * Plasma @@ -149,9 +161,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \ /obj/item/stack/sheet/mineral/plasma/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.plasma_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /obj/item/stack/sheet/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite @@ -190,9 +200,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \ /obj/item/stack/sheet/mineral/gold/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.gold_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* * Silver @@ -217,9 +225,7 @@ GLOBAL_LIST_INIT(silver_recipes, list ( \ /obj/item/stack/sheet/mineral/silver/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.silver_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* * Clown @@ -239,9 +245,7 @@ GLOBAL_LIST_INIT(clown_recipes, list ( \ /obj/item/stack/sheet/mineral/bananium/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.clown_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* * Titanium @@ -265,9 +269,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \ /obj/item/stack/sheet/mineral/titanium/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.titanium_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* @@ -292,9 +294,7 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list ( \ /obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.plastitanium_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /* @@ -316,9 +316,7 @@ GLOBAL_LIST_INIT(snow_recipes, list ( \ /obj/item/stack/sheet/mineral/snow/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.snow_recipes - pixel_x = rand(0,4)-4 - pixel_y = rand(0,4)-4 - ..() + . = ..() /****************************** Others ****************************/ @@ -347,7 +345,7 @@ GLOBAL_LIST_INIT(adamantine_recipes, list( /obj/item/stack/sheet/mineral/adamantine/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.adamantine_recipes - ..() + . = ..() /* * Mythril @@ -384,4 +382,4 @@ GLOBAL_LIST_INIT(abductor_recipes, list ( \ /obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.abductor_recipes - ..() \ No newline at end of file + . = ..() diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm new file mode 100644 index 0000000000..7c31360a6b --- /dev/null +++ b/code/modules/mining/equipment/mining_tools.dm @@ -0,0 +1,111 @@ +/*****************Pickaxes & Drills & Shovels****************/ +/obj/item/weapon/pickaxe + name = "pickaxe" + icon = 'icons/obj/mining.dmi' + icon_state = "pickaxe" + flags = CONDUCT + slot_flags = SLOT_BELT | SLOT_BACK + force = 15 + throwforce = 10 + item_state = "pickaxe" + w_class = WEIGHT_CLASS_BULKY + materials = list(MAT_METAL=2000) //one sheet, but where can you make them? + var/digspeed = 40 + var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg') + origin_tech = "materials=2;engineering=3" + attack_verb = list("hit", "pierced", "sliced", "attacked") + +/obj/item/weapon/pickaxe/mini + name = "compact pickaxe" + desc = "A smaller, compact version of the standard pickaxe." + icon_state = "minipick" + force = 10 + throwforce = 7 + slot_flags = SLOT_BELT + w_class = WEIGHT_CLASS_NORMAL + materials = list(MAT_METAL=1000) + +/obj/item/weapon/pickaxe/proc/playDigSound() + playsound(src, pick(digsound),50,1) + +/obj/item/weapon/pickaxe/silver + name = "silver-plated pickaxe" + icon_state = "spickaxe" + item_state = "spickaxe" + digspeed = 20 //mines faster than a normal pickaxe, bought from mining vendor + origin_tech = "materials=3;engineering=4" + desc = "A silver-plated pickaxe that mines slightly faster than standard-issue." + force = 17 + +/obj/item/weapon/pickaxe/diamond + name = "diamond-tipped pickaxe" + icon_state = "dpickaxe" + item_state = "dpickaxe" + digspeed = 14 + origin_tech = "materials=5;engineering=4" + desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt." + force = 19 + +/obj/item/weapon/pickaxe/drill + name = "mining drill" + icon_state = "handdrill" + item_state = "jackhammer" + slot_flags = SLOT_BELT + digspeed = 25 //available from roundstart, faster than a pickaxe. + digsound = list('sound/weapons/drill.ogg') + hitsound = 'sound/weapons/drill.ogg' + origin_tech = "materials=2;powerstorage=2;engineering=3" + desc = "An electric mining drill for the especially scrawny." + +/obj/item/weapon/pickaxe/drill/cyborg + name = "cyborg mining drill" + desc = "An integrated electric mining drill." + flags = NODROP + +/obj/item/weapon/pickaxe/drill/diamonddrill + name = "diamond-tipped mining drill" + icon_state = "diamonddrill" + digspeed = 7 + origin_tech = "materials=6;powerstorage=4;engineering=4" + desc = "Yours is the drill that will pierce the heavens!" + +/obj/item/weapon/pickaxe/drill/cyborg/diamond //This is the BORG version! + name = "diamond-tipped cyborg mining drill" //To inherit the NODROP flag, and easier to change borg specific drill mechanics. + icon_state = "diamonddrill" + digspeed = 7 + +/obj/item/weapon/pickaxe/drill/jackhammer + name = "sonic jackhammer" + icon_state = "jackhammer" + item_state = "jackhammer" + digspeed = 5 //the epitome of powertools. extremely fast mining, laughs at puny walls + origin_tech = "materials=6;powerstorage=4;engineering=5;magnets=4" + digsound = list('sound/weapons/sonic_jackhammer.ogg') + hitsound = 'sound/weapons/sonic_jackhammer.ogg' + desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls." + +/obj/item/weapon/shovel + name = "shovel" + desc = "A large tool for digging and moving dirt." + icon = 'icons/obj/mining.dmi' + icon_state = "shovel" + flags = CONDUCT + slot_flags = SLOT_BELT + force = 8 + var/digspeed = 20 + throwforce = 4 + item_state = "shovel" + w_class = WEIGHT_CLASS_NORMAL + materials = list(MAT_METAL=50) + origin_tech = "materials=2;engineering=2" + attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") + sharpness = IS_SHARP + +/obj/item/weapon/shovel/spade + name = "spade" + desc = "A small tool for digging and moving dirt." + icon_state = "spade" + item_state = "spade" + force = 5 + throwforce = 7 + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm new file mode 100644 index 0000000000..e28b0c51ab --- /dev/null +++ b/code/modules/mining/equipment/survival_pod.dm @@ -0,0 +1,333 @@ +/*****************************Survival Pod********************************/ +/area/survivalpod + name = "\improper Emergency Shelter" + icon_state = "away" + dynamic_lighting = DYNAMIC_LIGHTING_FORCED + requires_power = FALSE + has_gravity = TRUE + +//Survival Capsule +/obj/item/weapon/survivalcapsule + name = "bluespace shelter capsule" + desc = "An emergency shelter stored within a pocket of bluespace." + icon_state = "capsule" + icon = 'icons/obj/mining.dmi' + w_class = WEIGHT_CLASS_TINY + origin_tech = "engineering=3;bluespace=3" + var/template_id = "shelter_alpha" + var/datum/map_template/shelter/template + var/used = FALSE + +/obj/item/weapon/survivalcapsule/proc/get_template() + if(template) + return + template = SSmapping.shelter_templates[template_id] + if(!template) + throw EXCEPTION("Shelter template ([template_id]) not found!") + qdel(src) + +/obj/item/weapon/survivalcapsule/Destroy() + template = null // without this, capsules would be one use. per round. + . = ..() + +/obj/item/weapon/survivalcapsule/examine(mob/user) + . = ..() + get_template() + to_chat(user, "This capsule has the [template.name] stored.") + to_chat(user, template.description) + +/obj/item/weapon/survivalcapsule/attack_self() + //Can't grab when capsule is New() because templates aren't loaded then + get_template() + if(!used) + loc.visible_message("\The [src] begins to shake. Stand back!") + used = TRUE + sleep(50) + var/turf/deploy_location = get_turf(src) + var/status = template.check_deploy(deploy_location) + switch(status) + if(SHELTER_DEPLOY_BAD_AREA) + src.loc.visible_message("\The [src] will not function in this area.") + if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS) + var/width = template.width + var/height = template.height + src.loc.visible_message("\The [src] doesn't have room to deploy! You need to clear a [width]x[height] area!") + + if(status != SHELTER_DEPLOY_ALLOWED) + used = FALSE + return + + playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1) + + var/turf/T = deploy_location + if(T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)//only report capsules away from the mining/lavaland level + message_admins("[ADMIN_LOOKUPFLW(usr)] activated a bluespace capsule away from the mining level! [ADMIN_JMP(T)]") + log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [get_area(T)][COORD(T)]") + template.load(deploy_location, centered = TRUE) + new /obj/effect/particle_effect/smoke(get_turf(src)) + qdel(src) + +/obj/item/weapon/survivalcapsule/luxury + name = "luxury bluespace shelter capsule" + desc = "An exorbitantly expensive luxury suite stored within a pocket of bluespace." + origin_tech = "engineering=3;bluespace=4" + template_id = "shelter_beta" + +//Pod objects + +//Window +/obj/structure/window/shuttle/survival_pod + name = "pod window" + icon = 'icons/obj/smooth_structures/pod_window.dmi' + icon_state = "smooth" + smooth = SMOOTH_MORE + canSmoothWith = list(/turf/closed/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod) + +/obj/structure/window/reinforced/survival_pod + name = "pod window" + icon = 'icons/obj/lavaland/survival_pod.dmi' + icon_state = "pwindow" + +//Door +/obj/machinery/door/airlock/survival_pod + name = "airlock" + icon = 'icons/obj/doors/airlocks/survival/survival.dmi' + overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi' + assemblytype = /obj/structure/door_assembly/door_assembly_pod + opacity = FALSE + glass = TRUE + var/expected_dir = SOUTH //we visually turn when shuttle rotated, but need to not turn for any other reason + +/obj/machinery/door/airlock/survival_pod/setDir(direction) + direction = expected_dir + ..() + +/obj/machinery/door/airlock/survival_pod/shuttleRotate(rotation) + expected_dir = angle2dir(rotation+dir2angle(dir)) + ..() + +/obj/machinery/door/airlock/survival_pod/vertical + dir = EAST + expected_dir = EAST + +/obj/structure/door_assembly/door_assembly_pod + name = "pod airlock assembly" + icon = 'icons/obj/doors/airlocks/survival/survival.dmi' + overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi' + airlock_type = /obj/machinery/door/airlock/survival_pod + anchored = TRUE + state = 1 + mineral = "glass" + material = "glass" + var/expected_dir = SOUTH + +/obj/structure/door_assembly/door_assembly_pod/setDir(direction) + direction = expected_dir + ..() + +/obj/structure/door_assembly/door_assembly_pod/shuttleRotate(rotation) + expected_dir = angle2dir(rotation+dir2angle(dir)) + ..() + +/obj/structure/door_assembly/door_assembly_pod/vertical + dir = EAST + expected_dir = EAST + +//Windoor +/obj/machinery/door/window/survival_pod + icon = 'icons/obj/lavaland/survival_pod.dmi' + icon_state = "windoor" + base_state = "windoor" + +//Table +/obj/structure/table/survival_pod + icon = 'icons/obj/lavaland/survival_pod.dmi' + icon_state = "table" + smooth = SMOOTH_FALSE + +//Sleeper +/obj/machinery/sleeper/survival_pod + icon = 'icons/obj/lavaland/survival_pod.dmi' + icon_state = "sleeper" + +/obj/machinery/sleeper/survival_pod/update_icon() + if(state_open) + cut_overlays() + else + add_overlay("sleeper_cover") + +//Computer +/obj/item/device/gps/computer + name = "pod computer" + icon_state = "pod_computer" + icon = 'icons/obj/lavaland/pod_computer.dmi' + anchored = TRUE + density = TRUE + pixel_y = -32 + +/obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) + playsound(src.loc, W.usesound, 50, 1) + user.visible_message("[user] disassembles the gps.", \ + "You start to disassemble the gps...", "You hear clanking and banging noises.") + if(do_after(user, 20*W.toolspeed, target = src)) + new /obj/item/device/gps(loc) + qdel(src) + return + return ..() + +/obj/item/device/gps/computer/attack_hand(mob/user) + attack_self(user) + +//Bed +/obj/structure/bed/pod + icon = 'icons/obj/lavaland/survival_pod.dmi' + icon_state = "bed" + +//Survival Storage Unit +/obj/machinery/smartfridge/survival_pod + name = "survival pod storage" + desc = "A heated storage unit." + icon_state = "donkvendor" + icon = 'icons/obj/lavaland/donkvendor.dmi' + icon_on = "donkvendor" + icon_off = "donkvendor" + light_range = 5 + light_power = 1.2 + light_color = "#DDFFD3" + max_n_of_items = 10 + pixel_y = -4 + flags = NODECONSTRUCT + +/obj/machinery/smartfridge/survival_pod/empty + name = "dusty survival pod storage" + desc = "A heated storage unit. This one's seen better days." + +/obj/machinery/smartfridge/survival_pod/empty/Initialize(mapload) + ..(mapload, TRUE) + +/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O) + if(istype(O, /obj/item)) + return 1 + return 0 + +/obj/machinery/smartfridge/survival_pod/Initialize(mapload, empty) + . = ..() + if(empty) + return + for(var/i in 1 to 5) + var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/warm/W = new(src) + load(W) + if(prob(50)) + var/obj/item/weapon/storage/pill_bottle/dice/D = new(src) + load(D) + else + var/obj/item/device/instrument/guitar/G = new(src) + load(G) + +//Fans +/obj/structure/fans + icon = 'icons/obj/lavaland/survival_pod.dmi' + icon_state = "fans" + name = "environmental regulation system" + desc = "A large machine releasing a constant gust of air." + anchored = TRUE + density = TRUE + var/arbitraryatmosblockingvar = TRUE + var/buildstacktype = /obj/item/stack/sheet/metal + var/buildstackamount = 5 + CanAtmosPass = ATMOS_PASS_NO + +/obj/structure/fans/deconstruct() + if(!(flags & NODECONSTRUCT)) + if(buildstacktype) + new buildstacktype(loc,buildstackamount) + qdel(src) + +/obj/structure/fans/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) + playsound(src.loc, W.usesound, 50, 1) + user.visible_message("[user] disassembles the fan.", \ + "You start to disassemble the fan...", "You hear clanking and banging noises.") + if(do_after(user, 20*W.toolspeed, target = src)) + deconstruct() + return ..() + +/obj/structure/fans/tiny + name = "tiny fan" + desc = "A tiny fan, releasing a thin gust of air." + layer = ABOVE_NORMAL_TURF_LAYER + density = FALSE + icon_state = "fan_tiny" + buildstackamount = 2 + +/obj/structure/fans/Initialize(mapload) + . = ..() + air_update_turf(1) + +/obj/structure/fans/Destroy() + var/turf/T = loc + . = ..() + T.air_update_turf(1) + +//Inivisible, indestructible fans +/obj/structure/fans/tiny/invisible + name = "air flow blocker" + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + invisibility = INVISIBILITY_ABSTRACT + +//Signs +/obj/structure/sign/mining + name = "nanotrasen mining corps sign" + desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims." + icon = 'icons/turf/walls/survival_pod_walls.dmi' + icon_state = "ntpod" + +/obj/structure/sign/mining/survival + name = "shelter sign" + desc = "A high visibility sign designating a safe shelter." + icon = 'icons/turf/walls/survival_pod_walls.dmi' + icon_state = "survival" + +//Fluff +/obj/structure/tubes + icon_state = "tubes" + icon = 'icons/obj/lavaland/survival_pod.dmi' + name = "tubes" + anchored = TRUE + layer = BELOW_MOB_LAYER + density = FALSE + +/obj/item/fakeartefact + name = "expensive forgery" + icon = 'icons/mob/screen_gen.dmi' + icon_state = "x2" + var/possible = list(/obj/item/ship_in_a_bottle, + /obj/item/weapon/gun/energy/pulse, + /obj/item/weapon/sleeping_carp_scroll, + /obj/item/weapon/melee/supermatter_sword, + /obj/item/weapon/shield/changeling, + /obj/item/weapon/lava_staff, + /obj/item/weapon/katana/energy, + /obj/item/weapon/hierophant_club, + /obj/item/weapon/his_grace, + /obj/item/weapon/gun/ballistic/minigun, + /obj/item/weapon/gun/ballistic/automatic/l6_saw, + /obj/item/weapon/gun/magic/staff/chaos, + /obj/item/weapon/gun/magic/staff/spellblade, + /obj/item/weapon/gun/magic/wand/death, + /obj/item/weapon/gun/magic/wand/fireball, + /obj/item/stack/telecrystal/twenty, + /obj/item/nuke_core, + /obj/item/phylactery, + /obj/item/riding_offhand, + /obj/item/weapon/banhammer) + +/obj/item/fakeartefact/Initialize() + . = ..() + var/obj/item/I = pick(possible) + name = initial(I.name) + icon = initial(I.icon) + desc = initial(I.desc) + icon_state = initial(I.icon_state) + item_state = initial(I.item_state) \ No newline at end of file diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 10b7bc1eac..b8f598c683 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -72,432 +72,9 @@ return ..() -/*********************Pickaxe & Drills**************************/ - -/obj/item/weapon/pickaxe - name = "pickaxe" - icon = 'icons/obj/mining.dmi' - icon_state = "pickaxe" - flags = CONDUCT - slot_flags = SLOT_BELT | SLOT_BACK - force = 15 - throwforce = 10 - item_state = "pickaxe" - w_class = WEIGHT_CLASS_BULKY - materials = list(MAT_METAL=2000) //one sheet, but where can you make them? - var/digspeed = 40 - var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg') - origin_tech = "materials=2;engineering=3" - attack_verb = list("hit", "pierced", "sliced", "attacked") - -/obj/item/weapon/pickaxe/mini - name = "compact pickaxe" - desc = "A smaller, compact version of the standard pickaxe." - icon_state = "minipick" - force = 10 - throwforce = 7 - slot_flags = SLOT_BELT - w_class = WEIGHT_CLASS_NORMAL - materials = list(MAT_METAL=1000) - -/obj/item/weapon/pickaxe/proc/playDigSound() - playsound(src, pick(digsound),50,1) - -/obj/item/weapon/pickaxe/silver - name = "silver-plated pickaxe" - icon_state = "spickaxe" - item_state = "spickaxe" - digspeed = 20 //mines faster than a normal pickaxe, bought from mining vendor - origin_tech = "materials=3;engineering=4" - desc = "A silver-plated pickaxe that mines slightly faster than standard-issue." - force = 17 - -/obj/item/weapon/pickaxe/diamond - name = "diamond-tipped pickaxe" - icon_state = "dpickaxe" - item_state = "dpickaxe" - digspeed = 14 - origin_tech = "materials=5;engineering=4" - desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt." - force = 19 - -/obj/item/weapon/pickaxe/drill - name = "mining drill" - icon_state = "handdrill" - item_state = "jackhammer" - slot_flags = SLOT_BELT - digspeed = 25 //available from roundstart, faster than a pickaxe. - digsound = list('sound/weapons/drill.ogg') - hitsound = 'sound/weapons/drill.ogg' - origin_tech = "materials=2;powerstorage=2;engineering=3" - desc = "An electric mining drill for the especially scrawny." - -/obj/item/weapon/pickaxe/drill/cyborg - name = "cyborg mining drill" - desc = "An integrated electric mining drill." - flags = NODROP - -/obj/item/weapon/pickaxe/drill/diamonddrill - name = "diamond-tipped mining drill" - icon_state = "diamonddrill" - digspeed = 7 - origin_tech = "materials=6;powerstorage=4;engineering=4" - desc = "Yours is the drill that will pierce the heavens!" - -/obj/item/weapon/pickaxe/drill/cyborg/diamond //This is the BORG version! - name = "diamond-tipped cyborg mining drill" //To inherit the NODROP flag, and easier to change borg specific drill mechanics. - icon_state = "diamonddrill" - digspeed = 7 - -/obj/item/weapon/pickaxe/drill/jackhammer - name = "sonic jackhammer" - icon_state = "jackhammer" - item_state = "jackhammer" - digspeed = 5 //the epitome of powertools. extremely fast mining, laughs at puny walls - origin_tech = "materials=6;powerstorage=4;engineering=5;magnets=4" - digsound = list('sound/weapons/sonic_jackhammer.ogg') - hitsound = 'sound/weapons/sonic_jackhammer.ogg' - desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls." - -/*****************************Shovel********************************/ - -/obj/item/weapon/shovel - name = "shovel" - desc = "A large tool for digging and moving dirt." - icon = 'icons/obj/mining.dmi' - icon_state = "shovel" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 8 - var/digspeed = 20 - throwforce = 4 - item_state = "shovel" - w_class = WEIGHT_CLASS_NORMAL - materials = list(MAT_METAL=50) - origin_tech = "materials=2;engineering=2" - attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") - sharpness = IS_SHARP - -/obj/item/weapon/shovel/spade - name = "spade" - desc = "A small tool for digging and moving dirt." - icon_state = "spade" - item_state = "spade" - force = 5 - throwforce = 7 - w_class = WEIGHT_CLASS_SMALL - -/obj/item/weapon/emptysandbag - name = "empty sandbag" - desc = "A bag to be filled with sand." - icon = 'icons/obj/items.dmi' - icon_state = "sandbag" - w_class = WEIGHT_CLASS_TINY - -/obj/item/weapon/emptysandbag/attackby(obj/item/W, mob/user, params) - if(istype(W,/obj/item/weapon/ore/glass)) - to_chat(user, "You fill the sandbag.") - var/obj/item/stack/sheet/mineral/sandbags/I = new /obj/item/stack/sheet/mineral/sandbags - qdel(src) - user.put_in_hands(I) - qdel(W) - else - return ..() - /**********************Mining car (Crate like thing, not the rail car)**************************/ /obj/structure/closet/crate/miningcar desc = "A mining car. This one doesn't work on rails, but has to be dragged." name = "Mining car (not for rails)" icon_state = "miningcar" - -/*****************************Survival Pod********************************/ - - -/area/survivalpod - name = "\improper Emergency Shelter" - icon_state = "away" - dynamic_lighting = DYNAMIC_LIGHTING_FORCED - requires_power = 0 - has_gravity = 1 - -/obj/item/weapon/survivalcapsule - name = "bluespace shelter capsule" - desc = "An emergency shelter stored within a pocket of bluespace." - icon_state = "capsule" - icon = 'icons/obj/mining.dmi' - w_class = WEIGHT_CLASS_TINY - origin_tech = "engineering=3;bluespace=3" - var/template_id = "shelter_alpha" - var/datum/map_template/shelter/template - var/used = FALSE - -/obj/item/weapon/survivalcapsule/proc/get_template() - if(template) - return - template = SSmapping.shelter_templates[template_id] - if(!template) - throw EXCEPTION("Shelter template ([template_id]) not found!") - qdel(src) - -/obj/item/weapon/survivalcapsule/Destroy() - template = null // without this, capsules would be one use. per round. - . = ..() - -/obj/item/weapon/survivalcapsule/examine(mob/user) - . = ..() - get_template() - to_chat(user, "This capsule has the [template.name] stored.") - to_chat(user, template.description) - -/obj/item/weapon/survivalcapsule/attack_self() - // Can't grab when capsule is New() because templates aren't loaded then - get_template() - if(used == FALSE) - src.loc.visible_message("\The [src] begins \ - to shake. Stand back!") - used = TRUE - sleep(50) - var/turf/deploy_location = get_turf(src) - var/status = template.check_deploy(deploy_location) - switch(status) - if(SHELTER_DEPLOY_BAD_AREA) - src.loc.visible_message("\The [src] \ - will not function in this area.") - if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS) - var/width = template.width - var/height = template.height - src.loc.visible_message("\The [src] \ - doesn't have room to deploy! You need to clear a \ - [width]x[height] area!") - - if(status != SHELTER_DEPLOY_ALLOWED) - used = FALSE - return - - playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1) - - var/turf/T = deploy_location - if(T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)//only report capsules away from the mining/lavaland level - message_admins("[ADMIN_LOOKUPFLW(usr)] activated a bluespace capsule away from the mining level! [ADMIN_JMP(T)]") - log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [get_area(T)][COORD(T)]") - template.load(deploy_location, centered = TRUE) - new /obj/effect/particle_effect/smoke(get_turf(src)) - qdel(src) - - - -//Pod turfs and objects - - -//Window -/obj/structure/window/shuttle/survival_pod - name = "pod window" - icon = 'icons/obj/smooth_structures/pod_window.dmi' - icon_state = "smooth" - smooth = SMOOTH_MORE - canSmoothWith = list(/turf/closed/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod) - -//Door -/obj/machinery/door/airlock/survival_pod - name = "airlock" - icon = 'icons/obj/doors/airlocks/survival/survival.dmi' - overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi' - assemblytype = /obj/structure/door_assembly/door_assembly_pod - opacity = 0 - glass = 1 - var/expected_dir = SOUTH //we visually turn when shuttle rotated, but need to not turn for any other reason - -/obj/machinery/door/airlock/survival_pod/setDir(direction) - direction = expected_dir - ..() - -/obj/machinery/door/airlock/survival_pod/shuttleRotate(rotation) - expected_dir = angle2dir(rotation+dir2angle(dir)) - ..() - -/obj/machinery/door/airlock/survival_pod/vertical - dir = EAST - expected_dir = EAST - -/obj/structure/door_assembly/door_assembly_pod - name = "pod airlock assembly" - icon = 'icons/obj/doors/airlocks/survival/survival.dmi' - overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi' - airlock_type = /obj/machinery/door/airlock/survival_pod - anchored = 1 - state = 1 - mineral = "glass" - material = "glass" - var/expected_dir = SOUTH - -/obj/structure/door_assembly/door_assembly_pod/setDir(direction) - direction = expected_dir - ..() - -/obj/structure/door_assembly/door_assembly_pod/shuttleRotate(rotation) - expected_dir = angle2dir(rotation+dir2angle(dir)) - ..() - -/obj/structure/door_assembly/door_assembly_pod/vertical - dir = EAST - expected_dir = EAST - -//Table -/obj/structure/table/survival_pod - icon = 'icons/obj/lavaland/survival_pod.dmi' - icon_state = "table" - smooth = SMOOTH_FALSE - -//Sleeper -/obj/machinery/sleeper/survival_pod - icon = 'icons/obj/lavaland/survival_pod.dmi' - icon_state = "sleeper" - -/obj/machinery/sleeper/survival_pod/update_icon() - if(state_open) - cut_overlays() - else - add_overlay("sleeper_cover") - -//Computer -/obj/item/device/gps/computer - name = "pod computer" - icon_state = "pod_computer" - icon = 'icons/obj/lavaland/pod_computer.dmi' - anchored = 1 - density = 1 - pixel_y = -32 - -/obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params) - if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) - playsound(src.loc, W.usesound, 50, 1) - user.visible_message("[user] disassembles the gps.", \ - "You start to disassemble the gps...", "You hear clanking and banging noises.") - if(do_after(user, 20*W.toolspeed, target = src)) - new /obj/item/device/gps(src.loc) - qdel(src) - return ..() - -/obj/item/device/gps/computer/attack_hand(mob/user) - attack_self(user) - -//Bed -/obj/structure/bed/pod - icon = 'icons/obj/lavaland/survival_pod.dmi' - icon_state = "bed" - -//Survival Storage Unit -/obj/machinery/smartfridge/survival_pod - name = "survival pod storage" - desc = "A heated storage unit." - icon_state = "donkvendor" - icon = 'icons/obj/lavaland/donkvendor.dmi' - icon_on = "donkvendor" - icon_off = "donkvendor" - light_range = 5 - light_power = 1.2 - light_color = "#DDFFD3" - max_n_of_items = 10 - pixel_y = -4 - flags = NODECONSTRUCT - -/obj/machinery/smartfridge/survival_pod/empty - name = "dusty survival pod storage" - desc = "A heated storage unit. This one's seen better days." - -/obj/machinery/smartfridge/survival_pod/empty/Initialize(mapload) - ..(mapload, TRUE) - -/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O) - if(istype(O, /obj/item)) - return 1 - return 0 - -/obj/machinery/smartfridge/survival_pod/Initialize(mapload, empty) - ..() - if(empty) - return - for(var/i in 1 to 5) - var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/warm/W = new(src) - load(W) - if(prob(50)) - var/obj/item/weapon/storage/pill_bottle/dice/D = new(src) - load(D) - else - var/obj/item/device/instrument/guitar/G = new(src) - load(G) - -//Fans -/obj/structure/fans - icon = 'icons/obj/lavaland/survival_pod.dmi' - icon_state = "fans" - name = "environmental regulation system" - desc = "A large machine releasing a constant gust of air." - anchored = 1 - density = 1 - var/arbitraryatmosblockingvar = TRUE - var/buildstacktype = /obj/item/stack/sheet/metal - var/buildstackamount = 5 - CanAtmosPass = ATMOS_PASS_NO - -/obj/structure/fans/deconstruct() - if(!(flags & NODECONSTRUCT)) - if(buildstacktype) - new buildstacktype(loc,buildstackamount) - qdel(src) - -/obj/structure/fans/attackby(obj/item/weapon/W, mob/user, params) - if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) - playsound(src.loc, W.usesound, 50, 1) - user.visible_message("[user] disassembles the fan.", \ - "You start to disassemble the fan...", "You hear clanking and banging noises.") - if(do_after(user, 20*W.toolspeed, target = src)) - deconstruct() - return ..() - -/obj/structure/fans/tiny - name = "tiny fan" - desc = "A tiny fan, releasing a thin gust of air." - layer = ABOVE_NORMAL_TURF_LAYER - density = 0 - icon_state = "fan_tiny" - buildstackamount = 2 - -/obj/structure/fans/New(loc) - ..() - air_update_turf(1) - -/obj/structure/fans/Destroy() - var/turf/T = loc - . = ..() - T.air_update_turf(1) - -//Inivisible, indestructible fans -/obj/structure/fans/tiny/invisible - name = "air flow blocker" - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF - invisibility = INVISIBILITY_ABSTRACT - - -//Signs -/obj/structure/sign/mining - name = "nanotrasen mining corps sign" - desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims." - icon = 'icons/turf/walls/survival_pod_walls.dmi' - icon_state = "ntpod" - -/obj/structure/sign/mining/survival - name = "shelter sign" - desc = "A high visibility sign designating a safe shelter." - icon = 'icons/turf/walls/survival_pod_walls.dmi' - icon_state = "survival" - -//Fluff -/obj/structure/tubes - icon_state = "tubes" - icon = 'icons/obj/lavaland/survival_pod.dmi' - name = "tubes" - anchored = 1 - layer = BELOW_MOB_LAYER - density = 0 diff --git a/tgstation.dme b/tgstation.dme index 050e661dc5..cfc637f503 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1491,7 +1491,9 @@ #include "code\modules\mining\equipment\lazarus_injector.dm" #include "code\modules\mining\equipment\marker_beacons.dm" #include "code\modules\mining\equipment\mineral_scanner.dm" +#include "code\modules\mining\equipment\mining_tools.dm" #include "code\modules\mining\equipment\resonator.dm" +#include "code\modules\mining\equipment\survival_pod.dm" #include "code\modules\mining\equipment\vendor_items.dm" #include "code\modules\mining\equipment\wormhole_jaunter.dm" #include "code\modules\mining\laborcamp\laborshuttle.dm"