diff --git a/code/__defines/flags.dm b/code/__defines/flags.dm index 0744653794..792bc9cc39 100644 --- a/code/__defines/flags.dm +++ b/code/__defines/flags.dm @@ -1,29 +1,17 @@ #define EMPTY_BITFIELD 0 -#define ENABLE_BITFIELD(variable, flag) (variable |= (flag)) -#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag)) -#define CHECK_BITFIELD(variable, flag) (variable & (flag)) - -//check if all bitflags specified are present -#define CHECK_MULTIPLE_BITFIELDS(flagvar, flags) ((flagvar & (flags)) == flags) - -GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768)) - /* Directions */ ///All the cardinal direction bitflags. #define ALL_CARDINALS (NORTH|SOUTH|EAST|WEST) -// datum_flags + +/* -- /datum/var/datum_flags -- */ + #define DF_VAR_EDITED (1<<0) #define DF_ISPROCESSING (1<<1) #define DF_USE_TAG (1<<2) -/* -- /atom/movable/var/movement_type -- */ - -#define UNSTOPPABLE (1<<0) //Can not be stopped from moving from Cross(), CanPass(), or Uncross() failing. Still bumps everything it passes through, though. - - /* -- /atom/var/atom_flags -- */ /// The atom has been initialized. @@ -34,9 +22,22 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define OPENCONTAINER (1<<3) // Is an open container for chemistry purposes. #define NOREACT (1<<4) // Reagents don't react inside this container. #define OVERLAY_QUEUED (1<<5) // Atom is queued for an overlay update -#define NOJAUNT (1<<6) // blocks ethereal jaunt from landing/leaving on flagged turfs. -#define SLANDMARK_FLAG_AUTOSET (1<<7) // If set, will set base area and turf type to same as where it was spawned at -#define SLANDMARK_FLAG_ZERO_G (1<<8) // Zero-G shuttles moved here will lose gravity unless the area has ambient gravity. +#define SLANDMARK_FLAG_AUTOSET (1<<6) // If set, will set base area and turf type to same as where it was spawned at +#define SLANDMARK_FLAG_ZERO_G (1<<7) // Zero-G shuttles moved here will lose gravity unless the area has ambient gravity. + + +/* -- /turf/var/turf_flags -- */ + +/// The turf is blessed; it interferes with cult behaviors. +#define TURF_IS_BLESSED (1<<0) + +/// The turf prevents wizard movement spells. +#define TURF_PREVENTS_JAUNT (1<<1) + + +/* -- /atom/movable/var/movement_type -- */ + +#define UNSTOPPABLE (1<<0) //Can not be stopped from moving from Cross(), CanPass(), or Uncross() failing. Still bumps everything it passes through, though. /* -- /obj/item/var/item_flags -- */ diff --git a/code/_macros.dm b/code/_macros.dm index a725086194..b02af88ae8 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -51,4 +51,11 @@ #define WORLD_ICON_SIZE 32 //Needed for the R-UST port -#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 //Needed for the R-UST port \ No newline at end of file +#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 //Needed for the R-UST port + +#define ENABLE_BITFIELD(variable, flag) (variable |= (flag)) +#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag)) +#define CHECK_BITFIELD(variable, flag) (variable & (flag)) + +//check if all bitflags specified are present +#define CHECK_MULTIPLE_BITFIELDS(flagvar, flags) ((flagvar & (flags)) == flags) diff --git a/code/game/gamemodes/cult/hell_universe.dm b/code/game/gamemodes/cult/hell_universe.dm index f67f689288..2bb00a38b2 100644 --- a/code/game/gamemodes/cult/hell_universe.dm +++ b/code/game/gamemodes/cult/hell_universe.dm @@ -21,7 +21,7 @@ In short: */ /datum/universal_state/hell/DecayTurf(var/turf/T) - if(!T.holy) + if(!(T.turf_flags & TURF_IS_BLESSED)) T.cultify() for(var/obj/machinery/light/L in T.contents) new /obj/structure/cult/pylon(L.loc) @@ -70,7 +70,7 @@ In short: /datum/universal_state/hell/proc/MiscSet() for(var/turf/simulated/floor/T in world) - if(!T.holy && prob(1)) + if(!(T.turf_flags & TURF_IS_BLESSED) && prob(1)) new /obj/effect/gateway/active/cult(T) for (var/obj/machinery/firealarm/alm in machines) diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm index 8e95c4c43a..128bcab725 100644 --- a/code/game/gamemodes/cult/narsie.dm +++ b/code/game/gamemodes/cult/narsie.dm @@ -190,10 +190,9 @@ var/global/list/narsie_list = list() continue if (dist <= consume_range && !istype(A, /turf/space)) - var/turf/T = A - if(T.holy) - T.holy = 0 //Nar-Sie doesn't give a shit about sacred grounds. - T.cultify() + var/turf/turf = A + turf.turf_flags &= ~TURF_IS_BLESSED + turf.cultify() /obj/singularity/narsie/proc/old_narsie(const/atom/A) if(!(A.singuloCanEat())) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 7b5078fc38..568bd33c43 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -59,7 +59,7 @@ /turf/simulated/Initialize(mapload) . = ..() if(istype(loc, /area/chapel)) - holy = 1 + turf_flags |= TURF_IS_BLESSED levelupdate() /turf/simulated/proc/AddTracks(var/typepath,var/bloodDNA,var/comingdir,var/goingdir,var/bloodcolor="#A10808") diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 8e7649f451..d443b6a422 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -125,7 +125,7 @@ add_overlay(H.overlays_standing) default_pixel_x = body.default_pixel_x default_pixel_y = body.default_pixel_y - if(!T && length(latejoin)) + if(!T && length(latejoin)) T = pick(latejoin) //Safety in case we cannot find the body's position if(T) forceMove(T) @@ -167,10 +167,10 @@ I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE) set_cached_examine_icon(src, I, 200 SECONDS) return I - + /mob/observer/dead/examine(mob/user) . = ..() - + if(is_admin(user)) . += "\t>[ADMIN_FULLMONTY(src)]" @@ -343,7 +343,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp for(var/area/A as anything in areas) if(A.z in using_map?.secret_levels) areas -= A - return areas + return areas /mob/observer/dead/proc/jumpable_mobs() var/list/mobs = getmobs() @@ -369,7 +369,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in jumpable_areas() if(!A) return - + usr.forceMove(pick(get_area_turfs(A))) usr.on_mob_jump() @@ -382,7 +382,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in jumpable_mobs() if(!input) return - + var/target = jumpable_mobs()[input] if(!target) return ManualFollow(target) @@ -524,7 +524,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(check_rights(R_ADMIN|R_FUN|R_EVENT, 0, src)) return 0 - return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists)) + return (T?.turf_flags & TURF_IS_BLESSED) && (is_manifest || (mind in cult.current_antagonists)) /mob/observer/dead/verb/jumptomob(input in jumpable_mobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak set category = "Ghost" @@ -930,7 +930,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" set name = "Blank pAI alert" set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope." - + if(usr.client.prefs?.be_special & BE_PAI) var/count = 0 for(var/obj/item/paicard/p in all_pai_cards) diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index e681fc8136..57e4a3403d 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -145,7 +145,7 @@ Whatever you did that made the last camera window disappear-- don't do that agai name = "" icon = 'icons/misc/pic_in_pic.dmi' icon_state = "room_background" - atom_flags = NOJAUNT + turf_flags = TURF_PREVENTS_JAUNT plane = SPACE_PLANE layer = AREA_LAYER + 0.1 diff --git a/code/modules/reagents/reagents/other.dm b/code/modules/reagents/reagents/other.dm index a76bad9d2d..7a1a6995a0 100644 --- a/code/modules/reagents/reagents/other.dm +++ b/code/modules/reagents/reagents/other.dm @@ -363,7 +363,7 @@ /datum/reagent/water/holywater/touch_turf(var/turf/T) ..() if(volume >= 5) - T.holy = 1 + T.turf_flags |= TURF_IS_BLESSED return /datum/reagent/ammonia diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm index 89f9e43d72..077ee45282 100644 --- a/code/modules/spells/targeted/ethereal_jaunt.dm +++ b/code/modules/spells/targeted/ethereal_jaunt.dm @@ -91,7 +91,7 @@ /obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction) if (!src.canmove || reappearing) return var/turf/newLoc = get_step(src,direction) - if(!(newLoc.atom_flags & NOJAUNT)) + if(!(newLoc.turf_flags & TURF_PREVENTS_JAUNT)) loc = newLoc var/turf/T = get_turf(loc) if(!T.contains_dense_objects())