Cargo shuttle no longer takes you to Centcomm

- Created far more robust method of detecting beacons/humans/mechs on the cargo shuttle. 
As a result:
- It is no longer possible to send mobs/mechs/tracking beacons to Centcomm.
- It is no longer possible to send the nuke disk away on the shuttle. (This should prevent people from magically duplicating nuke disks)
- Centcomm cargo techs now clean up the shuttle when it arrives in case something somehow manages to bypass the previous checks.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3373 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-03-30 05:39:55 +00:00
parent d31d22674f
commit 322b47a00e
+40 -4
View File
@@ -144,9 +144,37 @@ var/ordernum=0
supply_shuttle_moving = 0
send_supply_shuttle()
/proc/supply_can_move()
if(supply_shuttle_moving) return 0
//Check for mobs
for(var/mob/living/M in world)
var/area/A = get_area(M)
if(A.type == /area/supply/station)
return 0
//Check for beacons
for(var/obj/item/device/radio/beacon/B in world)
var/area/A = get_area(B)
if(A.type == /area/supply/station)
return 0
//Check for mechs. I think this was added because people were somehow on centcomm and bringing back centcomm mechs.
for(var/obj/mecha/Mech in world)
var/area/A = get_area(Mech)
if(A.type == /area/supply/station)
return 0
//Check for nuke disk This also prevents multiple nuke disks from being made -Nodrak
for(var/obj/item/weapon/disk/nuclear/N)
var/area/A = get_area(N)
if(A.type == /area/supply/station)
return 0
return 1
/*
Teleport beacon -> wrapping paper -> backpack -> bodybag -> crate -> wrapping paper -> loaded on a mulebot
That would be a teleport beacon inside of 6-layers deep in contents. Meaning you would have to add more loops or more checks.
This method wont take into account items developed in the future and doesn't take into account the items we have currently.
-Nodrak
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
for(var/turf/T in get_area_turfs(shuttleat) )
@@ -166,7 +194,7 @@ var/ordernum=0
if((locate(/obj/mecha ) in ATMM)) return 0
if((locate(/obj/structure/closet/body_bag) in ATMM)) return 0
return 1
*/
/proc/sell_crates()
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
@@ -438,7 +466,7 @@ var/ordernum=0
if(!supply_shuttle_at_station || supply_shuttle_moving) return
if (!supply_can_move())
usr << "\red The supply shuttle can not transport station employees, exosuits, or homing beacons."
usr << "\red The supply shuttle can not transport station employees, exosuits, classified nuclear codes or homing beacons."
return
src.temp = "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
@@ -449,13 +477,21 @@ var/ordernum=0
supply_shuttle_shoppinglist = new/list()
sell_crates()
//Remove anything or anyone that was either left behind or that bypassed supply_can_move() -Nodrak
for(var/area/supply/station/A in world)
for(var/obj/item/I in A.contents)
del(I)
for(var/mob/living/M in A.contents)
del(M)
send_supply_shuttle()
else if (href_list["sendtostation"])
if(supply_shuttle_at_station || supply_shuttle_moving) return
if (!supply_can_move())
usr << "\red The supply shuttle can not transport station employees or homing beacons."
usr << "\red The supply shuttle can not transport station employees, exosuits, classified nuclear codes or homing beacons."
return
post_signal("supply")
@@ -581,7 +617,7 @@ var/ordernum=0
if (supply_shuttle_moving) return
if (!supply_can_move())
usr << "\red The supply shuttle can not transport station employees or homing beacons."
usr << "\red The supply shuttle can not transport station employees, exosuits, classified nuclear codes, or homing beacons."
return
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE