Fixes rcds working on transit space (#981)
This commit is contained in:
committed by
Poojawa
parent
60f5f84353
commit
946013ac22
@@ -513,3 +513,13 @@ SUBSYSTEM_DEF(shuttle)
|
||||
centcom_message = SSshuttle.centcom_message
|
||||
ordernum = SSshuttle.ordernum
|
||||
points = SSshuttle.points
|
||||
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/is_in_shuttle_bounds(atom/A)
|
||||
var/area/current = get_area(A)
|
||||
if(istype(current, /area/shuttle) && !istype(current,/area/shuttle/transit))
|
||||
return TRUE
|
||||
for(var/obj/docking_port/mobile/M in mobile)
|
||||
if(M.is_in_shuttle_bounds(A))
|
||||
return TRUE
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
AM.newtonian_move(dir)
|
||||
|
||||
/turf/open/space/transit/CanBuildHere()
|
||||
return istype(get_area(src), /area/shuttle)
|
||||
return SSshuttle.is_in_shuttle_bounds(src)
|
||||
|
||||
|
||||
/turf/open/space/transit/Initialize()
|
||||
..()
|
||||
|
||||
@@ -754,4 +754,16 @@
|
||||
for(var/obj/machinery/door/E in A) //dumb, I know, but playing it on the engines doesn't do it justice
|
||||
playsound(E, s, 100, FALSE, max(width, height) - world.view)
|
||||
|
||||
/obj/docking_port/mobile/proc/is_in_shuttle_bounds(atom/A)
|
||||
var/turf/T = get_turf(A)
|
||||
if(T.z != z)
|
||||
return FALSE
|
||||
var/list/bounds= return_coords()
|
||||
var/turf/T0 = locate(bounds[1],bounds[2],z)
|
||||
var/turf/T1 = locate(bounds[3],bounds[4],z)
|
||||
if(T in block(T0,T1))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
#undef DOCKING_PORT_HIGHLIGHT
|
||||
|
||||
Reference in New Issue
Block a user