Merge pull request #5254 from Crazylemon64/space_allocation

Updates space transitions and integrates it with the space management module
This commit is contained in:
Fox McCloud
2016-07-31 12:18:19 -04:00
committed by GitHub
122 changed files with 1035 additions and 465 deletions
@@ -61,6 +61,7 @@
return null
var/turf/T = get_turf(user.loc)
// TODO: Tie into space manager
if(T.z != current.z || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
@@ -225,6 +226,7 @@
to_chat(usr, "<span class='danger'>Something's wrong with that camera. You can't get a feed.</span>")
return
var/turf/T = get_turf(loc)
// TODO: Tie into space manager
if(!T || C.z != T.z)
to_chat(usr, "<span class='danger'>You can't get a signal.</span>")
return
@@ -284,4 +286,4 @@
#undef BUGMODE_LIST
#undef BUGMODE_MONITOR
#undef BUGMODE_TRACK
#undef BUGMODE_TRACK
@@ -124,6 +124,7 @@
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
// TODO: Tie into space manager
if(isnull(position) || !(position.z in level))
return -1
if(!src.listening)
@@ -64,6 +64,7 @@
//Play sound through the station intercomms, so everyone knows the doom you have wrought.
for(var/O in global_intercoms)
var/obj/item/device/radio/intercom/I = O
// TODO: Tie into space manager
if(I.z != ZLEVEL_STATION) //Only broadcast to the station intercoms
continue
if(!I.on) //Only broadcast to active intercoms (powered, switched on)
@@ -75,4 +76,4 @@
var/mob/living/simple_animal/hostile/poison/bees/syndi/B = new /mob/living/simple_animal/hostile/poison/bees/syndi(null)
B.master_and_friends = blood_list //Doesn't automatically add the person who opens the case, so the bees will attack the user unless they gave their blood
B.forceMove(get_turf(user)) //RELEASE THE BEES!
bees_left -= 5
bees_left -= 5
@@ -48,6 +48,7 @@ Frequency:
return 1
var/turf/current_location = get_turf(usr)//What turf is the user on?
// TODO: Tie into space manager
if(!current_location ||( current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
to_chat(usr, "<span class='warning'>\The [src] is malfunctioning.</span>")
return 1
@@ -61,6 +62,7 @@ Frequency:
for(var/obj/item/device/radio/beacon/W in beacons)
if(W.frequency == frequency && !W.syndicate)
// TODO: Tie into space manager
if(W && W.z == z)
var/turf/TB = get_turf(W)
temp += "[W.code]: [TB.x], [TB.y], [TB.z]<BR>"
@@ -107,7 +109,8 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
// TODO: Tie into space manager
if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=ZLEVEL_EMPTY)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
@@ -192,6 +192,7 @@
return
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
// TODO: Tie into space manager
if(!(src.z in config.contact_levels))
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
@@ -84,6 +84,7 @@
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
// TODO: Tie into space manager
if(!(src.z in config.player_levels))
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return