Fixed EMP'd AI shuttle call, fixed shuttle log entries being added even if the shuttle wasn't called (#26140)

This commit is contained in:
DamianX
2020-04-10 16:13:26 +02:00
committed by GitHub
parent 5fdaff1ec7
commit 209e14c33c
2 changed files with 6 additions and 7 deletions

View File

@@ -212,9 +212,7 @@ var/list/shuttle_log = list()
return
var/response = alert("Are you sure you wish to call the shuttle?", "Confirm", "Yes", "Cancel")
if(response == "Yes")
if(call_shuttle_proc(usr, justification))
if(!isobserver(usr))
shuttle_log += "\[[worldtime2text()]] Called from [get_area(usr)]."
call_shuttle_proc(usr, justification)
if(emergency_shuttle.online)
post_status("shuttle")
setMenuState(usr,COMM_SCREEN_MAIN)
@@ -558,6 +556,8 @@ var/list/shuttle_log = list()
emergency_shuttle.incall()
if(!justification)
justification = "#??!7E/_1$*/ARR-CON<4F>FAIL!!*$^?" //Can happen for reasons, let's deal with it IC
if(!isobserver(user))
shuttle_log += "\[[worldtime2text()]] Called from [get_area(user)]."
log_game("[key_name(user)] has called the shuttle. Justification given : '[justification]'")
message_admins("[key_name_admin(user)] has called the shuttle. Justification given : '[justification]'.", 1)
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes. Justification : '[justification]'")

View File

@@ -353,9 +353,7 @@ var/list/ai_list = list()
return
var/confirm = alert("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "Cancel")
if(confirm == "Yes")
if(call_shuttle_proc(src, justification))
if(!isobserver(usr))
shuttle_log += "\[[worldtime2text()]] Called from [get_area(usr)]."
call_shuttle_proc(src, justification)
// hack to display shuttle timer
if(emergency_shuttle.online)
@@ -409,7 +407,8 @@ var/list/ai_list = list()
if(1)
view_core()
if(2)
ai_call_shuttle()
if(call_shuttle_proc(src))
message_admins("[key_name_admin(src)] called the shuttle due to being hit with an EMP.'.")
..()
/mob/living/silicon/ai/ex_act(severity)