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
+5 -4
View File
@@ -2,7 +2,7 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new()
/datum/repository/air_alarm/proc/air_alarm_data(var/list/monitored_alarms, var/refresh = 0, var/obj/machinery/alarm/passed_alarm)
var/alarms[0]
var/datum/cache_entry/cache_entry = cache_data
if(!cache_entry)
cache_entry = new/datum/cache_entry
@@ -15,13 +15,14 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new()
alarms[++alarms.len] = passed_alarm.get_nano_data_console()
else
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : air_alarms))
// TODO: Tie into space manager
if(!monitored_alarms && alarm.z != ZLEVEL_STATION && alarm.z != ZLEVEL_ASTEROID)
continue
alarms[++alarms.len] = alarm.get_nano_data_console()
cache_entry.timestamp = world.time //+ 10 SECONDS
cache_entry.data = alarms
cache_entry.data = alarms
return alarms
/datum/repository/air_alarm/proc/update_cache(var/obj/machinery/alarm/alarm)
return air_alarm_data(refresh = 1, passed_alarm = alarm)
return air_alarm_data(refresh = 1, passed_alarm = alarm)
+2 -1
View File
@@ -406,7 +406,8 @@ var/list/advance_cures = list(
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
if(H.z != 1)
// TODO: Tie into space manager
if(H.z != ZLEVEL_STATION)
continue
if(!H.HasDisease(D))
H.ForceContractDisease(D)
+2 -2
View File
@@ -48,7 +48,7 @@
// This system will metaphorically snap in half (not postpone init everywhere)
// if given a multi-z template
// it might need to be adapted for that when that time comes
zlevels.add_dirt(placement.z)
space_manager.add_dirt(placement.z)
var/list/bounds = maploader.load_map(get_file(), min_x, min_y, placement.z, cropMap = 1)
if(!bounds)
return 0
@@ -65,7 +65,7 @@
late_setup_level(
block(bot_left, top_right),
block(ST_bot_left, ST_top_right))
zlevels.remove_dirt(placement.z)
space_manager.remove_dirt(placement.z)
log_game("[name] loaded at [min_x],[min_y],[placement.z]")
return 1
+3 -1
View File
@@ -67,6 +67,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
caster.reset_view(0)
return 0
// TODO: Tie into space manager
if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages")
@@ -363,6 +364,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list))
return 0
// TODO: Tie into space manager
if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages")
@@ -400,4 +402,4 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return 0
if(isbrain(user) || ispAI(user))
return 0
return 1
return 1
+1
View File
@@ -1,4 +1,5 @@
//Different types of weather.
// TODO: Tie into space manager
/datum/weather/floor_is_lava //The Floor is Lava: Makes all turfs damage anyone on them unless they're standing on a solid object.
name = "the floor is lava"