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"