mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 16:13:49 +01:00
converts area vars to flags
This commit is contained in:
@@ -48,7 +48,7 @@ BLIND // can't see anything
|
||||
// Prevent people from just turning their goggles back on.
|
||||
if(!active && (vision_flags & (SEE_TURFS|SEE_OBJS)))
|
||||
var/area/A = get_area(src)
|
||||
if(A.no_spoilers)
|
||||
if(A.flag_check(AREA_NO_SPOILERS))
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -44,7 +44,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
continue
|
||||
if(!(A.z in using_map.station_levels))
|
||||
continue
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
if(A.flag_check(RAD_SHIELDED))
|
||||
continue
|
||||
if(isbelly(G.loc))
|
||||
continue
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
var/area/A = get_area(temp_vent)
|
||||
if(A.forbid_events)
|
||||
if(A.flag_check(AREA_FORBID_EVENTS))
|
||||
continue
|
||||
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(!(T.z in using_map.station_levels))
|
||||
continue
|
||||
var/area/A = get_area(T)
|
||||
if(A.flags & RAD_SHIELDED || A.flags & BLUE_SHIELDED)
|
||||
if(A.flag_check(RAD_SHIELDED | BLUE_SHIELDED))
|
||||
continue
|
||||
place_ian(T)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(!(S.z in affecting_z))
|
||||
continue
|
||||
var/area/A = get_area(S)
|
||||
if(!A || A.flags & RAD_SHIELDED) // Rad shielding will protect from ions too
|
||||
if(!A || A.flag_check(RAD_SHIELDED)) // Rad shielding will protect from ions too
|
||||
continue
|
||||
to_chat(S, span_warning("Your integrated sensors detect an ionospheric anomaly. Your systems will be impacted as you begin a partial restart."))
|
||||
var/ionbug = rand(3, 9)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
var/area/A = get_area(C)
|
||||
if(!A)
|
||||
continue
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
if(A.flag_check(RAD_SHIELDED))
|
||||
continue
|
||||
if(istype(C,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
var/area/A = get_area(temp_vent)
|
||||
if(!(A.forbid_events))
|
||||
if(!(A.flag_check(AREA_FORBID_EVENTS)))
|
||||
vents += temp_vent
|
||||
|
||||
while((spawncount >= 1) && vents.len)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
continue
|
||||
if(!(A.z in using_map.station_levels))
|
||||
continue
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
if(A.flag_check(RAD_SHIELDED))
|
||||
continue
|
||||
if(isbelly(H.loc))
|
||||
continue
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if(istype(candidate, /turf/simulated/wall))
|
||||
center = candidate
|
||||
var/area/A = get_area(candidate)
|
||||
if(!A.forbid_events)
|
||||
if(!A.flag_check(AREA_FORBID_EVENTS))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
|
||||
// Only rot up to severity walls
|
||||
if(rotcount >= actual_severity)
|
||||
break
|
||||
break
|
||||
|
||||
@@ -107,7 +107,7 @@ This allows for events that have their announcement happen after the end itself.
|
||||
var/list/area/grand_list_of_areas = get_all_existing_areas_of_types(specific_areas)
|
||||
. = list()
|
||||
for(var/area/A as anything in shuffle(grand_list_of_areas))
|
||||
if(A.forbid_events)
|
||||
if(A.flag_check(AREA_FORBID_EVENTS))
|
||||
continue
|
||||
if(!(A.z in get_location_z_levels()))
|
||||
continue
|
||||
|
||||
@@ -196,7 +196,7 @@ Works together with spawning an observer, noted above.
|
||||
if(!isturf(loc))
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
if(A.block_ghosts)
|
||||
if(A.flag_check(AREA_BLOCK_GHOSTS))
|
||||
to_chat(src, span_warning("Ghosts can't enter this location."))
|
||||
return_to_spawn()
|
||||
|
||||
@@ -452,7 +452,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
//RS Port #658 Start
|
||||
var/area/A = get_area(destination)
|
||||
if(A.block_ghosts)
|
||||
if(A.flag_check(AREA_BLOCK_GHOSTS))
|
||||
to_chat(src,span_warning("Sorry, that area does not allow ghosts."))
|
||||
if(following)
|
||||
stop_following()
|
||||
|
||||
@@ -1631,7 +1631,7 @@
|
||||
|
||||
// Do this early so certain stuff gets turned off before vision is assigned.
|
||||
var/area/A = get_area(src)
|
||||
if(A?.no_spoilers)
|
||||
if(A?.flag_check(AREA_NO_SPOILERS))
|
||||
disable_spoiler_vision()
|
||||
|
||||
if(XRAY in mutations)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
//RS Port #658 Start
|
||||
var/area/A = get_area(src)
|
||||
if(!client?.holder && A.block_phase_shift)
|
||||
if(!client?.holder && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
|
||||
to_chat(src, span_warning("You can't do that here!"))
|
||||
return
|
||||
//RS Port #658 End
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
var/seejanhud = src.sight_mode & BORGJAN
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(A?.no_spoilers)
|
||||
if(A?.flag_check(AREA_NO_SPOILERS))
|
||||
disable_spoiler_vision()
|
||||
|
||||
if (src.stat == DEAD || (XRAY in mutations) || (src.sight_mode & BORGXRAY))
|
||||
|
||||
@@ -135,7 +135,7 @@ Field studies suggest analytical abilities on par with some species of cepholapo
|
||||
bitesize = 10
|
||||
gender = NEUTER
|
||||
|
||||
has_langs = list("Drake")
|
||||
has_langs = list(LANNGUAGE_DRAKE)
|
||||
|
||||
see_in_dark = 8 // on par with Taj
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
to_chat(src,span_warning("You can't use that here!"))
|
||||
return FALSE
|
||||
//RS Port #658 Start
|
||||
if(!client?.holder && A.block_phase_shift)
|
||||
if(!client?.holder && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
|
||||
to_chat(src,span_warning("You can't use that here!"))
|
||||
return FALSE
|
||||
//RS Port #658 End
|
||||
|
||||
@@ -358,13 +358,13 @@
|
||||
return
|
||||
//RS Port #658 Start
|
||||
if(!holder)
|
||||
if(isliving(mob) && A.block_phase_shift)
|
||||
if(isliving(mob) && A.flag_check(AREA_BLOCK_PHASE_SHIFT))
|
||||
to_chat(mob, span_warning("Something blocks you from entering this location while phased out."))
|
||||
return
|
||||
if(isobserver(mob) && A.block_ghosts)
|
||||
if(isobserver(mob) && A.flag_check(AREA_BLOCK_GHOSTS))
|
||||
to_chat(mob, span_warning("Ghosts can't enter this location."))
|
||||
var/area/our_area = mobloc.loc
|
||||
if(our_area.block_ghosts)
|
||||
if(our_area.flag_check(AREA_BLOCK_GHOSTS))
|
||||
var/mob/observer/dead/D = mob
|
||||
D.return_to_spawn()
|
||||
return
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if(!T || !(T.z in using_map.persist_levels) )
|
||||
return FALSE
|
||||
var/area/A = get_area(T)
|
||||
if(!A || (A.flags & AREA_FLAG_IS_NOT_PERSISTENT))
|
||||
if(!A || (A.flag_check(AREA_FLAG_IS_NOT_PERSISTENT)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
|
||||
// VOREStation Edit Start
|
||||
var/area/A = get_area(T)
|
||||
if(A.forbid_singulo) //No going to dorms
|
||||
if(A.flag_check(AREA_FORBID_SINGULO)) //No going to dorms
|
||||
return 0
|
||||
// VOREStation Edit End
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(ownturf.z != T.z || get_dist(T,ownturf) > world.view)
|
||||
to_chat(user, span_warning("The target is out of range!"))
|
||||
return
|
||||
if(get_area(A).flags & BLUE_SHIELDED)
|
||||
if(get_area(A).flag_check(BLUE_SHIELDED))
|
||||
to_chat(user, span_warning("The target area protected by bluespace shielding!"))
|
||||
return
|
||||
if(!(A in view(user, world.view)))
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
S.set_up(5, 1, get_turf(telepad))
|
||||
S.start()
|
||||
|
||||
if(!A || (A.flags & BLUE_SHIELDED))
|
||||
if(!A || (A.flag_check(BLUE_SHIELDED)))
|
||||
telefail()
|
||||
temp_msg = "ERROR! Target is shielded from bluespace intersection!"
|
||||
return
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
var/turf/newturf = get_turf(active_camera)
|
||||
var/area/B = newturf?.loc // No cam tracking in dorms!
|
||||
// Show static if can't use the camera
|
||||
if(!active_camera?.can_use() || B.block_tracking)
|
||||
if(!active_camera?.can_use() || B.flag_check(AREA_BLOCK_TRACKING))
|
||||
show_camera_static()
|
||||
if(!ui)
|
||||
var/user_ref = REF(user)
|
||||
@@ -182,7 +182,7 @@
|
||||
var/turf/newturf = get_turf(active_camera)
|
||||
var/area/B = newturf?.loc // No cam tracking in dorms!
|
||||
// Show static if can't use the camera
|
||||
if(!active_camera?.can_use() || B.block_tracking)
|
||||
if(!active_camera?.can_use() || B.flag_check(AREA_BLOCK_TRACKING))
|
||||
show_camera_static()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
|
||||
/atom/movable/proc/size_range_check(size_select) //both objects and mobs needs to have that
|
||||
var/area/A = get_area(src) //Get the atom's area to check for size limit.
|
||||
if((A?.limit_mob_size && (size_select > 200 || size_select < 25)) || (size_select > 600 || size_select <1))
|
||||
if((!A?.flag_check(AREA_ALLOW_LARGE_SIZE) && (size_select > 200 || size_select < 25)) || (size_select > 600 || size_select <1))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/has_large_resize_bounds()
|
||||
var/area/A = get_area(src) //Get the atom's area to check for size limit.
|
||||
return !A.limit_mob_size
|
||||
return A.flag_check(AREA_ALLOW_LARGE_SIZE)
|
||||
|
||||
/proc/is_extreme_size(size)
|
||||
return (size < RESIZE_MINIMUM || size > RESIZE_MAXIMUM)
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if(!istype(H))
|
||||
return 1
|
||||
var/area/A = get_area(H)
|
||||
if(A.forbid_events)
|
||||
if(A.flag_check(AREA_FORBID_EVENTS))
|
||||
return 0
|
||||
var/protected = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user