Merge pull request #4999 from Citadel-Station-13/upstream-merge-34614
[MIRROR] Lets check_dock be silent
This commit is contained in:
@@ -44,7 +44,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S))
|
||||
if(!M.check_dock(S, silent=TRUE))
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=[REF(src)];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S))
|
||||
if(!M.check_dock(S, silent=TRUE))
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=[REF(src)];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
|
||||
@@ -335,18 +335,17 @@
|
||||
|
||||
return SHUTTLE_CAN_DOCK
|
||||
|
||||
/obj/docking_port/mobile/proc/check_dock(obj/docking_port/stationary/S)
|
||||
/obj/docking_port/mobile/proc/check_dock(obj/docking_port/stationary/S, silent=FALSE)
|
||||
var/status = canDock(S)
|
||||
if(status == SHUTTLE_CAN_DOCK)
|
||||
return TRUE
|
||||
else if(status == SHUTTLE_ALREADY_DOCKED)
|
||||
else
|
||||
if(status != SHUTTLE_ALREADY_DOCKED && !silent) // SHUTTLE_ALREADY_DOCKED is no cause for error
|
||||
var/msg = "Shuttle [src] cannot dock at [S], error: [status]"
|
||||
message_admins(msg)
|
||||
// We're already docked there, don't need to do anything.
|
||||
// Triggering shuttle movement code in place is weird
|
||||
return FALSE
|
||||
else
|
||||
var/msg = "Shuttle [src] cannot dock at [S], error: [status]"
|
||||
message_admins(msg)
|
||||
return FALSE
|
||||
|
||||
/obj/docking_port/mobile/proc/transit_failure()
|
||||
message_admins("Shuttle [src] repeatedly failed to create transit zone.")
|
||||
|
||||
Reference in New Issue
Block a user