Skip to content

Commit

Permalink
Adds the Snatcherprod. It steals stuff from peoples hands and puts it…
Browse files Browse the repository at this point in the history
… into yours! (tgstation#73746)

## About The Pull Request

Adds the Snatcherprod, the telecrystal version of the teleprod. It
yoinks an item out of the victim's hand, and puts it into yours. Or on
the ground, if your hands are full.

You make it like you would a teleprod, but using a telecrystal instead.

## Why It's Good For The Game

It was a funny joke I observed. Also I'm deeply sleep deprived and so my
better judgement eludes me during these capricious moments.

## Changelog
:cl:
add: Adds the Snatcherprod. Like a teleprod, but it steals stuff from
peoples hands instead. Made using a telecrystal, rather than a bluespace
crystal.
/:cl:

---------

Co-authored-by: John Willard <[email protected]>
  • Loading branch information
necromanceranne and JohnFulpWillard authored Mar 15, 2023
1 parent 75e4bcc commit 6d55729
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 11 deletions.
12 changes: 12 additions & 0 deletions code/datums/components/crafting/melee_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
71 changes: 60 additions & 11 deletions code/game/objects/items/melee/baton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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)
. = ..()
Expand All @@ -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!"))
Binary file modified icons/mob/inhands/weapons/melee_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/melee_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/weapons/items_and_weapons.dmi
Binary file not shown.

0 comments on commit 6d55729

Please sign in to comment.