Fixes Exosuit passenger removal (#334)

* Fixes Exosuit passenger removal

-Fixed exosuit do_after function, renamed it do_after_mecha
-Fixed all calls to this function
-Removing people from passenger compartments will now work

* Added changelog
This commit is contained in:
NanakoAC
2016-05-28 01:55:04 +03:00
committed by skull132
parent 762427f5a2
commit ee485d5850
3 changed files with 46 additions and 12 deletions
+3 -3
View File
@@ -33,7 +33,7 @@
if(M.stat>1)
M.gib()
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_mecha(melee_cooldown))
melee_can_hit = 1
return
*/
@@ -85,7 +85,7 @@
src.visible_message("[src] pushes [target] out of the way.")
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_mecha(melee_cooldown))
melee_can_hit = 1
return
@@ -103,7 +103,7 @@
src.visible_message("<b>[src.name] smashes through the wall</b>")
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
melee_can_hit = 0
if(do_after(melee_cooldown))
if(do_after_mecha(melee_cooldown))
melee_can_hit = 1
break
return
+7 -9
View File
@@ -197,7 +197,7 @@
pr_give_air = new /datum/global_iterator/mecha_tank_give_air(list(src))
pr_internal_damage = new /datum/global_iterator/mecha_internal_damage(list(src),0)
/obj/mecha/proc/do_after(delay as num)
/obj/mecha/proc/do_after_mecha(delay as num)
sleep(delay)
if(src)
return 1
@@ -391,7 +391,7 @@
if(!src.check_for_support())
src.pr_inertial_movement.start(list(src,direction))
src.log_message("Movement control lost. Inertial movement started.")
if(do_after(step_in))
if(do_after_mecha(step_in))
can_move = 1
return 1
return 0
@@ -1552,12 +1552,10 @@
var/mob/occupant = P.occupant
user.visible_message("\red [user] begins opening the hatch on \the [P]...", "\red You begin opening the hatch on \the [P]...")
if (!do_after(user, 40, needhand=0))
return
user.visible_message("\red [user] opens the hatch on \the [P] and removes [occupant]!", "\red You open the hatch on \the [P] and remove [occupant]!")
P.go_out()
P.log_message("[occupant] was removed.")
if (do_after(user, 40, needhand=0))
user.visible_message("\red [user] opens the hatch on \the [P] and removes [occupant]!", "\red You open the hatch on \the [P] and remove [occupant]!")
P.go_out()
P.log_message("[occupant] was removed.")
return
if(href_list["add_req_access"] && add_req_access && filter.getObj("id_card"))
if(!in_range(src, usr)) return
@@ -1592,7 +1590,7 @@
src.occupant_message("Recalibrating coordination system.")
src.log_message("Recalibration of coordination system started.")
var/T = src.loc
if(do_after(100))
if(do_after_mecha(100))
if(T == src.loc)
src.clearInternalDamage(MECHA_INT_CONTROL_LOST)
src.occupant_message("<font color='blue'>Recalibration successful.</font>")