Pod Disabler and Grab Fixes

Fixes the bug that lets you destroy pods with stamina damage weapons by
adding in a check, as well as fixes the bug that makes it possible to
pull someone out of a pod they are not in anymore.

Fixes #5088

🆑 Twinmold
Fix: Can no longer destroy pods with disablers and other stamina damage
weapons.
Fix: Can no longer pull someone out of a pod when no one is actually in
the pod.
/🆑
This commit is contained in:
Twinmold
2016-07-20 02:38:34 -05:00
parent f5324665ac
commit 4436cb995a
+5 -2
View File
@@ -130,7 +130,7 @@
light_color = icon_light_color[src.icon_state]
/obj/spacepod/bullet_act(var/obj/item/projectile/P)
if(P.damage && !P.nodamage)
if(P.damage && !P.nodamage && P.damage_type != STAMINA)
deal_damage(P.damage)
else if(P.flag == "energy" && istype(P,/obj/item/projectile/ion)) //needed to make sure ions work properly
empulse(src, 1, 1)
@@ -370,7 +370,10 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/device/spacepod_equipment
if(do_after(user, 50, target = src))
target.forceMove(get_turf(src))
target.Stun(1)
passengers -= target
if(pilot)
pilot = null
else
passengers -= target
target.visible_message("<span class='warning'>[user] flings the door open and tears [target] out of the [src]</span>",
"<span class='warning'>The door flies open and you are thrown out of the [src] and to the ground!</span>")
return