diff --git a/code/datums/components/crafting/melee_weapon.dm b/code/datums/components/crafting/melee_weapon.dm index 87bcbbbf17e..0d50bf077e6 100644 --- a/code/datums/components/crafting/melee_weapon.dm +++ b/code/datums/components/crafting/melee_weapon.dm @@ -21,6 +21,18 @@ time = 4 SECONDS category = CAT_WEAPON_MELEE +/datum/crafting_recipe/telecrystalprod + name = "Snatcherprod" + result = /obj/item/melee/baton/security/cattleprod/telecrystalprod + reqs = list( + /obj/item/restraints/handcuffs/cable = 1, + /obj/item/stack/rods = 1, + /obj/item/assembly/igniter = 1, + /obj/item/stack/telecrystal = 1, + ) + time = 4 SECONDS + category = CAT_WEAPON_MELEE + /datum/crafting_recipe/tailclub name = "Tail Club" result = /obj/item/tailclub diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm index 4305e986c6e..789399e73da 100644 --- a/code/game/objects/items/melee/baton.dm +++ b/code/game/objects/items/melee/baton.dm @@ -654,24 +654,44 @@ slot_flags = ITEM_SLOT_BACK convertible = FALSE var/obj/item/assembly/igniter/sparkler + ///Determines whether or not we can improve the cattleprod into a new type. Prevents turning the cattleprod subtypes into different subtypes, or wasting materials on making it....another version of itself. + var/can_upgrade = TRUE /obj/item/melee/baton/security/cattleprod/Initialize(mapload) . = ..() sparkler = new (src) -/obj/item/melee/baton/security/cattleprod/attackby(obj/item/item, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod - if(!istype(item, /obj/item/stack/ore/bluespace_crystal)) +/obj/item/melee/baton/security/cattleprod/attackby(obj/item/item, mob/user, params)//handles sticking a crystal onto a stunprod to make an improved cattleprod + if(!istype(item, /obj/item/stack)) return ..() - if(!cell) - var/obj/item/stack/ore/bluespace_crystal/crystal = item - var/obj/item/melee/baton/security/cattleprod/teleprod/prod = new - remove_item_from_storage(user) - qdel(src) - crystal.use(1) - user.put_in_hands(prod) - to_chat(user, span_notice("You place the bluespace crystal firmly into the igniter.")) - else + + if(!can_upgrade) + user.visible_message(span_warning("This prod is already improved!")) + return ..() + + if(cell) user.visible_message(span_warning("You can't put the crystal onto the stunprod while it has a power cell installed!")) + return ..() + + var/our_prod + if(istype(item, /obj/item/stack/ore/bluespace_crystal)) + var/obj/item/stack/ore/bluespace_crystal/our_crystal = item + our_crystal.use(1) + our_prod = /obj/item/melee/baton/security/cattleprod/teleprod + + else if(istype(item, /obj/item/stack/telecrystal)) + var/obj/item/stack/telecrystal/our_crystal = item + our_crystal.use(1) + our_prod = /obj/item/melee/baton/security/cattleprod/telecrystalprod + else + to_chat(user, span_notice("You don't think the [item.name] will do anything to improve the [src].")) + return ..() + + to_chat(user, span_notice("You place the [item.name] firmly into the igniter.")) + remove_item_from_storage(user) + qdel(src) + var/obj/item/melee/baton/security/cattleprod/brand_new_prod = new our_prod(user.loc) + user.put_in_hands(brand_new_prod) /obj/item/melee/baton/security/cattleprod/baton_effect() if(!sparkler.activate()) @@ -719,6 +739,7 @@ icon_state = "teleprod" inhand_icon_state = "teleprod" slot_flags = null + can_upgrade = FALSE /obj/item/melee/baton/security/cattleprod/teleprod/clumsy_check(mob/living/carbon/human/user) . = ..() @@ -731,3 +752,31 @@ if(!. || target.move_resist >= MOVE_FORCE_OVERPOWERING) return do_teleport(target, get_turf(target), 15, channel = TELEPORT_CHANNEL_BLUESPACE) + +/obj/item/melee/baton/security/cattleprod/telecrystalprod + name = "snatcherprod" + desc = "A prod with a telecrystal on the end. It sparks with a desire for theft and subversion." + w_class = WEIGHT_CLASS_NORMAL + icon_state = "telecrystalprod" + inhand_icon_state = "telecrystalprod" + slot_flags = null + throw_stun_chance = 50 //I think it'd be funny + can_upgrade = FALSE + +/obj/item/melee/baton/security/cattleprod/telecrystalprod/clumsy_check(mob/living/carbon/human/user) + . = ..() + if(!.) + return + do_teleport(src, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE) //Wait, where did it go? + +/obj/item/melee/baton/security/cattleprod/telecrystalprod/baton_effect(mob/living/target, mob/living/user, modifiers, stun_override) + . = ..() + if(!.) + return + var/obj/item/stuff_in_hand = target.get_active_held_item() + if(stuff_in_hand && target.temporarilyRemoveItemFromInventory(stuff_in_hand)) + if(user.put_in_inactive_hand(stuff_in_hand)) + stuff_in_hand.loc.visible_message(span_warning("[stuff_in_hand] suddenly appears in [user]'s hand!")) + else + stuff_in_hand.forceMove(user.drop_location()) + stuff_in_hand.loc.visible_message(span_warning("[stuff_in_hand] suddenly appears!")) diff --git a/icons/mob/inhands/weapons/melee_lefthand.dmi b/icons/mob/inhands/weapons/melee_lefthand.dmi index 804daac34a8..79a362a0090 100644 Binary files a/icons/mob/inhands/weapons/melee_lefthand.dmi and b/icons/mob/inhands/weapons/melee_lefthand.dmi differ diff --git a/icons/mob/inhands/weapons/melee_righthand.dmi b/icons/mob/inhands/weapons/melee_righthand.dmi index ba891803b37..222f8955396 100644 Binary files a/icons/mob/inhands/weapons/melee_righthand.dmi and b/icons/mob/inhands/weapons/melee_righthand.dmi differ diff --git a/icons/obj/weapons/items_and_weapons.dmi b/icons/obj/weapons/items_and_weapons.dmi index 2ae955091f6..9581048e240 100644 Binary files a/icons/obj/weapons/items_and_weapons.dmi and b/icons/obj/weapons/items_and_weapons.dmi differ