diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 69cb247287..3fbbab087f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -109,6 +109,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder! + /obj/item/Initialize() materials = typelist("materials", materials) diff --git a/code/game/objects/items/devices/compressionkit.dm b/code/game/objects/items/devices/compressionkit.dm new file mode 100644 index 0000000000..cd26a06dde --- /dev/null +++ b/code/game/objects/items/devices/compressionkit.dm @@ -0,0 +1,127 @@ +/obj/item/compressionkit + name = "bluespace compression kit" + desc = "An illegally modified BSRPED, capable of reducing the size of most items." + icon = 'icons/obj/tools.dmi' + icon_state = "compression_c" + item_state = "RPED" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + w_class = WEIGHT_CLASS_NORMAL + var/charges = 5 + var/damage_multiplier = 0.2 // Changing this effects how much more or less damage a resized item will do + var/mode = 0 + +/obj/item/compressionkit/examine(mob/user) + ..() + to_chat(user, "It has [charges] charges left. Recharge with bluespace crystals.") + to_chat(user, "Use in-hand to swap toggle compress/expand mode (expand mode not yet implemented).") + +/obj/item/compressionkit/attack_self(mob/user) + if(mode == 0) + mode = 1 + icon_state = "compression_e" + to_chat(user, "You switch the compressor to expand mode. This isn't implemented yet, so right now it wont do anything different!") + return + if(mode == 1) + mode = 0 + icon_state = "compression_c" + to_chat(user, "You switch the compressor to compress mode. Usage will now reduce the size of objects.") + return + else + mode = 0 + icon_state = "compression_c" + to_chat(user, "Some coder cocked up or an admin broke your compressor. It's been set back to compress mode..") + +/obj/item/compressionkit/proc/sparks() + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(5, 1, get_turf(src)) + s.start() + +/obj/item/compressionkit/suicide_act(mob/living/carbon/M) + M.visible_message("[M] is sticking their head in [src] and turning it on! [M.p_theyre(TRUE)] going to compress their own skull!") + var/obj/item/bodypart/head = M.get_bodypart("head") + if(!head) + return + var/turf/T = get_turf(M) + var/list/organs = M.getorganszone("head") + M.getorganszone("eyes") + M.getorganszone("mouth") + for(var/internal_organ in organs) + var/obj/item/organ/I = internal_organ + I.Remove(M) + I.forceMove(T) + head.drop_limb() + qdel(head) + new M.gib_type(T,1,M.get_static_viruses()) + M.add_splatter_floor(T) + playsound(M, 'sound/weapons/flash.ogg', 50, 1) + playsound(M, 'sound/effects/splat.ogg', 50, 1) + + return OXYLOSS + +/obj/item/compressionkit/afterattack(atom/target, mob/user, proximity) + . = ..() + if(!proximity || !target) + return + else + if(charges == 0) + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1) + to_chat(user, "The bluespace compression kit is out of charges! Recharge it with bluespace crystals.") + return + if(istype(target, /obj/item)) + var/obj/item/O = target + if(O.w_class == 1) + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1) + to_chat(user, "[target] cannot be compressed smaller!.") + return + if(O.GetComponent(/datum/component/storage)) + to_chat(user, "You feel like compressing an item that stores other items would be counterproductive.") + return + if(O.w_class > 1) + playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1) + user.visible_message("[user] is compressing [O] with their bluespace compression kit!") + if(do_mob(user, O, 40) && charges > 0 && O.w_class > 1) + playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1) + sparks() + flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN) + O.w_class -= 1 + O.force_mult -= damage_multiplier + charges -= 1 + to_chat(user, "You successfully compress [target]! The compressor now has [charges] charges.") + else + to_chat(user, "Anomalous error. Summon a coder.") + + if(istype(target, /mob/living)) + var/mob/living/victim = target + if(istype(victim, /mob/living/carbon/human)) + if(user.zone_selected == "groin") // pp smol. There's probably a smarter way to do this but im retarded. If you have a simpler method let me know. + var/list/organs = victim.getorganszone("groin") + for(var/internal_organ in organs) + if(istype(internal_organ, /obj/item/organ/genital/penis)) + var/obj/item/organ/genital/penis/O = internal_organ + playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1) + victim.visible_message("[user] is preparing to shrink [victim]\'s [O.name] with their bluespace compression kit!") + if(do_mob(user, victim, 40) && charges > 0 && O.length > 0) + victim.visible_message("[user] has shrunk [victim]\'s [O.name]!") + playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1) + sparks() + flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN) + charges -= 1 + O.length -= 5 + if(O.length < 1) + victim.visible_message("[user]\'s [O.name] vanishes!") + qdel(O) // no pp for you + else + O.update_size() + O.update_appearance() + + + +/obj/item/compressionkit/attackby(obj/item/I, mob/user, params) + ..() + if(istype(I, /obj/item/stack/ore/bluespace_crystal)) + var/obj/item/stack/ore/bluespace_crystal/B = I + charges += 2 + to_chat(user, "You insert [I] into [src]. It now has [charges] charges.") + if(B.amount > 1) + B.amount -= 1 + else + qdel(I) \ No newline at end of file diff --git a/code/game/objects/items/devices/glue.dm b/code/game/objects/items/devices/glue.dm new file mode 100644 index 0000000000..fed582d951 --- /dev/null +++ b/code/game/objects/items/devices/glue.dm @@ -0,0 +1,32 @@ +/obj/item/syndie_glue + name = "bottle of super glue" + desc = "A black market brand of high strength adhesive, rarely sold to the public. Do not ingest." + icon = 'icons/obj/tools.dmi' + icon_state = "glue" + w_class = WEIGHT_CLASS_SMALL + var/uses = 1 + +/obj/item/syndie_glue/suicide_act(mob/living/carbon/M) + return //todo + +/obj/item/syndie_glue/afterattack(atom/target, mob/user, proximity) + . = ..() + if(!proximity || !target) + return + else + if(uses == 0) + to_chat(user, "The bottle of glue is empty!") + return + if(istype(target, /obj/item)) + var/obj/item/I = target + if(I.item_flags & NODROP) + to_chat(user, "[I] is already sticky!") + return + uses -= 1 + I.item_flags |= NODROP + I.desc += " It looks sticky." + to_chat(user, "You smear the [I] with glue, making it incredibly sticky!") + if(uses == 0) + icon_state = "glue_used" + name = "empty bottle of super glue" + return \ No newline at end of file diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index f2f919a717..0d5a5e5819 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -1262,6 +1262,23 @@ datum/uplink_item/stealthy_tools/taeclowndo_shoes item = /obj/item/codespeak_manual/unlimited cost = 3 +/datum/uplink_item/device_tools/compressionkit + name = "Bluespace Compression Kit" + desc = "A modified version of a BSRPED that can be used to reduce the size of most items while retaining their original functions! \ + Does not work on storage items. \ + Recharge using bluespace crystals. \ + Comes with 5 charges." + item = /obj/item/compressionkit + cost = 5 + +/datum/uplink_item/device_tools/syndie_glue + name = "Glue" + desc = "A cheap bottle of one use syndicate brand super glue. \ + Use on any item to make it undroppable. \ + Be careful not to glue an item you're already holding!" + item = /obj/item/syndie_glue + cost = 2 + // Implants /datum/uplink_item/implants category = "Implants" diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi index 8f6b844a23..cfb36bb3ae 100644 Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ diff --git a/tgstation.dme b/tgstation.dme index e33566290c..0fbefaa7b8 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -836,12 +836,14 @@ #include "code\game\objects\items\devices\beacon.dm" #include "code\game\objects\items\devices\camera_bug.dm" #include "code\game\objects\items\devices\chameleonproj.dm" +#include "code\game\objects\items\devices\compressionkit.dm" #include "code\game\objects\items\devices\dogborg_sleeper.dm" #include "code\game\objects\items\devices\doorCharge.dm" #include "code\game\objects\items\devices\electroadaptive_pseudocircuit.dm" #include "code\game\objects\items\devices\flashlight.dm" #include "code\game\objects\items\devices\forcefieldprojector.dm" #include "code\game\objects\items\devices\geiger_counter.dm" +#include "code\game\objects\items\devices\glue.dm" #include "code\game\objects\items\devices\gps.dm" #include "code\game\objects\items\devices\instruments.dm" #include "code\game\objects\items\devices\laserpointer.dm"