diff --git a/code/game/vehicles/spacepods/spacepod.dm b/code/game/vehicles/spacepods/spacepod.dm
index a1195a22868..4b1bba60671 100644
--- a/code/game/vehicles/spacepods/spacepod.dm
+++ b/code/game/vehicles/spacepods/spacepod.dm
@@ -50,9 +50,9 @@
pr_int_temp_processor = new /datum/global_iterator/pod_preserve_temp(list(src))
pr_give_air = new /datum/global_iterator/pod_tank_give_air(list(src))
equipment_system = new(src)
- spacepods_list += src
-
-/obj/spacepod/Destroy()
+ spacepods_list += src
+
+/obj/spacepod/Destroy()
spacepods_list -= src
..()
@@ -61,9 +61,9 @@
pod_overlays = new/list(2)
pod_overlays[DAMAGE] = image(icon, icon_state="pod_damage")
pod_overlays[FIRE] = image(icon, icon_state="pod_fire")
-
+
overlays.Cut()
-
+
if(health <= round(initial(health)/2))
overlays += pod_overlays[DAMAGE]
if(health <= round(initial(health)/4))
@@ -72,11 +72,11 @@
/obj/spacepod/bullet_act(var/obj/item/projectile/P)
if(P.damage && !P.nodamage)
deal_damage(P.damage)
-
+
/obj/spacepod/blob_act()
deal_damage(30)
return
-
+
/obj/spacepod/attack_animal(mob/living/simple_animal/user as mob)
if(user.melee_damage_upper == 0)
user.emote("[user.friendly] [src]")
@@ -86,7 +86,7 @@
visible_message("\red [user] [user.attacktext] [src]!")
user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
return
-
+
/obj/spacepod/attack_alien(mob/user as mob)
deal_damage(15)
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
@@ -211,8 +211,8 @@
user << "\blue \The [src] is fully repaired!"
/obj/spacepod/attack_paw(mob/user as mob)
- return src.attack_hand(user)
-
+ return src.attack_hand(user)
+
/obj/spacepod/attack_hand(mob/user as mob)
if(!hatch_open)
return ..()
@@ -371,7 +371,11 @@
return
if(H && H.client && H in range(1))
- if(src.occupant)
+ if(src.occupant && src.occupant2)
+ H << "[src.name] is full."
+ return
+
+ if(src.occupant && !src.occupant2)
if(src.occupant.ckey == H.ckey)
H.visible_message("You climb over the console and drop down into the secondary seat.")
H.reset_view(src)
@@ -404,30 +408,36 @@
return 1
else
- H.reset_view(src)
- /*
- H.client.perspective = EYE_PERSPECTIVE
- H.client.eye = src
- */
- H.stop_pulling()
- H.forceMove(src)
- src.occupant = H
- src.add_fingerprint(H)
- src.forceMove(src.loc)
- //dir = dir_in
- playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
- return 1
+ if(!src.occupant)
+ H.reset_view(src)
+ /*
+ H.client.perspective = EYE_PERSPECTIVE
+ H.client.eye = src
+ */
+ H.stop_pulling()
+ H.forceMove(src)
+ src.occupant = H
+ src.add_fingerprint(H)
+ src.forceMove(src.loc)
+ //dir = dir_in
+ playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
+ return 1
+ else
+ return
else
return 0
/obj/spacepod/proc/moved_other_inside(var/mob/living/carbon/human/H as mob)
- H.reset_view(src)
- H.stop_pulling()
- H.forceMove(src)
- src.occupant2 = H
- src.forceMove(src.loc)
- playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
- return 1
+ if(!src.occupant2)
+ H.reset_view(src)
+ H.stop_pulling()
+ H.forceMove(src)
+ src.occupant2 = H
+ src.forceMove(src.loc)
+ playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
+ return 1
+ else
+ return
@@ -436,7 +446,15 @@
if(M != user)
if(M.stat != 0)
if(allow2enter)
- moved_other_inside(M)
+ if(!src.occupant2)
+ visible_message("\red [user.name] starts loading [M.name] into the pod!")
+ sleep(10)
+ moved_other_inside(M)
+ else if(src.occupant2 && !src.occupant)
+ usr << "\red You can't put a corpse into the driver's seat!"
+ return
+ else
+ return
else
return
else
@@ -445,6 +463,68 @@
move_inside(M, user)
+/obj/spacepod/verb/move_inside()
+ set category = "Object"
+ set name = "Enter Pod"
+ set src in oview(1)
+ var/fukkendisk = usr.GetTypeInAllContents(/obj/item/weapon/disk/nuclear)
+
+ if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other
+ return
+
+ if (usr.stat || !ishuman(usr))
+ return
+
+ if(fukkendisk)
+ usr << "\red The nuke-disk is locking the door every time you try to open it. You get the feeling that it doesn't want to go into the spacepod."
+ return
+
+ for(var/mob/living/carbon/slime/M in range(1,usr))
+ if(M.Victim == usr)
+ usr << "You're too busy getting your life sucked out of you."
+ return
+
+ if(src.occupant)
+ if(allow2enter)
+ if(!src.occupant2)
+ usr << "\blue You start climbing into the secondary seat."
+ visible_message("\blue [usr] starts to climb into [src.name].")
+ if(enter_after(40,usr))
+ moved_inside(usr)
+ else
+ usr << "You stop entering the spacepod."
+ return
+ else
+ usr << "\red You can't fit!"
+ else
+ usr << "\red The door is locked!"
+
+ else if(!src.occupant && src.occupant2)
+ if(allow2enter)
+ usr << "\blue You start climbing into the primary seat."
+ visible_message("\blue [usr] starts to climb into [src.name].")
+ if(enter_after(40,usr))
+ moved_inside(usr)
+ else
+ usr << "You stop entering the spacepod."
+ return
+ else
+ usr << "\red The door is locked!"
+
+ else if(!src.occupant && !src.occupant2)
+ visible_message("\blue [usr] starts to climb into [src.name].")
+ if(enter_after(40,usr))
+ if(!src.occupant)
+ moved_inside(usr)
+ else if(src.occupant!=usr)
+ usr << "[src.occupant] was faster. Try better next time, loser."
+ else
+ usr << "You stop entering the spacepod."
+ return
+
+
+/* !!OLD BROKEN SYSTEM!! - tiger
+
/obj/spacepod/verb/move_inside()
set category = "Object"
set name = "Enter Pod"
@@ -459,8 +539,12 @@
return
if (usr.stat || !ishuman(usr))
return
+
if (src.occupant)
if(allow2enter)
+ if(src.occupant2)
+ usr << "\blue You can't fit!You starts climbing into the secondary seat."
visible_message("\blue [usr] starts to climb into [src.name]")
if(enter_after(40,usr))
@@ -515,46 +599,55 @@
usr << "You stop entering the exosuit."
return
+*/
+
/obj/spacepod/verb/exit_pod()
set name = "Exit pod"
set category = "Spacepod"
set src = usr.loc
+
if(usr != src.occupant)
if(src.occupant2)
if(usr != src.occupant2)
return
else
+ if(src.occupant)
+ src.occupant.visible_message("[src.occupant2.name] climbs out of the pod!") //Inform the remaining occupant that someone ejected.
inertia_dir = 0 // engage reverse thruster and power down pod
src.occupant2.loc = src.loc
src.occupant2 = null
- usr << "You climb out of the pod"
+ usr << "You climb out of the pod."
+
else
return
else
+ if(src.occupant2)
+ src.occupant2.visible_message("[src.occupant2.name] climbs out of the pod!") //Inform the remaining occupant that someone ejected.
inertia_dir = 0 // engage reverse thruster and power down pod
src.occupant.loc = src.loc
src.occupant = null
- usr << "You climb out of the pod"
+ usr << "You climb out of the pod."
return
/obj/spacepod/verb/exit_pod2()
if(!src.occupant2)
set hidden = 1
return
+
else
set name = "Eject Secondary Seat"
set category = "Spacepod"
set src = usr.loc
set hidden = 0
- if(usr.ckey == src.occupant2.ckey)
+ if(usr == src.occupant2)
usr << "Use 'Exit Pod'"
return
else
usr << "You eject [src.occupant2.name]."
- src.occupant2.visible_message("You were ejected from the pod!")
+ src.occupant2.visible_message("You were ejected from the pod!")
inertia_dir = 0 // engage reverse thruster and power down pod
src.occupant2.loc = src.loc
src.occupant2 = null
@@ -565,7 +658,7 @@
set category = "Spacepod"
set src = usr.loc
- if(occupant2 == src)
+ if(occupant2 == usr)
if(!allow2enter)
usr << "You can't unlock the doors from your seat."
return