mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Changes to drones and z-macros (#7068)
Turns the z-level restriction procs into macros Changes z-level restrictions to use the macros Use contact_levels for announcements (instead of player_levels) Restricts the teleporter to station_levels instead of player_levels Restricts AI tracking to station_levels instead of player_levels Mechs only get tracking beacons if they are on station_levels (instead of player_levels) Construction Drones gib if they enter a station level Mining Drones gib if they leave the station levels Removes the mining equipment vendor from the scrapheap
This commit is contained in:
@@ -367,6 +367,15 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define isStationLevel(Z) ((Z) in current_map.station_levels)
|
||||
#define isNotStationLevel(Z) !isStationLevel(Z)
|
||||
|
||||
#define isPlayerLevel(Z) ((Z) in current_map.player_levels)
|
||||
#define isNotPlayerLevel(Z) !isPlayerLevel(Z)
|
||||
|
||||
#define isAdminLevel(Z) ((Z) in current_map.admin_levels)
|
||||
#define isNotAdminLevel(Z) !isAdminLevel(Z)
|
||||
|
||||
#define isContactLevel(Z) ((Z) in current_map.contact_levels)
|
||||
#define isNotContactLevel(Z) !isContactLevel(Z)
|
||||
|
||||
//Affects the chance that armour will block an attack. Should be between 0 and 1.
|
||||
//If set to 0, then armor will always prevent the same amount of damage, always, with no randomness whatsoever.
|
||||
//Of course, this will affect code that checks for blocked < 100, as blocked will be less likely to actually be 100.
|
||||
|
||||
+1
-10
@@ -12,7 +12,7 @@
|
||||
/proc/is_on_same_plane_or_station(var/z1, var/z2)
|
||||
if(z1 == z2)
|
||||
return 1
|
||||
if((z1 in current_map.station_levels) && (z2 in current_map.station_levels))
|
||||
if(isStationLevel(z1) && isStationLevel(z2))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -60,15 +60,6 @@
|
||||
|
||||
return heard
|
||||
|
||||
/proc/isPlayerLevel(var/level)
|
||||
return level in current_map.player_levels
|
||||
|
||||
/proc/isAdminLevel(var/level)
|
||||
return level in current_map.admin_levels
|
||||
|
||||
/proc/isNotAdminLevel(var/level)
|
||||
return !isAdminLevel(level)
|
||||
|
||||
/proc/circlerange(center=usr,radius=3)
|
||||
|
||||
var/turf/centerturf = get_turf(center)
|
||||
|
||||
@@ -354,8 +354,7 @@
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
if(destination.z in current_map.admin_levels) //centcomm z-level
|
||||
|
||||
if(isAdminLevel(destination.z)) //centcomm z-level
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/channel_name = "Station Announcements"
|
||||
var/announcement_type = "Announcement"
|
||||
|
||||
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0, var/do_print = 0)
|
||||
/datum/announcement/New(var/do_log = 1, var/new_sound = null, var/do_newscast = 0, var/do_print = 0)
|
||||
sound = new_sound
|
||||
log = do_log
|
||||
newscast = do_newscast
|
||||
@@ -53,7 +53,7 @@
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/abstract/new_player) && !isdeaf(M))
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && isStationLevel(T.z))
|
||||
if(T && isContactLevel(T.z))
|
||||
to_chat(M, "<h2 class='alert'>[message_title]</h2>")
|
||||
to_chat(M, "<span class='alert'>[message]</span>")
|
||||
if (announcer)
|
||||
|
||||
@@ -414,7 +414,7 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
if(!Y)
|
||||
continue
|
||||
var/area/A = Y
|
||||
if(!(A.z in current_map.station_levels))
|
||||
if (isNotStationLevel(A.z))
|
||||
continue
|
||||
if (istype(A, /area/shuttle) || findtext(A.name, "Docked") || findtext(A.name, "Shuttle"))
|
||||
continue
|
||||
|
||||
@@ -21,7 +21,7 @@ var/list/sacrificed = list()
|
||||
for(var/obj/effect/rune/R in rune_list)
|
||||
if(R == src)
|
||||
continue
|
||||
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && isPlayerLevel(R.z))
|
||||
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && isStationLevel(R.z))
|
||||
index++
|
||||
allrunesloc.len = index
|
||||
allrunesloc[index] = R.loc
|
||||
@@ -32,7 +32,7 @@ var/list/sacrificed = list()
|
||||
qdel(src)
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if(!(T.z in current_map.station_levels))
|
||||
if(isNotStationLevel(T.z))
|
||||
to_chat(user, "<span class='warning'>You are too far from the station, Nar'sie is unable to reach you here.</span>")
|
||||
return fizzle(user)
|
||||
|
||||
@@ -195,7 +195,7 @@ var/list/sacrificed = list()
|
||||
return fizzle(user)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!(T.z in current_map.station_levels))
|
||||
if(isNotStationLevel(T.z))
|
||||
to_chat(user, "<span class='warning'>You are too far from the station, Nar'sie can not be summoned here.</span>")
|
||||
return fizzle(user)
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
if(istype(T, /turf/space))
|
||||
T.add_overlay("end01")
|
||||
else
|
||||
if (!(T.z in current_map.admin_levels))
|
||||
if (isNotAdminLevel(T.z))
|
||||
T.underlays += "end01"
|
||||
CHECK_TICK
|
||||
|
||||
@@ -111,7 +111,7 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
if (!C.active)
|
||||
continue
|
||||
|
||||
if (!(C.z in current_map.admin_levels))
|
||||
if (isNotAdminLevel(C.z))
|
||||
C.update_lumcount(0.15, 0.15, 0.5)
|
||||
CHECK_TICK
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(announce)
|
||||
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in SSmachinery.processing_machines)
|
||||
if(C.cell && (C.z in current_map.station_levels))
|
||||
if(C.cell && isStationLevel(C.z))
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in SSpower.smes_units)
|
||||
var/area/current_area = get_area(S)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
spawn()
|
||||
var/list/pick_turfs = list()
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(T.z in current_map.station_levels)
|
||||
if(isStationLevel(T.z))
|
||||
pick_turfs += T
|
||||
|
||||
if(pick_turfs.len)
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
log_ability_use(user, "system override (STARTED)")
|
||||
var/list/remaining_apcs = list()
|
||||
for(var/obj/machinery/power/apc/A in SSmachinery.processing_machines)
|
||||
if(!(A.z in current_map.station_levels)) // Only station APCs
|
||||
if(isNotStationLevel(A.z)) // Only station APCs
|
||||
continue
|
||||
if(A.hacker == user || A.aidisabled) // This one is already hacked, or AI control is disabled on it.
|
||||
continue
|
||||
@@ -264,7 +264,7 @@
|
||||
sleep(300)
|
||||
// Hack all APCs, including those built during hack sequence.
|
||||
for(var/obj/machinery/power/apc/A in SSmachinery.processing_machines)
|
||||
if((!A.hacker || A.hacker != src) && !A.aidisabled && A.z in current_map.station_levels)
|
||||
if((!A.hacker || A.hacker != src) && !A.aidisabled && isStationLevel(A.z))
|
||||
A.ai_hack(src)
|
||||
|
||||
log_ability_use(user, "system override (FINISHED)")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/mob/living/silicon/ai/var/stored_locations[0]
|
||||
|
||||
/proc/InvalidPlayerTurf(turf/T as turf)
|
||||
return !(T && T.z in current_map.player_levels)
|
||||
return !(T && isStationLevel(T.z))
|
||||
|
||||
/mob/living/silicon/ai/proc/get_camera_list()
|
||||
if(src.stat == 2)
|
||||
@@ -248,7 +248,7 @@ mob/living/proc/near_camera()
|
||||
|
||||
if(. == TRACKING_NO_COVERAGE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && (T.z in current_map.station_levels) && hassensorlevel(src, SUIT_SENSOR_TRACKING))
|
||||
if(T && isStationLevel(T.z) && hassensorlevel(src, SUIT_SENSOR_TRACKING))
|
||||
return TRACKING_POSSIBLE
|
||||
|
||||
mob/living/proc/tracking_initiated()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/aiupload/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
if (!src.z in current_map.station_levels)
|
||||
if(isNotStationLevel(src.z))
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection:</span>")
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/aiModule))
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/borgupload/attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
|
||||
if (!src.z in current_map.station_levels)
|
||||
if(isNotStationLevel(src.z))
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection:</span>")
|
||||
return
|
||||
if(istype(module, /obj/item/weapon/aiModule))
|
||||
|
||||
@@ -1351,7 +1351,7 @@ About the new airlock wires panel:
|
||||
/obj/machinery/door/airlock/Initialize(mapload, obj/structure/door_assembly/assembly = null)
|
||||
var/on_admin_z = FALSE
|
||||
//wires & hatch - this needs to be done up here so the hatch isn't generated by the parent Initialize().
|
||||
if(loc && (z in current_map.admin_levels))
|
||||
if(loc && isAdminLevel(z))
|
||||
on_admin_z = TRUE
|
||||
hashatch = FALSE
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
pixel_x = DIR2PIXEL_X(dir)
|
||||
pixel_y = DIR2PIXEL_Y(dir)
|
||||
|
||||
if(z in current_map.contact_levels)
|
||||
if(isContactLevel(z))
|
||||
set_security_level(security_level ? get_security_level() : "green")
|
||||
|
||||
// Convenience subtypes for mappers.
|
||||
|
||||
@@ -349,7 +349,7 @@ var/bomb_set
|
||||
|
||||
var/off_station = 0
|
||||
var/turf/bomb_location = get_turf(src)
|
||||
if(bomb_location && (bomb_location.z in current_map.station_levels))
|
||||
if(bomb_location && isStationLevel(bomb_location.z))
|
||||
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
|
||||
off_station = 1
|
||||
else
|
||||
@@ -358,7 +358,7 @@ var/bomb_set
|
||||
if(SSticker.mode && SSticker.mode.name == "Mercenary")
|
||||
var/obj/machinery/computer/shuttle_control/multi/syndicate/syndie_location = locate(/obj/machinery/computer/shuttle_control/multi/syndicate)
|
||||
if(syndie_location)
|
||||
SSticker.mode:syndies_didnt_escape = !(syndie_location.z in current_map.admin_levels)
|
||||
SSticker.mode:syndies_didnt_escape = isNotAdminLevel(syndie_location.z)
|
||||
SSticker.mode:nuke_off_station = off_station
|
||||
|
||||
SSticker.station_explosion_cinematic(off_station, null, GetConnectedZlevels(z))
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
var/turf/T = get_turf(R)
|
||||
if (!T)
|
||||
continue
|
||||
if(!(T.z in current_map.player_levels))
|
||||
if(isNotStationLevel(T.z))
|
||||
continue
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/mecha/medical/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(isPlayerLevel(T.z))
|
||||
if(isStationLevel(T.z))
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/obj/mecha/working/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(isPlayerLevel(T.z))
|
||||
if(isStationLevel(T.z))
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
var/security = 0
|
||||
if((T && T in current_map.admin_levels) || prisonwarped.Find(H))
|
||||
if((T && isAdminLevel(T.z)) || prisonwarped.Find(H))
|
||||
//don't warp them if they aren't ready or are already there
|
||||
continue
|
||||
H.Paralyse(5)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
step_rand(W)
|
||||
|
||||
var/area/A = get_area(M)
|
||||
if(A.requires_power && !A.always_unpowered && A.power_light && (A.z in current_map.player_levels))
|
||||
if(A.requires_power && !A.always_unpowered && A.power_light && isPlayerLevel(A.z))
|
||||
affected_areas |= get_area(M)
|
||||
|
||||
affected_mobs |= user
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/inactive_on_main_station = 0
|
||||
for(var/zone/zone in SSair.zones)
|
||||
var/turf/simulated/turf = locate() in zone.contents
|
||||
if(turf && turf.z in current_map.station_levels)
|
||||
if(turf && isStationLevel(turf.z))
|
||||
if(zone.needs_update)
|
||||
active_on_main_station++
|
||||
else
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(!(origin && source))
|
||||
return
|
||||
|
||||
if (!(origin.z in current_map.station_levels))
|
||||
if(isNotStationLevel(origin.z))
|
||||
return
|
||||
|
||||
origin = origin.get_alarm_origin()
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
to_chat(H, "<span class='warning'>You cannot teleport into solid walls.</span>")
|
||||
return FALSE
|
||||
|
||||
if(T.z in current_map.admin_levels)
|
||||
if(isAdminLevel(T.z))
|
||||
to_chat(H, "<span class='warning'>You cannot use your teleporter on this Z-level.</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -46,4 +46,4 @@
|
||||
|
||||
/datum/event/apc_damage/proc/is_valid_apc(var/obj/machinery/power/apc/apc)
|
||||
var/turf/T = get_turf(apc)
|
||||
return !apc.is_critical && !apc.emagged && T && (T.z in current_map.player_levels)
|
||||
return !apc.is_critical && !apc.emagged && T && isStationLevel(T.z)
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
/datum/event/camera_damage/proc/is_valid_camera(var/obj/machinery/camera/C)
|
||||
// Only return a functional camera, not installed in a silicon, and that exists somewhere players have access
|
||||
var/turf/T = get_turf(C)
|
||||
return T && C.can_use() && !istype(C.loc, /mob/living/silicon) && (T.z in current_map.player_levels)
|
||||
return T && C.can_use() && !istype(C.loc, /mob/living/silicon) && isStationLevel(T.z)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/area/A = get_area(C)
|
||||
if(!A)
|
||||
continue
|
||||
if(!(A.z in current_map.station_levels))
|
||||
if(isNotStationLevel(A.z))
|
||||
continue
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
continue
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/datum/event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSmachinery.processing_machines)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in current_map.station_levels)
|
||||
if(!temp_vent.welded && temp_vent.network && isStationLevel(temp_vent.loc.z))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in SSmachinery.processing_machines)
|
||||
if(!temp_vent)
|
||||
continue
|
||||
if(temp_vent.z in current_map.station_levels)//STATION ZLEVEL
|
||||
if(isStationLevel(temp_vent.z))
|
||||
if(temp_vent.network && temp_vent.network.normal_members.len > 20)
|
||||
vents += temp_vent
|
||||
if(!vents.len)
|
||||
|
||||
@@ -43,7 +43,7 @@ datum/event/viral_infection/start()
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(H.mind && H.stat != DEAD && H.is_client_active(5) && !player_is_antag(H.mind))
|
||||
var/turf/T = get_turf(H)
|
||||
if(T.z in current_map.station_levels)
|
||||
if(isStationLevel(T.z))
|
||||
candidates += H
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)
|
||||
|
||||
@@ -671,7 +671,7 @@
|
||||
|
||||
for(var/obj/item/device/radio/beacon/B in teleportbeacons)
|
||||
var/turf/T = get_turf(B)
|
||||
if(T.z in current_map.station_levels)
|
||||
if(isStationLevel(T.z))
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
req_access = list(access_mining, access_robotics)
|
||||
idcard_type = /obj/item/weapon/card/id/minedrone
|
||||
speed = -1
|
||||
range_limit = 0
|
||||
var/health_upgrade
|
||||
var/ranged_upgrade
|
||||
var/melee_upgrade
|
||||
@@ -154,6 +153,17 @@
|
||||
visible_message("\icon[src] <span class = 'notice'>The [usr] pings, \"[P.name] ready for review\", and happily disgorges a small printout.</span>", range = 2)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/process_level_restrictions()
|
||||
//Abort if they should not get blown
|
||||
if (lockcharge || scrambledcodes || emagged)
|
||||
return
|
||||
//Check if they are not on a station level -> abort
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || isStationLevel(T.z))
|
||||
return
|
||||
to_chat(src,"WARNING: Removal from NanoTrasen property detected. Anti-Theft mode activated.")
|
||||
gib()
|
||||
|
||||
/**********************Minebot Upgrades**********************/
|
||||
|
||||
/obj/item/device/mine_bot_ugprade
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
var/obj/item/hat
|
||||
var/hat_x_offset = 0
|
||||
var/hat_y_offset = -13
|
||||
var/range_limit = 1
|
||||
var/hacked = FALSE
|
||||
|
||||
holder_type = /obj/item/weapon/holder/drone
|
||||
@@ -107,7 +106,6 @@
|
||||
can_pull_size = 5
|
||||
can_pull_mobs = MOB_PULL_SAME
|
||||
holder_type = /obj/item/weapon/holder/drone/heavy
|
||||
range_limit = 0
|
||||
|
||||
/mob/living/silicon/robot/drone/Initialize()
|
||||
. = ..()
|
||||
@@ -282,6 +280,12 @@
|
||||
|
||||
//DRONE LIFE/DEATH
|
||||
/mob/living/silicon/robot/drone/process_level_restrictions()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(T)
|
||||
if((!T || !(A in the_station_areas)) && src.stat != DEAD)
|
||||
to_chat(src,"WARNING: Removal from NanoTrasen property detected. Anti-Theft mode activated.")
|
||||
gib()
|
||||
return
|
||||
return
|
||||
|
||||
//For some goddamn reason robots have this hardcoded. Redefining it for our fragile friends here.
|
||||
@@ -297,11 +301,7 @@
|
||||
//Standard robots use config for crit, which is somewhat excessive for these guys.
|
||||
//Drones killed by damage will gib.
|
||||
/mob/living/silicon/robot/drone/handle_regular_status_updates()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(T)
|
||||
if((!T || health <= -maxHealth || (range_limit && !(A in the_station_areas))) && src.stat != DEAD)
|
||||
timeofdeath = world.time
|
||||
death() //Possibly redundant, having trouble making death() cooperate.
|
||||
if(health <= -maxHealth && src.stat != DEAD)
|
||||
gib()
|
||||
return
|
||||
..()
|
||||
@@ -413,6 +413,17 @@
|
||||
real_name = "construction drone ([rand(100,999)])"
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/drone/construction/process_level_restrictions()
|
||||
//Abort if they should not get blown
|
||||
if (lockcharge || scrambledcodes || emagged)
|
||||
return
|
||||
//Check if they are not on station level -> abort
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || isNotStationLevel(T.z))
|
||||
return
|
||||
to_chat(src,"WARNING: Lost contact with controller. Anti-Theft mode activated.")
|
||||
gib()
|
||||
|
||||
/proc/too_many_active_drones()
|
||||
var/drones = 0
|
||||
for(var/mob/living/silicon/robot/drone/D in mob_list)
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
dat += "<B>Maintenance Units</B><BR>"
|
||||
|
||||
for(var/mob/living/silicon/robot/drone/D in silicon_mob_list)
|
||||
if(src.z in current_map.station_levels && !(D.z in current_map.station_levels)) //If the console is on a station level, then list all drones on the station levels
|
||||
if(isStationLevel(src.z) && isNotStationLevel(D.z)) //If the console is on a station level, then list all drones on the station levels
|
||||
continue
|
||||
else if (!(src.z in current_map.station_levels) && src.z != D.z) //If the console is not on the station, only list drones on the current level
|
||||
else if (isNotStationLevel(src.z) && src.z != D.z) //If the console is not on the station, only list drones on the current level
|
||||
continue
|
||||
dat += "<BR>[D.real_name] ([D.stat == 2 ? "<font color='red'>INACTIVE</FONT>" : "<font color='green'>ACTIVE</FONT>"])"
|
||||
dat += "<font dize = 9><BR>Cell charge: [D.cell.charge]/[D.cell.maxcharge]."
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
return
|
||||
//Check if they are on a player level -> abort
|
||||
var/turf/T = get_turf(src)
|
||||
if (!T || (T.z in current_map.player_levels))
|
||||
if (!T || isStationLevel(T.z))
|
||||
return
|
||||
//If they are on centcom -> abort
|
||||
if (istype(get_area(src), /area/centcom) || istype(get_area(src), /area/shuttle/escape) || istype(get_area(src), /area/shuttle/arrival))
|
||||
|
||||
@@ -77,7 +77,7 @@ var/global/ntnet_card_uid = 1
|
||||
|
||||
if(holder2)
|
||||
var/turf/T = get_turf(holder2)
|
||||
if((T && istype(T)) && T.z in current_map.station_levels)
|
||||
if((T && istype(T)) && isStationLevel(T.z))
|
||||
// Computer is on station. Low/High signal depending on what type of network card you have
|
||||
if(long_range)
|
||||
return 2
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
|
||||
// unless it's on the same level as the object it's interacting with.
|
||||
var/turf/T = get_turf(src_object)
|
||||
if(!T || !(z == T.z || (T.z in current_map.player_levels)))
|
||||
if(!T || !(z == T.z || isStationLevel(T.z)))
|
||||
return STATUS_CLOSE
|
||||
|
||||
// If an object is in view then we can interact with it
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
if (start_with_cell && !no_emergency)
|
||||
cell = new /obj/item/weapon/cell/device/emergency_light(src)
|
||||
|
||||
if (mapload && loc && !(z in current_map.admin_levels))
|
||||
if (mapload && loc && isNotAdminLevel(z))
|
||||
switch(fitting)
|
||||
if("tube")
|
||||
if(prob(2))
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
failure_timer = max(failure_timer, duration)
|
||||
|
||||
/obj/machinery/power/smes/proc/ion_act()
|
||||
if(src.z in current_map.station_levels)
|
||||
if(isStationLevel(src.z))
|
||||
if(prob(1)) //explosion
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>The [src.name] is making strange noises!</span>", 3, "<span class='warning'>You hear sizzling electronics.</span>", 2)
|
||||
|
||||
@@ -696,7 +696,7 @@
|
||||
P.name = "wormhole"
|
||||
var/list/pick_turfs = list()
|
||||
for(var/turf/simulated/floor/exit in turfs)
|
||||
if(exit.z in current_map.station_levels)
|
||||
if(isStationLevel(exit.z))
|
||||
pick_turfs += exit
|
||||
P.target = pick(pick_turfs)
|
||||
QDEL_IN(P, rand(150,300))
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
var/newlevel = get_security_level()
|
||||
for(var/obj/machinery/firealarm/FA in SSmachinery.processing_machines)
|
||||
if(FA.z in current_map.contact_levels)
|
||||
if(isContactLevel(FA.z))
|
||||
FA.set_security_level(newlevel)
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(!user_turf)
|
||||
to_chat(user, "<span class='warning'>You cannot cast spells in null space!</span>")
|
||||
|
||||
if(spell_flags & Z2NOCAST && (user_turf.z in current_map.admin_levels)) //Certain spells are not allowed on the centcomm zlevel
|
||||
if(spell_flags & Z2NOCAST && isAdminLevel(user_turf.z)) //Certain spells are not allowed on the centcomm zlevel
|
||||
return 0
|
||||
|
||||
if(spell_flags & CONSTRUCT_CHECK)
|
||||
|
||||
@@ -247,9 +247,9 @@
|
||||
telefail()
|
||||
temp_msg = "ERROR!<BR>Elevation is less than 1 or greater than 90."
|
||||
return
|
||||
if(!(z_co in current_map.player_levels))
|
||||
if(isNotStationLevel(z_co))
|
||||
telefail()
|
||||
temp_msg = "ERROR! Sector is invalid! Valid sectors are [english_list(current_map.player_levels)]."
|
||||
temp_msg = "ERROR! Sector is invalid! Valid sectors are [english_list(current_map.station_levels)]."
|
||||
return
|
||||
if(teles_left > 0)
|
||||
doteleport(user)
|
||||
|
||||
@@ -27,7 +27,7 @@ datum/unit_test/apc_area_test/start_test()
|
||||
var/list/exempt_from_apc = typecacheof(current_map.ut_apc_exempt_areas)
|
||||
|
||||
for(var/area/A in typecache_filter_list_reverse(all_areas, exempt_areas))
|
||||
if(A.z in current_map.station_levels)
|
||||
if(isStationLevel(A.z))
|
||||
area_test_count++
|
||||
var/area_good = 1
|
||||
var/bad_msg = "[ascii_red]--------------- [A.name]([A.type])"
|
||||
@@ -70,7 +70,7 @@ datum/unit_test/wire_test/start_test()
|
||||
|
||||
for(C in world)
|
||||
T = get_turf(C)
|
||||
if(T && T.z in current_map.station_levels)
|
||||
if(T && isStationLevel(T.z))
|
||||
cable_turfs |= get_turf(C)
|
||||
|
||||
for(T in cable_turfs)
|
||||
@@ -132,7 +132,7 @@ datum/unit_test/wire_test/start_test()
|
||||
var/ladders_blocked = 0
|
||||
|
||||
for (var/obj/structure/ladder/ladder in world)
|
||||
if (ladder.z in current_map.admin_levels)
|
||||
if (isAdminLevel(ladder.z))
|
||||
continue
|
||||
|
||||
ladders_total++
|
||||
@@ -219,7 +219,7 @@ datum/unit_test/wire_test/start_test()
|
||||
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for (var/obj/machinery/atmospherics/plumbing in world)
|
||||
if(!(plumbing.z in current_map.station_levels))
|
||||
if(isNotStationLevel(plumbing.z))
|
||||
continue
|
||||
checks++
|
||||
if (plumbing.nodealert)
|
||||
@@ -228,7 +228,7 @@ datum/unit_test/wire_test/start_test()
|
||||
|
||||
//Manifolds
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
|
||||
if(!(pipe.z in current_map.station_levels))
|
||||
if(isNotStationLevel(pipe.z))
|
||||
continue
|
||||
checks++
|
||||
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
|
||||
@@ -237,7 +237,7 @@ datum/unit_test/wire_test/start_test()
|
||||
|
||||
//Pipes
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in world)
|
||||
if(!(pipe.z in current_map.station_levels))
|
||||
if(isNotStationLevel(pipe.z))
|
||||
continue
|
||||
checks++
|
||||
if (!pipe.node1 || !pipe.node2)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Arrow768
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Construction Drones can no longer go to the Aurora."
|
||||
- tweak: "Mining Drones can no longer go to the Derelict."
|
||||
- tweak: "TSC is now restricted to station levels instead of player levels."
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
lobby_screens = list("aurora_asteroid", "aurora_postcard")
|
||||
|
||||
station_levels = list(3, 4, 5, 6, 7)
|
||||
station_levels = list(2, 3, 4, 5, 6, 7)
|
||||
admin_levels = list(1)
|
||||
contact_levels = list(3, 4, 5, 6)
|
||||
player_levels = list(2, 3, 4, 5, 6, 7, 8)
|
||||
|
||||
@@ -8005,7 +8005,7 @@
|
||||
},
|
||||
/area/derelict)
|
||||
"xe" = (
|
||||
/obj/machinery/mineral/equipment_vendor,
|
||||
/obj/machinery/floodlight
|
||||
/turf/simulated/floor/shuttle{
|
||||
icon_state = "floor7"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user