mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Merge pull request #5254 from Crazylemon64/space_allocation
Updates space transitions and integrates it with the space management module
This commit is contained in:
@@ -67,6 +67,7 @@ var/list/teleportlocs = list()
|
||||
if(AR.no_teleportlocs) continue
|
||||
if(teleportlocs.Find(AR.name)) continue
|
||||
var/turf/picked = safepick(get_area_turfs(AR.type))
|
||||
// TODO: Tie into space manager
|
||||
if(picked && (picked.z == ZLEVEL_STATION))
|
||||
teleportlocs += AR.name
|
||||
teleportlocs[AR.name] = AR
|
||||
@@ -2632,4 +2633,3 @@ var/list/the_station_areas = list (
|
||||
/area/turret_protected/ai_upload_foyer,
|
||||
/area/turret_protected/ai,
|
||||
)
|
||||
|
||||
|
||||
@@ -376,6 +376,7 @@
|
||||
return 1
|
||||
else
|
||||
// There's a gravity generator on our z level
|
||||
// This would do well when integrated with the z level manager
|
||||
if(T && gravity_generators["[T.z]"] && length(gravity_generators["[T.z]"]))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
|
||||
return 0
|
||||
|
||||
@@ -58,6 +59,7 @@
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
|
||||
return 0
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
// at which point object creations are a fair toss more seldom
|
||||
/atom/movable/proc/attempt_init()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && zlevels.is_zlevel_dirty(T.z))
|
||||
zlevels.postpone_init(T.z, src)
|
||||
if(T && space_manager.is_zlevel_dirty(T.z))
|
||||
space_manager.postpone_init(T.z, src)
|
||||
else if(auto_init)
|
||||
initialize()
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
var/mob/living/demon_type = /mob/living/simple_animal/slaughter
|
||||
|
||||
/obj/item/weapon/antag_spawner/slaughter_demon/attack_self(mob/user as mob)
|
||||
// TODO: Tie into space manager
|
||||
if(user.z == ZLEVEL_CENTCOMM)//this is to make sure the wizard does NOT summon a demon from the Den..
|
||||
to_chat(user, "<span class='notice'>You should probably wait until you reach the station.</span>")
|
||||
return
|
||||
@@ -135,4 +136,4 @@
|
||||
veil_msg = "<span class='warning'>You sense an adorable presence \
|
||||
lurking just beyond the veil...</span>"
|
||||
objective_verb = "Hug and Tickle"
|
||||
demon_type = /mob/living/simple_animal/slaughter/laughter
|
||||
demon_type = /mob/living/simple_animal/slaughter/laughter
|
||||
|
||||
@@ -118,6 +118,7 @@ var/list/blob_nodes = list()
|
||||
if(directory[ckey(blob.key)])
|
||||
blob_client = directory[ckey(blob.key)]
|
||||
location = get_turf(C)
|
||||
// TODO: Tie into space manager
|
||||
if(location.z != ZLEVEL_STATION || istype(location, /turf/space))
|
||||
if(!warned)
|
||||
to_chat(C, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/nukecode = rand(10000, 99999)
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
if(bomb && bomb.r_code)
|
||||
// TODO: Tie into space manager
|
||||
if(bomb.z == ZLEVEL_STATION)
|
||||
bomb.r_code = nukecode
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ var/list/sacrificed = list()
|
||||
for(var/obj/effect/rune/R in world)
|
||||
if(R == src)
|
||||
continue
|
||||
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != 2)
|
||||
// TODO: Tie into space manager
|
||||
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != ZLEVEL_CENTCOMM)
|
||||
index++
|
||||
allrunesloc.len = index
|
||||
allrunesloc[index] = R.loc
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
//command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
// TODO: Tie into space manager
|
||||
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
@@ -427,6 +427,7 @@ proc/get_nt_opposed()
|
||||
/proc/get_nuke_code()
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
// TODO: Tie into space manager
|
||||
if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION)
|
||||
nukecode = bomb.r_code
|
||||
return nukecode
|
||||
@@ -452,6 +453,7 @@ proc/get_nt_opposed()
|
||||
else
|
||||
text += " <span class='greenannounce'>survived</span>"
|
||||
if(fleecheck && ply.current.z > ZLEVEL_STATION)
|
||||
// TODO: Tie into space manager
|
||||
text += " while <span class='boldannounce'>fleeing the station</span>"
|
||||
if(ply.current.real_name != ply.name)
|
||||
text += " as <b>[ply.current.real_name]</b>"
|
||||
@@ -468,4 +470,4 @@ proc/get_nt_opposed()
|
||||
else
|
||||
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='boldannounce'>Fail.</span>"
|
||||
count++
|
||||
return text
|
||||
return text
|
||||
|
||||
@@ -266,7 +266,8 @@ var/round_start_time = 0
|
||||
M.client.screen += cinematic
|
||||
if(M.stat != DEAD)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && T.z == 1)
|
||||
// TODO: Tie into space manager
|
||||
if(T && T.z == ZLEVEL_STATION)
|
||||
M.death(0) //no mercy
|
||||
|
||||
//Now animate the cinematic
|
||||
|
||||
@@ -69,6 +69,7 @@ rcd light flash thingy on matter drain
|
||||
src.verbs -= /mob/living/silicon/ai/proc/upgrade_turrets
|
||||
for(var/obj/machinery/porta_turret/turret in machines)
|
||||
var/turf/T = get_turf(turret)
|
||||
// TODO: Tie into space manager
|
||||
if(T.z in config.station_levels)
|
||||
// Increase health by 37.5% of original max, decrease delays between shots to 66%
|
||||
turret.health += initial(turret.health) * 3 / 8
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
/datum/game_mode/proc/check_ai_loc()
|
||||
for(var/datum/mind/AI_mind in malf_ai)
|
||||
var/turf/ai_location = get_turf(AI_mind.current)
|
||||
// TODO: Tie into space manager
|
||||
if(ai_location && (ai_location.z == ZLEVEL_STATION))
|
||||
return 1
|
||||
return 0
|
||||
@@ -343,4 +344,4 @@
|
||||
text += module_text_temp
|
||||
|
||||
to_chat(world, text)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
var/Me = pickweight(meteortypes)
|
||||
var/obj/effect/meteor/M = new Me(pickedstart)
|
||||
M.dest = pickedgoal
|
||||
M.z_original = 1
|
||||
// TODO: Tie into space manager
|
||||
M.z_original = ZLEVEL_STATION
|
||||
spawn(0)
|
||||
walk_towards(M, M.dest, 1)
|
||||
return
|
||||
@@ -102,6 +103,7 @@
|
||||
var/dropamt = 2
|
||||
|
||||
/obj/effect/meteor/Move()
|
||||
// TODO: Tie into space manager
|
||||
if(z != z_original || loc == dest)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -309,5 +311,3 @@
|
||||
/obj/effect/meteor/goreops/Bump(atom/A)
|
||||
A.ex_act(hitpwr)
|
||||
get_hit()
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
/datum/event/borer_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
// TODO: Tie into space manager
|
||||
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
|
||||
//Stops cortical borers getting stuck in small networks. See: Security, Virology
|
||||
if(temp_vent.parent.other_atmosmch.len > 50)
|
||||
@@ -33,4 +34,3 @@
|
||||
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
|
||||
|
||||
@@ -290,6 +290,7 @@
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(var/mob/living/target)
|
||||
if(target != src)
|
||||
to_chat(src, "<span class='info'>Attempting to remove this being from our presence.</span>")
|
||||
// TODO: Tie into space manager
|
||||
if(src.z != ZLEVEL_STATION)
|
||||
to_chat(src, "<span class='warning'>Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.</span>")
|
||||
return
|
||||
@@ -512,4 +513,3 @@
|
||||
for(var/mob/M in mob_list)
|
||||
if(isswarmer(M) || (M in dead_mob_list))
|
||||
to_chat(M, "<B>Swarm communication - </b> [src] states: [message]")
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ datum/game_mode/nations
|
||||
|
||||
/datum/game_mode/nations/proc/remove_access()
|
||||
for(var/obj/machinery/door/airlock/W in airlocks)
|
||||
// TODO: Tie into space manager
|
||||
if(W.z in config.station_levels)
|
||||
W.req_access = list()
|
||||
|
||||
@@ -253,4 +254,4 @@ datum/game_mode/nations
|
||||
/datum/game_mode/proc/update_nations_icons_removed(datum/mind/nations_mind)
|
||||
var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
|
||||
nations_hud.leave_hud(nations_mind)
|
||||
set_nations_hud(nations_mind, null)
|
||||
set_nations_hud(nations_mind, null)
|
||||
|
||||
@@ -651,7 +651,7 @@ datum
|
||||
return 10
|
||||
else
|
||||
return 20
|
||||
|
||||
|
||||
|
||||
/*burger
|
||||
steal_target = /obj/item/weapon/reagent_containers/food/snacks/human/burger
|
||||
@@ -1358,6 +1358,7 @@ datum
|
||||
var/turf/T = get_turf(target.current)
|
||||
if(target.current.stat == 2)
|
||||
return 1
|
||||
// TODO: Tie into space manager
|
||||
else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this
|
||||
return 2
|
||||
else
|
||||
@@ -1413,4 +1414,4 @@ datum/objective/silence
|
||||
#undef LENIENT
|
||||
#undef NORMAL
|
||||
#undef HARD
|
||||
#undef IMPOSSIBLE
|
||||
#undef IMPOSSIBLE
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
if(player_list.len < MIN_CHALLENGE_PLAYERS)
|
||||
to_chat(user, "The enemy crew is too small to be worth declaring war on.")
|
||||
return
|
||||
// TODO: Tie into space manager
|
||||
if(user.z != ZLEVEL_CENTCOMM)
|
||||
to_chat(user, "You have to be at your base to use this.")
|
||||
return
|
||||
|
||||
@@ -353,6 +353,7 @@ var/bomb_set
|
||||
|
||||
var/off_station = 0
|
||||
var/turf/bomb_location = get_turf(src)
|
||||
// TODO: Tie into space manager
|
||||
if( bomb_location && (bomb_location.z in config.station_levels) )
|
||||
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
|
||||
off_station = 1
|
||||
@@ -363,7 +364,8 @@ var/bomb_set
|
||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||
var/obj/docking_port/mobile/syndie_shuttle = shuttle_master.getShuttle("syndicate")
|
||||
if(syndie_shuttle)
|
||||
ticker.mode:syndies_didnt_escape = (syndie_shuttle.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
|
||||
// TODO: Tie into space manager
|
||||
ticker.mode:syndies_didnt_escape = (syndie_shuttle.z > ZLEVEL_STATION ? 0 : 1) //muskets will make me change this, but it will do for now
|
||||
ticker.mode:nuke_off_station = off_station
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
if(ticker.mode)
|
||||
@@ -401,6 +403,7 @@ var/bomb_set
|
||||
|
||||
/obj/item/weapon/disk/nuclear/process()
|
||||
var/turf/disk_loc = get_turf(src)
|
||||
// TODO: Tie into space manager
|
||||
if(disk_loc.z != ZLEVEL_STATION && disk_loc.z != ZLEVEL_CENTCOMM)
|
||||
var/holder = get(src, /mob)
|
||||
if(holder)
|
||||
|
||||
@@ -77,7 +77,8 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
// TODO: Tie into space manager
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
@@ -109,6 +110,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
|
||||
return 1
|
||||
var/turf/T = get_turf(target.current)
|
||||
// TODO: Tie into space manager
|
||||
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
|
||||
return 2
|
||||
return 0
|
||||
@@ -144,6 +146,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
if(target in ticker.mode:head_revolutionaries)
|
||||
return 1
|
||||
var/turf/T = get_turf(target.current)
|
||||
// TODO: Tie into space manager
|
||||
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
|
||||
rval = 2
|
||||
return 0
|
||||
@@ -170,8 +173,10 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
// TODO: Tie into space manager
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
return 1
|
||||
// TODO: Tie into space manager
|
||||
if((target.current.z in config.admin_levels))
|
||||
return 0
|
||||
return 1
|
||||
@@ -572,7 +577,8 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || target.current.z > 6 || !target.current.ckey)
|
||||
// TODO: Tie into space manager
|
||||
if(target.current.stat == DEAD || target.current.z > ZLEVEL_DERELICT || !target.current.ckey)
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
@@ -861,4 +867,4 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
|
||||
/datum/objective/wizchaos
|
||||
explanation_text = "Wreak havoc upon the station as much you can. Send those wandless Nanotrasen scum a message!"
|
||||
completed = 1
|
||||
completed = 1
|
||||
|
||||
@@ -314,6 +314,7 @@
|
||||
/datum/game_mode/revolution/proc/check_heads_victory()
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
var/turf/T = get_turf(rev_mind.current)
|
||||
// TODO: Tie into space manager
|
||||
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == ZLEVEL_STATION))
|
||||
if(ishuman(rev_mind.current))
|
||||
return 0
|
||||
@@ -448,4 +449,4 @@
|
||||
dat += "<b>Revolution Successful:</b> [score_traitorswon ? "Yes" : "No"] (-[score_traitorswon * 10000] Points)<br>"
|
||||
dat += "<HR>"
|
||||
|
||||
return dat
|
||||
return dat
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
|
||||
// Who is alive/dead, who escaped
|
||||
for(var/mob/living/silicon/ai/I in mob_list)
|
||||
// TODO: Tie into space manager
|
||||
if(I.stat == DEAD && (I.z in config.station_levels))
|
||||
score_deadaipenalty++
|
||||
score_deadcrew++
|
||||
|
||||
for(var/mob/living/carbon/human/I in mob_list)
|
||||
// TODO: Tie into space manager
|
||||
if(I.stat == DEAD && (I.z in config.station_levels))
|
||||
score_deadcrew++
|
||||
|
||||
@@ -79,6 +81,7 @@
|
||||
|
||||
// Check station's power levels
|
||||
for(var/obj/machinery/power/apc/A in machines)
|
||||
// TODO: Tie into space manager
|
||||
if(!(A.z in config.station_levels)) continue
|
||||
|
||||
for(var/obj/item/weapon/stock_parts/cell/C in A.contents)
|
||||
@@ -88,6 +91,7 @@
|
||||
|
||||
// Check how much uncleaned mess is on the station
|
||||
for(var/obj/effect/decal/cleanable/M in world)
|
||||
// TODO: Tie into space manager
|
||||
if(!(M.z in config.station_levels)) continue
|
||||
if(istype(M, /obj/effect/decal/cleanable/blood/gibs))
|
||||
score_mess += 3
|
||||
@@ -244,4 +248,4 @@
|
||||
if(50000 to INFINITY) score_rating = "Nanotrasen's Finest"
|
||||
|
||||
dat += "<b><u>RATING:</u></b> [score_rating]"
|
||||
src << browse(dat, "window=roundstats;size=500x600")
|
||||
src << browse(dat, "window=roundstats;size=500x600")
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
|
||||
set_security_level("gamma")
|
||||
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
|
||||
// TODO: Tie into space manager
|
||||
if(V && (V.z in config.station_levels))
|
||||
V.locked = 0
|
||||
V.update_icon()
|
||||
@@ -142,6 +143,7 @@
|
||||
var/list/livingplayers = list()
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
// TODO: Tie into space manager
|
||||
if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && ((T.z in config.station_levels) || (T.z in config.admin_levels))))
|
||||
if(ishuman(M))
|
||||
livingplayers += 1
|
||||
@@ -182,4 +184,4 @@
|
||||
to_chat(world, text)
|
||||
|
||||
..()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -769,6 +769,7 @@
|
||||
var/turf/pos = get_turf(src)
|
||||
data["x"] = pos.x
|
||||
data["y"] = pos.y
|
||||
// TODO: Tie into space manager
|
||||
data["z"] = pos.z
|
||||
return data
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
scrubber.update_icon()
|
||||
|
||||
proc/validscrubber( var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber as obj )
|
||||
// TODO: Tie into space manager
|
||||
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
|
||||
return 0
|
||||
|
||||
@@ -176,4 +177,4 @@
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
|
||||
if(!T)
|
||||
return 1
|
||||
// TODO: Tie into space manager
|
||||
if((T.z in config.admin_levels))
|
||||
return 1
|
||||
if(T.z > MAX_Z)
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
|
||||
var/list/cameras = list()
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
// TODO: Tie into space manager
|
||||
if((z > MAX_Z || C.z > MAX_Z) && (C.z != z)) //can only recieve away mission cameras on away missions
|
||||
continue
|
||||
if(!can_access_camera(C))
|
||||
@@ -313,4 +314,4 @@
|
||||
icon_keyboard = "power_key"
|
||||
icon_screen = "engie_cams"
|
||||
light_color = "#FAC54B"
|
||||
network = list("Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
network = list("Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
if(..(href, href_list))
|
||||
return 1
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if((!(src.z in config.station_levels) && !(src.z in config.admin_levels)))
|
||||
to_chat(usr, "<span class='warning'>Unable to establish a connection: You're too far away from the station!</span>")
|
||||
return 1
|
||||
@@ -303,6 +304,7 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if(!(src.z in list(ZLEVEL_STATION, ZLEVEL_CENTCOMM)))
|
||||
to_chat(user, "<span class='warning'>Unable to establish a connection: You're too far away from the station!</span>")
|
||||
return
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
/obj/machinery/computer/HONKputer/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
// TODO: Tie into space manager
|
||||
if(!(src.z in config.station_levels))
|
||||
to_chat(usr, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
|
||||
return
|
||||
@@ -68,7 +69,8 @@
|
||||
/obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.z > 6)
|
||||
// TODO: Tie into space manager
|
||||
if(src.z > ZLEVEL_DERELICT)
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
|
||||
return
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
|
||||
attackby(obj/item/weapon/O as obj, mob/user as mob, params)
|
||||
if(user.z > 6)
|
||||
// TODO: Tie into space manager
|
||||
if(user.z > ZLEVEL_DERELICT)
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/aiModule))
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
health_display = "DEAD"
|
||||
else if(total_loss)
|
||||
health_display = "HURT ([total_loss])"
|
||||
// TODO: Tie into space manager
|
||||
if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
|
||||
loc_display = "[get_area(M)]"
|
||||
dat += "ID: [T.id] <BR>Subject: [M] <BR>Location: [loc_display] <BR>Health: [health_display] <BR>"
|
||||
|
||||
@@ -41,11 +41,12 @@
|
||||
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.z > 6)
|
||||
// TODO: Tie into space manager
|
||||
if(src.z > ZLEVEL_DERELICT)
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
|
||||
return
|
||||
var/dat
|
||||
|
||||
|
||||
// search javascript
|
||||
var/head_content = {"
|
||||
<script src="libraries.min.js"></script>
|
||||
@@ -89,7 +90,7 @@
|
||||
|
||||
//body tag start + onload and onkeypress (onkeyup) javascript event calls
|
||||
dat += "<body onload='selectTextField(); updateSearch();' onkeyup='updateSearch();'>"
|
||||
|
||||
|
||||
dat += {"
|
||||
<p style='text-align:center;'>"}
|
||||
dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.z > 6)
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if(src.z > ZLEVEL_DERELICT)
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
|
||||
return
|
||||
var/dat
|
||||
|
||||
@@ -293,6 +293,8 @@ FIRE ALARM
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
|
||||
// TODO: Tie into space manager
|
||||
// also hwat
|
||||
if(z == ZLEVEL_STATION || ZLEVEL_ASTEROID == 5)
|
||||
if(security_level)
|
||||
src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
/obj/machinery/status_display/supply_display/update()
|
||||
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
|
||||
if(shuttle_master.supply.mode == SHUTTLE_IDLE)
|
||||
// TODO: Tie into space manager
|
||||
if(shuttle_master.supply.z == ZLEVEL_STATION)
|
||||
message1 = "CARGO"
|
||||
message2 = "Docked"
|
||||
|
||||
@@ -439,6 +439,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
if(data == 1)
|
||||
for(var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
// TODO: Tie into space manager
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(display_freq, level)
|
||||
|
||||
@@ -451,6 +452,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
if(istype(R, /obj/item/device/radio/headset))
|
||||
continue
|
||||
var/turf/position = get_turf(R)
|
||||
// TODO: Tie into space manager
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(display_freq)
|
||||
|
||||
@@ -462,6 +464,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(freq)
|
||||
for(var/obj/item/device/radio/R in antag_connection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
// TODO: Tie into space manager
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(freq)
|
||||
|
||||
@@ -471,6 +474,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
else
|
||||
for(var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
// TODO: Tie into space manager
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(display_freq)
|
||||
|
||||
@@ -597,6 +601,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
/atom/proc/test_telecomms()
|
||||
var/datum/signal/signal = src.telecomms_process()
|
||||
var/turf/position = get_turf(src)
|
||||
// TODO: Tie into space manager
|
||||
return (position.z in signal.data["level"]) && signal.data["done"]
|
||||
|
||||
/atom/proc/telecomms_process(var/do_sleep = 1)
|
||||
@@ -615,6 +620,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
"type" = 4, // determines what type of radio input it is: test broadcast
|
||||
"reject" = 0,
|
||||
"done" = 0,
|
||||
// TODO: Tie into space manager
|
||||
"level" = pos.z // The level it is being broadcasted at.
|
||||
)
|
||||
signal.frequency = PUB_FREQ// Common channel
|
||||
@@ -630,4 +636,3 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
//log_to_dd("Level: [signal.data["level"]] - Done: [signal.data["done"]]")
|
||||
|
||||
return signal
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
// Toggle on/off getting signals from the station or the current Z level
|
||||
// TODO: Tie into space manager
|
||||
if(src.listening_level == ZLEVEL_STATION) // equals the station
|
||||
src.listening_level = position.z
|
||||
return 1
|
||||
@@ -393,4 +394,3 @@
|
||||
if(issilicon(user) || in_range(user, src))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
continue
|
||||
if(amount && send_count >= amount)
|
||||
break
|
||||
// TODO: Tie into space manager
|
||||
if(machine.loc.z != listening_level)
|
||||
if(long_range_link == 0 && machine.long_range_link == 0)
|
||||
continue
|
||||
@@ -142,6 +143,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
if(!listening_level)
|
||||
//Defaults to our Z level!
|
||||
var/turf/position = get_turf(src)
|
||||
// TODO: Tie into space manager
|
||||
listening_level = position.z
|
||||
|
||||
/obj/machinery/telecomms/initialize()
|
||||
@@ -167,6 +169,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
/obj/machinery/telecomms/proc/add_link(var/obj/machinery/telecomms/T)
|
||||
var/turf/position = get_turf(src)
|
||||
var/turf/T_position = get_turf(T)
|
||||
// TODO: Tie into space manager
|
||||
if((position.z == T_position.z) || (src.long_range_link && T.long_range_link))
|
||||
for(var/x in autolinkers)
|
||||
if(T.autolinkers.Find(x))
|
||||
|
||||
@@ -182,7 +182,8 @@
|
||||
var/turf/T = get_turf(R)
|
||||
if(!T)
|
||||
continue
|
||||
if((T.z in config.admin_levels) || T.z > 7)
|
||||
// TODO: Tie into space manager
|
||||
if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY)
|
||||
continue
|
||||
if(R.syndicate == 1 && emagged == 0)
|
||||
continue
|
||||
@@ -203,6 +204,7 @@
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T) continue
|
||||
// TODO: Tie into space manager
|
||||
if((T.z in config.admin_levels)) continue
|
||||
var/tmpname = M.real_name
|
||||
if(areaindex[tmpname])
|
||||
@@ -225,7 +227,8 @@
|
||||
var/turf/T = get_turf(R)
|
||||
if(!T || !R.teleporter_hub || !R.teleporter_console)
|
||||
continue
|
||||
if((T.z in config.admin_levels) || T.z > 7)
|
||||
// TODO: Tie into space manager
|
||||
if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY)
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
|
||||
@@ -382,6 +382,7 @@
|
||||
range = RANGED
|
||||
|
||||
action(atom/target)
|
||||
// TODO: Tie into space manager
|
||||
if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
|
||||
var/turf/T = get_turf(target)
|
||||
if(T)
|
||||
@@ -403,6 +404,7 @@
|
||||
|
||||
|
||||
action(atom/target)
|
||||
// TODO: Tie into space manager
|
||||
if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
|
||||
var/list/theareas = list()
|
||||
for(var/area/AR in orange(100, chassis))
|
||||
@@ -1144,4 +1146,4 @@
|
||||
if(do_after_cooldown(target))
|
||||
new /obj/structure/barricade/mime/mrcd(target)
|
||||
chassis.spark_system.start()
|
||||
chassis.use_power(energy_drain*2)
|
||||
chassis.use_power(energy_drain*2)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user