TG: 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.
Revision: r3373
Author: 	 johnsonmt88
This commit is contained in:
Ren Erthilo
2012-05-01 00:41:06 +01:00
parent 8a9f0f6eb4
commit f5c2a17237
+48 -3
View File
@@ -166,6 +166,43 @@ var/list/supply_groups = new()
/proc/supply_can_move()
if(supply_shuttle_moving) return 0
//Check for carbon mobs - Allows simple animals.
for(var/mob/living/carbon/M in world)
var/area/A = get_area(M)
if(!A || !A.type) continue
if(A.type == /area/supply/station)
return 0
//Check for silicon mobs - Allows simple animals.
for(var/mob/living/silicon/M in world)
var/area/A = get_area(M)
if(!A || !A.type) continue
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 || !A.type) continue
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 || !A.type) continue
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 || !A.type) continue
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 storage items developed in the future and doesn't take into account the storage 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) )
@@ -186,7 +223,7 @@ var/list/supply_groups = new()
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
@@ -475,7 +512,7 @@ var/list/supply_groups = new()
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>"
@@ -486,13 +523,21 @@ var/list/supply_groups = new()
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")