diff --git a/archive/maps/southern_cross/southern_cross-1.dmm b/archive/maps/southern_cross/southern_cross-1.dmm index b22d8a5dbc..7cfa4a0fb3 100644 --- a/archive/maps/southern_cross/southern_cross-1.dmm +++ b/archive/maps/southern_cross/southern_cross-1.dmm @@ -63826,7 +63826,7 @@ /obj/structure/table/rack{ dir = 1 }, -/obj/item/storage/bag/ore, +/obj/item/ore_bag, /obj/random/maintenance/cargo, /obj/random/maintenance/cargo, /obj/random/maintenance/cargo, diff --git a/archive/maps/submaps/depreciated_vr/talon.dm b/archive/maps/submaps/depreciated_vr/talon.dm index 4b428ed54b..e6c744f6cc 100644 --- a/archive/maps/submaps/depreciated_vr/talon.dm +++ b/archive/maps/submaps/depreciated_vr/talon.dm @@ -386,7 +386,7 @@ Once in open space, consider disabling nonessential power-consuming electronics /obj/item/gps/mining/talonminer, /obj/item/clothing/gloves/black, /obj/item/analyzer, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/flashlight/lantern, /obj/item/shovel, /obj/item/pickaxe/drill, diff --git a/code/__defines/clothing.dm b/code/__defines/clothing.dm index 549cf6243f..8254289cc0 100644 --- a/code/__defines/clothing.dm +++ b/code/__defines/clothing.dm @@ -94,7 +94,7 @@ NOTICE: Do not leave trailing commas!!!! #define POCKET_MINING \ /obj/item/storage/excavation, \ /obj/item/storage/briefcase/inflatable, \ - /obj/item/storage/bag/ore, \ + /obj/item/ore_bag, \ /obj/item/pickaxe, \ /obj/item/shovel, \ /obj/item/stack/marker_beacon, \ diff --git a/code/datums/outfits/jobs/cargo.dm b/code/datums/outfits/jobs/cargo.dm index a8a1a80d5f..72e3a9811c 100644 --- a/code/datums/outfits/jobs/cargo.dm +++ b/code/datums/outfits/jobs/cargo.dm @@ -31,7 +31,7 @@ satchel_one = /obj/item/storage/backpack/satchel/eng id_type = /obj/item/card/id/cargo/miner pda_type = /obj/item/pda/shaftminer - backpack_contents = list(/obj/item/tool/crowbar = 1, /obj/item/storage/bag/ore = 1, /obj/item/mining_voucher = 1) + backpack_contents = list(/obj/item/tool/crowbar = 1, /obj/item/ore_bag = 1, /obj/item/mining_voucher = 1) flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL headset = /obj/item/radio/headset/miner diff --git a/code/datums/supplypacks/supply.dm b/code/datums/supplypacks/supply.dm index 77e2a2f287..8b34d131d4 100644 --- a/code/datums/supplypacks/supply.dm +++ b/code/datums/supplypacks/supply.dm @@ -146,7 +146,7 @@ /obj/item/clothing/gloves/black, /obj/item/clothing/shoes/black, /obj/item/analyzer, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/flashlight/lantern, /obj/item/shovel, /obj/item/pickaxe, diff --git a/code/game/jobs/job/job_goodies.dm b/code/game/jobs/job/job_goodies.dm index 90ec8b2c1f..dbd0c70501 100644 --- a/code/game/jobs/job/job_goodies.dm +++ b/code/game/jobs/job/job_goodies.dm @@ -157,7 +157,7 @@ /obj/item/clothing/shoes/bhop = 125, /obj/item/inducer = 125, /obj/item/pickaxe/advdrill = 100, - /obj/item/storage/bag/ore/holding = 100 + /obj/item/ore_bag/holding = 100 ) mail_color = COMMS_COLOR_SUPPLY diff --git a/code/game/objects/items/devices/vacpack.dm b/code/game/objects/items/devices/vacpack.dm index 3493189f62..ac662f8ddd 100644 --- a/code/game/objects/items/devices/vacpack.dm +++ b/code/game/objects/items/devices/vacpack.dm @@ -110,7 +110,7 @@ to_chat(user, span_warning("[B.name] full. Empty or process contents to continue.")) return if(B.ore_storage) - if(B.current_capacity >= B.max_ore_storage) + if(B.ore_bag.current_capacity >= B.ore_bag.max_storage_space) to_chat(user, span_warning("Ore storage full. Deposit ore contents to a box continue.")) return if(isbelly(output_atom)) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index c652766891..30de779f36 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -88,165 +88,6 @@ can_hold = list() // any cant_hold = list(/obj/item/disk/nuclear) -// ----------------------------- -// Mining Satchel -// ----------------------------- -/* - * Mechoid - Orebags are the most common quick-gathering thing, and also have tons of lag associated with it. - * Their checks are going to be hyper-simplified due to this, and their INCREDIBLY singular target contents. - */ -/obj/item/storage/bag/ore - name = "mining satchel" - desc = "This little bugger can be used to store and transport ores." - icon = 'icons/obj/mining.dmi' - icon_state = "satchel" - slot_flags = SLOT_BELT | SLOT_POCKET - w_class = ITEMSIZE_NORMAL - max_storage_space = ITEMSIZE_COST_NORMAL * 25 - max_w_class = ITEMSIZE_NORMAL - allow_quick_empty = FALSE - can_hold = list(/obj/item/ore) - var/current_capacity = 0 - var/max_pickup = 100 //How much ore can be picked up in one go. There to prevent someone from walking on a turf with 10000 ore and making the server cry. - var/list/stored_ore = list( - ORE_SAND = 0, - ORE_HEMATITE = 0, - ORE_CARBON = 0, - ORE_COPPER = 0, - ORE_TIN = 0, - ORE_VOPAL = 0, - ORE_PAINITE = 0, - ORE_QUARTZ = 0, - ORE_BAUXITE = 0, - ORE_PHORON = 0, - ORE_SILVER = 0, - ORE_GOLD = 0, - ORE_MARBLE = 0, - ORE_URANIUM = 0, - ORE_DIAMOND = 0, - ORE_PLATINUM = 0, - ORE_LEAD = 0, - ORE_MHYDROGEN = 0, - ORE_VERDANTIUM = 0, - ORE_RUTILE = 0) - var/last_update = 0 - -/obj/item/storage/bag/ore/holding - name = "mining satchel of holding" - desc = "Like a mining satchel, but when you put your hand in, you're pretty sure you can feel time itself." - icon_state = "satchel_bspace" - max_storage_space = ITEMSIZE_COST_NORMAL * 15000 // This should never, ever, ever be reached. - -/obj/item/storage/bag/ore/attackby(obj/item/W as obj, mob/user as mob) - if(current_capacity >= max_storage_space) - to_chat(user, span_notice("\the [src] is too full to possibly fit anything else inside of it.")) - return - - if (istype(W, /obj/item/ore) && !istype(W, /obj/item/ore/slag)) - var/obj/item/ore/ore = W - stored_ore[ore.material]++ - current_capacity++ - user.remove_from_mob(W) - qdel(ore) - -/obj/item/storage/bag/ore/remove_from_storage(obj/item/W as obj, atom/new_location) - if(!istype(W)) return 0 - - if(new_location) - if(ismob(loc)) - W.dropped(usr) - if(ismob(new_location)) - W.hud_layerise() - else - W.reset_plane_and_layer() - W.forceMove(new_location) - else - W.forceMove(get_turf(src)) - - W.on_exit_storage(src) - update_icon() - return 1 - -/obj/item/storage/bag/ore/gather_all(turf/T as turf, mob/user as mob, var/silent = 0) - var/success = 0 - var/failure = 0 - var/current_pickup = 0 - var/max_pickup_reached = 0 - for(var/obj/item/ore/O in T) //Only ever grabs ores. Doesn't do any extraneous checks, as all ore is the same size. Tons of checks means it causes hanging for up to three seconds. - if(current_capacity >= max_storage_space) - failure = 1 - break - if(current_pickup >= max_pickup) - max_pickup_reached = 1 - break - if(istype(O, /obj/item/ore/slag)) - continue - var/obj/item/ore/ore = O - stored_ore[ore.material]++ - current_capacity++ - current_pickup++ - qdel(ore) - success = 1 - if(!silent) //Let's do a single check and then do more instead of a bunch at once. - if(success && !failure && !max_pickup_reached) //Picked stuff up, did not reach capacity, did not reach max_pickup. - to_chat(user, span_notice("You put everything in [src].")) - else if(success && failure) //Picked stuff up to capacity. - to_chat(user, span_notice("You fill the [src].")) - else if(success && max_pickup_reached) //Picked stuff up to the max_pickup - to_chat(user, span_notice("You fill the [src] with as much as you can grab in one go.")) - else //Failed. The bag is full. - to_chat(user, span_notice("You fail to pick anything up with \the [src].")) - if(istype(user.pulling, /obj/structure/ore_box)) //Bit of a crappy way to do this, as it doubles spam for the user, but it works. //Then let me fix it. ~CL. - var/obj/structure/ore_box/OB = user.pulling - for(var/ore in stored_ore) - if(stored_ore[ore] > 0) - var/ore_amount = stored_ore[ore] // How many ores does the satchel have? - OB.stored_ore[ore] += ore_amount // Add the ore to the box - stored_ore[ore] = 0 // Set the value of the ore in the satchel to 0. - current_capacity = 0 // Set the amount of ore in the satchel to 0. - current_pickup = 0 - -/obj/item/storage/bag/ore/equipped(mob/user) - ..() - user.AddComponent(/datum/component/recursive_move) - RegisterSignal(user, COMSIG_MOVABLE_ATTEMPTED_MOVE, /obj/item/storage/bag/ore/proc/autoload, override = TRUE) - -/obj/item/storage/bag/ore/dropped(mob/user) - ..() - UnregisterSignal(user, COMSIG_MOVABLE_ATTEMPTED_MOVE) - -/obj/item/storage/bag/ore/proc/autoload(mob/user) - SIGNAL_HANDLER - var/obj/item/ore/O = locate() in get_turf(src) - if(O) - gather_all(get_turf(src), user) - -/obj/item/storage/bag/ore/proc/rangedload(atom/A, mob/user) - var/obj/item/ore/O = locate() in get_turf(A) - if(O) - gather_all(get_turf(A), user) - -/obj/item/storage/bag/ore/examine(mob/user) - . = ..() - - if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them. - return . - - if(isliving(user)) - add_fingerprint(user) - - . += span_notice("It holds:") - var/has_ore = 0 - for(var/ore in stored_ore) - if(stored_ore[ore] > 0) - . += span_notice("- [stored_ore[ore]] [ore]") - has_ore = 1 - if(!has_ore) - . += "Nothing." - -/obj/item/storage/bag/ore/open(mob/user as mob) //No opening it for the weird UI of having shit-tons of ore inside it. - user.examinate(src) - // ----------------------------- // Plant bag // ----------------------------- diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index b998b26241..b7d3b53ce0 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -737,7 +737,7 @@ /obj/item/melee, /obj/item/kinetic_crusher, /obj/item/mining_scanner, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/storage/sample_container ) //Pretty much, if it's in the mining vendor, they should be able to put it on the belt. diff --git a/code/game/objects/items/weapons/storage/ore_bag.dm b/code/game/objects/items/weapons/storage/ore_bag.dm new file mode 100644 index 0000000000..e6bf6cd975 --- /dev/null +++ b/code/game/objects/items/weapons/storage/ore_bag.dm @@ -0,0 +1,179 @@ +// ----------------------------- +// Mining Satchel +// ----------------------------- +/* + * Mechoid - Orebags are the most common quick-gathering thing, and also have tons of lag associated with it. + * Their checks are going to be hyper-simplified due to this, and their INCREDIBLY singular target contents. + */ +/obj/item/ore_bag + name = "mining satchel" + desc = "This little bugger can be used to store and transport ores." + icon = 'icons/obj/mining.dmi' + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_storage.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_storage.dmi', + ) + icon_state = "satchel" + slot_flags = SLOT_BELT | SLOT_POCKET + w_class = ITEMSIZE_NORMAL + var/current_capacity = 0 + var/max_storage_space = 100 + var/max_pickup = 100 //How much ore can be picked up in one go. There to prevent someone from walking on a turf with 10000 ore and making the server cry. + var/list/stored_ore = list( + ORE_SAND = 0, + ORE_HEMATITE = 0, + ORE_CARBON = 0, + ORE_COPPER = 0, + ORE_TIN = 0, + ORE_VOPAL = 0, + ORE_PAINITE = 0, + ORE_QUARTZ = 0, + ORE_BAUXITE = 0, + ORE_PHORON = 0, + ORE_SILVER = 0, + ORE_GOLD = 0, + ORE_MARBLE = 0, + ORE_URANIUM = 0, + ORE_DIAMOND = 0, + ORE_PLATINUM = 0, + ORE_LEAD = 0, + ORE_MHYDROGEN = 0, + ORE_VERDANTIUM = 0, + ORE_RUTILE = 0) + var/last_update = 0 + drop_sound = 'sound/items/drop/backpack.ogg' + pickup_sound = 'sound/items/pickup/backpack.ogg' + +/obj/item/ore_bag/holding + name = "mining satchel of holding" + desc = "Like a mining satchel, but when you put your hand in, you're pretty sure you can feel time itself." + icon_state = "satchel_bspace" + max_storage_space = ITEMSIZE_COST_NORMAL * 15000 // This should never, ever, ever be reached. + +/obj/item/ore_bag/sleeper + name = "processing chamber" + desc = "A mining satchel built into a sleeper. VORE!!!" + icon_state = "satchel_bspace" + max_storage_space = 500 + //item_flags = ABSTRACT //Enable once we have abstract PR merged. + +/obj/item/ore_bag/attackby(obj/item/W, mob/user) + if(current_capacity >= max_storage_space) + to_chat(user, span_notice("\the [src] is too full to possibly fit anything else inside of it.")) + return + + if (istype(W, /obj/item/ore) && !istype(W, /obj/item/ore/slag) && !istype(W, /obj/item/ore/archeology_debris)) + var/obj/item/ore/ore = W + stored_ore[ore.material]++ + current_capacity++ + user.remove_from_mob(W) + qdel(ore) + +/obj/item/ore_bag/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + //If we attack a turf, we try to scoop up all the ore from the turf first. + if(isturf(target) && user.Adjacent(target)) + gather_all(target, user) + return + + //If we attack an ore, see if it's on a turf. If so, scoop up everything on the turf. If not, scoop up just that ore. + else if(istype(target, /obj/item/ore) && user.Adjacent(target)) + var/turf_check = isturf(target.loc) //get_turf intentionally not used here due to clicking ore in a backpack or other weirdness. + if(turf_check) + gather_all(target.loc, user) + return + +/obj/item/ore_bag/proc/remove_from_storage(obj/item/W, atom/new_location) + if(!istype(W)) return 0 + + if(new_location) + if(ismob(loc)) + W.dropped(usr) + if(ismob(new_location)) + W.hud_layerise() + else + W.reset_plane_and_layer() + W.forceMove(new_location) + else + W.forceMove(get_turf(src)) + + W.on_exit_storage(src) + update_icon() + return 1 + +/obj/item/ore_bag/proc/gather_all(turf/T, mob/user, var/silent = 0) + var/success = 0 + var/failure = 0 + var/current_pickup = 0 + var/max_pickup_reached = 0 + for(var/obj/item/ore/O in T) //Only ever grabs ores. Doesn't do any extraneous checks, as all ore is the same size. Tons of checks means it causes hanging for up to three seconds. + if(current_capacity >= max_storage_space) + failure = 1 + break + if(current_pickup >= max_pickup) + max_pickup_reached = 1 + break + if(istype(O, /obj/item/ore/slag) || istype(O, /obj/item/ore/archeology_debris)) + continue + var/obj/item/ore/ore = O + stored_ore[ore.material]++ + current_capacity++ + current_pickup++ + qdel(ore) + success = 1 + if(!silent) //Let's do a single check and then do more instead of a bunch at once. + if(success && !failure && !max_pickup_reached) //Picked stuff up, did not reach capacity, did not reach max_pickup. + to_chat(user, span_notice("You put everything in [src].")) + else if(success && failure) //Picked stuff up to capacity. + to_chat(user, span_notice("You fill the [src].")) + else if(success && max_pickup_reached) //Picked stuff up to the max_pickup + to_chat(user, span_notice("You fill the [src] with as much as you can grab in one go.")) + else //Failed. The bag is full. + to_chat(user, span_notice("You fail to pick anything up with \the [src].")) + if(istype(user.pulling, /obj/structure/ore_box)) //Bit of a crappy way to do this, as it doubles spam for the user, but it works. //Then let me fix it. ~CL. + var/obj/structure/ore_box/OB = user.pulling + for(var/ore in stored_ore) + if(stored_ore[ore] > 0) + var/ore_amount = stored_ore[ore] // How many ores does the satchel have? + OB.stored_ore[ore] += ore_amount // Add the ore to the box + stored_ore[ore] = 0 // Set the value of the ore in the satchel to 0. + current_capacity = 0 // Set the amount of ore in the satchel to 0. + current_pickup = 0 + return success + +/obj/item/ore_bag/equipped(mob/user) + ..() + user.AddComponent(/datum/component/recursive_move) + RegisterSignal(user, COMSIG_MOVABLE_ATTEMPTED_MOVE, /obj/item/ore_bag/proc/autoload) + +/obj/item/ore_bag/dropped(mob/user) + ..() + UnregisterSignal(user, COMSIG_MOVABLE_ATTEMPTED_MOVE) + +/obj/item/ore_bag/proc/autoload(mob/user) + SIGNAL_HANDLER + var/obj/item/ore/O = locate() in get_turf(user) + if(O) + gather_all(get_turf(user), user) + +/obj/item/ore_bag/proc/rangedload(atom/A, mob/user) + var/obj/item/ore/O = locate() in get_turf(A) + if(O) + gather_all(get_turf(A), user) + +/obj/item/ore_bag/examine(mob/user) + . = ..() + + if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them. + return . + + if(isliving(user)) + add_fingerprint(user) + + . += span_notice("It holds:") + var/has_ore = 0 + for(var/ore in stored_ore) + if(stored_ore[ore] > 0) + . += span_notice("- [stored_ore[ore]] [ore]") + has_ore = 1 + if(!has_ore) + . += "Nothing." diff --git a/code/game/objects/random/mapping.dm b/code/game/objects/random/mapping.dm index acd8381ebe..1381198eab 100644 --- a/code/game/objects/random/mapping.dm +++ b/code/game/objects/random/mapping.dm @@ -347,7 +347,7 @@ ), prob(2);list( /obj/item/rig/industrial/equipped, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/structure/closet/crate/engineering ), prob(2);list( @@ -406,43 +406,43 @@ ), prob(2);list( /obj/item/pickaxe/silver, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), prob(2);list( /obj/item/pickaxe/advdrill, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), prob(2);list( /obj/item/pickaxe/jackhammer, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), prob(2);list( /obj/item/pickaxe/diamond, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), prob(2);list( /obj/item/pickaxe/diamonddrill, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), prob(2);list( /obj/item/pickaxe/gold, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), prob(2);list( /obj/item/pickaxe/plasmacutter, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/clothing/glasses/material, /obj/structure/closet/crate/engineering ), @@ -1617,7 +1617,7 @@ /obj/random/multiple/underdark/ores/item_to_spawn() return pick( prob(9);list( - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/shovel, /obj/item/ore/glass, /obj/item/ore/glass, @@ -1637,7 +1637,7 @@ /obj/item/ore/hydrogen ), prob(7);list( - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/pickaxe, /obj/item/ore/osmium, /obj/item/ore/osmium, diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm index e83779ceab..9603317ce9 100644 --- a/code/game/objects/random/misc.dm +++ b/code/game/objects/random/misc.dm @@ -1134,7 +1134,7 @@ prob(10);/obj/item/clothing/under/hyperfiber, prob(10);/obj/item/clothing/under/hyperfiber/bluespace, prob(20);/obj/item/implant/sizecontrol, - prob(2);/obj/item/storage/bag/ore/holding, + prob(2);/obj/item/ore_bag/holding, prob(2);/obj/item/storage/bag/sheetsnatcher/holding, prob(2);/obj/item/storage/backpack/holding, prob(2);/obj/item/storage/backpack/holding/duffle, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index 0506e00dae..a521879dda 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -80,7 +80,7 @@ /obj/item/clothing/gloves/black, /obj/item/clothing/shoes/black, /obj/item/analyzer, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/storage/belt/miner, /obj/item/flashlight/lantern, /obj/item/shovel, diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 6742963b73..6bf3286519 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -402,13 +402,6 @@ GLOBAL_LIST_EMPTY(mining_overlay_cache) to_chat(user, span_notice("You dug a hole.")) GetDrilled() - else if(istype(W,/obj/item/storage/bag/ore)) - var/obj/item/storage/bag/ore/S = W - if(S.collection_mode) - for(var/obj/item/ore/O in contents) - O.attackby(W,user) - return - else if(istype(W,/obj/item/storage/bag/fossils)) var/obj/item/storage/bag/fossils/S = W if(S.collection_mode) @@ -497,7 +490,7 @@ GLOBAL_LIST_EMPTY(mining_overlay_cache) next_rock += S.excavation_amount while(next_rock > 50) next_rock -= 50 - var/obj/item/ore/O = new(src) + var/obj/item/ore/archeology_debris/O = new(src) geologic_data.UpdateNearbyArtifactInfo(src) O.geologic_data = geologic_data @@ -547,7 +540,7 @@ GLOBAL_LIST_EMPTY(mining_overlay_cache) next_rock += P.excavation_amount while(next_rock > 50) next_rock -= 50 - var/obj/item/ore/O = new(src) + var/obj/item/ore/archeology_debris/O = new(src) geologic_data.UpdateNearbyArtifactInfo(src) O.geologic_data = geologic_data return diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 5f0acb332a..9f4dca32ae 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -7,6 +7,10 @@ var/datum/geosample/geologic_data var/material +/obj/item/ore/archeology_debris + name = "rocky debris" + desc = "Leftover rocky debris from digging." + /obj/item/ore/uranium name = "pitchblende" icon_state = "ore_uranium" diff --git a/code/modules/mining/ore_box.dm b/code/modules/mining/ore_box.dm index b17e8ddbf4..0b2e24dc4b 100644 --- a/code/modules/mining/ore_box.dm +++ b/code/modules/mining/ore_box.dm @@ -33,16 +33,20 @@ . = ..() AddElement(/datum/element/climbable) -/obj/structure/ore_box/attackby(obj/item/W as obj, mob/user as mob) - if (istype(W, /obj/item/ore)) +/obj/structure/ore_box/attackby(obj/item/W, mob/user) + if(istype(W, /obj/item/ore)) var/obj/item/ore/ore = W stored_ore[ore.material]++ user.remove_from_mob(W) qdel(ore) + return - else if (istype(W, /obj/item/storage/bag/ore)) - var/obj/item/storage/bag/ore/S = W - S.hide_from(user) + if(istype(W, /obj/item/dogborg/sleeper/compactor/supply)) + var/obj/item/dogborg/sleeper/compactor/supply/borg_sleeper = W + W = borg_sleeper.ore_bag + + if(istype(W, /obj/item/ore_bag)) + var/obj/item/ore_bag/S = W for(var/ore in S.stored_ore) if(S.stored_ore[ore] > 0) var/ore_amount = S.stored_ore[ore] // How many ores does the satchel have? @@ -50,6 +54,7 @@ S.stored_ore[ore] = 0 // Set the value of the ore in the satchel to 0. S.current_capacity = 0 // Set the amount of ore in the satchel to 0. to_chat(user, span_notice("You empty the satchel into the box.")) + return return diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index e635091125..0866b51cb8 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -69,7 +69,7 @@ EQUIPMENT("Jump Boots", /obj/item/clothing/shoes/bhop, 2500), EQUIPMENT("Mini-Translocator", /obj/item/perfect_tele/one_beacon, 1200), EQUIPMENT("Survival Equipment - Insulated Poncho", /obj/random/thermalponcho, 750), - EQUIPMENT("Mining Satchel of Holding", /obj/item/storage/bag/ore/holding, 1500), + EQUIPMENT("Mining Satchel of Holding", /obj/item/ore_bag/holding, 1500), EQUIPMENT("Industrial Equipment - Sheet-Snatcher", /obj/item/storage/bag/sheetsnatcher, 500), EQUIPMENT("Sheet Snatcher of Holding", /obj/item/storage/bag/sheetsnatcher/holding, 1000), EQUIPMENT("Advanced Ore Scanner", /obj/item/mining_scanner/advanced, 500), diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm index 876d964510..2976aaca85 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper.dm @@ -43,8 +43,7 @@ var/medsensor = TRUE //Does belly sprite come with patient ok/dead light? var/obj/item/healthanalyzer/med_analyzer = null var/ore_storage = FALSE - var/max_ore_storage = 500 - var/current_capacity = 0 + var/obj/item/ore_bag/sleeper/ore_bag //Used by supply compactor flags = NOBLUDGEON /obj/item/dogborg/sleeper/Initialize(mapload) @@ -58,11 +57,17 @@ config_flags = EXPERIMENT_CONFIG_ALWAYS_ACTIVE|EXPERIMENT_CONFIG_SILENT_FAIL,\ experiment_signals = destructive_signals, \ ) + if(ore_storage) + ore_bag = new(null) //We don't need it inside, just need a reference to it. . = ..() med_analyzer = new /obj/item/healthanalyzer /obj/item/dogborg/sleeper/Destroy() go_out() + if(ore_bag) + QDEL_NULL(ore_bag) + if(med_analyzer) + QDEL_NULL(med_analyzer) . = ..() /obj/item/dogborg/sleeper/Exit(atom/movable/O) @@ -75,11 +80,11 @@ var/datum/gas_mixture/belly_air/air = new(1000) return air -/obj/item/dogborg/sleeper/afterattack(var/atom/movable/target, mob/living/silicon/user, proximity) +/obj/item/dogborg/sleeper/afterattack(var/atom/movable/target, mob/living/silicon/user, proximity_flag, click_parameters) hound = loc if(!istype(target)) return - if(!proximity) + if(!proximity_flag) return if(target.anchored) return @@ -156,7 +161,7 @@ return user.visible_message(span_warning("[hound.name] is ingesting [H.name] into their [src.name]."), span_notice("You start ingesting [H] into your [src]...")) if(!patient && !H.buckled && do_after (user, 50, H)) - if(!proximity) + if(!proximity_flag) return //If they moved away, you can't eat them. if(patient) return //If you try to eat two people at once, you can only eat one. @@ -291,6 +296,11 @@ ) var/datum/component/experiment_handler/handler = get_experiment_handler() + var/current_capacity = 0 + var/max_ore_storage = 0 + if(ore_storage) + current_capacity = ore_bag.current_capacity + max_ore_storage = ore_bag.max_storage_space var/list/data = list( "our_patient" = patient_data, "eject_port" = eject_port, diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_types.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_types.dm index d5cd8c1319..ad91fcc115 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_types.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_types.dm @@ -50,49 +50,26 @@ injection_chems = list(REAGENT_ID_GLUCOSE,REAGENT_ID_INAPROVALINE,REAGENT_ID_TRICORDRAZINE) max_item_count = 20 ore_storage = TRUE - var/list/stored_ore = list( - ORE_SAND = 0, - ORE_HEMATITE = 0, - ORE_CARBON = 0, - ORE_COPPER = 0, - ORE_TIN = 0, - ORE_VOPAL = 0, - ORE_PAINITE = 0, - ORE_QUARTZ = 0, - ORE_BAUXITE = 0, - ORE_PHORON = 0, - ORE_SILVER = 0, - ORE_GOLD = 0, - ORE_MARBLE = 0, - ORE_URANIUM = 0, - ORE_DIAMOND = 0, - ORE_PLATINUM = 0, - ORE_LEAD = 0, - ORE_MHYDROGEN = 0, - ORE_VERDANTIUM = 0, - ORE_RUTILE = 0) medsensor = FALSE -/obj/item/dogborg/sleeper/compactor/supply/Entered(atom/movable/thing, atom/OldLoc) - . = ..() - if(istype(thing, /obj/item/ore)) - var/obj/item/ore/ore = thing - stored_ore[ore.material]++ - current_capacity++ - qdel(ore) - -/obj/structure/ore_box/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/dogborg/sleeper/compactor/supply)) - var/obj/item/dogborg/sleeper/compactor/supply/S = W - for(var/ore in S.stored_ore) - if(S.stored_ore[ore] > 0) - var/ore_amount = S.stored_ore[ore] // How many ores does the satchel have? - stored_ore[ore] += ore_amount // Add the ore to the machine. - S.stored_ore[ore] = 0 // Set the value of the ore in the satchel to 0. - S.current_capacity = 0 // Set the amount of ore in the satchel to 0. - to_chat(user, span_notice("You empty the satchel into the box.")) +/obj/item/dogborg/sleeper/compactor/supply/afterattack(atom/movable/target, mob/living/silicon/user, proximity_flag, click_parameters) + if(!proximity_flag) return - ..() + + if(isturf(target)) + if(ore_bag.gather_all(target, user, TRUE)) + user.visible_message(span_warning("[hound.name]'s [src.name] groans lightly as ore slips inside."), span_notice("Your [src.name] groans lightly as ore slips inside.")) + playsound(src, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/preference/toggle/eating_noises) + return + if(istype(target, /obj/item/ore) && !istype(target, /obj/item/ore/slag) && !istype(target, /obj/item/ore/archeology_debris)) + var/turf_check = isturf(target.loc) //get_turf intentionally not used here due to clicking ore in a backpack or other weirdness. + if(turf_check) + if(ore_bag.gather_all(target.loc, user, TRUE)) + user.visible_message(span_warning("[hound.name]'s [src.name] groans lightly as ore slips inside."), span_notice("Your [src.name] groans lightly as ore slips inside.")) + playsound(src, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/preference/toggle/eating_noises) + return + . = ..() + /obj/item/dogborg/sleeper/compactor/brewer name = "Brew Belly" diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index e510b9c9b3..85c0b3d2a6 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -378,6 +378,13 @@ if(tracker.tracking) tracker.tracking = FALSE tracker.toggle_tracking() + if(istype(O, /obj/item/dogborg/sleeper)) //gross + var/obj/item/dogborg/sleeper/our_compactor = O + if(our_compactor.ore_storage) + if(O in get_all_held_items()) + our_compactor.ore_bag.equipped(src) + else + our_compactor.ore_bag.dropped(src) if(sight_mode & BORGANOMALOUS) var/obj/item/dogborg/pounce/pounce = has_upgrade_module(/obj/item/dogborg/pounce) if(pounce) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index b6f517fa6d..7679d45b80 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -744,7 +744,6 @@ src.modules += new /obj/item/borg/sight/material(src) src.modules += new /obj/item/tool/wrench/cyborg(src) src.modules += new /obj/item/tool/screwdriver/cyborg(src) - src.modules += new /obj/item/storage/bag/ore(src) src.modules += new /obj/item/pickaxe/borgdrill(src) src.modules += new /obj/item/storage/bag/sheetsnatcher/borg(src) src.modules += new /obj/item/gripper/miner(src) @@ -933,7 +932,7 @@ ..() src.modules += new /obj/item/borg/sight/material(src) src.modules += new /obj/item/pickaxe/borgdrill(src) - src.modules += new /obj/item/storage/bag/ore(src) + src.modules += new /obj/item/ore_bag(src) src.modules += new /obj/item/storage/bag/sheetsnatcher/borg(src) src.emag += new /obj/item/pickaxe/diamonddrill(src) diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index 0616c19b5d..68aff84b8e 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -46,19 +46,6 @@ if(!module) return - //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use. - if(istype(module_state_1, /obj/item/storage/bag/ore) || istype(module_state_2, /obj/item/storage/bag/ore) || istype(module_state_3, /obj/item/storage/bag/ore)) - var/obj/item/storage/bag/ore/B = null - if(istype(module_state_1, /obj/item/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. - B = module_state_1 - else if(istype(module_state_2, /obj/item/storage/bag/ore)) - B = module_state_2 - else if(istype(module_state_3, /obj/item/storage/bag/ore)) - B = module_state_3 - var/turf/tile = loc - if(isturf(tile)) - B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! - if(scrubbing && isturf(loc)) var/turf/tile = loc tile.wash(CLEAN_SCRUB) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm index 18a12b7744..8401527e51 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/drones/mining_drone.dm @@ -62,7 +62,7 @@ var/datum/effect/effect/system/ion_trail_follow/ion_trail = null var/obj/item/shield_projector/shields = null - var/obj/item/storage/bag/ore/my_storage = null + var/obj/item/ore_bag/my_storage = null var/last_search = 0 var/search_cooldown = 5 SECONDS @@ -74,7 +74,7 @@ ion_trail.set_up(src) ion_trail.start() - my_storage = new /obj/item/storage/bag/ore(src) + my_storage = new /obj/item/ore_bag(src) shields = new /obj/item/shield_projector/rectangle/automatic/drone(src) return ..() diff --git a/code/modules/projectiles/guns/energy/altevian_vr.dm b/code/modules/projectiles/guns/energy/altevian_vr.dm index 11a8fde933..952c04f2d0 100644 --- a/code/modules/projectiles/guns/energy/altevian_vr.dm +++ b/code/modules/projectiles/guns/energy/altevian_vr.dm @@ -123,7 +123,7 @@ var/turf/simulated/mineral/M = T M.GetDrilled(TRUE) if(firer) - var/obj/item/storage/bag/ore/orebag = locate(/obj/item/storage/bag/ore) in firer + var/obj/item/ore_bag/orebag = locate(/obj/item/ore_bag) in firer if(orebag) for(var/turf/T in RANGE_TURFS(2, target_turf)) orebag.gather_all(T, firer, TRUE) diff --git a/code/modules/research/tg/designs/equipment_designs.dm b/code/modules/research/tg/designs/equipment_designs.dm index 7a1bfaafde..86403c505c 100644 --- a/code/modules/research/tg/designs/equipment_designs.dm +++ b/code/modules/research/tg/designs/equipment_designs.dm @@ -60,7 +60,7 @@ // req_tech = list(TECH_BLUESPACE = 2, TECH_MATERIAL = 3) build_type = PROTOLATHE materials = list(MAT_GOLD = 1000, MAT_DIAMOND = 500, MAT_URANIUM = 250) // Less expensive since it can only hold ores - build_path = /obj/item/storage/bag/ore/holding + build_path = /obj/item/ore_bag/holding category = list( RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_BLUESPACE ) diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm index 9d0083bfe5..76edf4e7fb 100644 --- a/code/modules/xenoarcheaology/sampling.dm +++ b/code/modules/xenoarcheaology/sampling.dm @@ -121,8 +121,8 @@ var/turf/simulated/mineral/T = item_to_sample T.geologic_data.UpdateNearbyArtifactInfo(T) geo_data = T.geologic_data - else if(istype(item_to_sample, /obj/item/ore)) - var/obj/item/ore/O = item_to_sample + else if(istype(item_to_sample, /obj/item/ore/archeology_debris)) + var/obj/item/ore/archeology_debris/O = item_to_sample geo_data = O.geologic_data if(geo_data) diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm index 729fad1c47..af390cefef 100644 --- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm +++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm @@ -242,8 +242,8 @@ var/data = " - Mundane object: [scanned_item.desc ? scanned_item.desc : "No information on record."]
" var/datum/geosample/G switch(scanned_item.type) - if(/obj/item/ore) - var/obj/item/ore/O = scanned_item + if(/obj/item/ore/archeology_debris) + var/obj/item/ore/archeology_debris/O = scanned_item if(O.geologic_data) G = O.geologic_data diff --git a/maps/offmap_vr/talon/talon_v2.dm b/maps/offmap_vr/talon/talon_v2.dm index 512569c571..3442a66f8d 100644 --- a/maps/offmap_vr/talon/talon_v2.dm +++ b/maps/offmap_vr/talon/talon_v2.dm @@ -522,7 +522,7 @@ personally I recommend using the ship's boat if you need to evacuate, but if you /obj/item/gps/mining/talonminer, /obj/item/clothing/gloves/black, /obj/item/analyzer, - /obj/item/storage/bag/ore, + /obj/item/ore_bag, /obj/item/flashlight/lantern, /obj/item/shovel, /obj/item/pickaxe, diff --git a/maps/offmap_vr/talon/talon_v2.dmm b/maps/offmap_vr/talon/talon_v2.dmm index b3031f7b4d..ef24c13ffc 100644 --- a/maps/offmap_vr/talon/talon_v2.dmm +++ b/maps/offmap_vr/talon/talon_v2.dmm @@ -14963,7 +14963,7 @@ dir = 8 }, /obj/structure/table/rack/steel, -/obj/item/storage/bag/ore, +/obj/item/ore_bag, /obj/item/pickaxe/drill, /obj/item/stack/marker_beacon/thirty, /obj/machinery/atmospherics/unary/vent_pump/on{ diff --git a/maps/redgate/fantasy.dmm b/maps/redgate/fantasy.dmm index d84378a198..ed8078b0fe 100644 --- a/maps/redgate/fantasy.dmm +++ b/maps/redgate/fantasy.dmm @@ -2118,7 +2118,7 @@ /area/redgate/fantasy/house) "nn" = ( /obj/structure/table/rack/shelf/wood, -/obj/item/storage/bag/ore, +/obj/item/ore_bag, /turf/simulated/floor/wood, /area/redgate/fantasy/mininghouse) "nr" = ( @@ -6060,7 +6060,7 @@ /area/redgate/fantasy/church) "LN" = ( /obj/structure/closet/crate/wooden, -/obj/item/storage/bag/ore, +/obj/item/ore_bag, /turf/simulated/floor/concrete, /area/redgate/fantasy/mininghouse) "LR" = ( diff --git a/maps/submaps/surface_submaps/wilderness/chasm.dmm b/maps/submaps/surface_submaps/wilderness/chasm.dmm index 613cc5c040..3933b8a2e3 100644 --- a/maps/submaps/surface_submaps/wilderness/chasm.dmm +++ b/maps/submaps/surface_submaps/wilderness/chasm.dmm @@ -634,7 +634,7 @@ /area/submap/Chasm) "Tl" = ( /obj/effect/floor_decal/rust, -/obj/item/storage/bag/ore, +/obj/item/ore_bag, /turf/simulated/floor/plating, /area/submap/Chasm) "Tp" = ( diff --git a/maps/tether/tether_jobs.dm b/maps/tether/tether_jobs.dm index 6787efcbbc..6354057892 100644 --- a/maps/tether/tether_jobs.dm +++ b/maps/tether/tether_jobs.dm @@ -299,7 +299,7 @@ flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL shoes = /obj/item/clothing/shoes/boots/workboots - r_pocket = /obj/item/storage/bag/ore + r_pocket = /obj/item/ore_bag l_pocket = /obj/item/tool/crowbar head = /obj/item/clothing/head/soft/talon/refreshed uniform = /obj/item/clothing/under/rank/talon/basic/refreshed diff --git a/vorestation.dme b/vorestation.dme index aaa64db809..860c9e4326 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1937,6 +1937,7 @@ #include "code\game\objects\items\weapons\storage\lockbox.dm" #include "code\game\objects\items\weapons\storage\misc.dm" #include "code\game\objects\items\weapons\storage\mre.dm" +#include "code\game\objects\items\weapons\storage\ore_bag.dm" #include "code\game\objects\items\weapons\storage\pouches.dm" #include "code\game\objects\items\weapons\storage\quickdraw.dm" #include "code\game\objects\items\weapons\storage\secure.dm"