diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 0b5d1a0719..7163c2d266 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -298,8 +298,14 @@ /obj/item/weapon/storage/part_replacer name = "rapid part exchange device" desc = "A special mechanical module made to store, sort, and apply standard machine parts." + icon = 'icons/obj/storage_vr.dmi' icon_state = "RPED" +<<<<<<< HEAD item_icons = list(slot_l_hand_str = 'icons/vore/custom_items_left_hand_yw.dmi', slot_r_hand_str = 'icons/vore/custom_items_right_hand_yw.dmi') //YW add - RPED sprite +||||||| parent of a027154001... Merge pull request #11665 from Hatterhat/brrrrped +======= + item_state = "RPED" +>>>>>>> a027154001... Merge pull request #11665 from Hatterhat/brrrrped w_class = ITEMSIZE_HUGE can_hold = list(/obj/item/weapon/stock_parts) storage_slots = 50 @@ -313,9 +319,22 @@ drop_sound = 'sound/items/drop/device.ogg' pickup_sound = 'sound/items/pickup/device.ogg' var/panel_req = TRUE + var/pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/rped.ogg' + var/reskin_ran = FALSE + var/unique_reskin = list("Soulless" = "RPED", + "Soulful" = "RPED_old") + +/obj/item/weapon/storage/part_replacer/proc/play_rped_sound() + //Plays the sound for RPED exhanging or installing parts. +/* if(alt_sound && prob(1)) + playsound(src, alt_sound, 40, 1) + else +*/ + playsound(src, pshoom_or_beepboopblorpzingshadashwoosh, 40, 1) /obj/item/weapon/storage/part_replacer/adv name = "advanced rapid part exchange device" +<<<<<<< HEAD desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity." icon_state = "RPED" w_class = ITEMSIZE_HUGE @@ -325,22 +344,61 @@ /obj/item/weapon/stock_parts, /obj/item/weapon/reagent_containers/glass/beaker) //End of YAWN Changes +||||||| parent of a027154001... Merge pull request #11665 from Hatterhat/brrrrped + desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity." + icon_state = "RPED" + w_class = ITEMSIZE_HUGE + can_hold = list(/obj/item/weapon/stock_parts) +======= + desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity, \ + and the ability to hold beakers." + can_hold = list(/obj/item/weapon/stock_parts, /obj/item/weapon/reagent_containers/glass/beaker) +>>>>>>> a027154001... Merge pull request #11665 from Hatterhat/brrrrped storage_slots = 200 - use_to_pickup = TRUE - allow_quick_gather = 1 - allow_quick_empty = 1 - collection_mode = 1 - display_contents_with_number = 1 - max_w_class = ITEMSIZE_NORMAL max_storage_space = 400 /obj/item/weapon/storage/part_replacer/adv/discount_bluespace - name = "discount bluespace rapid part exchange device" - desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a further increased storage capacity, \ + name = "prototype bluespace rapid part exchange device" + icon_state = "DBRPED" + item_state = "DBRPED" + desc = "A special mechanical module made to store, sort, and apply standard machine parts. This one has a further increased storage capacity, \ and the ability to work on machines with closed maintenance panels." storage_slots = 400 max_storage_space = 800 panel_req = FALSE + pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/pshoom.ogg' + unique_reskin = list("Soulless" = "DBRPED", + "Soulful" = "DBRPED_old") + +/obj/item/weapon/storage/part_replacer/examine(mob/user) + . = ..() + if(!reskin_ran) + . += "[src]'s external casing can be modified via alt-click." + +/obj/item/weapon/storage/part_replacer/AltClick(mob/user) + . = ..() + if(!reskin_ran) + reskin_radial(user) + +/obj/item/weapon/storage/part_replacer/proc/reskin_radial(mob/M) + if(!LAZYLEN(unique_reskin)) + return + + var/list/items = list() + for(var/reskin_option in unique_reskin) + var/image/item_image = image(icon = src.icon, icon_state = unique_reskin[reskin_option]) + items += list("[reskin_option]" = item_image) + sortList(items) + + var/pick = show_radial_menu(M, src, items, radius = 38, require_near = TRUE) + if(!pick) + return + if(!unique_reskin[pick]) + return + icon_state = unique_reskin[pick] + item_state = unique_reskin[pick] + reskin_ran = TRUE + to_chat(M, "[src] is now '[pick].'") /obj/item/weapon/storage/part_replacer/drop_contents() // hacky-feeling tier-based drop system hide_from(usr) @@ -350,6 +408,7 @@ * Why not just use the stock part's rating variable? * Future-proofing for a potential future where stock parts aren't the only thing that can fit in an RPED. * see: /tg/ and /vg/'s RPEDs fitting power cells, beakers, etc. + * 10/8/21 edit - It's Time. */ for(var/obj/item/B in contents) if(B.rped_rating() < lowest_rating) @@ -358,7 +417,7 @@ if(B.rped_rating() > lowest_rating) continue remove_from_storage(B, T) - + /obj/item/weapon/stock_parts name = "stock part" desc = "What?" @@ -384,6 +443,7 @@ desc = "Used in the construction of computers and other devices with a interactive console." icon_state = "screen" origin_tech = list(TECH_MATERIAL = 1) + rating = 5 // these are actually Really Important for some things?? matter = list(MAT_GLASS = 200) /obj/item/weapon/stock_parts/capacitor @@ -698,3 +758,72 @@ icon_state = "spring" origin_tech = list(TECH_ENGINEERING = 1) matter = list(MAT_STEEL = 40) + +/obj/effect/spawner/parts + name = "nondescript parts bundle that shouldn't exist" + desc = "this qdels itself lol! if you're reading this you're codediving or Someone fucked up" + var/list/items + +/obj/effect/spawner/parts/Initialize(mapload) + ..() + if(items && items.len) + var/turf/T = get_turf(src) + for(var/path in items) + for(var/i in 1 to 5) + new path(T) + return INITIALIZE_HINT_QDEL + +/obj/effect/spawner/parts/t1 + name = "basic parts bundle" + desc = "5 of each T1 part, no more and no less." + items = list( + /obj/item/weapon/stock_parts/matter_bin, + /obj/item/weapon/stock_parts/manipulator, + /obj/item/weapon/stock_parts/capacitor, + /obj/item/weapon/stock_parts/scanning_module, + /obj/item/weapon/stock_parts/micro_laser + ) + +/obj/effect/spawner/parts/t2 + name = "advanced parts bundle" + desc = "5 of each T2 part, no more and no less." + items = list( + /obj/item/weapon/stock_parts/matter_bin/adv, + /obj/item/weapon/stock_parts/manipulator/nano, + /obj/item/weapon/stock_parts/capacitor/adv, + /obj/item/weapon/stock_parts/scanning_module/adv, + /obj/item/weapon/stock_parts/micro_laser/high + ) + +/obj/effect/spawner/parts/t3 + name = "super parts bundle" + desc = "5 of each T3 part, no more and no less." + items = list( + /obj/item/weapon/stock_parts/matter_bin/super, + /obj/item/weapon/stock_parts/manipulator/pico, + /obj/item/weapon/stock_parts/capacitor/super, + /obj/item/weapon/stock_parts/scanning_module/phasic, + /obj/item/weapon/stock_parts/micro_laser/ultra + ) + +/obj/effect/spawner/parts/t4 + name = "hyper parts bundle" + desc = "5 of each T4 part, no more and no less." + items = list( + /obj/item/weapon/stock_parts/matter_bin/hyper, + /obj/item/weapon/stock_parts/manipulator/hyper, + /obj/item/weapon/stock_parts/capacitor/hyper, + /obj/item/weapon/stock_parts/scanning_module/hyper, + /obj/item/weapon/stock_parts/micro_laser/hyper + ) + +/obj/effect/spawner/parts/t5 + name = "omni parts bundle" + desc = "5 of each T5 part, no more and no less." + items = list( + /obj/item/weapon/stock_parts/matter_bin/omni, + /obj/item/weapon/stock_parts/manipulator/omni, + /obj/item/weapon/stock_parts/capacitor/omni, + /obj/item/weapon/stock_parts/scanning_module/omni, + /obj/item/weapon/stock_parts/micro_laser/omni + ) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 26766addf6..137d3a7adb 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -330,6 +330,7 @@ Class Procs: return C /obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R) + var/parts_replaced = FALSE if(!istype(R)) return 0 if(!component_parts) @@ -340,23 +341,26 @@ Class Procs: if(panel_open || !R.panel_req) var/obj/item/weapon/circuitboard/CB = circuit var/P - for(var/obj/item/weapon/stock_parts/A in component_parts) + for(var/obj/item/A in component_parts) for(var/T in CB.req_components) if(ispath(A.type, T)) P = T break - for(var/obj/item/weapon/stock_parts/B in R.contents) + for(var/obj/item/B in R.contents) if(istype(B, P) && istype(A, P)) - if(B.rating > A.rating) + if(B.get_rating() > A.get_rating()) R.remove_from_storage(B, src) R.handle_item_insertion(A, 1) component_parts -= A component_parts += B B.loc = null to_chat(user, "[A.name] replaced with [B.name].") + parts_replaced = TRUE break update_icon() RefreshParts() + if(parts_replaced) + R.play_rped_sound() return 1 // Default behavior for wrenching down machines. Supports both delay and instant modes. diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 1c0369adc5..10c682a90f 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -162,6 +162,10 @@ matter = list(MAT_GLASS = 500) drop_sound = 'sound/items/drop/glass.ogg' pickup_sound = 'sound/items/pickup/glass.ogg' + var/rating = 1 + +/obj/item/weapon/reagent_containers/glass/beaker/get_rating() + return rating /obj/item/weapon/reagent_containers/glass/beaker/Initialize() . = ..() @@ -216,6 +220,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,60,120) flags = OPENCONTAINER + rating = 3 /obj/item/weapon/reagent_containers/glass/beaker/noreact name = "cryostasis beaker" @@ -237,6 +242,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,60,120,300) flags = OPENCONTAINER + rating = 5 /obj/item/weapon/reagent_containers/glass/beaker/vial name = "vial" diff --git a/code/modules/research/designs/stock_parts.dm b/code/modules/research/designs/stock_parts.dm index f8a03b1604..20c09f7900 100644 --- a/code/modules/research/designs/stock_parts.dm +++ b/code/modules/research/designs/stock_parts.dm @@ -200,6 +200,42 @@ sort_string = "AAAEE" +// part bundles, because i HATE queues and i don't want to rewrite it for stack-printing +/datum/design/item/stock_part/bundle/t1 + id = "parts_bundle_t1" + req_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1, TECH_POWER = 1, TECH_MAGNET = 1) + materials = list(MAT_STEEL = 1100, MAT_GLASS = 450) + build_path = /obj/effect/spawner/parts/t1 + sort_string = "AAAFA" + +/datum/design/item/stock_part/bundle/t2 + id = "parts_bundle_t2" + req_tech = list(TECH_MATERIAL = 3, TECH_DATA = 2, TECH_POWER = 3, TECH_MAGNET = 3) + materials = list(MAT_STEEL = 1100, MAT_GLASS = 450) + build_path = /obj/effect/spawner/parts/t2 + sort_string = "AAAFB" + +/datum/design/item/stock_part/bundle/t3 + id = "parts_bundle_t3" + req_tech = list(TECH_MATERIAL = 5, TECH_DATA = 2, TECH_POWER = 5, TECH_MAGNET = 5) + materials = list(MAT_STEEL = 1100, MAT_GLASS = 450, MAT_SILVER = 50, MAT_GOLD = 100, MAT_URANIUM = 50) + build_path = /obj/effect/spawner/parts/t3 + sort_string = "AAAFC" + +/datum/design/item/stock_part/bundle/t4 + id = "parts_bundle_t4" + req_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_POWER = 6, TECH_MAGNET = 6, TECH_ARCANE = 2) + materials = list(MAT_STEEL = 4250, MAT_GLASS = 700, MAT_SILVER = 250, MAT_URANIUM = 150, MAT_DURASTEEL = 1450, MAT_VERDANTIUM = 900) + build_path = /obj/effect/spawner/parts/t4 + sort_string = "AAAFD" + +/datum/design/item/stock_part/bundle/t5 + id = "parts_bundle_t5" + req_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_POWER = 7, TECH_MAGNET = 7, TECH_PRECURSOR = 2) + materials = list(MAT_STEEL = 45000, MAT_PLASTEEL = 5500, MAT_GLASS = 11250, MAT_SILVER = 2500, MAT_URANIUM = 10000, MAT_DIAMOND = 5000, MAT_DURASTEEL = 2500, MAT_MORPHIUM = 2050) + build_path = /obj/effect/spawner/parts/t5 + sort_string = "AAAFE" + // RPEDs /datum/design/item/stock_part/RPED @@ -213,9 +249,20 @@ /datum/design/item/stock_part/ARPED name = "Advanced Rapid Part Exchange Device" - desc = "Special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity." + desc = "Special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity, \ + and the ability to manipulate beakers." id = "arped" req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 5) materials = list(MAT_STEEL = 30000, MAT_GLASS = 10000) build_path = /obj/item/weapon/storage/part_replacer/adv + sort_string = "ABAAB" + +/datum/design/item/stock_part/PBRPED + name = "Prototype Bluespace Rapid Part Exchange Device" + desc = "Special mechanical module made to store, sort, and apply standard machine parts. This one has a remarkably upgraded storage capacity, \ + and the ability to manipulate beakers." + id = "pbrped" + req_tech = list(TECH_ENGINEERING = 7, TECH_MATERIAL = 7, TECH_BLUESPACE = 5) + materials = list(MAT_STEEL = 30000, MAT_GLASS = 10000, MAT_SILVER = 5000, MAT_GOLD = 5000, MAT_DIAMOND = 1000) + build_path = /obj/item/weapon/storage/part_replacer/adv/discount_bluespace sort_string = "ABAAB" \ No newline at end of file diff --git a/icons/mob/items/lefthand_storage.dmi b/icons/mob/items/lefthand_storage.dmi index d69025101e..c8f275f173 100644 Binary files a/icons/mob/items/lefthand_storage.dmi and b/icons/mob/items/lefthand_storage.dmi differ diff --git a/icons/mob/items/righthand_storage.dmi b/icons/mob/items/righthand_storage.dmi index b2160603b8..d8ce049aa5 100644 Binary files a/icons/mob/items/righthand_storage.dmi and b/icons/mob/items/righthand_storage.dmi differ diff --git a/sound/items/rped.ogg b/sound/items/rped.ogg new file mode 100644 index 0000000000..93dca60d34 Binary files /dev/null and b/sound/items/rped.ogg differ