Files
Bubberstation/code/game/objects/items/teleprod.dm
vuonojenmustaturska c4fd8715a5 Return of ore stacking, various changes to lavaland bombs to facilitate reduced lag (#35291)
* Ore Stacking

* honk

* honk

* component memes

* honk2

* fix overlay off-by-1, sheet singular names

* Give the ores more descriptive names since sheets also have

* whoops debug memes

* atom editor memes

* fixes

* snowdin fix
2018-02-05 22:27:35 +01:00

42 lines
1.6 KiB
Plaintext

/obj/item/melee/baton/cattleprod/teleprod
name = "teleprod"
desc = "A prod with a bluespace crystal on the end. The crystal doesn't look too fun to touch."
w_class = WEIGHT_CLASS_NORMAL
icon_state = "teleprod_nocell"
item_state = "teleprod"
slot_flags = null
/obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
..()
if(status && user.has_trait(TRAIT_CLUMSY) && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
if(do_teleport(user, get_turf(user), 50))//honk honk
user.Knockdown(stunforce*3)
deductcharge(hitcost)
else
user.Knockdown(stunforce*3)
deductcharge(hitcost/4)
return
else
if(status)
if(!istype(M) && M.anchored)
return .
else
do_teleport(M, get_turf(M), 15)
/obj/item/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod
if(istype(I, /obj/item/stack/ore/bluespace_crystal))
if(!cell)
var/obj/item/stack/ore/bluespace_crystal/BSC = I
var/obj/item/melee/baton/cattleprod/teleprod/S = new /obj/item/melee/baton/cattleprod/teleprod
remove_item_from_storage(user)
qdel(src)
BSC.use(1)
user.put_in_hands(S)
to_chat(user, "<span class='notice'>You place the bluespace crystal firmly into the igniter.</span>")
else
user.visible_message("<span class='warning'>You can't put the crystal onto the stunprod while it has a power cell installed!</span>")
else
return ..()