Merge pull request #4414 from CrAzYPiLoT-SS13/uselessness_at_its_best

Pilot's Useless Fiesta; Part 1: The hunting trip
This commit is contained in:
TheDZD
2016-05-22 18:44:57 -04:00
+33 -2
View File
@@ -19,11 +19,15 @@
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
var/obj/item/weapon/grenade/iedcasing/IED = null
var/obj/item/device/assembly/signaler/sig = null
/obj/item/weapon/restraints/legcuffs/beartrap/Destroy()
if(IED)
qdel(IED)
IED = null
if(sig)
qdel(sig)
sig = null
return ..()
/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user)
@@ -43,6 +47,9 @@
if(IED)
to_chat(user, "<span class='warning'>This beartrap already has an IED hooked up to it!</span>")
return
if(sig)
to_chat(user, "<span class='warning'>This beartrap already has a signaler hooked up to it!</span>")
return
IED = I
switch(IED.assembled)
if(0,1) //if it's not fueled/hooked up
@@ -50,7 +57,7 @@
IED = null
return
if(2,3)
user.drop_item(src)
user.drop_item()
I.forceMove(src)
message_admins("[key_name_admin(user)] has rigged a beartrap with an IED.")
log_game("[key_name(user)] has rigged a beartrap with an IED.")
@@ -60,12 +67,33 @@
to_chat(user, "<span class='danger'>You shouldn't be reading this message! Contact a coder or someone, something broke!</span>")
IED = null
return
if(istype(I, /obj/item/device/assembly/signaler))
if(IED)
to_chat(user, "<span class='warning'>This beartrap already has an IED hooked up to it!</span>")
return
if(sig)
to_chat(user, "<span class='warning'>This beartrap already has a signaler hooked up to it!</span>")
return
sig = I
if(sig.secured)
to_chat(user, "<span class='notice'>The signaler is secured.</span>")
sig = null
return
user.drop_item()
I.forceMove(src)
to_chat(user, "<span class='notice'>You sneak the [sig] underneath the pressure plate and connect the trigger wire.</span>")
desc = "A trap used to catch bears and other legged creatures. <span class='warning'>There is a remote signaler hooked up to it.</span>"
if(istype(I, /obj/item/weapon/screwdriver))
if(IED)
IED.forceMove(get_turf(src))
IED = null
to_chat(user, "<span class='notice'>You remove the IED from the [src].</span>")
return
if(sig)
sig.forceMove(get_turf(src))
sig = null
to_chat(user, "<span class='notice'>You remove the signaler from the [src].</span>")
return
..()
/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
@@ -88,6 +116,9 @@
spawn(IED.det_time)
IED.prime()
if(sig && isturf(src.loc))
sig.signal()
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
@@ -192,4 +223,4 @@
/obj/item/weapon/legcuffs/bolas/Bump()
..()
throw_failed() //allows a mech bolas to be destroyed
throw_failed() //allows a mech bolas to be destroyed