From 371f1ba4f0f9638929387be299a5c6bd7cfab02a Mon Sep 17 00:00:00 2001 From: Ian Turk Date: Tue, 15 Aug 2017 16:01:35 -0600 Subject: [PATCH 1/2] Replace all secondary flags with bitflags stored in the flags_2 var --- code/__DEFINES/flags.dm | 22 ++++++++-------- code/__HELPERS/flags.dm | 4 --- code/__HELPERS/icons.dm | 8 +++--- code/game/atoms.dm | 4 +-- code/game/atoms_movable.dm | 18 ++++++------- .../miniantags/abduction/abduction_gear.dm | 2 +- code/game/gamemodes/wizard/spellbook.dm | 2 +- code/game/machinery/autolathe.dm | 2 +- .../objects/items/devices/radio/headset.dm | 25 ++++--------------- .../game/objects/items/devices/radio/radio.dm | 2 +- .../objects/items/weapons/grenades/plastic.dm | 5 +--- .../objects/items/weapons/holy_weapons.dm | 2 +- code/game/objects/objs.dm | 2 +- code/game/turfs/open.dm | 4 +-- code/game/turfs/turf.dm | 6 ++--- code/modules/awaymissions/capture_the_flag.dm | 2 +- code/modules/cargo/exports.dm | 2 +- code/modules/clothing/ears/ears.dm | 6 +---- code/modules/clothing/head/helmet.dm | 6 ++--- code/modules/crafting/craft.dm | 4 +-- code/modules/events/sentience.dm | 2 +- code/modules/holodeck/area_copy.dm | 2 +- .../mob/living/carbon/carbon_defense.dm | 6 ++--- .../mob/living/carbon/human/human_defense.dm | 2 +- .../mob/living/carbon/human/species.dm | 2 +- code/modules/mob/living/living_defense.dm | 2 +- .../mob/living/silicon/pai/software.dm | 6 ++--- .../hostile/megafauna/colossus.dm | 2 +- .../computers/item/laptop.dm | 6 ++--- code/modules/power/tesla/energy_ball.dm | 2 +- .../guns/ballistic/laser_gatling.dm | 5 ++-- code/modules/projectiles/projectile/magic.dm | 2 +- code/modules/spells/spell_types/lichdom.dm | 2 +- code/modules/surgery/organs/ears.dm | 2 +- tgstation.dme | 1 - 35 files changed, 72 insertions(+), 100 deletions(-) delete mode 100644 code/__HELPERS/flags.dm diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 2b046c2b499..ea34bb4c718 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -30,28 +30,28 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define DROPDEL 16384 // When dropped, it calls qdel on itself #define PREVENT_CLICK_UNDER 32768 //Prevent clicking things below it on the same turf eg. doors/ fulltile windows -/* Secondary atom flags, access using the SECONDARY_FLAG macros */ +/* Secondary atom flags, for the flags_2 var, denoted with a _2 */ -#define SLOWS_WHILE_IN_HAND "slows_while_in_hand" -#define NO_EMP_WIRES "no_emp_wires" -#define HOLOGRAM "hologram" -#define FROZEN "frozen" -#define STATIONLOVING "stationloving" -#define INFORM_ADMINS_ON_RELOCATE "inform_admins_on_relocate" -#define BANG_PROTECT "bang_protect" +#define SLOWS_WHILE_IN_HAND_2 1 +#define NO_EMP_WIRES_2 2 +#define HOLOGRAM_2 4 +#define FROZEN_2 8 +#define STATIONLOVING_2 16 +#define INFORM_ADMINS_ON_RELOCATE_2 32 +#define BANG_PROTECT_2 64 // An item worn in the ear slot with HEALS_EARS will heal your ears each // Life() tick, even if normally your ears would be too damaged to heal. -#define HEALS_EARS "heals_ears" +#define HEALS_EARS_2 128 // A mob with OMNITONGUE has no restriction in the ability to speak // languages that they know. So even if they wouldn't normally be able to // through mob or tongue restrictions, this flag allows them to ignore // those restrictions. -#define OMNITONGUE "omnitongue" +#define OMNITONGUE_2 256 // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity -#define TESLA_IGNORE "tesla_ignore" +#define TESLA_IGNORE_2 512 //turf-only flags #define NOJAUNT 1 diff --git a/code/__HELPERS/flags.dm b/code/__HELPERS/flags.dm deleted file mode 100644 index 5a6c1f3ab43..00000000000 --- a/code/__HELPERS/flags.dm +++ /dev/null @@ -1,4 +0,0 @@ -#define HAS_SECONDARY_FLAG(atom, sflag) (atom.secondary_flags ? atom.secondary_flags[sflag] : FALSE) -#define SET_SECONDARY_FLAG(atom, sflag) if(!atom.secondary_flags) { atom.secondary_flags = list(); } atom.secondary_flags[sflag] = TRUE; -#define CLEAR_SECONDARY_FLAG(atom, sflag) if(atom.secondary_flags) atom.secondary_flags[sflag] = null -#define TOGGLE_SECONDARY_FLAG(atom, sflag) if(HAS_SECONDARY_FLAG(atom, sflag)) { CLEAR_SECONDARY_FLAG(atom, sflag); } else {SET_SECONDARY_FLAG(atom, sflag) ; } diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index b245b1f1462..9b16644b4ca 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -978,19 +978,19 @@ GLOBAL_LIST_EMPTY(friendly_animal_types) // Used to make the frozen item visuals for Freon. if(resistance_flags & FREEZE_PROOF) return - if(!HAS_SECONDARY_FLAG(src, FROZEN)) + if(!(flags_2 & FROZEN_2)) name = "frozen [name]" add_atom_colour(list(FROZEN_RED_COLOR, FROZEN_GREEN_COLOR, FROZEN_BLUE_COLOR, rgb(0,0,0)), TEMPORARY_COLOUR_PRIORITY) alpha -= 25 - SET_SECONDARY_FLAG(src, FROZEN) + flags_2 |= FROZEN_2 //Assumes already frozed /obj/proc/make_unfrozen() - if(HAS_SECONDARY_FLAG(src, FROZEN)) + if(flags_2 & FROZEN_2) name = replacetext(name, "frozen ", "") remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, list(FROZEN_RED_COLOR, FROZEN_GREEN_COLOR, FROZEN_BLUE_COLOR, rgb(0,0,0))) alpha += 25 - CLEAR_SECONDARY_FLAG(src, FROZEN) + flags_2 &= ~FROZEN_2 #undef FROZEN_RED_COLOR #undef FROZEN_GREEN_COLOR diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c3c4944cdf8..4263ddc64c5 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -4,7 +4,7 @@ var/level = 2 var/flags = 0 - var/list/secondary_flags + var/flags_2 = 0 var/list/fingerprints var/list/fingerprintshidden @@ -221,7 +221,7 @@ return /atom/proc/emp_act(severity) - if(istype(wires) && !HAS_SECONDARY_FLAG(src, NO_EMP_WIRES)) + if(istype(wires) && !(flags_2 & NO_EMP_WIRES_2)) wires.emp_pulse() /atom/proc/bullet_act(obj/item/projectile/P, def_zone) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 2686b08f54c..e89d71b6eed 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -176,8 +176,8 @@ to_chat(cleaned_human, "[src] cleans your face!") /atom/movable/Destroy(force) - var/inform_admins = HAS_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE) - var/stationloving = HAS_SECONDARY_FLAG(src, STATIONLOVING) + var/inform_admins = (flags_2 & INFORM_ADMINS_ON_RELOCATE_2) + var/stationloving = (flags_2 & STATIONLOVING_2) if(inform_admins && force) var/turf/T = get_turf(src) @@ -221,7 +221,7 @@ //This is tg's equivalent to the byond bump, it used to be called bump with a second arg //to differentiate it, naturally everyone forgot about this immediately and so some things //would bump twice, so now it's called Collide -/atom/movable/proc/Collide(atom/A) +/atom/movable/proc/Collide(atom/A) if((A)) if(throwing) throwing.hit_atom(A) @@ -550,21 +550,21 @@ */ /atom/movable/proc/set_stationloving(state, inform_admins=FALSE) - var/currently = HAS_SECONDARY_FLAG(src, STATIONLOVING) + var/currently = (flags_2 & STATIONLOVING_2) if(inform_admins) - SET_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE) + flags_2 |= INFORM_ADMINS_ON_RELOCATE_2 else - CLEAR_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE) + flags_2 &= ~INFORM_ADMINS_ON_RELOCATE_2 if(state == currently) return else if(!state) STOP_PROCESSING(SSinbounds, src) - CLEAR_SECONDARY_FLAG(src, STATIONLOVING) + flags_2 &= ~STATIONLOVING_2 else START_PROCESSING(SSinbounds, src) - SET_SECONDARY_FLAG(src, STATIONLOVING) + flags_2 |= STATIONLOVING_2 /atom/movable/proc/relocate() var/targetturf = find_safe_turf(ZLEVEL_STATION) @@ -593,7 +593,7 @@ to_chat(get(src, /mob), "You can't help but feel that you just lost something back there...") var/turf/targetturf = relocate() log_game("[src] has been moved out of bounds in [COORD(currentturf)]. Moving it to [COORD(targetturf)].") - if(HAS_SECONDARY_FLAG(src, INFORM_ADMINS_ON_RELOCATE)) + if(flags_2 & INFORM_ADMINS_ON_RELOCATE_2) message_admins("[src] has been moved out of bounds in [ADMIN_COORDJMP(currentturf)]. Moving it to [ADMIN_COORDJMP(targetturf)].") /atom/movable/proc/in_bounds() diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 9413de030cd..bab7e1cb7fb 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -529,10 +529,10 @@ Congratulations! You are now trained for invasive xenobiology research!"} icon_state = "abductor_headset" item_state = "abductor_headset" keyslot2 = new /obj/item/device/encryptionkey/heads/captain + flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/abductor/Initialize(mapload) ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) make_syndie() /obj/item/device/radio/headset/abductor/attackby(obj/item/weapon/W, mob/user, params) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 69c26cdb43e..ea6bb3cf206 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -213,7 +213,7 @@ /datum/spellbook_entry/lightningbolt/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) //return 1 on success . = ..() - SET_SECONDARY_FLAG(user, TESLA_IGNORE) + user.flags_2 |= TESLA_IGNORE_2 /datum/spellbook_entry/infinite_guns name = "Lesser Summon Guns" diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index c6606c6ced0..53d8acd0a2d 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -123,7 +123,7 @@ busy = FALSE return 1 - if(HAS_SECONDARY_FLAG(O, HOLOGRAM)) + if(O.flags_2 & HOLOGRAM_2) return 1 var/material_amount = materials.get_item_material_amount(O) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 79c0cb4b874..d2674be82cc 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -45,10 +45,7 @@ origin_tech = "syndicate=3" icon_state = "syndie_headset" item_state = "syndie_headset" - -/obj/item/device/radio/headset/syndicate/alt/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) + flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/syndicate/alt/leader name = "team leader headset" @@ -77,10 +74,7 @@ desc = "This is used by your elite security force. Protects ears from flashbangs. \nTo access the security channel, use :s." icon_state = "sec_headset_alt" item_state = "sec_headset_alt" - -/obj/item/device/radio/headset/headset_sec/alt/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) + flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/headset_eng name = "engineering radio headset" @@ -132,10 +126,7 @@ desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science." icon_state = "com_headset_alt" item_state = "com_headset_alt" - -/obj/item/device/radio/headset/heads/captain/alt/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) + flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/heads/rd name = "\proper the research director's headset" @@ -154,10 +145,7 @@ desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs. \nTo access the security channel, use :s. For command, use :c." icon_state = "com_headset_alt" item_state = "com_headset_alt" - -/obj/item/device/radio/headset/heads/hos/alt/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) + flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/heads/ce name = "\proper the chief engineer's headset" @@ -211,10 +199,7 @@ icon_state = "cent_headset_alt" item_state = "cent_headset_alt" keyslot = null - -/obj/item/device/radio/headset/headset_cent/alt/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) + flags_2 = BANG_PROTECT_2 /obj/item/device/radio/headset/ai name = "\proper Integrated Subspace Transceiver " diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 251be1c3689..d77b21f3471 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -547,10 +547,10 @@ name = "cyborg radio" subspace_switchable = 1 dog_fashion = null + flags_2 = NO_EMP_WIRES_2 /obj/item/device/radio/borg/Initialize(mapload) ..() - SET_SECONDARY_FLAG(src, NO_EMP_WIRES) /obj/item/device/radio/borg/syndicate syndie = 1 diff --git a/code/game/objects/items/weapons/grenades/plastic.dm b/code/game/objects/items/weapons/grenades/plastic.dm index a043f3890c1..26161fbda81 100644 --- a/code/game/objects/items/weapons/grenades/plastic.dm +++ b/code/game/objects/items/weapons/grenades/plastic.dm @@ -4,6 +4,7 @@ icon_state = "plastic-explosive0" item_state = "plastic-explosive" flags = NOBLUDGEON + flags_2 = NO_EMP_WIRES_2 det_time = 10 display_timer = 0 var/atom/target = null @@ -18,10 +19,6 @@ plastic_overlay = mutable_appearance(icon, "[item_state]2") ..() -/obj/item/weapon/grenade/plastic/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, NO_EMP_WIRES) - /obj/item/weapon/grenade/plastic/Destroy() qdel(nadeassembly) nadeassembly = null diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 8e1cf3301e4..6ef928a9dbd 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -372,10 +372,10 @@ slot_flags = null hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + flags_2 = SLOWS_WHILE_IN_HAND_2 /obj/item/weapon/nullrod/tribal_knife/Initialize(mapload) ..() - SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND) /obj/item/weapon/nullrod/tribal_knife/New() ..() diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 8fe5dbdd369..e9cf30f5be2 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -58,7 +58,7 @@ /obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) ..() - if(HAS_SECONDARY_FLAG(src, FROZEN)) + if(flags_2 & FROZEN_2) visible_message("[src] shatters into a million pieces!") qdel(src) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 59495161505..e3c4b57ea71 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -125,7 +125,7 @@ for(var/obj/I in contents) if(I.resistance_flags & FREEZE_PROOF) return - if(!HAS_SECONDARY_FLAG(I, FROZEN)) //let it go + if(!(I.flags_2 & FROZEN_2)) //let it go I.make_frozen_visual() for(var/mob/living/L in contents) if(L.bodytemperature <= 50) @@ -267,7 +267,7 @@ wet_time = MAXIMUM_WET_TIME if(wet == TURF_WET_ICE && air.temperature > T0C) for(var/obj/O in contents) - if(HAS_SECONDARY_FLAG(O, FROZEN)) + if(O.flags_2 & FROZEN_2) O.make_unfrozen() MakeDry(TURF_WET_ICE) MakeSlippery(TURF_WET_WATER) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 3692b6cef2e..fd763af9370 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -174,7 +174,7 @@ //melting if(isobj(AM) && air && air.temperature > T0C) var/obj/O = AM - if(HAS_SECONDARY_FLAG(O, FROZEN)) + if(O.flags_2 & FROZEN_2) O.make_unfrozen() /turf/proc/is_plasteel_floor() @@ -213,7 +213,7 @@ var/old_affecting_lights = affecting_lights var/old_lighting_object = lighting_object var/old_corners = corners - + var/old_exl = explosion_level var/old_exi = explosion_id var/old_bp = blueprint_data @@ -237,7 +237,7 @@ W.AfterChange(ignore_air) W.blueprint_data = old_bp - + if(SSlighting.initialized) recalc_atom_opacity() lighting_object = old_lighting_object diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index 6d634ab3a4f..9aac5e8793b 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -23,6 +23,7 @@ armour_penetration = 1000 resistance_flags = INDESTRUCTIBLE anchored = TRUE + flags_2 = SLOWS_WHILE_IN_HAND_2 var/team = WHITE_TEAM var/reset_cooldown = 0 var/obj/effect/ctf/flag_reset/reset @@ -34,7 +35,6 @@ /obj/item/weapon/twohanded/ctf/Initialize() . = ..() - SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND) if(!reset) reset = new reset_path(get_turf(src)) diff --git a/code/modules/cargo/exports.dm b/code/modules/cargo/exports.dm index 8a36f178a4c..27552e1582c 100644 --- a/code/modules/cargo/exports.dm +++ b/code/modules/cargo/exports.dm @@ -115,7 +115,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they return FALSE if(!get_cost(O, contr, emag)) return FALSE - if(HAS_SECONDARY_FLAG(O, HOLOGRAM)) + if(O.flags_2 & HOLOGRAM_2) return FALSE return TRUE diff --git a/code/modules/clothing/ears/ears.dm b/code/modules/clothing/ears/ears.dm index b36ad74f895..d612f0fc7c3 100644 --- a/code/modules/clothing/ears/ears.dm +++ b/code/modules/clothing/ears/ears.dm @@ -15,11 +15,7 @@ strip_delay = 15 equip_delay_other = 25 resistance_flags = FLAMMABLE - -/obj/item/clothing/ears/earmuffs/Initialize(mapload) - . = ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) - SET_SECONDARY_FLAG(src, HEALS_EARS) + flags_2 = BANG_PROTECT_2|HEALS_EARS_2 /obj/item/clothing/ears/headphones name = "headphones" diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 24d8049ac73..38dde244ce6 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -13,13 +13,13 @@ resistance_flags = 0 flags_cover = HEADCOVERSEYES flags_inv = HIDEHAIR + flags_2 = BANG_PROTECT_2 dog_fashion = /datum/dog_fashion/head/helmet /obj/item/clothing/head/helmet/Initialize() ..() - SET_SECONDARY_FLAG(src, BANG_PROTECT) /obj/item/clothing/head/helmet/sec can_flashlight = 1 @@ -191,11 +191,11 @@ flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH strip_delay = 80 dog_fashion = null + // old knight helmets do not offer protection against loud noises + flags_2 = NONE /obj/item/clothing/head/helmet/knight/Initialize(mapload) ..() - // old knight helmets do not offer protection against loud noises - CLEAR_SECONDARY_FLAG(src, BANG_PROTECT) /obj/item/clothing/head/helmet/knight/blue icon_state = "knight_blue" diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 87b6cb561ad..d3c6b402515 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -81,14 +81,14 @@ if(T.Adjacent(user)) for(var/B in T) var/atom/movable/AM = B - if(HAS_SECONDARY_FLAG(AM, HOLOGRAM)) + if(AM.flags_2 & HOLOGRAM_2) continue . += AM /datum/personal_crafting/proc/get_surroundings(mob/user) . = list() for(var/obj/item/I in get_environment(user)) - if(HAS_SECONDARY_FLAG(I, HOLOGRAM)) + if(I.flags_2 & HOLOGRAM_2) continue if(istype(I, /obj/item/stack)) var/obj/item/stack/S = I diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm index 64175e11e99..a425c540b38 100644 --- a/code/modules/events/sentience.dm +++ b/code/modules/events/sentience.dm @@ -51,7 +51,7 @@ SA.key = SG.key SA.grant_language(/datum/language/common) - SET_SECONDARY_FLAG(SA, OMNITONGUE) + SA.flags_2 |= OMNITONGUE_2 SA.sentience_act() diff --git a/code/modules/holodeck/area_copy.dm b/code/modules/holodeck/area_copy.dm index 70dc073c3bd..272fb1c5362 100644 --- a/code/modules/holodeck/area_copy.dm +++ b/code/modules/holodeck/area_copy.dm @@ -36,7 +36,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs", M.power_change() if(holoitem) - SET_SECONDARY_FLAG(O, HOLOGRAM) + O.flags_2 |= HOLOGRAM_2 return O diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index f6c91075953..c7eb9bcc5c3 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -24,9 +24,9 @@ /mob/living/carbon/get_ear_protection() var/number = ..() - if(ears && HAS_SECONDARY_FLAG(ears, BANG_PROTECT)) + if(ears && (ears.flags_2 & BANG_PROTECT_2)) number += 1 - if(head && HAS_SECONDARY_FLAG(head, BANG_PROTECT)) + if(head && (head.flags_2 & BANG_PROTECT_2)) number += 1 var/obj/item/organ/ears/E = getorganslot("ears") if(!E) @@ -210,7 +210,7 @@ ..() /mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE) - if(tesla_shock && HAS_SECONDARY_FLAG(src, TESLA_IGNORE)) + if(tesla_shock && (flags_2 & TESLA_IGNORE_2)) return FALSE shock_damage *= siemens_coeff if(dna && dna.species) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 07ffd35979f..dd88df651c1 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -442,7 +442,7 @@ else if(S.siemens_coefficient == (-1)) total_coeff -= 1 siemens_coeff = total_coeff - if(HAS_SECONDARY_FLAG(src, TESLA_IGNORE)) + if(flags_2 & TESLA_IGNORE_2) siemens_coeff = 0 else if(!safety) var/gloves_siemens_coeff = 1 diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 867ac0c48b1..8fc7c4655b9 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1021,7 +1021,7 @@ if(H.back) . += H.back.slowdown for(var/obj/item/I in H.held_items) - if(HAS_SECONDARY_FLAG(I, SLOWS_WHILE_IN_HAND)) + if(I.flags_2 & SLOWS_WHILE_IN_HAND_2) . += I.slowdown var/health_deficiency = (100 - H.health + H.staminaloss) var/hungry = (500 - H.nutrition) / 5 // So overeat would be 100 and default level would be 80 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 578eaec93ea..2cf78032941 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -277,7 +277,7 @@ return 1 /mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE) - if(tesla_shock && HAS_SECONDARY_FLAG(src, TESLA_IGNORE)) + if(tesla_shock && (flags_2 & TESLA_IGNORE_2)) return FALSE if(shock_damage > 0) if(!illusion) diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index f0c50e17f1e..eb6652157f2 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -253,7 +253,7 @@ med.remove_hud_from(src) if("translator") if(href_list["toggle"]) - if(!HAS_SECONDARY_FLAG(src, OMNITONGUE)) + if(!(flags_2 & OMNITONGUE_2)) grant_all_languages(TRUE) // this is PERMAMENT. if("doorjack") @@ -313,7 +313,7 @@ if(s == "medical HUD") dat += "Medical Analysis Suite[(src.medHUD) ? " On" : " Off"]
" if(s == "universal translator") - var/translator_on = HAS_SECONDARY_FLAG(src, OMNITONGUE) + var/translator_on = (flags_2 & OMNITONGUE_2) dat += "Universal Translator[translator_on ? " On" : " Off"]
" if(s == "projection array") dat += "Projection Array
" @@ -465,7 +465,7 @@ // Universal Translator /mob/living/silicon/pai/proc/softwareTranslator() - var/translator_on = HAS_SECONDARY_FLAG(src, OMNITONGUE) + var/translator_on = (flags_2 & OMNITONGUE_2) . = {"

Universal Translator


When enabled, this device will permamently be able to speak and understand all known forms of communication.

The device is currently [translator_on ? "en" : "dis" ]abled.
[translator_on ? "" : "Activate Translation Module
"]"} diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 356c3197b37..2e4e76359a2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -667,7 +667,7 @@ Difficulty: Very Hard for(var/i in T) if(isitem(i) && !is_type_in_typecache(i, banned_items_typecache)) var/obj/item/W = i - if(!W.admin_spawned && !HAS_SECONDARY_FLAG(W, HOLOGRAM) && !(W.flags & ABSTRACT)) + if(!W.admin_spawned && !(W.flags_2 & HOLOGRAM_2) && !(W.flags & ABSTRACT)) L += W if(L.len) var/obj/item/CHOSEN = pick(L) diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm index af6d089f358..b6cf404248c 100644 --- a/code/modules/modular_computers/computers/item/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop.dm @@ -12,6 +12,9 @@ max_hardware_size = 2 w_class = WEIGHT_CLASS_NORMAL + // No running around with open laptops in hands. + flags_2 = SLOWS_WHILE_IN_HAND_2 + screen_on = 0 // Starts closed var/start_open = TRUE // unless this var is set to 1 var/icon_state_closed = "laptop-closed" @@ -21,9 +24,6 @@ /obj/item/device/modular_computer/laptop/Initialize() . = ..() - // No running around with open laptops in hands. - SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND) - if(start_open && !screen_on) toggle_open() diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 9fc63d9421d..6d90a88a335 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -214,7 +214,7 @@ else if(isliving(A)) var/dist = get_dist(source, A) var/mob/living/L = A - if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !HAS_SECONDARY_FLAG(L, TESLA_IGNORE)) + if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD && !(L.flags_2 & TESLA_IGNORE_2)) closest_mob = L closest_atom = A closest_dist = dist diff --git a/code/modules/projectiles/guns/ballistic/laser_gatling.dm b/code/modules/projectiles/guns/ballistic/laser_gatling.dm index 1eac0eb3219..1f6d7cf60e1 100644 --- a/code/modules/projectiles/guns/ballistic/laser_gatling.dm +++ b/code/modules/projectiles/guns/ballistic/laser_gatling.dm @@ -108,16 +108,15 @@ fire_sound = 'sound/weapons/laser.ogg' mag_type = /obj/item/ammo_box/magazine/internal/minigun casing_ejector = 0 + flags_2 = SLOWS_WHILE_IN_HAND_2 var/obj/item/weapon/minigunpack/ammo_pack /obj/item/weapon/gun/ballistic/minigun/Initialize() - SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND) - if(istype(loc, /obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one. ammo_pack = loc else return INITIALIZE_HINT_QDEL //No pack, no gun - + return ..() /obj/item/weapon/gun/ballistic/minigun/attack_self(mob/living/user) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 7a1c12639f6..ac238ab0424 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -259,7 +259,7 @@ if(!new_mob) return new_mob.grant_language(/datum/language/common) - SET_SECONDARY_FLAG(new_mob, OMNITONGUE) + new_mob.flags_2 |= OMNITONGUE_2 new_mob.logging = M.logging // Some forms can still wear some items diff --git a/code/modules/spells/spell_types/lichdom.dm b/code/modules/spells/spell_types/lichdom.dm index cc728f942e6..0c9047f508c 100644 --- a/code/modules/spells/spell_types/lichdom.dm +++ b/code/modules/spells/spell_types/lichdom.dm @@ -34,7 +34,7 @@ for(var/obj/item in hand_items) // I ensouled the nuke disk once. But it's probably a really // mean tactic, so probably should discourage it. - if(ABSTRACT in item.flags || NODROP in item.flags || HAS_SECONDARY_FLAG(item, STATIONLOVING)) + if((item.flags & ABSTRACT) || (item.flags & NODROP) || (item & STATIONLOVING_2)) continue marked_item = item to_chat(M, "You begin to focus your very being into [item]...") diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index 75298342f4d..2ee223b4030 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -25,7 +25,7 @@ if(C.disabilities & DEAF) deaf = max(deaf, 1) else - if(C.ears && HAS_SECONDARY_FLAG(C.ears, HEALS_EARS)) + if(C.ears && (C.ears.flags_2 & HEALS_EARS_2)) deaf = max(deaf - 1, 1) ear_damage = max(ear_damage - 0.10, 0) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs. diff --git a/tgstation.dme b/tgstation.dme index 8fd305f2cd3..64d20e9eaa3 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -81,7 +81,6 @@ #include "code\__HELPERS\AStar.dm" #include "code\__HELPERS\cmp.dm" #include "code\__HELPERS\files.dm" -#include "code\__HELPERS\flags.dm" #include "code\__HELPERS\game.dm" #include "code\__HELPERS\global_lists.dm" #include "code\__HELPERS\icon_smoothing.dm" From 7460f2c5b899b4c0aa7af6bded5c0dd0d83e3f91 Mon Sep 17 00:00:00 2001 From: Ian Turk Date: Wed, 16 Aug 2017 13:01:15 -0600 Subject: [PATCH 2/2] Replaced flags with flags_1 --- code/__DEFINES/flags.dm | 50 +-- code/__DEFINES/reagents.dm | 8 +- code/__HELPERS/game.dm | 2 +- code/_onclick/adjacent.dm | 4 +- code/_onclick/click.dm | 6 +- code/_onclick/hud/screen_objects.dm | 2 +- code/_onclick/item_attack.dm | 4 +- code/_onclick/telekinesis.dm | 2 +- .../subsystem/processing/overlays.dm | 6 +- code/controllers/subsystem/shuttle.dm | 10 +- code/controllers/subsystem/throwing.dm | 2 +- code/datums/diseases/magnitis.dm | 6 +- code/datums/riding.dm | 2 +- code/game/area/Space_Station_13_areas.dm | 416 +++++++++--------- code/game/area/areas.dm | 2 +- code/game/area/areas/centcom.dm | 12 +- code/game/area/areas/holodeck.dm | 2 +- code/game/area/areas/mining.dm | 6 +- code/game/atoms.dm | 12 +- code/game/atoms_movable.dm | 4 +- .../gamemodes/changeling/powers/mutations.dm | 16 +- .../gamemodes/changeling/powers/transform.dm | 16 +- .../clock_helpers/fabrication_helpers.dm | 2 +- .../clock_helpers/slab_abilities.dm | 4 +- .../clock_cult/clock_items/clockwork_armor.dm | 16 +- .../clock_items/replica_fabricator.dm | 4 +- .../ark_of_the_clockwork_justicar.dm | 2 +- .../clock_structures/geis_binding.dm | 2 +- .../clock_cult/clock_structures/wall_gear.dm | 2 +- code/game/gamemodes/cult/cult_items.dm | 8 +- code/game/gamemodes/cult/talisman.dm | 2 +- .../gamemodes/devil/true_devil/_true_devil.dm | 2 +- code/game/gamemodes/gang/dominator.dm | 4 +- code/game/gamemodes/gang/gang_items.dm | 2 +- code/game/gamemodes/gang/recaller.dm | 2 +- .../miniantags/abduction/abduction_gear.dm | 6 +- .../miniantags/abduction/abduction_outfits.dm | 2 +- .../miniantags/abduction/machinery/console.dm | 2 +- .../miniantags/revenant/revenant_abilities.dm | 4 +- code/game/gamemodes/nuclear/pinpointer.dm | 4 +- code/game/gamemodes/wizard/artefact.dm | 2 +- code/game/gamemodes/wizard/spellbook.dm | 2 +- code/game/machinery/PDApainter.dm | 2 +- code/game/machinery/_machinery.dm | 14 +- code/game/machinery/aug_manipulator.dm | 2 +- code/game/machinery/buttons.dm | 2 +- code/game/machinery/camera/camera.dm | 4 +- code/game/machinery/camera/camera_assembly.dm | 2 +- code/game/machinery/computer/_computer.dm | 6 +- .../game/machinery/computer/buildandrepair.dm | 2 +- code/game/machinery/constructable_frame.dm | 4 +- code/game/machinery/deployable.dm | 2 +- code/game/machinery/doors/airlock.dm | 4 +- code/game/machinery/doors/airlock_types.dm | 2 +- code/game/machinery/doors/door.dm | 4 +- code/game/machinery/doors/firedoor.dm | 4 +- code/game/machinery/doors/windowdoor.dm | 6 +- code/game/machinery/droneDispenser.dm | 4 +- code/game/machinery/firealarm.dm | 4 +- code/game/machinery/flasher.dm | 4 +- code/game/machinery/hologram.dm | 2 +- code/game/machinery/iv_drip.dm | 2 +- code/game/machinery/launch_pad.dm | 2 +- code/game/machinery/limbgrower.dm | 2 +- code/game/machinery/magnet.dm | 2 +- code/game/machinery/newscaster.dm | 4 +- .../machinery/porta_turret/portable_turret.dm | 2 +- code/game/machinery/recycler.dm | 2 +- code/game/machinery/shieldgen.dm | 4 +- code/game/machinery/suit_storage_unit.dm | 2 +- code/game/machinery/vending.dm | 4 +- code/game/mecha/mecha.dm | 2 +- code/game/mecha/mecha_parts.dm | 4 +- code/game/objects/effects/mines.dm | 2 +- code/game/objects/items.dm | 4 +- code/game/objects/items/AI_modules.dm | 2 +- code/game/objects/items/RCD.dm | 2 +- code/game/objects/items/RPD.dm | 2 +- code/game/objects/items/RSF.dm | 2 +- code/game/objects/items/airlock_painter.dm | 2 +- code/game/objects/items/apc_frame.dm | 4 +- code/game/objects/items/cardboard_cutouts.dm | 2 +- code/game/objects/items/cards_ids.dm | 2 +- code/game/objects/items/chrono_eraser.dm | 2 +- code/game/objects/items/cigs_lighters.dm | 6 +- code/game/objects/items/clown_items.dm | 2 +- code/game/objects/items/cosmetics.dm | 2 +- code/game/objects/items/devices/PDA/PDA.dm | 2 +- code/game/objects/items/devices/aicard.dm | 2 +- code/game/objects/items/devices/camera_bug.dm | 2 +- .../objects/items/devices/chameleonproj.dm | 2 +- code/game/objects/items/devices/doorCharge.dm | 2 +- code/game/objects/items/devices/flashlight.dm | 8 +- .../items/devices/forcefieldprojector.dm | 2 +- code/game/objects/items/devices/gps.dm | 4 +- .../objects/items/devices/laserpointer.dm | 2 +- .../objects/items/devices/lightreplacer.dm | 2 +- .../objects/items/devices/pipe_painter.dm | 2 +- code/game/objects/items/devices/powersink.dm | 2 +- .../items/devices/radio/electropack.dm | 6 +- .../game/objects/items/devices/radio/radio.dm | 2 +- code/game/objects/items/devices/scanners.dm | 10 +- .../objects/items/devices/taperecorder.dm | 2 +- .../objects/items/devices/traitordevices.dm | 2 +- code/game/objects/items/eightball.dm | 2 +- code/game/objects/items/extinguisher.dm | 4 +- code/game/objects/items/flamethrower.dm | 2 +- .../game/objects/items/grenades/ghettobomb.dm | 2 +- code/game/objects/items/grenades/grenade.dm | 2 +- code/game/objects/items/grenades/plastic.dm | 4 +- code/game/objects/items/handcuffs.dm | 6 +- code/game/objects/items/his_grace.dm | 8 +- code/game/objects/items/holosign_creator.dm | 2 +- code/game/objects/items/holy_weapons.dm | 6 +- code/game/objects/items/implants/implant.dm | 2 +- .../objects/items/implants/implant_chem.dm | 2 +- code/game/objects/items/kitchen.dm | 6 +- code/game/objects/items/melee/energy.dm | 2 +- code/game/objects/items/melee/misc.dm | 4 +- code/game/objects/items/paiwire.dm | 2 +- code/game/objects/items/powerfist.dm | 2 +- code/game/objects/items/religion.dm | 4 +- code/game/objects/items/robot/robot_items.dm | 2 +- code/game/objects/items/singularityhammer.dm | 4 +- code/game/objects/items/stacks/rods.dm | 2 +- .../objects/items/stacks/sheets/leather.dm | 4 +- .../game/objects/items/stacks/sheets/light.dm | 2 +- .../items/stacks/sheets/sheet_types.dm | 4 +- code/game/objects/items/stacks/telecrystal.dm | 2 +- code/game/objects/items/stacks/tiles/light.dm | 2 +- .../objects/items/stacks/tiles/tile_types.dm | 2 +- code/game/objects/items/stacks/wrap.dm | 4 +- code/game/objects/items/storage/bags.dm | 2 +- code/game/objects/items/storage/briefcase.dm | 4 +- code/game/objects/items/storage/storage.dm | 4 +- code/game/objects/items/storage/toolbox.dm | 2 +- code/game/objects/items/tanks/tank_types.dm | 4 +- code/game/objects/items/tanks/tanks.dm | 4 +- code/game/objects/items/tanks/watertank.dm | 8 +- code/game/objects/items/teleportation.dm | 2 +- code/game/objects/items/tools.dm | 10 +- code/game/objects/items/toys.dm | 8 +- code/game/objects/items/twohanded.dm | 4 +- code/game/objects/items/vending_items.dm | 2 +- code/game/objects/items/weaponry.dm | 16 +- code/game/objects/structures/aliens.dm | 4 +- code/game/objects/structures/barsigns.dm | 2 +- .../structures/beds_chairs/alien_nest.dm | 2 +- .../objects/structures/beds_chairs/bed.dm | 4 +- .../objects/structures/beds_chairs/chair.dm | 8 +- .../structures/crates_lockers/closets.dm | 8 +- .../structures/destructible_structures.dm | 2 +- code/game/objects/structures/displaycase.dm | 4 +- code/game/objects/structures/door_assembly.dm | 2 +- code/game/objects/structures/extinguisher.dm | 4 +- code/game/objects/structures/false_walls.dm | 2 +- code/game/objects/structures/fireaxe.dm | 4 +- code/game/objects/structures/flora.dm | 2 +- code/game/objects/structures/girders.dm | 4 +- code/game/objects/structures/grille.dm | 6 +- code/game/objects/structures/janicart.dm | 2 +- code/game/objects/structures/lattice.dm | 4 +- code/game/objects/structures/manned_turret.dm | 2 +- code/game/objects/structures/mirror.dm | 4 +- code/game/objects/structures/mop_bucket.dm | 2 +- code/game/objects/structures/noticeboard.dm | 2 +- code/game/objects/structures/plasticflaps.dm | 2 +- code/game/objects/structures/statues.dm | 2 +- code/game/objects/structures/tables_racks.dm | 16 +- .../game/objects/structures/tank_dispenser.dm | 2 +- code/game/objects/structures/target_stake.dm | 2 +- .../transit_tubes/transit_tube_pod.dm | 2 +- code/game/objects/structures/watercloset.dm | 4 +- code/game/objects/structures/window.dm | 22 +- code/game/turfs/simulated/dirtystation.dm | 4 +- .../game/turfs/simulated/floor/fancy_floor.dm | 4 +- .../turfs/simulated/floor/plating/asteroid.dm | 2 +- .../simulated/floor/plating/misc_plating.dm | 2 +- .../turfs/simulated/wall/mineral_walls.dm | 2 +- code/game/turfs/space/transit.dm | 2 +- code/game/turfs/turf.dm | 6 +- code/modules/admin/secrets.dm | 2 +- code/modules/admin/verbs/onlyone.dm | 2 +- code/modules/assembly/assembly.dm | 2 +- code/modules/assembly/bomb.dm | 2 +- code/modules/assembly/holder.dm | 2 +- code/modules/assembly/shock_kit.dm | 2 +- code/modules/assembly/voice.dm | 2 +- .../atmospherics/machinery/airalarm.dm | 2 +- .../atmospherics/machinery/atmosmachinery.dm | 2 +- .../machinery/portable/canister.dm | 4 +- code/modules/awaymissions/capture_the_flag.dm | 4 +- code/modules/cargo/export_scanner.dm | 2 +- code/modules/clothing/chameleon.dm | 12 +- code/modules/clothing/clothing.dm | 10 +- code/modules/clothing/glasses/glasses.dm | 4 +- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/clothing/head/hardhat.dm | 6 +- code/modules/clothing/head/helmet.dm | 4 +- code/modules/clothing/head/jobs.dm | 2 +- code/modules/clothing/head/misc.dm | 2 +- code/modules/clothing/masks/breath.dm | 4 +- code/modules/clothing/masks/gasmask.dm | 14 +- code/modules/clothing/masks/hailer.dm | 4 +- code/modules/clothing/shoes/bananashoes.dm | 6 +- code/modules/clothing/shoes/magboots.dm | 6 +- code/modules/clothing/shoes/miscellaneous.dm | 6 +- .../modules/clothing/spacesuits/chronosuit.dm | 14 +- .../modules/clothing/spacesuits/flightsuit.dm | 14 +- code/modules/clothing/spacesuits/hardsuit.dm | 12 +- .../clothing/spacesuits/miscellaneous.dm | 14 +- code/modules/clothing/suits/armor.dm | 6 +- code/modules/clothing/suits/bio.dm | 4 +- code/modules/clothing/suits/cloaks.dm | 2 +- code/modules/clothing/suits/miscellaneous.dm | 8 +- code/modules/clothing/suits/utility.dm | 10 +- code/modules/clothing/under/color.dm | 2 +- code/modules/clothing/under/miscellaneous.dm | 2 +- code/modules/crafting/craft.dm | 2 +- .../detectivework/footprints_and_rag.dm | 4 +- code/modules/detectivework/scanner.dm | 2 +- code/modules/events/wizard/curseditems.dm | 4 +- code/modules/fields/turf_objects.dm | 2 +- code/modules/food_and_drinks/drinks/drinks.dm | 8 +- code/modules/food_and_drinks/food.dm | 2 +- .../modules/food_and_drinks/food/condiment.dm | 2 +- .../food_and_drinks/food/customizables.dm | 2 +- .../kitchen_machinery/deep_fryer.dm | 2 +- .../kitchen_machinery/food_cart.dm | 4 +- .../kitchen_machinery/icecream_vat.dm | 4 +- .../kitchen_machinery/microwave.dm | 8 +- code/modules/games/cards.dm | 2 +- code/modules/holodeck/computer.dm | 8 +- code/modules/holodeck/items.dm | 2 +- code/modules/holodeck/turfs.dm | 2 +- code/modules/hydroponics/beekeeping/beebox.dm | 2 +- .../hydroponics/beekeeping/beekeeper_suit.dm | 4 +- code/modules/hydroponics/grown/towercap.dm | 2 +- code/modules/hydroponics/hydroitemdefines.dm | 10 +- .../modules/mining/equipment/explorer_gear.dm | 2 +- code/modules/mining/equipment/goliath_hide.dm | 2 +- .../mining/equipment/marker_beacons.dm | 2 +- .../mining/equipment/mineral_scanner.dm | 4 +- code/modules/mining/equipment/mining_tools.dm | 8 +- .../mining/equipment/regenerative_core.dm | 2 +- code/modules/mining/equipment/survival_pod.dm | 8 +- .../mining/lavaland/necropolis_chests.dm | 4 +- code/modules/mining/ores_coins.dm | 2 +- .../modules/mob/dead/new_player/new_player.dm | 4 +- code/modules/mob/inventory.dm | 12 +- code/modules/mob/living/bloodcrawl.dm | 4 +- code/modules/mob/living/brain/brain_item.dm | 2 +- .../living/carbon/alien/humanoid/humanoid.dm | 2 +- .../mob/living/carbon/alien/humanoid/queen.dm | 2 +- .../living/carbon/alien/special/facehugger.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 16 +- code/modules/mob/living/carbon/examine.dm | 2 +- .../mob/living/carbon/human/examine.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 42 +- .../mob/living/carbon/human/human_helpers.dm | 4 +- .../mob/living/carbon/human/human_movement.dm | 4 +- code/modules/mob/living/carbon/human/life.dm | 8 +- .../mob/living/carbon/human/species.dm | 8 +- .../carbon/human/species_types/plasmamen.dm | 2 +- code/modules/mob/living/carbon/life.dm | 2 +- .../mob/living/carbon/monkey/combat.dm | 4 +- code/modules/mob/living/carbon/monkey/life.dm | 2 +- code/modules/mob/living/death.dm | 2 +- code/modules/mob/living/living.dm | 4 +- .../mob/living/silicon/robot/inventory.dm | 4 +- .../modules/mob/living/silicon/robot/robot.dm | 4 +- .../mob/living/silicon/robot/robot_modules.dm | 4 +- .../simple_animal/friendly/drone/_drone.dm | 8 +- .../simple_animal/guardian/types/dextrous.dm | 4 +- .../simple_animal/hostile/jungle_mobs.dm | 2 +- .../hostile/megafauna/colossus.dm | 4 +- .../simple_animal/hostile/wumborian_fugu.dm | 2 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/mob_defines.dm | 2 +- code/modules/mob/mob_helpers.dm | 2 +- code/modules/mob/mob_movement.dm | 2 +- code/modules/mob/say_readme.dm | 8 +- .../computers/item/computer_damage.dm | 2 +- .../computers/machinery/modular_computer.dm | 2 +- code/modules/ninja/suit/gloves.dm | 2 +- code/modules/ninja/suit/shoes.dm | 2 +- code/modules/ninja/suit/suit.dm | 16 +- code/modules/paperwork/contract.dm | 2 +- code/modules/paperwork/filingcabinet.dm | 2 +- code/modules/paperwork/paperplane.dm | 2 +- code/modules/paperwork/pen.dm | 2 +- code/modules/paperwork/photocopier.dm | 2 +- code/modules/paperwork/photography.dm | 6 +- code/modules/power/antimatter/shielding.dm | 2 +- code/modules/power/apc.dm | 4 +- code/modules/power/cable.dm | 4 +- code/modules/power/lighting.dm | 8 +- code/modules/power/singularity/collector.dm | 2 +- code/modules/power/singularity/emitter.dm | 4 +- .../particle_accelerator.dm | 2 +- code/modules/power/solar.dm | 8 +- code/modules/power/supermatter/supermatter.dm | 2 +- code/modules/power/tracker.dm | 4 +- code/modules/projectiles/ammunition.dm | 2 +- .../projectiles/ammunition/ammo_casings.dm | 2 +- code/modules/projectiles/box_magazine.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- .../guns/ballistic/laser_gatling.dm | 2 +- .../projectiles/guns/ballistic/revolver.dm | 2 +- .../projectiles/guns/ballistic/shotgun.dm | 4 +- code/modules/projectiles/guns/beam_rifle.dm | 2 +- code/modules/projectiles/guns/energy/laser.dm | 2 +- code/modules/projectiles/guns/energy/pulse.dm | 2 +- .../projectiles/guns/energy/special.dm | 6 +- code/modules/projectiles/guns/magic.dm | 2 +- code/modules/projectiles/pins.dm | 2 +- code/modules/projectiles/projectile.dm | 6 +- .../chemistry/machinery/chem_dispenser.dm | 2 +- .../chemistry/machinery/chem_heater.dm | 2 +- .../chemistry/machinery/chem_master.dm | 2 +- .../reagents/chemistry/machinery/pandemic.dm | 2 +- .../chemistry/machinery/reagentgrinder.dm | 2 +- .../reagents/reagent_containers/dropper.dm | 2 +- .../reagents/reagent_containers/glass.dm | 10 +- .../reagents/reagent_containers/hypospray.dm | 6 +- .../reagents/reagent_containers/spray.dm | 4 +- .../reagents/reagent_containers/syringes.dm | 2 +- code/modules/reagents/reagent_dispenser.dm | 4 +- code/modules/recycling/disposal-structures.dm | 2 +- code/modules/recycling/disposal-unit.dm | 4 +- code/modules/recycling/sortingmachinery.dm | 2 +- code/modules/research/circuitprinter.dm | 2 +- code/modules/research/protolathe.dm | 2 +- .../research/xenobiology/xenobiology.dm | 18 +- .../ruins/objects_and_mobs/necropolis_gate.dm | 2 +- code/modules/shuttle/shuttle.dm | 2 +- code/modules/shuttle/special.dm | 6 +- code/modules/spells/spell_types/barnyard.dm | 2 +- .../spells/spell_types/ethereal_jaunt.dm | 2 +- code/modules/spells/spell_types/godhand.dm | 2 +- code/modules/spells/spell_types/lichdom.dm | 2 +- code/modules/spells/spell_types/summonitem.dm | 4 +- code/modules/station_goals/dna_vault.dm | 2 +- .../surgery/bodyparts/robot_bodyparts.dm | 12 +- code/modules/surgery/cavity_implant.dm | 2 +- code/modules/surgery/organs/augments_arms.dm | 2 +- .../surgery/organs/augments_internal.dm | 8 +- code/modules/surgery/tools.dm | 24 +- code/modules/vehicles/pimpin_ride.dm | 2 +- code/modules/zombie/items.dm | 2 +- 350 files changed, 958 insertions(+), 960 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index ea34bb4c718..b464ea130c3 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -1,5 +1,5 @@ /* - These defines are specific to the atom/flags bitmask + These defines are specific to the atom/flags_1 bitmask */ #define ALL ~0 //For convenience. #define NONE 0 @@ -7,28 +7,28 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768)) //FLAGS BITMASK -#define STOPSPRESSUREDMAGE 1 //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere +#define STOPSPRESSUREDMAGE_1 1 //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere //To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. -#define NODROP 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. -#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() -#define MASKINTERNALS 8 // mask allows internals -#define HEAR 16 // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. -#define CHECK_RICOCHET 32 // Projectiels will check ricochet on things impacted that have this. -#define CONDUCT 64 // conducts electricity (metal etc.) -#define ABSTRACT 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way -#define NODECONSTRUCT 128 // For machines and structures that should not break into parts, eg, holodeck stuff -#define OVERLAY_QUEUED 256 //atom queued to SSoverlay -#define ON_BORDER 512 // item has priority to check when entering or leaving +#define NODROP_1 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted. +#define NOBLUDGEON_1 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() +#define MASKINTERNALS_1 8 // mask allows internals +#define HEAR_1 16 // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not. +#define CHECK_RICOCHET_1 32 // Projectiels will check ricochet on things impacted that have this. +#define CONDUCT_1 64 // conducts electricity (metal etc.) +#define ABSTRACT_1 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way +#define NODECONSTRUCT_1 128 // For machines and structures that should not break into parts, eg, holodeck stuff +#define OVERLAY_QUEUED_1 256 // atom queued to SSoverlay +#define ON_BORDER_1 512 // item has priority to check when entering or leaving -#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc -#define CLEAN_ON_MOVE 2048 +#define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc +#define CLEAN_ON_MOVE_1 2048 -// BLOCK_GAS_SMOKE_EFFECT only used in masks at the moment. -#define BLOCK_GAS_SMOKE_EFFECT 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. -#define DROPDEL 16384 // When dropped, it calls qdel on itself -#define PREVENT_CLICK_UNDER 32768 //Prevent clicking things below it on the same turf eg. doors/ fulltile windows +// BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment. +#define BLOCK_GAS_SMOKE_EFFECT_1 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! +#define THICKMATERIAL_1 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. +#define DROPDEL_1 16384 // When dropped, it calls qdel on itself +#define PREVENT_CLICK_UNDER_1 32768 //Prevent clicking things below it on the same turf eg. doors/ fulltile windows /* Secondary atom flags, for the flags_2 var, denoted with a _2 */ @@ -54,11 +54,11 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define TESLA_IGNORE_2 512 //turf-only flags -#define NOJAUNT 1 -#define UNUSED_TRANSIT_TURF 2 -#define CAN_BE_DIRTY 4 //If a turf can be made dirty at roundstart. This is also used in areas. -#define NO_DEATHRATTLE 16 // Do not notify deadchat about any deaths that occur on this turf. -//#define CHECK_RICOCHET 32 //Same thing as atom flag. +#define NOJAUNT_1 1 +#define UNUSED_TRANSIT_TURF_1 2 +#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas. +#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf. +//#define CHECK_RICOCHET_1 32 //Same thing as atom flag. /* These defines are used specifically with the atom/pass_flags bitmask @@ -90,5 +90,3 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ACID_PROOF 32 //acid stuck on it doesn't melt it. #define INDESTRUCTIBLE 64 //doesn't take damage #define FREEZE_PROOF 128 //can't be frozen - -// language secondary flags for atoms diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index b43fddadb5b..9e17719e760 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -2,10 +2,10 @@ #define LIQUID 2 #define GAS 3 -#define INJECTABLE 1024 //Makes reagents addable through droppers and syringes -#define DRAWABLE 2048 //If a syringe can draw from it -#define OPENCONTAINER 4096 //Is an open container for chemistry purposes -#define TRANSPARENT 8192 //Used for non-open containers which you still want to be able to see the reagents off. +#define INJECTABLE_1 1024 //Makes reagents addable through droppers and syringes +#define DRAWABLE_1 2048 //If a syringe can draw from it +#define OPENCONTAINER_1 4096 //Is an open container for chemistry purposes +#define TRANSPARENT_1 8192 //Used for non-open containers which you still want to be able to see the reagents off. #define TOUCH 1 //splashing #define INGEST 2 //ingestion diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 9b1507771a1..d1d330fb01e 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -164,7 +164,7 @@ . = list() while(processing_list.len) var/atom/A = processing_list[1] - if(A.flags & HEAR) + if(A.flags_1 & HEAR_1) . += A processing_list.Cut(1, 2) processing_list += A.contents diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index b9627a26f27..ef3c988d680 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -85,7 +85,7 @@ /* This checks if you there is uninterrupted airspace between that turf and this one. - This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW. + This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW. The border_only flag allows you to not objects (for source and destination squares) */ /turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null) @@ -95,7 +95,7 @@ if(O == target_atom || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf continue // LETPASSTHROW is used for anything you can click through (or the firedoor special case, see above) - if( O.flags&ON_BORDER) // windows are on border, check them first + if( O.flags_1&ON_BORDER_1) // windows are on border, check them first if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 006cc337216..4688e348b82 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -144,7 +144,7 @@ else RangedAttack(A,params) -//Is the atom obscured by a PREVENT_CLICK_UNDER object above it +//Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it /atom/proc/IsObscured() if(!isturf(loc)) //This only makes sense for things directly on turfs for now return FALSE @@ -152,13 +152,13 @@ if(!T) return FALSE for(var/atom/movable/AM in T) - if(AM.flags & PREVENT_CLICK_UNDER && AM.density && AM.layer > layer) + if(AM.flags_1 & PREVENT_CLICK_UNDER_1 && AM.density && AM.layer > layer) return TRUE return FALSE /turf/IsObscured() for(var/atom/movable/AM in src) - if(AM.flags & PREVENT_CLICK_UNDER && AM.density) + if(AM.flags_1 & PREVENT_CLICK_UNDER_1 && AM.density) return TRUE return FALSE diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 0e83d45b116..94799437868 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -258,7 +258,7 @@ var/obj/item/clothing/mask/M = C.wear_mask if(M.mask_adjusted) // if mask on face but pushed down M.adjustmask(C) // adjust it back - if( !(M.flags & MASKINTERNALS) ) + if( !(M.flags_1 & MASKINTERNALS_1) ) to_chat(C, "You are not wearing an internals mask!") return diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 43569dca0c3..f1ac1af1afa 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -35,7 +35,7 @@ /obj/item/proc/attack(mob/living/M, mob/living/user) - if(flags & NOBLUDGEON) + if(flags_1 & NOBLUDGEON_1) return if(!force) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1) @@ -54,7 +54,7 @@ //the equivalent of the standard version of attack() but for object targets. /obj/item/proc/attack_obj(obj/O, mob/living/user) - if(flags & NOBLUDGEON) + if(flags_1 & NOBLUDGEON_1) return user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(O) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 89803baef62..b0ab260d63c 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -68,7 +68,7 @@ desc = "Magic" icon = 'icons/obj/magic.dmi'//Needs sprites icon_state = "2" - flags = NOBLUDGEON | ABSTRACT | DROPDEL + flags_1 = NOBLUDGEON_1 | ABSTRACT_1 | DROPDEL_1 //item_state = null w_class = WEIGHT_CLASS_GIGANTIC layer = ABOVE_HUD_LAYER diff --git a/code/controllers/subsystem/processing/overlays.dm b/code/controllers/subsystem/processing/overlays.dm index 589bf667af7..fba4ebcaf05 100644 --- a/code/controllers/subsystem/processing/overlays.dm +++ b/code/controllers/subsystem/processing/overlays.dm @@ -55,7 +55,7 @@ PROCESSING_SUBSYSTEM_DEF(overlays) overlays = po else overlays.Cut() - flags &= ~OVERLAY_QUEUED + flags_1 &= ~OVERLAY_QUEUED_1 /proc/iconstate2appearance(icon, iconstate) var/static/image/stringbro = new() @@ -102,8 +102,8 @@ PROCESSING_SUBSYSTEM_DEF(overlays) new_overlays[i] = appearance_bro.appearance return new_overlays -#define NOT_QUEUED_ALREADY (!(flags & OVERLAY_QUEUED)) -#define QUEUE_FOR_COMPILE flags |= OVERLAY_QUEUED; SSoverlays.processing += src; +#define NOT_QUEUED_ALREADY (!(flags_1 & OVERLAY_QUEUED_1)) +#define QUEUE_FOR_COMPILE flags_1 |= OVERLAY_QUEUED_1; SSoverlays.processing += src; /atom/proc/cut_overlays(priority = FALSE) var/list/cached_overlays = our_overlays var/list/cached_priority = priority_overlays diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 4642e234ef7..7338f0280d3 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -82,7 +82,7 @@ SUBSYSTEM_DEF(shuttle) var/turf/T = i T.ChangeTurf(/turf/open/space) transit_turfs += T - T.flags |= UNUSED_TRANSIT_TURF + T.flags_1 |= UNUSED_TRANSIT_TURF_1 #ifdef HIGHLIGHT_DYNAMIC_TRANSIT /datum/controller/subsystem/shuttle/proc/color_space() @@ -403,13 +403,13 @@ SUBSYSTEM_DEF(shuttle) for(var/i in transit_turfs) CHECK_TICK var/turf/topleft = i - if(!(topleft.flags & UNUSED_TRANSIT_TURF)) + if(!(topleft.flags_1 & UNUSED_TRANSIT_TURF_1)) continue var/turf/bottomright = locate(topleft.x + transit_width, topleft.y + transit_height, topleft.z) if(!bottomright) continue - if(!(bottomright.flags & UNUSED_TRANSIT_TURF)) + if(!(bottomright.flags_1 & UNUSED_TRANSIT_TURF_1)) continue proposed_zone = block(topleft, bottomright) @@ -419,7 +419,7 @@ SUBSYSTEM_DEF(shuttle) var/turf/T = j if(!T) continue base - if(!(T.flags & UNUSED_TRANSIT_TURF)) + if(!(T.flags_1 & UNUSED_TRANSIT_TURF_1)) continue base //to_chat(world, "[COORD(topleft)] and [COORD(bottomright)]") break base @@ -491,7 +491,7 @@ SUBSYSTEM_DEF(shuttle) for(var/i in new_transit_dock.assigned_turfs) var/turf/T = i T.ChangeTurf(transit_path) - T.flags &= ~(UNUSED_TRANSIT_TURF) + T.flags_1 &= ~(UNUSED_TRANSIT_TURF_1) M.assigned_transit = new_transit_dock return TRUE diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm index d91d91de72d..f245b0766cb 100644 --- a/code/controllers/subsystem/throwing.dm +++ b/code/controllers/subsystem/throwing.dm @@ -135,6 +135,6 @@ SUBSYSTEM_DEF(throwing) var/atom/movable/AM = thing if (AM == thrownthing) continue - if (AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER)) + if (AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags_1 & ON_BORDER_1)) finalize(hit=TRUE, target=AM) return TRUE diff --git a/code/datums/diseases/magnitis.dm b/code/datums/diseases/magnitis.dm index c88f80d11f0..770f6bf313f 100644 --- a/code/datums/diseases/magnitis.dm +++ b/code/datums/diseases/magnitis.dm @@ -19,7 +19,7 @@ to_chat(affected_mob, "You feel a slight shock course through your body.") if(prob(2)) for(var/obj/M in orange(2,affected_mob)) - if(!M.anchored && (M.flags & CONDUCT)) + if(!M.anchored && (M.flags_1 & CONDUCT_1)) step_towards(M,affected_mob) for(var/mob/living/silicon/S in orange(2,affected_mob)) if(isAI(S)) @@ -32,7 +32,7 @@ to_chat(affected_mob, "You feel like clowning around.") if(prob(4)) for(var/obj/M in orange(4,affected_mob)) - if(!M.anchored && (M.flags & CONDUCT)) + if(!M.anchored && (M.flags_1 & CONDUCT_1)) var/i var/iter = rand(1,2) for(i=0,iYou query upon the nature of miracles.") if(prob(8)) for(var/obj/M in orange(6,affected_mob)) - if(!M.anchored && (M.flags & CONDUCT)) + if(!M.anchored && (M.flags_1 & CONDUCT_1)) var/i var/iter = rand(1,3) for(i=0,i