diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 325e0ab51da..fd062539852 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -20,6 +20,7 @@ var/global/list/landmarks_list = list() //list of all landmarks created
var/global/list/surgery_steps = list() //list of all surgery steps |BS12
var/global/list/side_effects = list() //list of all medical sideeffects types by thier names |BS12
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
+var/global/list/spacepods_list = list() //list of all space pods. Used by hostile mobs target tracking.
var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
var/global/list/flag_list = list() //list of flags during Nations gamemode
var/global/list/airlocks = list() //list of all airlocks
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index 6bb718ea8eb..507d0c1dfe7 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -22,6 +22,10 @@
var/obj/mecha/Mech = O
if( Mech.occupant )
turretTargets |= Mech
+ else if( istype(O, /obj/spacepod) )
+ var/obj/spacepod/Pod = O
+ if( Pod.occupant || Pod.occupant2 )
+ turretTargets |= Pod
else if(istype(O,/mob/living/simple_animal))
turretTargets |= O
return 1
@@ -34,6 +38,8 @@
turretTargets -= O
else if( istype(O, /obj/mecha) )
turretTargets -= O
+ else if( istype(O, /obj/spacepod) )
+ turretTargets -= O
..()
return 1
@@ -139,6 +145,10 @@
var/obj/mecha/ME = T
if( ME.occupant )
return 1
+ else if( istype(T, /obj/spacepod) )
+ var/obj/spacepod/SP = T
+ if( SP.occupant || SP.occupant2 )
+ return 1
else if(istype(T,/mob/living/simple_animal))
var/mob/living/simple_animal/A = T
if( !A.stat )
@@ -156,6 +166,9 @@
for(var/obj/mecha/M in protected_area.turretTargets)
if(M.occupant)
new_targets += M
+ for(var/obj/spacepod/M in protected_area.turretTargets)
+ if(M.occupant)
+ new_targets += M
for(var/mob/living/simple_animal/M in protected_area.turretTargets)
if(!M.stat)
new_targets += M
@@ -575,6 +588,10 @@
var/obj/mecha/M = target
if(M.occupant)
return 1
+ else if(istype(target, /obj/spacepod))
+ var/obj/spacepod/S = target
+ if(S.occupant || S.occupant2)
+ return 1
return 0
@@ -606,6 +623,16 @@
if(!M.occupant)
continue //Don't shoot at empty mechs.
pos_targets += M
+ for(var/obj/spacepod/M in oview(scan_range, src))
+ if(M.occupant)
+ if(faction in M.occupant.faction)
+ continue
+ if(M.occupant2)
+ if(faction in M.occupant2.faction)
+ continue
+ if(!M.occupant && !M.occupant2)
+ continue //Don't shoot at empty mechs.
+ pos_targets += M
if(pos_targets.len)
target = pick(pos_targets)
return target
diff --git a/code/game/vehicles/spacepods/spacepod.dm b/code/game/vehicles/spacepods/spacepod.dm
index 138559e543a..248868e1957 100644
--- a/code/game/vehicles/spacepods/spacepod.dm
+++ b/code/game/vehicles/spacepods/spacepod.dm
@@ -26,7 +26,7 @@
var/hatch_open = 0
var/next_firetime = 0
var/list/pod_overlays
- var/health = 100
+ var/health = 250
var/lights = 0
var/lights_power = 6
var/allow2enter = 1
@@ -50,6 +50,11 @@
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/proc/update_icons()
if(!pod_overlays)
@@ -69,6 +74,23 @@
/obj/spacepod/bullet_act(var/obj/item/projectile/P)
if(P.damage && !P.nodamage)
deal_damage(P.damage)
+
+/obj/spacepod/attack_animal(mob/living/simple_animal/user as mob)
+ if(user.melee_damage_upper == 0)
+ user.emote("[user.friendly] [src]")
+ else
+ var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
+ deal_damage(damage)
+ 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)
+ user << "\red You slash at the armored suit!"
+ visible_message("\red The [user] slashes at [src.name]'s armor!")
+ return
/obj/spacepod/proc/deal_damage(var/damage)
var/oldhealth = health
@@ -160,7 +182,9 @@
equipment_system.weapon_system.my_atom = src
return
-
+/obj/spacepod/attack_paw(mob/user as mob)
+ return src.attack_hand(user)
+
/obj/spacepod/attack_hand(mob/user as mob)
if(!hatch_open)
return ..()
@@ -222,7 +246,7 @@
name = "\improper security spacepod"
desc = "An armed security spacepod with reinforced armor plating."
icon_state = "pod_mil"
- health = 150
+ health = 400
/obj/spacepod/sec/New()
..()
@@ -512,12 +536,12 @@
set category = "Spacepod"
set src = usr.loc
- if(usr.ckey == src.occupant2.ckey)
+ if(occupant2 == src)
if(!allow2enter)
- usr << "You can't unlock the doors from your seat. "
+ usr << "You can't unlock the doors from your seat."
return
else
- usr << "You can't lock the doors from your seat. "
+ usr << "You can't lock the doors from your seat."
return
else
if(src.allow2enter)
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 1cc7a8fff7d..893992f5b7e 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -71,6 +71,9 @@
for(var/obj/mecha/M in mechas_list)
if(get_dist(M, src) <= vision_range && can_see(src, M, vision_range))
L += M
+ for(var/obj/spacepod/S in spacepods_list)
+ if(get_dist(S, src) <= vision_range && can_see(src, S, vision_range))
+ L += S
return L
/mob/living/simple_animal/hostile/proc/FindTarget()//Step 2, filter down possible targets to things we actually care about
@@ -131,6 +134,10 @@
var/obj/mecha/M = the_target
if(M.occupant)//Just so we don't attack empty mechs
return 1
+ if(istype(the_target, /obj/spacepod))
+ var/obj/spacepod/S = the_target
+ if(S.occupant || S.occupant2)//Just so we don't attack empty mechs
+ return 1
return 0
/mob/living/simple_animal/hostile/proc/GiveTarget(var/new_target)//Step 4, give us our selected target
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
index 978deb17346..6cf9a8aec56 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
@@ -14,6 +14,11 @@
if(M.occupant)
stance = HOSTILE_STANCE_ATTACK
return A
+ else if(istype(A, /obj/spacepod))
+ var/obj/spacepod/M = A
+ if(M.occupant || M.occupant2)
+ stance = HOSTILE_STANCE_ATTACK
+ return A
/mob/living/simple_animal/hostile/retaliate/ListTargets()
if(!enemies.len)
@@ -43,6 +48,11 @@
if(M.occupant)
enemies |= M
enemies |= M.occupant
+ else if(istype(A, /obj/spacepod))
+ var/obj/spacepod/M = A
+ if(M.occupant || M.occupant2)
+ enemies |= M
+ enemies |= M.occupant
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
var/retaliate_faction_check = 0
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 7becc36cfa2..890c953c632 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -468,6 +468,10 @@
var/obj/mecha/M = target
if (M.occupant)
return 0
+ if (istype(target,/obj/spacepod))
+ var/obj/spacepod/S = target
+ if (S.occupant || S.occupant2)
+ return 0
return 1
/mob/living/simple_animal/update_fire()
@@ -526,4 +530,8 @@
var/obj/mecha/M = the_target
if (M.occupant)
return 0
+ if (istype(the_target, /obj/spacepod))
+ var/obj/spacepod/S = the_target
+ if (S.occupant || S.occupant2)
+ return 0
return 1