[MIRROR] Adds the Snatcherprod. It steals stuff from peoples hands and puts it into yours! [MDB IGNORE] (#19882)

* Adds the Snatcherprod. It steals stuff from peoples hands and puts it into yours! (#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
🆑
add: Adds the Snatcherprod. Like a teleprod, but it steals stuff from
peoples hands instead. Made using a telecrystal, rather than a bluespace
crystal.
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>

* Adds the Snatcherprod. It steals stuff from peoples hands and puts it into yours!

---------

Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-18 11:24:31 +01:00
committed by GitHub
parent 41d6d6a61a
commit e13e921d75
5 changed files with 72 additions and 11 deletions
+60 -11
View File
@@ -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!"))