From e63094d9aecd96eb422ff439ff80e3254a698be2 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 1 Mar 2021 18:55:55 +0100 Subject: [PATCH] [MIRROR] adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs (#3737) * adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs (#57263) Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs Co-authored-by: Fikou Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> --- code/__DEFINES/flags.dm | 66 +++++++++---------- code/__DEFINES/obj_flags.dm | 11 ++-- code/_globalvars/bitfields.dm | 24 +++++-- code/_onclick/click.dm | 2 +- code/controllers/subsystem/mapping.dm | 4 +- code/datums/mapgen/CaveGenerator.dm | 4 +- code/game/area/areas.dm | 4 +- code/game/area/areas/ruins/lavaland.dm | 2 +- code/game/area/areas/shuttles.dm | 3 +- code/game/area/space_station_13_areas.dm | 10 +-- code/game/objects/effects/phased_mob.dm | 2 +- code/game/objects/items.dm | 2 +- code/game/objects/items/devices/powersink.dm | 1 + .../items/stacks/sheets/sheet_types.dm | 2 +- code/game/turfs/closed/minerals.dm | 4 +- code/game/turfs/open/floor.dm | 4 +- code/game/turfs/open/openspace.dm | 2 +- code/game/turfs/open/river.dm | 6 +- code/game/turfs/open/space/transit.dm | 2 +- code/game/turfs/turf.dm | 4 +- code/modules/antagonists/cult/ritual.dm | 2 +- .../environmental/LINDA_turf_tile.dm | 6 +- code/modules/mapping/mapping_helpers.dm | 2 +- code/modules/mapping/ruins.dm | 6 +- .../space_management/space_reservation.dm | 8 +-- code/modules/mob/inventory.dm | 2 +- .../modules/mob/living/silicon/ai/multicam.dm | 2 +- code/modules/mob/mob_movement.dm | 2 +- .../ruins/spaceruin_code/hilbertshotel.dm | 2 +- code/modules/shuttle/shuttle.dm | 2 +- 30 files changed, 105 insertions(+), 88 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 970c305db00..4cf4d524703 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -24,43 +24,44 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 // scroll down before changing the numbers on these /// This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. -#define HEAR_1 (1<<3) +#define HEAR_1 (1<<0) /// Is this object currently processing in the atmos object list? -#define ATMOS_IS_PROCESSING_1 (1<<4) +#define ATMOS_IS_PROCESSING_1 (1<<1) /// conducts electricity (metal etc.) -#define CONDUCT_1 (1<<5) +#define CONDUCT_1 (1<<2) /// For machines and structures that should not break into parts, eg, holodeck stuff -#define NODECONSTRUCT_1 (1<<7) +#define NODECONSTRUCT_1 (1<<3) /// atom queued to SSoverlay -#define OVERLAY_QUEUED_1 (1<<8) +#define OVERLAY_QUEUED_1 (1<<4) /// item has priority to check when entering or leaving -#define ON_BORDER_1 (1<<9) +#define ON_BORDER_1 (1<<5) ///Whether or not this atom shows screentips when hovered over -#define NO_SCREENTIPS_1 (1 << 10) +#define NO_SCREENTIPS_1 (1 << 6) /// Prevent clicking things below it on the same turf eg. doors/ fulltile windows -#define PREVENT_CLICK_UNDER_1 (1<<11) -#define HOLOGRAM_1 (1<<12) +#define PREVENT_CLICK_UNDER_1 (1<<7) +#define HOLOGRAM_1 (1<<8) /// Prevents mobs from getting chainshocked by teslas and the supermatter -#define SHOCKED_1 (1<<13) +#define SHOCKED_1 (1<<9) ///Whether /atom/Initialize() has already run for the object -#define INITIALIZED_1 (1<<14) +#define INITIALIZED_1 (1<<10) /// was this spawned by an admin? used for stat tracking stuff. -#define ADMIN_SPAWNED_1 (1<<15) +#define ADMIN_SPAWNED_1 (1<<11) /// should not get harmed if this gets caught by an explosion? -#define PREVENT_CONTENTS_EXPLOSION_1 (1<<16) +#define PREVENT_CONTENTS_EXPLOSION_1 (1<<12) /// should the contents of this atom be acted upon -#define RAD_PROTECT_CONTENTS_1 (1 << 17) +#define RAD_PROTECT_CONTENTS_1 (1 << 13) /// should this object be allowed to be contaminated -#define RAD_NO_CONTAMINATE_1 (1 << 18) +#define RAD_NO_CONTAMINATE_1 (1 << 14) /// Should this object be paintable with very dark colors? -#define ALLOW_DARK_PAINTS_1 (1 << 19) +#define ALLOW_DARK_PAINTS_1 (1 << 15) /// Should this object be unpaintable? -#define UNPAINTABLE_1 (1 << 20) +#define UNPAINTABLE_1 (1 << 16) /// Is the thing currently spinning? -#define IS_SPINNING_1 (1 << 21) -#define IS_ONTOP_1 (1 << 22) -#define SUPERMATTER_IGNORES_1 (1 << 23) - +#define IS_SPINNING_1 (1 << 17) +#define IS_ONTOP_1 (1 << 18) +#define SUPERMATTER_IGNORES_1 (1 << 19) +/// If a turf can be made dirty at roundstart. This is also used in areas. +#define CAN_BE_DIRTY_1 (1<<20) // Update flags for [/atom/proc/update_appearance] /// Update the atom's name @@ -79,19 +80,16 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 /// If the thing can reflect matter (bullets/bomb shrapnel) #define RICOCHET_HARD (1<<1) -//turf-only flags -#define NOJAUNT_1 (1<<0) -#define UNUSED_RESERVATION_TURF_1 (1<<1) -/// If a turf can be made dirty at roundstart. This is also used in areas. -#define CAN_BE_DIRTY_1 (1<<2) -/// If blood cultists can draw runes or build structures on this turf -#define CULT_PERMITTED_1 (1<<3) -/// Blocks lava rivers being generated on the turf -#define NO_LAVA_GEN_1 (1<<6) -/// Blocks ruins spawning on the turf -#define NO_RUINS_1 (1<<10) +//TURF FLAGS +/// If a turf cant be jaunted through. +#define NOJAUNT (1<<0) +#define UNUSED_RESERVATION_TURF (1<<1) +/// Blocks lava rivers being generated on the turf. +#define NO_LAVA_GEN (1<<3) +/// Blocks ruins spawning on the turf. +#define NO_RUINS (1<<4) /// Should this tile be cleaned up and reinserted into an excited group? -#define EXCITED_CLEANUP_1 (1 << 13) +#define EXCITED_CLEANUP (1<<5) ////////////////Area flags\\\\\\\\\\\\\\ /// If it's a valid territory for cult summoning or the CRAB-17 phone to spawn @@ -120,6 +118,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ABDUCTOR_PROOF (1<<11) /// If an area should be hidden from power consoles, power/atmosphere alerts, etc. #define NO_ALERTS (1<<12) +/// If blood cultists can draw runes or build structures on this AREA. +#define CULT_PERMITTED (1<<13) /* These defines are used specifically with the atom/pass_flags bitmask diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index dfb5fd7733f..8530bf63cad 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -31,10 +31,11 @@ #define IMMUTABLE_SLOW (1<<10) // When players should not be able to change the slowdown of the item (Speed potions, etc) #define IN_STORAGE (1<<11) //is this item in the storage item, such as backpack? used for tooltips #define SURGICAL_TOOL (1<<12) //Tool commonly used for surgery: won't attack targets in an active surgical operation on help intent (in case of mistakes) -#define EYE_STAB (1<<13) /// Item can be used to eyestab -#define HAND_ITEM (1<<14) /// If an item is just your hand (circled hand, slapper) and shouldn't block things like riding -#define EXAMINE_SKIP (1<<15) /// Makes the Examine proc not read out this item. -#define XENOMORPH_HOLDABLE (1<<16) /// A Xenomorph can hold this item. +#define EYE_STAB (1<<13) // Item can be used to eyestab +#define HAND_ITEM (1<<14) // If an item is just your hand (circled hand, slapper) and shouldn't block things like riding +#define EXAMINE_SKIP (1<<15) // Makes the Examine proc not read out this item. +#define XENOMORPH_HOLDABLE (1<<16) // A Xenomorph can hold this item. +#define NO_PIXEL_RANDOM_DROP (1<<17) //if dropped, it wont have a randomized pixel_x/pixel_y // Flags for the clothing_flags var on /obj/item/clothing @@ -73,7 +74,7 @@ /// Flags for the pod_flags var on /obj/structure/closet/supplypod #define FIRST_SOUNDS (1<<0) // If it shouldn't play sounds the first time it lands, used for reverse mode -/// Flags for the gun_flags var for firearms +/// Flags for the gun_flags var for firearms #define TOY_FIREARM_OVERLAY (1<<0) // If update_overlay would add some indicator that the gun is a toy, like a plastic cap on a pistol /// Flags for sharpness in obj/item diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index d170bc2aa12..bdd3a57d460 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -48,12 +48,15 @@ DEFINE_BITFIELD(appearance_flags, list( )) DEFINE_BITFIELD(area_flags, list( + "ABDUCTOR_PROOF" = ABDUCTOR_PROOF, "BLOBS_ALLOWED" = BLOBS_ALLOWED, "BLOCK_SUICIDE" = BLOCK_SUICIDE, + "CULT_PERMITTED" = CULT_PERMITTED, "FLORA_ALLOWED" = FLORA_ALLOWED, "HIDDEN_AREA" = HIDDEN_AREA, "MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED, "MOB_SPAWN_ALLOWED" = MOB_SPAWN_ALLOWED, + "NO_ALERTS" = NO_ALERTS, "NOTELEPORT" = NOTELEPORT, "CAVES_ALLOWED" = CAVES_ALLOWED, "UNIQUE_AREA" = UNIQUE_AREA, @@ -62,6 +65,14 @@ DEFINE_BITFIELD(area_flags, list( "NO_ALERTS" = NO_ALERTS, )) +DEFINE_BITFIELD(turf_flags, list( + "EXCITED_CLEANUP" = EXCITED_CLEANUP, + "NO_LAVA_GEN" = NO_LAVA_GEN, + "NO_RUINS" = NO_RUINS, + "NOJAUNT" = NOJAUNT, + "UNUSED_RESERVATION_TURF" = UNUSED_RESERVATION_TURF, +)) + DEFINE_BITFIELD(car_traits, list( "CAN_KIDNAP" = CAN_KIDNAP, )) @@ -96,16 +107,17 @@ DEFINE_BITFIELD(disease_flags, list( DEFINE_BITFIELD(flags_1, list( "ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1, + "ALLOW_DARK_PAINTS_1" = ALLOW_DARK_PAINTS_1, + "ATMOS_IS_PROCESSING_1" = ATMOS_IS_PROCESSING_1, "CAN_BE_DIRTY_1" = CAN_BE_DIRTY_1, "CONDUCT_1" = CONDUCT_1, - "CULT_PERMITTED_1" = CULT_PERMITTED_1, "HEAR_1" = HEAR_1, "HOLOGRAM_1" = HOLOGRAM_1, "INITIALIZED_1" = INITIALIZED_1, + "IS_ONTOP_1" = IS_ONTOP_1, + "IS_SPINNING_1" = IS_SPINNING_1, + "NO_SCREENTIPS_1" = NO_SCREENTIPS_1, "NODECONSTRUCT_1" = NODECONSTRUCT_1, - "NOJAUNT_1" = NOJAUNT_1, - "NO_LAVA_GEN_1" = NO_LAVA_GEN_1, - "NO_RUINS_1" = NO_RUINS_1, "ON_BORDER_1" = ON_BORDER_1, "OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1, "PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1, @@ -113,7 +125,8 @@ DEFINE_BITFIELD(flags_1, list( "RAD_NO_CONTAMINATE_1" = RAD_NO_CONTAMINATE_1, "RAD_PROTECT_CONTENTS_1" = RAD_PROTECT_CONTENTS_1, "SHOCKED_1" = SHOCKED_1, - "UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1, + "SUPERMATTER_IGNORES_1" = SUPERMATTER_IGNORES_1, + "UNPAINTABLE_1" = UNPAINTABLE_1, )) DEFINE_BITFIELD(flags_ricochet, list( @@ -165,6 +178,7 @@ DEFINE_BITFIELD(item_flags, list( "SLOWS_WHILE_IN_HAND" = SLOWS_WHILE_IN_HAND, "SURGICAL_TOOL" = SURGICAL_TOOL, "XENOMORPH_HOLDABLE" = XENOMORPH_HOLDABLE, + "NO_PIXEL_RANDOM_DROP" = NO_PIXEL_RANDOM_DROP, )) DEFINE_BITFIELD(machine_stat, list( diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 2b9d6f6eb39..c5529f233f1 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -203,7 +203,7 @@ if(closed[target] || isarea(target)) // avoid infinity situations continue closed[target] = TRUE - if(isturf(target) || isturf(target.loc) || (target in direct_access) || (isobj(target) && target.flags_1 & IS_ONTOP_1)) //Directly accessible atoms + if(isturf(target) || isturf(target.loc) || (target in direct_access) || (ismovable(target) && target.flags_1 & IS_ONTOP_1)) //Directly accessible atoms if(Adjacent(target) || (tool && CheckToolReach(src, target, tool.reach))) //Adjacent or reaching attacks return TRUE diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 89acf2b6cae..f3d69bc037d 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -542,7 +542,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) // No need to empty() these, because it's world init and they're // already /turf/open/space/basic. var/turf/T = t - T.flags_1 |= UNUSED_RESERVATION_TURF_1 + T.flags_1 |= UNUSED_RESERVATION_TURF unused_turfs["[z]"] = block reservation_ready["[z]"] = TRUE clearing_reserved_turfs = FALSE @@ -553,7 +553,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) T.empty(RESERVED_TURF_TYPE, RESERVED_TURF_TYPE, null, TRUE) LAZYINITLIST(unused_turfs["[T.z]"]) unused_turfs["[T.z]"] |= T - T.flags_1 |= UNUSED_RESERVATION_TURF_1 + T.flags_1 |= UNUSED_RESERVATION_TURF GLOB.areas_by_type[world.area].contents += T CHECK_TICK diff --git a/code/datums/mapgen/CaveGenerator.dm b/code/datums/mapgen/CaveGenerator.dm index 4d6ae0ae07d..64c13410c0a 100644 --- a/code/datums/mapgen/CaveGenerator.dm +++ b/code/datums/mapgen/CaveGenerator.dm @@ -60,8 +60,8 @@ var/closed = text2num(string_gen[world.maxx * (gen_turf.y - 1) + gen_turf.x]) var/stored_flags - if(gen_turf.flags_1 & NO_RUINS_1) - stored_flags |= NO_RUINS_1 + if(gen_turf.turf_flags & NO_RUINS) + stored_flags |= NO_RUINS var/turf/new_turf = pickweight(closed ? closed_turf_types : open_turf_types) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index b6082a09ee1..f0e6d451c7e 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -13,7 +13,7 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT invisibility = INVISIBILITY_LIGHTING - var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA + var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED ///Do we have an active fire alarm? var/fire = FALSE @@ -59,7 +59,7 @@ var/ambience_index = AMBIENCE_GENERIC var/list/ambientsounds - flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1 + flags_1 = CAN_BE_DIRTY_1 var/list/firedoors var/list/cameras diff --git a/code/game/area/areas/ruins/lavaland.dm b/code/game/area/areas/ruins/lavaland.dm index 7610deb7dbf..2ca26297e53 100644 --- a/code/game/area/areas/ruins/lavaland.dm +++ b/code/game/area/areas/ruins/lavaland.dm @@ -50,7 +50,7 @@ /area/ruin/unpowered/cultaltar name = "Cult Altar" - flags_1 = CULT_PERMITTED_1 + area_flags = CULT_PERMITTED ambience_index = AMBIENCE_SPOOKY //Syndicate lavaland base diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index 7e359bd256c..22af9dcb780 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -140,7 +140,8 @@ name = "Emergency Shuttle" area_flags = BLOBS_ALLOWED area_limited_icon_smoothing = /area/shuttle/escape - flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1 + flags_1 = CAN_BE_DIRTY_1 + area_flags = NO_ALERTS | CULT_PERMITTED /area/shuttle/escape/backup name = "Backup Emergency Shuttle" diff --git a/code/game/area/space_station_13_areas.dm b/code/game/area/space_station_13_areas.dm index d9afef345c0..68efb09170a 100644 --- a/code/game/area/space_station_13_areas.dm +++ b/code/game/area/space_station_13_areas.dm @@ -648,7 +648,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station mood_bonus = 5 mood_message = "I love being in the library!\n" mood_trait = TRAIT_INTROVERT - flags_1 = CULT_PERMITTED_1 + area_flags = CULT_PERMITTED sound_environment = SOUND_AREA_LARGE_SOFTFLOOR /area/service/library/lounge @@ -675,7 +675,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/service/library/abandoned name = "Abandoned Library" icon_state = "abandoned_library" - flags_1 = CULT_PERMITTED_1 + area_flags = CULT_PERMITTED /area/service/chapel icon_state = "chapel" @@ -716,7 +716,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/service/janitor name = "Custodial Closet" icon_state = "janitor" - flags_1 = CULT_PERMITTED_1 + area_flags = CULT_PERMITTED sound_environment = SOUND_AREA_SMALL_ENCLOSED /area/service/hydroponics @@ -760,7 +760,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engineering/atmos name = "Atmospherics" icon_state = "atmos" - flags_1 = CULT_PERMITTED_1 + area_flags = CULT_PERMITTED /area/engineering/atmos/upper name = "Upper Atmospherics" @@ -995,7 +995,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/medical/virology name = "Virology" icon_state = "virology" - flags_1 = CULT_PERMITTED_1 + area_flags = CULT_PERMITTED /area/medical/morgue name = "Morgue" diff --git a/code/game/objects/effects/phased_mob.dm b/code/game/objects/effects/phased_mob.dm index e04aebbb365..bdbed11ffc9 100644 --- a/code/game/objects/effects/phased_mob.dm +++ b/code/game/objects/effects/phased_mob.dm @@ -54,7 +54,7 @@ return var/area/destination_area = newloc.loc movedelay = world.time + movespeed - if(newloc.flags_1 & NOJAUNT_1) + if(newloc.flags_1 & NOJAUNT) to_chat(user, "Some strange aura is blocking the way.") return if(destination_area.area_flags & NOTELEPORT) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index bb4c65c781c..12e6afce740 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -674,7 +674,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb if (callback) //call the original callback . = callback.Invoke() item_flags &= ~IN_INVENTORY - if(!pixel_y && !pixel_x) + if(!pixel_y && !pixel_x && !(item_flags & NO_PIXEL_RANDOM_DROP)) pixel_x = rand(-8,8) pixel_y = rand(-8,8) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 54188838551..76f8e95ac29 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -14,6 +14,7 @@ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_BULKY flags_1 = CONDUCT_1 + item_flags = NO_PIXEL_RANDOM_DROP throwforce = 5 throw_speed = 1 throw_range = 2 diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 00154db6d75..671f04dfc56 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -546,7 +546,7 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \ return var/turf/T = get_turf(user) //we may have moved. adjust as needed... var/area/A = get_area(user) - if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.flags_1 & CULT_PERMITTED_1))) + if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.area_flags & CULT_PERMITTED))) to_chat(user, "The veil is not weak enough here.") return FALSE return ..() diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index 6c5a67c617a..0434ad115bb 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -190,8 +190,8 @@ var/path = pickweight(mineralSpawnChanceList) if(ispath(path, /turf)) var/stored_flags = 0 - if(flags_1 & NO_RUINS_1) - stored_flags |= NO_RUINS_1 + if(turf_flags & NO_RUINS) + stored_flags |= NO_RUINS var/turf/T = ChangeTurf(path,null,CHANGETURF_IGNORE_AIR) T.flags_1 |= stored_flags diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm index 993d84319bd..e3f8cec6e7a 100644 --- a/code/game/turfs/open/floor.dm +++ b/code/game/turfs/open/floor.dm @@ -11,8 +11,8 @@ barefootstep = FOOTSTEP_HARD_BAREFOOT clawfootstep = FOOTSTEP_HARD_CLAW heavyfootstep = FOOTSTEP_GENERIC_HEAVY - flags_1 = CAN_BE_DIRTY_1 | NO_SCREENTIPS_1 - + flags_1 = NO_SCREENTIPS_1 + turf_flags = CAN_BE_DIRTY_1 smoothing_groups = list(SMOOTH_GROUP_TURF_OPEN, SMOOTH_GROUP_OPEN_FLOOR) canSmoothWith = list(SMOOTH_GROUP_OPEN_FLOOR, SMOOTH_GROUP_TURF_OPEN) diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index 50664418d5e..114b276259b 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -160,7 +160,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr /turf/open/openspace/icemoon/Initialize() . = ..() var/turf/T = below() - if(T.flags_1 & NO_RUINS_1 && protect_ruin) + if(T.turf_flags & NO_RUINS && protect_ruin) ChangeTurf(replacement_turf, null, CHANGETURF_IGNORE_AIR) return if(!ismineralturf(T) || !drill_below) diff --git a/code/game/turfs/open/river.dm b/code/game/turfs/open/river.dm index 6e4695b0fe9..483db1b4648 100644 --- a/code/game/turfs/open/river.dm +++ b/code/game/turfs/open/river.dm @@ -11,7 +11,7 @@ while(num_spawned < nodes && possible_locs.len) var/turf/T = pick(possible_locs) var/area/A = get_area(T) - if(!istype(A, whitelist_area) || (T.flags_1 & NO_LAVA_GEN_1)) + if(!istype(A, whitelist_area) || (T.turf_flags & NO_LAVA_GEN)) possible_locs -= T else river_nodes += new /obj/effect/landmark/river_waypoint(T) @@ -47,7 +47,7 @@ cur_turf = get_step(cur_turf, cur_dir) var/area/new_area = get_area(cur_turf) - if(!istype(new_area, whitelist_area) || (cur_turf.flags_1 & NO_LAVA_GEN_1)) //Rivers will skip ruins + if(!istype(new_area, whitelist_area) || (cur_turf.turf_flags & NO_LAVA_GEN)) //Rivers will skip ruins detouring = FALSE cur_dir = get_dir(cur_turf, target_turf) cur_turf = get_step(cur_turf, cur_dir) @@ -75,7 +75,7 @@ for(var/F in RANGE_TURFS(1, src) - src) var/turf/T = F var/area/new_area = get_area(T) - if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area)) || (T.flags_1 & NO_LAVA_GEN_1) ) + if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area)) || (T.turf_flags & NO_LAVA_GEN) ) continue if(!logged_turf_type && ismineralturf(T)) diff --git a/code/game/turfs/open/space/transit.dm b/code/game/turfs/open/space/transit.dm index 8f705c03c38..94d710b5c96 100644 --- a/code/game/turfs/open/space/transit.dm +++ b/code/game/turfs/open/space/transit.dm @@ -3,7 +3,7 @@ icon_state = "black" dir = SOUTH baseturfs = /turf/open/space/transit - flags_1 = NOJAUNT_1 //This line goes out to every wizard that ever managed to escape the den. I'm sorry. + flags_1 = NOJAUNT //This line goes out to every wizard that ever managed to escape the den. I'm sorry. explosion_block = INFINITY /turf/open/space/transit/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b5dd3ab82e1..7c3a819fddb 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -3,10 +3,10 @@ GLOBAL_LIST_EMPTY(station_turfs) /// Any floor or wall. What makes up the station and the rest of the map. /turf icon = 'icons/turf/floors.dmi' - flags_1 = CAN_BE_DIRTY_1 vis_flags = VIS_INHERIT_ID|VIS_INHERIT_PLANE // Important for interaction with and visualization of openspace. luminosity = 1 - + /// Turf bitflags, see code/__DEFINES/flags.dm + var/turf_flags = NONE var/intact = 1 // baseturfs can be either a list or a single turf type. diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm index 8313862c9f9..57827d06941 100644 --- a/code/modules/antagonists/cult/ritual.dm +++ b/code/modules/antagonists/cult/ritual.dm @@ -158,7 +158,7 @@ This file contains the cult dagger and rune list code to_chat(user, "There is already a rune here.") return FALSE var/area/A = get_area(T) - if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.flags_1 & CULT_PERMITTED_1))) + if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.area_flags & CULT_PERMITTED))) to_chat(user, "The veil is not weak enough here.") return FALSE return TRUE diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index 13b9577a9e7..cb66e17903f 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -360,13 +360,13 @@ var/datum/excited_group/EG = our_excited_group || enemy_excited_group || new if(!our_excited_group) EG.add_turf(src) - if(!enemy_excited_group && enemy_tile.flags_1 & EXCITED_CLEANUP_1) + if(!enemy_excited_group && enemy_tile.turf_flags & EXCITED_CLEANUP) EG.add_turf(enemy_tile) our_excited_group = excited_group if(our_excited_group) our_excited_group.breakdown_cooldown = breakdown //Update with the old data our_excited_group.dismantle_cooldown = dismantle - flags_1 &= ~EXCITED_CLEANUP_1 + turf_flags &= ~EXCITED_CLEANUP //////////////////////////SPACEWIND///////////////////////////// @@ -528,7 +528,7 @@ var/turf/open/T = t T.excited_group = null if(will_cleanup) - T.flags_1 |= EXCITED_CLEANUP_1 + T.turf_flags |= EXCITED_CLEANUP if(will_cleanup) SSair.add_to_cleanup(src) turf_list.Cut() diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index e9abcdbe151..f53f68a0919 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -174,7 +174,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) /obj/effect/mapping_helpers/no_lava/Initialize() . = ..() var/turf/T = get_turf(src) - T.flags_1 |= NO_LAVA_GEN_1 + T.turf_flags |= NO_LAVA_GEN //This helper applies components to things on the map directly. /obj/effect/mapping_helpers/component_injector diff --git a/code/modules/mapping/ruins.dm b/code/modules/mapping/ruins.dm index 76c3a4670cc..09f77985a65 100644 --- a/code/modules/mapping/ruins.dm +++ b/code/modules/mapping/ruins.dm @@ -12,7 +12,7 @@ for(var/turf/check in get_affected_turfs(central_turf,1)) var/area/new_area = get_area(check) valid = FALSE // set to false before we check - if(check.flags_1 & NO_RUINS_1) + if(check.turf_flags & NO_RUINS) break for(var/type in allowed_areas) if(istype(new_area, type)) // it's at least one of our types so it's whitelisted @@ -39,7 +39,7 @@ loaded++ for(var/turf/T in get_affected_turfs(central_turf, 1)) - T.flags_1 |= NO_RUINS_1 + T.turf_flags |= NO_RUINS new /obj/effect/landmark/ruin(central_turf, src) return central_turf @@ -52,7 +52,7 @@ load(placement) loaded++ for(var/turf/T in get_affected_turfs(placement)) - T.flags_1 |= NO_RUINS_1 + T.turf_flags |= NO_RUINS var/turf/center = locate(placement.x + round(width/2),placement.y + round(height/2),placement.z) new /obj/effect/landmark/ruin(center, src) return center diff --git a/code/modules/mapping/space_management/space_reservation.dm b/code/modules/mapping/space_management/space_reservation.dm index 265d2c996d0..e05ea740037 100644 --- a/code/modules/mapping/space_management/space_reservation.dm +++ b/code/modules/mapping/space_management/space_reservation.dm @@ -31,12 +31,12 @@ for(var/i in avail) CHECK_TICK BL = i - if(!(BL.flags_1 & UNUSED_RESERVATION_TURF_1)) + if(!(BL.flags_1 & UNUSED_RESERVATION_TURF)) continue if(BL.x + width > world.maxx || BL.y + height > world.maxy) continue TR = locate(BL.x + width - 1, BL.y + height - 1, BL.z) - if(!(TR.flags_1 & UNUSED_RESERVATION_TURF_1)) + if(!(TR.flags_1 & UNUSED_RESERVATION_TURF)) continue final = block(BL, TR) if(!final) @@ -44,7 +44,7 @@ passing = TRUE for(var/I in final) var/turf/checking = I - if(!(checking.flags_1 & UNUSED_RESERVATION_TURF_1)) + if(!(checking.flags_1 & UNUSED_RESERVATION_TURF)) passing = FALSE break if(!passing) @@ -57,7 +57,7 @@ for(var/i in final) var/turf/T = i reserved_turfs |= T - T.flags_1 &= ~UNUSED_RESERVATION_TURF_1 + T.flags_1 &= ~UNUSED_RESERVATION_TURF SSmapping.unused_turfs["[T.z]"] -= T SSmapping.used_turfs[T] = src T.ChangeTurf(turf_type, turf_type) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 711d7095d4b..67e062c05be 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -281,7 +281,7 @@ */ /mob/proc/dropItemToGround(obj/item/I, force = FALSE, silent = FALSE, invdrop = TRUE) . = doUnEquip(I, force, drop_location(), FALSE, invdrop = invdrop, silent = silent) - if(. && I) //ensure the item exists and that it was dropped properly. + if(. && I && !(I.item_flags & NO_PIXEL_RANDOM_DROP)) //ensure the item exists and that it was dropped properly. I.pixel_x = I.base_pixel_x + rand(-6, 6) I.pixel_y = I.base_pixel_y + rand(-6, 6) diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index a4cb80e1061..3858e5d11b4 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -86,7 +86,7 @@ name = "" icon = 'icons/misc/pic_in_pic.dmi' icon_state = "room_background" - flags_1 = NOJAUNT_1 + flags_1 = NOJAUNT /area/ai_multicam_room name = "ai_multicam_room" diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 5cf0a973abf..de8b290c8e4 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -254,7 +254,7 @@ R.reveal(20) R.stun(20) return - if(stepTurf.flags_1 & NOJAUNT_1) + if(stepTurf.turf_flags & NOJAUNT) to_chat(L, "Some strange aura is blocking the way.") return if (locate(/obj/effect/blessing, stepTurf)) diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 45f5e232f0e..c87764de38d 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -250,7 +250,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) icon_state = "bluespace" base_icon_state = "bluespace" baseturfs = /turf/open/space/bluespace - flags_1 = NOJAUNT_1 + flags_1 = NOJAUNT explosion_block = INFINITY var/obj/item/hilbertshotel/parentSphere diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index f8bded668a0..046736a469a 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -231,7 +231,7 @@ if(mapload) for(var/turf/T in return_turfs()) - T.flags_1 |= NO_RUINS_1 + T.turf_flags |= NO_RUINS #ifdef DOCKING_PORT_HIGHLIGHT highlight("#f00")