From 186b552103c0f67ef7cd7c7889b996c5943fd066 Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Fri, 29 Oct 2021 21:50:58 -0700
Subject: [PATCH] merge
---
code/__DEFINES/_flags/_flags.dm | 6 +---
code/_onclick/hud/screen_objects.dm | 2 +-
code/_onclick/item_attack.dm | 2 +-
code/datums/elements/wuv.dm | 4 +--
code/datums/mind.dm | 2 +-
code/datums/radiation_wave.dm | 2 +-
code/game/machinery/requests_console.dm | 4 +--
.../telecomms/computers/logbrowser.dm | 14 ++++----
.../machinery/telecomms/computers/message.dm | 12 +++----
.../machinery/telecomms/telecomunications.dm | 8 ++---
.../mecha/equipment/tools/medical_tools.dm | 2 +-
code/game/objects/items.dm | 10 +++---
code/game/objects/items/cigs_lighters.dm | 10 +++---
.../objects/items/devices/dogborg_sleeper.dm | 6 ++--
code/game/objects/items/shields.dm | 24 ++++++-------
code/game/objects/items/storage/boxes.dm | 4 +--
code/game/objects/items/storage/toolbox.dm | 2 +-
code/game/objects/items/tanks/tanks.dm | 2 +-
code/game/objects/items/tools/weldingtool.dm | 4 +--
code/game/turfs/turf.dm | 2 +-
code/modules/admin/verbs/SDQL2/SDQL_2.dm | 10 +++---
code/modules/arousal/arousal.dm | 6 ++--
code/modules/arousal/genitals.dm | 2 +-
code/modules/arousal/organs/breasts.dm | 2 +-
code/modules/client/preferences_savefile.dm | 28 +++++++--------
code/modules/clothing/clothing.dm | 2 +-
code/modules/clothing/masks/_masks.dm | 6 ++--
code/modules/clothing/masks/miscellaneous.dm | 8 ++---
code/modules/food_and_drinks/drinks/drinks.dm | 2 +-
code/modules/holiday/halloween/jacqueen.dm | 4 +--
code/modules/holodeck/holo_effect.dm | 2 +-
code/modules/hydroponics/fermenting_barrel.dm | 16 ++++-----
code/modules/hydroponics/grown/misc.dm | 2 +-
.../instrument_data/_instrument_data.dm | 4 +--
.../subtypes/reagents.dm | 10 +++---
code/modules/mob/living/carbon/carbon.dm | 6 ++--
.../mob/living/carbon/carbon_movement.dm | 2 +-
.../carbon/human/innate_abilities/blobform.dm | 4 +--
.../mob/living/carbon/human/inventory.dm | 4 +--
code/modules/mob/living/carbon/human/life.dm | 2 +-
.../mob/living/carbon/human/species.dm | 4 +--
.../carbon/human/species_types/dullahan.dm | 4 +--
code/modules/mob/living/carbon/life.dm | 2 +-
code/modules/mob/living/living.dm | 11 ++++--
code/modules/mob/living/living_mobility.dm | 10 +++---
code/modules/mob/living/living_sprint.dm | 8 ++---
.../mob/living/simple_animal/bot/cleanbot.dm | 4 +--
.../mob/living/simple_animal/bot/floorbot.dm | 6 ++--
.../mob/living/simple_animal/bot/medbot.dm | 16 ++++-----
.../living/simple_animal/hostile/hostile.dm | 2 +-
.../hostile/megafauna/megafauna.dm | 2 +-
.../living/simple_animal/simple_animal_vr.dm | 8 ++---
.../mob/living/simple_animal/slime/slime.dm | 2 +-
.../simple_animal/slime/slime_mobility.dm | 2 +-
.../ammunition/ballistic/shotgun.dm | 2 +-
code/modules/projectiles/projectile.dm | 10 +++---
.../projectile/bullets/dart_syringe.dm | 2 +-
.../projectiles/projectile/special/curse.dm | 4 +--
.../reagents/reagent_containers/chem_pack.dm | 2 +-
.../reagents/reagent_containers/rags.dm | 4 +--
code/modules/vore/eating/belly_obj.dm | 12 +++----
code/modules/vore/eating/bellymodes.dm | 4 +--
code/modules/vore/eating/living.dm | 12 +++----
code/modules/vore/eating/vorepanel.dm | 36 +++++++++----------
64 files changed, 208 insertions(+), 205 deletions(-)
diff --git a/code/__DEFINES/_flags/_flags.dm b/code/__DEFINES/_flags/_flags.dm
index 6f8ea6cda7..5f591b429b 100644
--- a/code/__DEFINES/_flags/_flags.dm
+++ b/code/__DEFINES/_flags/_flags.dm
@@ -5,10 +5,6 @@
#define NONE 0
//for convenience
-#define ENABLE_BITFIELD(variable, flag) (variable |= (flag))
-#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag))
-#define CHECK_BITFIELD(variable, flag) (variable & (flag))
-#define TOGGLE_BITFIELD(variable, flag) (variable ^= (flag))
#define COPY_SPECIFIC_BITFIELDS(a,b,flags)\
do{\
var/_old = a & ~(flags);\
@@ -154,7 +150,7 @@ GLOBAL_LIST_INIT(bitflags, list(
//Mob mobility var flags
/// any flag
-#define CHECK_MOBILITY(target, flags) CHECK_BITFIELD(target.mobility_flags, flags)
+#define CHECK_MOBILITY(target, flags) (target.mobility_flags & flags)
#define CHECK_ALL_MOBILITY(target, flags) CHECK_MULTIPLE_BITFIELDS(target.mobility_flags, flags)
/// can move
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 8590e056c9..87d888e457 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -323,7 +323,7 @@
var/obj/item/clothing/mask/M = check
if(M.mask_adjusted)
M.adjustmask(C)
- if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
+ if((check.clothing_flags & ALLOWINTERNALS))
internals = TRUE
if(!internals)
to_chat(C, "You are not wearing an internals mask!")
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 1618e351ec..8f3a7ef02c 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -260,7 +260,7 @@
return clamp((1.5 + (w_class/5)) * ((force_override || force) / 1.5), 0, 10 SECONDS) * CONFIG_GET(number/melee_stagger_factor)
/obj/item/proc/do_stagger_action(mob/living/target, mob/living/user, force_override)
- if(!CHECK_BITFIELD(target.status_flags, CANSTAGGER))
+ if(!(target.status_flags & CANSTAGGER))
return FALSE
if(target.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
target.do_staggered_animation()
diff --git a/code/datums/elements/wuv.dm b/code/datums/elements/wuv.dm
index d4f1955afc..854bfdf8dd 100644
--- a/code/datums/elements/wuv.dm
+++ b/code/datums/elements/wuv.dm
@@ -52,7 +52,7 @@
new /obj/effect/temp_visual/heart(target.loc)
if(pet_emote)
target.emote("me", pet_type, pet_emote)
- if(pet_moodlet && !CHECK_BITFIELD(target.flags_1, HOLOGRAM_1)) //prevents unlimited happiness petting park exploit.
+ if(pet_moodlet && !(target.flags_1 & HOLOGRAM_1)) //prevents unlimited happiness petting park exploit.
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, target, pet_moodlet, target)
/datum/element/wuv/proc/kick_the_dog(mob/target, mob/user)
@@ -60,5 +60,5 @@
return
if(punt_emote)
target.emote("me", punt_type, punt_emote)
- if(punt_moodlet && !CHECK_BITFIELD(target.flags_1, HOLOGRAM_1))
+ if(punt_moodlet && !(target.flags_1 & HOLOGRAM_1))
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, target, punt_moodlet, target)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index fdd576067b..fe4aa3d46a 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -141,7 +141,7 @@
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
if(L.client?.prefs && L.client.prefs.auto_ooc && L.client.prefs.chat_toggles & CHAT_OOC)
- DISABLE_BITFIELD(L.client.prefs.chat_toggles,CHAT_OOC)
+ L.client.prefs.chat_toggles &= ~(CHAT_OOC)
hide_ckey = current.client?.prefs?.hide_ckey
diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm
index 8dc3b64e16..ebb1f58a20 100644
--- a/code/datums/radiation_wave.dm
+++ b/code/datums/radiation_wave.dm
@@ -112,7 +112,7 @@
))
if(!can_contaminate || blacklisted[thing.type])
continue
- if(CHECK_BITFIELD(thing.rad_flags, RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
+ if((thing.rad_flags & RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
continue
contam_atoms += thing
var/did_contam = 0
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 5d1b30741b..d4807e377c 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
update_icon()
/obj/machinery/requests_console/update_icon_state()
- if(CHECK_BITFIELD(stat, NOPOWER))
+ if((stat & NOPOWER))
set_light(0)
else
set_light(1.4, 0.7, "#34D352")//green light
@@ -72,7 +72,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
icon_state="req_comp_open"
else
icon_state="req_comp_rewired"
- else if(CHECK_BITFIELD(stat, NOPOWER))
+ else if((stat & NOPOWER))
if(icon_state != "req_comp_off")
icon_state = "req_comp_off"
else
diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm
index ca04009e3b..c39c4667a6 100644
--- a/code/game/machinery/telecomms/computers/logbrowser.dm
+++ b/code/game/machinery/telecomms/computers/logbrowser.dm
@@ -1,5 +1,5 @@
/*
- The log console for viewing the entire telecomms
+ The log console for viewing the entire telecomms
network log
*/
@@ -15,7 +15,7 @@
var/network = "NULL" // the network to probe
var/notice = ""
- var/universal_translate = FALSE // set to TRUE(1) if it can translate nonhuman speech
+ var/universal_translate = FALSE // set to TRUE(1) if it can translate nonhuman speech
/obj/machinery/computer/telecomms/server/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -53,7 +53,7 @@
if(!LAZYLEN(SelectedMachine.log_entries))
return data_out
-
+
for(var/datum/comm_log_entry/C in SelectedMachine.log_entries)
var/list/data = list()
data["name"] = C.name //name of the file
@@ -104,7 +104,7 @@
data["message"] = C.parameters["message"]
else
data["message"] = "(unintelligible)"
-
+
data_out["selected_logs"] += list(data)
return data_out
@@ -133,7 +133,7 @@
if(LAZYLEN(machinelist) > 0)
notice = "FAILED: Cannot probe when buffer full"
return
-
+
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) //telecomms just went global!
if(T.network == network)
LAZYADD(machinelist, T)
@@ -147,7 +147,7 @@
SelectedMachine = T
break
if("delete")
- if(!src.allowed(usr) && !CHECK_BITFIELD(obj_flags, EMAGGED))
+ if(!src.allowed(usr) && !(obj_flags & EMAGGED))
to_chat(usr, "ACCESS DENIED.")
return
@@ -156,7 +156,7 @@
return
var/datum/comm_log_entry/D = locate(params["value"])
if(!istype(D))
- notice = "NOTICE: Object not found"
+ notice = "NOTICE: Object not found"
return
notice = "Deleted entry: [D.name]"
LAZYREMOVE(SelectedMachine.log_entries, D)
diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm
index a674bb6489..b4f4b495f8 100644
--- a/code/game/machinery/telecomms/computers/message.dm
+++ b/code/game/machinery/telecomms/computers/message.dm
@@ -94,9 +94,9 @@
if(istype(S) && S.hack_software)
data_out["canhack"] = TRUE
- data_out["hacking"] = (hacking || CHECK_BITFIELD(obj_flags, EMAGGED))
+ data_out["hacking"] = (hacking || (obj_flags & EMAGGED))
if(hacking)
- data_out["borg"] = ((isAI(user) || iscyborg(user)) && !CHECK_BITFIELD(obj_flags, EMAGGED)) //even borgs can't read emag
+ data_out["borg"] = ((isAI(user) || iscyborg(user)) && !(obj_flags & EMAGGED)) //even borgs can't read emag
return data_out
data_out["servers"] = list()
@@ -324,7 +324,7 @@
update_static_data(usr)
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
- if(O.tool_behaviour == TOOL_SCREWDRIVER && CHECK_BITFIELD(obj_flags, EMAGGED))
+ if(O.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
//Why this though, you should make it emag to a board level. (i wont do it)
to_chat(user, "It is too hot to mess with!")
@@ -333,12 +333,12 @@
/obj/machinery/computer/message_monitor/emag_act(mob/user)
. = ..()
- if(CHECK_BITFIELD(obj_flags, EMAGGED))
+ if((obj_flags & EMAGGED))
return
if(isnull(linkedServer))
to_chat(user, "A no server error appears on the screen.")
return
- ENABLE_BITFIELD(obj_flags, EMAGGED)
+ obj_flags |= EMAGGED
spark_system.set_up(5, 0, src)
spark_system.start()
var/obj/item/paper/monitorkey/MK = new(loc, linkedServer)
@@ -366,7 +366,7 @@
message = ""
/obj/machinery/computer/message_monitor/proc/UnmagConsole()
- DISABLE_BITFIELD(obj_flags, EMAGGED)
+ obj_flags &= ~(EMAGGED)
message = ""
/obj/machinery/computer/message_monitor/proc/ResetMessage()
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index f75eef0b21..489e19a9e3 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -137,11 +137,11 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/emp_act(severity)
. = ..()
- if(CHECK_BITFIELD(., EMP_PROTECT_SELF))
+ if((. & EMP_PROTECT_SELF))
return
if(prob(severity))
- if(!CHECK_BITFIELD(stat, EMPED))
- ENABLE_BITFIELD(stat, EMPED)
+ if(!(stat & EMPED))
+ stat |= EMPED
var/duration = severity * 35
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
- DISABLE_BITFIELD(stat, EMPED)
+ stat &= ~(EMPED)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index 1435f78718..756cee058c 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -276,7 +276,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
..()
if(reagents)
- DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags &= ~(NO_REACT)
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/medical/M)
if(..())
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 53f64c57d2..96fd32401a 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -450,8 +450,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
A.Remove(user)
if(item_flags & DROPDEL)
qdel(src)
- DISABLE_BITFIELD(item_flags, IN_INVENTORY)
- DISABLE_BITFIELD(item_flags, IN_STORAGE)
+ item_flags &= ~(IN_INVENTORY)
+ item_flags &= ~(IN_STORAGE)
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
remove_outline()
// if(!silent)
@@ -529,8 +529,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
A.Grant(user)
item_flags |= IN_INVENTORY
- if(CHECK_BITFIELD(item_flags, IN_STORAGE)) // Left storage item but somehow has the bitfield active still.
- DISABLE_BITFIELD(item_flags, IN_STORAGE)
+ if((item_flags & IN_STORAGE)) // Left storage item but somehow has the bitfield active still.
+ item_flags &= ~(IN_STORAGE)
// if(!initial)
// if(equip_sound && (slot_flags & slot))
// playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE)
@@ -1054,7 +1054,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
*/
/obj/item/proc/set_slowdown(new_slowdown)
slowdown = new_slowdown
- if(CHECK_BITFIELD(item_flags, IN_INVENTORY))
+ if((item_flags & IN_INVENTORY))
var/mob/living/L = loc
if(istype(L))
L.update_equipment_speed_mods()
diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm
index 5e37e9d992..702cbd8d56 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -190,7 +190,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
qdel(src)
return
// allowing reagents to react after being lit
- DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags &= ~(NO_REACT)
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
@@ -762,7 +762,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!screw)
screw = TRUE
to_chat(user, "You open the cap on [src].")
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
if(obj_flags & EMAGGED)
add_overlay("vapeopen_high")
else if(super)
@@ -772,7 +772,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else
screw = FALSE
to_chat(user, "You close the cap on [src].")
- DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags &= ~(OPENCONTAINER)
cut_overlays()
if(O.tool_behaviour == TOOL_MULTITOOL)
@@ -822,7 +822,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(slot == SLOT_WEAR_MASK)
if(!screw)
to_chat(user, "You start puffing on the vape.")
- DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags &= ~(NO_REACT)
START_PROCESSING(SSobj, src)
else //it will not start if the vape is opened.
to_chat(user, "You need to close the cap first!")
@@ -831,7 +831,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
. = ..()
var/mob/living/carbon/C = user
if(C.get_item_by_slot(SLOT_WEAR_MASK) == src)
- ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags |= NO_REACT
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/mask/vape/proc/hand_reagents()//had to rename to avoid duplicate error
diff --git a/code/game/objects/items/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm
index 977029cca3..e7493efadc 100644
--- a/code/game/objects/items/devices/dogborg_sleeper.dm
+++ b/code/game/objects/items/devices/dogborg_sleeper.dm
@@ -326,7 +326,7 @@
cleaning_cycles--
cleaning = TRUE
for(var/mob/living/carbon/C in (touchable_items))
- if((C.status_flags & GODMODE) || !CHECK_BITFIELD(C.vore_flags, DIGESTABLE))
+ if((C.status_flags & GODMODE) || !(C.vore_flags & DIGESTABLE))
items_preserved += C
else
C.adjustBruteLoss(2)
@@ -335,7 +335,7 @@
var/atom/target = pick(touchable_items)
if(iscarbon(target)) //Handle the target being a mob
var/mob/living/carbon/T = target
- if(T.stat == DEAD && CHECK_BITFIELD(T.vore_flags, DIGESTABLE)) //Mob is now dead
+ if(T.stat == DEAD && (T.vore_flags & DIGESTABLE)) //Mob is now dead
message_admins("[key_name(hound)] has digested [key_name(T)] as a dogborg. ([hound ? "JMP" : "null"])")
to_chat(hound,"You feel your belly slowly churn around [T], breaking them down into a soft slurry to be used as power for your systems.")
to_chat(T,"You feel [hound]'s belly slowly churn around your form, breaking you down into a soft slurry to be used as power for [hound]'s systems.")
@@ -433,7 +433,7 @@
var/mob/living/silicon/robot/hound = get_host()
if(!hound || !istype(target) || !proximity || target.anchored)
return
- if (!CHECK_BITFIELD(target.vore_flags,DEVOURABLE))
+ if (!(target.vore_flags & DEVOURABLE))
to_chat(user, "The target registers an error code. Unable to insert into [src].")
return
if(patient)
diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm
index f1691e5eb9..8432a8b73e 100644
--- a/code/game/objects/items/shields.dm
+++ b/code/game/objects/items/shields.dm
@@ -174,11 +174,11 @@
/obj/item/shield/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(ismovable(object))
var/atom/movable/AM = object
- if(CHECK_BITFIELD(shield_flags, SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
+ if((shield_flags & SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
return BLOCK_NONE
- if(CHECK_BITFIELD(shield_flags, SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
+ if((shield_flags & SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
return BLOCK_NONE
- if(CHECK_BITFIELD(shield_flags, SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
+ if((shield_flags & SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
return BLOCK_NONE
if(attack_type & ATTACK_TYPE_THROWN)
final_block_chance += 30
@@ -249,15 +249,15 @@
if(attack_type & ATTACK_TYPE_MELEE)
var/obj/hittingthing = object
if(hittingthing.damtype == BURN)
- if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
+ if((shield_flags & SHIELD_ENERGY_WEAK))
final_damage *= 2
- else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
+ else if((shield_flags & SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == BRUTE)
- if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
+ if((shield_flags & SHIELD_KINETIC_WEAK))
final_damage *= 2
- else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
+ else if((shield_flags & SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == STAMINA || hittingthing.damtype == TOX || hittingthing.damtype == CLONE || hittingthing.damtype == BRAIN || hittingthing.damtype == OXY)
@@ -266,19 +266,19 @@
if(attack_type & ATTACK_TYPE_PROJECTILE)
var/obj/item/projectile/shootingthing = object
if(is_energy_reflectable_projectile(shootingthing))
- if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
+ if((shield_flags & SHIELD_ENERGY_WEAK))
final_damage *= 2
- else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
+ else if((shield_flags & SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(!is_energy_reflectable_projectile(object))
- if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
+ if((shield_flags & SHIELD_KINETIC_WEAK))
final_damage *= 2
- else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
+ else if((shield_flags & SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(shootingthing.damage_type == STAMINA)
- if(CHECK_BITFIELD(shield_flags, SHIELD_DISABLER_DISRUPTED))
+ if((shield_flags & SHIELD_DISABLER_DISRUPTED))
final_damage *= 3 //disablers melt these kinds of shields. Really meant more for holoshields.
else
final_damage = 0
diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm
index 8b897cb6e5..df439e98f1 100644
--- a/code/game/objects/items/storage/boxes.dm
+++ b/code/game/objects/items/storage/boxes.dm
@@ -1290,9 +1290,9 @@
var/toxic_risk = min(round(spess_current_year - expiration_date * 0.01), 1)
for(var/obj/item/reagent_containers/food/snacks/S in contents)
if(prob(gross_risk))
- ENABLE_BITFIELD(S.foodtype, GROSS)
+ S.foodtype |= GROSS
if(prob(toxic_risk))
- ENABLE_BITFIELD(S.foodtype, TOXIC)
+ S.foodtype |= TOXIC
/obj/item/storage/box/mre/menu1
name = "\improper Nanotrasen MRE Ration Kit Menu 1"
diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm
index 56cf50993b..869711e5b2 100644
--- a/code/game/objects/items/storage/toolbox.dm
+++ b/code/game/objects/items/storage/toolbox.dm
@@ -370,7 +370,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
desc = replacetext(desc, "Danger", "Bouncy")
desc = replacetext(desc, "robust", "safe")
desc = replacetext(desc, "heavier", "bouncier")
- DISABLE_BITFIELD(flags_1, CONDUCT_1)
+ flags_1 &= ~(CONDUCT_1)
custom_materials = null
damtype = STAMINA
force += 3 //to compensate the higher stamina K.O. threshold compared to actual health.
diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm
index 01da046809..b77e4a8ba0 100644
--- a/code/game/objects/items/tanks/tanks.dm
+++ b/code/game/objects/items/tanks/tanks.dm
@@ -48,7 +48,7 @@
var/obj/item/clothing/mask/M = check
if(M.mask_adjusted)
M.adjustmask(H)
- if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
+ if((check.clothing_flags & ALLOWINTERNALS))
internals = TRUE
if(!internals)
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index 13c3c100b5..7688d2d342 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -291,10 +291,10 @@
status = !status
if(status)
to_chat(user, "You resecure [src] and close the fuel tank.")
- DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags &= ~(OPENCONTAINER)
else
to_chat(user, "[src] can now be attached, modified, and refuelled.")
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
add_fingerprint(user)
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index d949158850..18ecbc21df 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -512,7 +512,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
/turf/shove_act(mob/living/target, mob/living/user, pre_act = FALSE)
var/list/possibilities
for(var/obj/O in contents)
- if(CHECK_BITFIELD(O.obj_flags, SHOVABLE_ONTO))
+ if((O.obj_flags & SHOVABLE_ONTO))
LAZYADD(possibilities, O)
else if(!O.CanPass(target, src))
return FALSE
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index f2c10ecc1c..498355f7c3 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -262,7 +262,7 @@
selectors_used |= query.where_switched
combined_refs |= query.select_refs
running -= query
- if(!CHECK_BITFIELD(query.options, SDQL2_OPTION_DO_NOT_AUTOGC))
+ if(!(query.options & SDQL2_OPTION_DO_NOT_AUTOGC))
QDEL_IN(query, 50)
else
if(usr)
@@ -442,19 +442,19 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
if("select")
switch(value)
if("force_nulls")
- DISABLE_BITFIELD(options, SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS)
+ options &= ~(SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS)
if("proccall")
switch(value)
if("blocking")
- ENABLE_BITFIELD(options, SDQL2_OPTION_BLOCKING_CALLS)
+ options |= SDQL2_OPTION_BLOCKING_CALLS
if("priority")
switch(value)
if("high")
- ENABLE_BITFIELD(options, SDQL2_OPTION_HIGH_PRIORITY)
+ options |= SDQL2_OPTION_HIGH_PRIORITY
if("autogc")
switch(value)
if("keep_alive")
- ENABLE_BITFIELD(options, SDQL2_OPTION_DO_NOT_AUTOGC)
+ options |= SDQL2_OPTION_DO_NOT_AUTOGC
/datum/SDQL2_query/proc/ARun()
INVOKE_ASYNC(src, .proc/Run)
diff --git a/code/modules/arousal/arousal.dm b/code/modules/arousal/arousal.dm
index 36da6c73ba..a3adf0d25b 100644
--- a/code/modules/arousal/arousal.dm
+++ b/code/modules/arousal/arousal.dm
@@ -55,7 +55,7 @@
return genit_list
/obj/item/organ/genital/proc/climaxable(mob/living/carbon/human/H, silent = FALSE) //returns the fluid source (ergo reagents holder) if found.
- if(CHECK_BITFIELD(genital_flags, GENITAL_FUID_PRODUCTION))
+ if((genital_flags & GENITAL_FUID_PRODUCTION))
. = reagents
else
if(linked_organ)
@@ -124,7 +124,7 @@
var/list/worn_stuff = get_equipped_items()
for(var/obj/item/organ/genital/G in internal_organs)
- if(CHECK_BITFIELD(G.genital_flags, CAN_CLIMAX_WITH) && G.is_exposed(worn_stuff)) //filter out what you can't masturbate with
+ if((G.genital_flags & CAN_CLIMAX_WITH) && G.is_exposed(worn_stuff)) //filter out what you can't masturbate with
LAZYADD(genitals_list, G)
if(LAZYLEN(genitals_list))
var/obj/item/organ/genital/ret_organ = input(src, "with what?", "Climax", null) as null|obj in genitals_list
@@ -212,7 +212,7 @@
if(forced_climax) //Something forced us to cum, this is not a masturbation thing and does not progress to the other checks
log_message("was forced to climax by [cause]",LOG_EMOTE)
for(var/obj/item/organ/genital/G in internal_organs)
- if(!CHECK_BITFIELD(G.genital_flags, CAN_CLIMAX_WITH)) //Skip things like wombs and testicles
+ if(!(G.genital_flags & CAN_CLIMAX_WITH)) //Skip things like wombs and testicles
continue
mob_climax_outside(G, mb_time = 0) //removed climax timer for sudden, forced orgasms
//Now all genitals that could climax, have.
diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm
index 313f108b0f..b7e90e5b84 100644
--- a/code/modules/arousal/genitals.dm
+++ b/code/modules/arousal/genitals.dm
@@ -112,7 +112,7 @@
var/list/genital_list = list()
for(var/obj/item/organ/genital/G in internal_organs)
- if(!CHECK_BITFIELD(G.genital_flags, GENITAL_INTERNAL))
+ if(!(G.genital_flags & GENITAL_INTERNAL))
genital_list += G
if(!genital_list.len) //There is nothing to expose
return
diff --git a/code/modules/arousal/organs/breasts.dm b/code/modules/arousal/organs/breasts.dm
index e37224e401..34b48fb2ff 100644
--- a/code/modules/arousal/organs/breasts.dm
+++ b/code/modules/arousal/organs/breasts.dm
@@ -48,7 +48,7 @@
else
desc += " You estimate that they're [uppertext(size)]-cups."
- if(CHECK_BITFIELD(genital_flags, GENITAL_FUID_PRODUCTION) && aroused_state)
+ if((genital_flags & GENITAL_FUID_PRODUCTION) && aroused_state)
var/datum/reagent/R = GLOB.chemical_reagents_list[fluid_id]
if(R)
desc += " They're leaking [lowertext(R.name)]."
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 96ffd09af8..510ac9ff28 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -126,29 +126,29 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
var/list/json_from_file = json_decode(file2text(vr_path))
if(json_from_file)
if(json_from_file["digestable"])
- ENABLE_BITFIELD(vore_flags,DIGESTABLE)
+ vore_flags |= DIGESTABLE
if(json_from_file["devourable"])
- ENABLE_BITFIELD(vore_flags,DEVOURABLE)
+ vore_flags |= DEVOURABLE
if(json_from_file["feeding"])
- ENABLE_BITFIELD(vore_flags,FEEDING)
+ vore_flags |= FEEDING
if(json_from_file["lickable"])
- ENABLE_BITFIELD(vore_flags,LICKABLE)
+ vore_flags |= LICKABLE
belly_prefs = json_from_file["belly_prefs"]
vore_taste = json_from_file["vore_taste"]
for(var/V in all_quirks) // quirk migration
switch(V)
if("Acute hepatic pharmacokinesis")
- DISABLE_BITFIELD(cit_toggles, PENIS_ENLARGEMENT)
- DISABLE_BITFIELD(cit_toggles, BREAST_ENLARGEMENT)
- ENABLE_BITFIELD(cit_toggles,FORCED_FEM)
- ENABLE_BITFIELD(cit_toggles,FORCED_MASC)
+ cit_toggles &= ~(PENIS_ENLARGEMENT)
+ cit_toggles &= ~(BREAST_ENLARGEMENT)
+ cit_toggles |= FORCED_FEM
+ cit_toggles |= FORCED_MASC
all_quirks -= V
if("Crocin Immunity")
- ENABLE_BITFIELD(cit_toggles,NO_APHRO)
+ cit_toggles |= NO_APHRO
all_quirks -= V
if("Buns of Steel")
- ENABLE_BITFIELD(cit_toggles,NO_ASS_SLAP)
+ cit_toggles |= NO_ASS_SLAP
all_quirks -= V
if(features["meat_type"] == "Inesct")
@@ -178,13 +178,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feeding"] >> feeding
S["lickable"] >> lickable
if(digestable)
- ENABLE_BITFIELD(vore_flags,DIGESTABLE)
+ vore_flags |= DIGESTABLE
if(devourable)
- ENABLE_BITFIELD(vore_flags,DEVOURABLE)
+ vore_flags |= DEVOURABLE
if(feeding)
- ENABLE_BITFIELD(vore_flags,FEEDING)
+ vore_flags |= FEEDING
if(lickable)
- ENABLE_BITFIELD(vore_flags,LICKABLE)
+ vore_flags |= LICKABLE
if(current_version < 30)
switch(features["taur"])
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 56ddb5f5f1..492768a8e0 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -67,7 +67,7 @@
/obj/item/clothing/Initialize()
. = ..()
- if(CHECK_BITFIELD(clothing_flags, VOICEBOX_TOGGLABLE))
+ if((clothing_flags & VOICEBOX_TOGGLABLE))
actions_types += /datum/action/item_action/toggle_voice_box
if(ispath(pocket_storage_component_path))
LoadComponent(pocket_storage_component_path)
diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm
index c4063108db..ef7c6a1926 100644
--- a/code/modules/clothing/masks/_masks.dm
+++ b/code/modules/clothing/masks/_masks.dm
@@ -11,9 +11,9 @@
var/datum/beepsky_fashion/beepsky_fashion //the associated datum for applying this to a secbot
/obj/item/clothing/mask/attack_self(mob/user)
- if(CHECK_BITFIELD(clothing_flags, VOICEBOX_TOGGLABLE))
- TOGGLE_BITFIELD(clothing_flags, VOICEBOX_DISABLED)
- var/status = !CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED)
+ if((clothing_flags & VOICEBOX_TOGGLABLE))
+ (clothing_flags ^= VOICEBOX_DISABLED)
+ var/status = !(clothing_flags & VOICEBOX_DISABLED)
to_chat(user, "You turn the voice box in [src] [status ? "on" : "off"].")
/obj/item/clothing/mask/equipped(mob/M, slot)
diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm
index 88fbc98280..e6a0425920 100644
--- a/code/modules/clothing/masks/miscellaneous.dm
+++ b/code/modules/clothing/masks/miscellaneous.dm
@@ -124,7 +124,7 @@
modifies_speech = TRUE
/obj/item/clothing/mask/pig/handle_speech(datum/source, list/speech_args)
- if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
+ if(!(clothing_flags & VOICEBOX_DISABLED))
speech_args[SPEECH_MESSAGE] = pick("Oink!","Squeeeeeeee!","Oink Oink!")
/obj/item/clothing/mask/pig/cursed //needs to be different otherwise you could turn the speedmodification off and on
@@ -150,7 +150,7 @@
modifies_speech = TRUE
/obj/item/clothing/mask/frog/handle_speech(datum/source, list/speech_args) //whenever you speak
- if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
+ if(!(clothing_flags & VOICEBOX_DISABLED))
if(prob(5)) //sometimes, the angry spirit finds others words to speak.
speech_args[SPEECH_MESSAGE] = pick("HUUUUU!!","SMOOOOOKIN'!!","Hello my baby, hello my honey, hello my rag-time gal.", "Feels bad, man.", "GIT DIS GUY OFF ME!!" ,"SOMEBODY STOP ME!!", "NORMIES, GET OUT!!")
else
@@ -180,7 +180,7 @@
modifies_speech = TRUE
/obj/item/clothing/mask/cowmask/handle_speech(datum/source, list/speech_args)
- if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
+ if(!(clothing_flags & VOICEBOX_DISABLED))
speech_args[SPEECH_MESSAGE] = pick("Moooooooo!","Moo!","Moooo!")
@@ -205,7 +205,7 @@
clothing_flags = VOICEBOX_TOGGLABLE
/obj/item/clothing/mask/horsehead/handle_speech(datum/source, list/speech_args)
- if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
+ if(!(clothing_flags & VOICEBOX_DISABLED))
speech_args[SPEECH_MESSAGE] = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm
index 6b8de787f0..0370c087d9 100644
--- a/code/modules/food_and_drinks/drinks/drinks.dm
+++ b/code/modules/food_and_drinks/drinks/drinks.dm
@@ -500,7 +500,7 @@
/obj/item/reagent_containers/food/drinks/soda_cans/attack_self(mob/user)
if(!is_drainable())
to_chat(user, "You pull back the tab of \the [src] with a satisfying pop.") //Ahhhhhhhh
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
playsound(src, "can_open", 50, 1)
spillable = TRUE
return
diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm
index f76255d9e8..4ec18e7f6c 100644
--- a/code/modules/holiday/halloween/jacqueen.dm
+++ b/code/modules/holiday/halloween/jacqueen.dm
@@ -473,9 +473,9 @@
/mob/living/simple_animal/jacq/update_mobility()
. = ..()
if(busy)
- DISABLE_BITFIELD(., MOBILITY_MOVE)
+ . &= ~(MOBILITY_MOVE)
else
- ENABLE_BITFIELD(., MOBILITY_MOVE)
+ . |= MOBILITY_MOVE
mobility_flags = .
diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm
index c37ccf657b..ffff8e190e 100644
--- a/code/modules/holodeck/holo_effect.dm
+++ b/code/modules/holodeck/holo_effect.dm
@@ -78,7 +78,7 @@
// these vars are not really standardized but all would theoretically create stuff on death
for(var/v in list("butcher_results","corpse","weapon1","weapon2","blood_volume") & mob.vars)
mob.vars[v] = null
- ENABLE_BITFIELD(mob.flags_1, HOLOGRAM_1)
+ mob.flags_1 |= HOLOGRAM_1
if(isliving(mob))
var/mob/living/L = mob
L.vore_flags = 0
diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm
index 3d6b90eb2d..39b0bfdfde 100644
--- a/code/modules/hydroponics/fermenting_barrel.dm
+++ b/code/modules/hydroponics/fermenting_barrel.dm
@@ -59,12 +59,12 @@
/obj/structure/fermenting_barrel/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
open = !open
if(open)
- DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
- ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
+ reagents.reagents_holder_flags &= ~(DRAINABLE)
+ reagents.reagents_holder_flags |= REFILLABLE
to_chat(user, "You open [src], letting you fill it.")
else
- DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
- ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
+ reagents.reagents_holder_flags &= ~(REFILLABLE)
+ reagents.reagents_holder_flags |= DRAINABLE
to_chat(user, "You close [src], letting you draw from its tap.")
update_icon()
@@ -96,12 +96,12 @@
/obj/structure/custom_keg/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
open = !open
if(open)
- DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
- ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
+ reagents.reagents_holder_flags &= ~(DRAINABLE)
+ reagents.reagents_holder_flags |= REFILLABLE
to_chat(user, "You open [src], letting you fill it.")
else
- DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
- ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
+ reagents.reagents_holder_flags &= ~(REFILLABLE)
+ reagents.reagents_holder_flags |= DRAINABLE
to_chat(user, "You close [src], letting you draw from its tap.")
update_icon()
diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm
index 733d973832..e7298e67be 100644
--- a/code/modules/hydroponics/grown/misc.dm
+++ b/code/modules/hydroponics/grown/misc.dm
@@ -365,7 +365,7 @@
opened = TRUE
spillable = !screwdrivered
reagent_flags = OPENCONTAINER
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
icon_state = screwdrivered ? "coconut_carved" : "coconut_chopped"
desc = "A coconut. [screwdrivered ? "This one's got a hole in it" : "This one's sliced open, with all its delicious contents for your eyes to savour"]."
playsound(user, W.hitsound, 50, 1, -1)
diff --git a/code/modules/instruments/instrument_data/_instrument_data.dm b/code/modules/instruments/instrument_data/_instrument_data.dm
index 447bcdffb1..37880f9f10 100644
--- a/code/modules/instruments/instrument_data/_instrument_data.dm
+++ b/code/modules/instruments/instrument_data/_instrument_data.dm
@@ -60,9 +60,9 @@
calculate_samples()
/datum/instrument/proc/ready()
- if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_LEGACY))
+ if((instrument_flags & INSTRUMENT_LEGACY))
return legacy_instrument_path && legacy_instrument_ext
- else if(CHECK_BITFIELD(instrument_flags, INSTRUMENT_DO_NOT_AUTOSAMPLE))
+ else if((instrument_flags & INSTRUMENT_DO_NOT_AUTOSAMPLE))
return length(samples)
return (length(samples) >= 128)
diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm
index f69fa08aaf..de6ad729e9 100644
--- a/code/modules/integrated_electronics/subtypes/reagents.dm
+++ b/code/modules/integrated_electronics/subtypes/reagents.dm
@@ -77,7 +77,7 @@
/obj/item/integrated_circuit/reagent/injector/Initialize()
. = ..()
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
/obj/item/integrated_circuit/reagent/injector/on_reagent_change(changetype)
push_vol()
@@ -273,7 +273,7 @@
/obj/item/integrated_circuit/reagent/storage/Initialize()
. = ..()
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
/obj/item/integrated_circuit/reagent/storage/do_work()
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
@@ -303,7 +303,7 @@
/obj/item/integrated_circuit/reagent/storage/cryo/Initialize()
. = ..()
- ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags |= NO_REACT
/obj/item/integrated_circuit/reagent/storage/grinder
name = "reagent grinder"
@@ -574,7 +574,7 @@
/obj/item/integrated_circuit/reagent/smoke/Initialize()
. = ..()
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
/obj/item/integrated_circuit/reagent/smoke/on_reagent_change(changetype)
//reset warning only if we have reagents now
@@ -632,7 +632,7 @@
/obj/item/integrated_circuit/reagent/extinguisher/Initialize()
.=..()
- ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags |= OPENCONTAINER
set_pin_data(IC_OUTPUT,2, src)
/obj/item/integrated_circuit/reagent/extinguisher/on_reagent_change(changetype)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index f6ef8e8177..0700cba2ea 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -198,7 +198,7 @@
if(start_T && end_T)
log_combat(src, throwable_mob, "thrown", addition="grab from tile in [AREACOORD(start_T)] towards tile at [AREACOORD(end_T)]")
- else if(!CHECK_BITFIELD(I.item_flags, ABSTRACT) && !HAS_TRAIT(I, TRAIT_NODROP))
+ else if(!(I.item_flags & ABSTRACT) && !HAS_TRAIT(I, TRAIT_NODROP))
thrown_thing = I
dropItemToGround(I)
@@ -621,12 +621,12 @@
to_chat(src, "You're too exhausted to keep going...")
set_resting(TRUE, FALSE, FALSE)
SEND_SIGNAL(src, COMSIG_DISABLE_COMBAT_MODE)
- ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_HARD_STAMCRIT)
+ combat_flags |= COMBAT_FLAG_HARD_STAMCRIT
filters += CIT_FILTER_STAMINACRIT
update_mobility()
if((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && total_health <= STAMINA_CRIT_REMOVAL_THRESHOLD)
to_chat(src, "You don't feel nearly as exhausted anymore.")
- DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_HARD_STAMCRIT)
+ combat_flags &= ~(COMBAT_FLAG_HARD_STAMCRIT)
filters -= CIT_FILTER_STAMINACRIT
update_mobility()
UpdateStaminaBuffer()
diff --git a/code/modules/mob/living/carbon/carbon_movement.dm b/code/modules/mob/living/carbon/carbon_movement.dm
index e98ddf5954..5bc0392a69 100644
--- a/code/modules/mob/living/carbon/carbon_movement.dm
+++ b/code/modules/mob/living/carbon/carbon_movement.dm
@@ -22,7 +22,7 @@
/mob/living/carbon/Moved()
. = ..()
- if(. && !CHECK_BITFIELD(movement_type, FLOATING)) //floating is easy
+ if(. && !(movement_type & FLOATING)) //floating is easy
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
set_nutrition(NUTRITION_LEVEL_FED - 1) //just less than feeling vigorous
else if(nutrition && stat != DEAD)
diff --git a/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm b/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm
index c8f870bf2a..482268f8f5 100644
--- a/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm
+++ b/code/modules/mob/living/carbon/human/innate_abilities/blobform.dm
@@ -62,7 +62,7 @@
H.add_movespeed_modifier(/datum/movespeed_modifier/slime_puddle)
- ENABLE_BITFIELD(H.pass_flags, PASSMOB) //this actually lets people pass over you
+ H.pass_flags |= PASSMOB //this actually lets people pass over you
squeak = H.AddComponent(/datum/component/squeak, custom_sounds = list('sound/effects/blobattack.ogg')) //blorble noise when people step on you
//if the user is a changeling, retract their sting
@@ -103,7 +103,7 @@
REMOVE_TRAIT(H, TRAIT_HUMAN_NO_RENDER, SLIMEPUDDLE_TRAIT)
H.update_disabled_bodyparts(silent = TRUE)
H.remove_movespeed_modifier(/datum/movespeed_modifier/slime_puddle)
- DISABLE_BITFIELD(H.pass_flags, PASSMOB)
+ H.pass_flags &= ~(PASSMOB)
is_puddle = FALSE
if(squeak)
squeak.RemoveComponent()
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index b135ae9cd8..c75654e10b 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -188,9 +188,9 @@
dropItemToGround(r_store, TRUE) //Again, makes sense for pockets to drop.
if(l_store)
dropItemToGround(l_store, TRUE)
- if(wear_id && !CHECK_BITFIELD(wear_id.item_flags, NO_UNIFORM_REQUIRED))
+ if(wear_id && !(wear_id.item_flags & NO_UNIFORM_REQUIRED))
dropItemToGround(wear_id)
- if(belt && !CHECK_BITFIELD(belt.item_flags, NO_UNIFORM_REQUIRED))
+ if(belt && !(belt.item_flags & NO_UNIFORM_REQUIRED))
dropItemToGround(belt)
w_uniform = null
update_suit_sensors()
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index b43cd266be..85f01e63b3 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -214,7 +214,7 @@
var/missing_body_parts_flags = ~get_body_parts_flags()
var/max_protection = 1
if(missing_body_parts_flags) //I don't like copypasta as much as proc overhead. Do you want me to make these into a macro?
- DISABLE_BITFIELD(thermal_protection_flags, missing_body_parts_flags)
+ thermal_protection_flags &= ~(missing_body_parts_flags)
if(missing_body_parts_flags & HEAD)
max_protection -= THERMAL_PROTECTION_HEAD
if(missing_body_parts_flags & CHEST)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 21554f25b4..3976b1ebca 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1243,7 +1243,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(SLOT_BELT)
if(H.belt)
return FALSE
- if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED))
+ if(!(I.item_flags & NO_UNIFORM_REQUIRED))
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
if(!H.w_uniform && !nojumpsuit && (!O || !O.is_robotic_limb()))
if(return_warning)
@@ -1285,7 +1285,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(SLOT_WEAR_ID)
if(H.wear_id)
return FALSE
- if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED))
+ if(!(I.item_flags & NO_UNIFORM_REQUIRED))
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
if(!H.w_uniform && !nojumpsuit && (!O || !O.is_robotic_limb()))
if(return_warning)
diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
index 0418292fea..7cd582d050 100644
--- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm
+++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
@@ -31,7 +31,7 @@
/datum/species/dullahan/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
. = ..()
- DISABLE_BITFIELD(H.flags_1, HEAR_1)
+ H.flags_1 &= ~(HEAR_1)
var/obj/item/bodypart/head/head = H.get_bodypart(BODY_ZONE_HEAD)
if(head)
if(pumpkin)//Pumpkinhead!
@@ -49,7 +49,7 @@
OA.Trigger()
/datum/species/dullahan/on_species_loss(mob/living/carbon/human/H)
- ENABLE_BITFIELD(H.flags_1, HEAR_1)
+ H.flags_1 |= HEAR_1
H.reset_perspective(H)
if(myhead)
var/obj/item/dullahan_relay/DR = myhead
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index a839a0dd83..8516d1decf 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -324,7 +324,7 @@
if(!HAS_TRAIT(src, TRAIT_NO_INTERNALS))
for(check in GET_INTERNAL_SLOTS(src))
- if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
+ if((check.clothing_flags & ALLOWINTERNALS))
internals = TRUE
if(internal)
if(internal.loc != src)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index c05215bc6f..6714eef3e2 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -125,19 +125,26 @@
if(IS_STAMCRIT(src))
to_chat(src, "You're too exhausted to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under": "over"] [L].")
return TRUE
+<<<<<<< Updated upstream
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
visible_message("[src] is attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under" : "over"] [L].",
"You are now attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under": "over"] [L].",
target = L, target_message = "[src] is attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under" : "over"] you.")
+=======
+ combat_flags |= COMBAT_FLAG_ATTEMPTING_CRAWL
+ visible_message("[src] is attempting to crawl under [L].",
+ "You are now attempting to crawl under [L].",
+ target = L, target_message = "[src] is attempting to crawl under you.")
+>>>>>>> Stashed changes
if(!do_after(src, CRAWLUNDER_DELAY, target = src) || CHECK_MOBILITY(src, MOBILITY_STAND))
- DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
+ combat_flags &= ~(COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
var/src_passmob = (pass_flags & PASSMOB)
pass_flags |= PASSMOB
Move(origtargetloc)
if(!src_passmob)
pass_flags &= ~PASSMOB
- DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL)
+ combat_flags &= ~(COMBAT_FLAG_ATTEMPTING_CRAWL)
return TRUE
//END OF CIT CHANGES
diff --git a/code/modules/mob/living/living_mobility.dm b/code/modules/mob/living/living_mobility.dm
index 2256a93fa1..af34fb54cf 100644
--- a/code/modules/mob/living/living_mobility.dm
+++ b/code/modules/mob/living/living_mobility.dm
@@ -28,7 +28,7 @@
set name = "Rest"
set category = "IC"
if(client?.prefs?.autostand)
- TOGGLE_BITFIELD(combat_flags, COMBAT_FLAG_INTENTIONALLY_RESTING)
+ (combat_flags ^= COMBAT_FLAG_INTENTIONALLY_RESTING)
to_chat(src, "You are now attempting to [(combat_flags & COMBAT_FLAG_INTENTIONALLY_RESTING) ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].")
if((combat_flags & COMBAT_FLAG_INTENTIONALLY_RESTING) && !resting)
set_resting(TRUE, FALSE)
@@ -117,14 +117,14 @@
mobility_flags &= ~(MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE | MOBILITY_HOLD)
if(HAS_TRAIT(src, TRAIT_MOBILITY_NOMOVE))
- DISABLE_BITFIELD(mobility_flags, MOBILITY_MOVE)
+ mobility_flags &= ~(MOBILITY_MOVE)
if(HAS_TRAIT(src, TRAIT_MOBILITY_NOPICKUP))
- DISABLE_BITFIELD(mobility_flags, MOBILITY_PICKUP)
+ mobility_flags &= ~(MOBILITY_PICKUP)
if(HAS_TRAIT(src, TRAIT_MOBILITY_NOUSE))
- DISABLE_BITFIELD(mobility_flags, MOBILITY_USE)
+ mobility_flags &= ~(MOBILITY_USE)
if(daze)
- DISABLE_BITFIELD(mobility_flags, MOBILITY_USE)
+ mobility_flags &= ~(MOBILITY_USE)
//Handle update-effects.
if(!CHECK_MOBILITY(src, MOBILITY_HOLD))
diff --git a/code/modules/mob/living/living_sprint.dm b/code/modules/mob/living/living_sprint.dm
index 3fbc229385..e45866bcf6 100644
--- a/code/modules/mob/living/living_sprint.dm
+++ b/code/modules/mob/living/living_sprint.dm
@@ -30,7 +30,7 @@
return
if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
return
- ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE)
+ combat_flags |= COMBAT_FLAG_SPRINT_ACTIVE
add_movespeed_modifier(/datum/movespeed_modifier/sprinting)
if(update_icon)
update_sprint_icon()
@@ -38,7 +38,7 @@
/mob/living/proc/disable_sprint_mode(update_icon = TRUE)
if(!(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) || (combat_flags & COMBAT_FLAG_SPRINT_FORCED))
return
- DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE)
+ combat_flags &= ~(COMBAT_FLAG_SPRINT_ACTIVE)
remove_movespeed_modifier(/datum/movespeed_modifier/sprinting)
if(update_icon)
update_sprint_icon()
@@ -46,7 +46,7 @@
/mob/living/proc/enable_intentional_sprint_mode()
if((combat_flags & COMBAT_FLAG_SPRINT_TOGGLED) && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
return
- ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_TOGGLED)
+ combat_flags |= COMBAT_FLAG_SPRINT_TOGGLED
if(!HAS_TRAIT(src, TRAIT_SPRINT_LOCKED) && !(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE))
enable_sprint_mode(FALSE)
update_sprint_icon()
@@ -57,7 +57,7 @@
return
if(combat_flags & COMBAT_FLAG_SPRINT_FORCED)
return
- DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_TOGGLED)
+ combat_flags &= ~(COMBAT_FLAG_SPRINT_TOGGLED)
if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
disable_sprint_mode(FALSE)
update_sprint_icon()
diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
index a52e975f9a..5b812086c8 100644
--- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm
@@ -182,7 +182,7 @@
deputize(W, user)
else if(istype(W, /obj/item/mop/advanced))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_CLEANER_ADVANCED_MOP))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_CLEANER_ADVANCED_MOP))
to_chat(user, "You replace \the [src] old mop with a new better one!")
upgrades |= UPGRADE_CLEANER_ADVANCED_MOP
clean_time = 20 //2.5 the speed!
@@ -198,7 +198,7 @@
to_chat(user, "The [src] already has this mop!")
else if(istype(W, /obj/item/broom))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_CLEANER_BROOM))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_CLEANER_BROOM))
to_chat(user, "You add to \the [src] a broom speeding it up!")
upgrades |= UPGRADE_CLEANER_BROOM
base_speed = 1 //2x faster!
diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm
index ff6941ec70..a67642f8ca 100644
--- a/code/modules/mob/living/simple_animal/bot/floorbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm
@@ -124,7 +124,7 @@
to_chat(user, "You need at least one floor tile to put into [src]!")
else if(istype(W, /obj/item/storage/toolbox/artistic))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_FLOOR_ARTBOX))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_FLOOR_ARTBOX))
to_chat(user, "You upgrade \the [src] case to hold more!")
upgrades |= UPGRADE_FLOOR_ARTBOX
maxtiles += 100 //Double the storage!
@@ -139,7 +139,7 @@
to_chat(user, "The [src] already has a upgraded case!")
else if(istype(W, /obj/item/storage/toolbox/syndicate))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_FLOOR_SYNDIBOX))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_FLOOR_SYNDIBOX))
to_chat(user, "You upgrade \the [src] case to hold more!")
upgrades |= UPGRADE_FLOOR_SYNDIBOX
maxtiles += 200 //Double bse storage
@@ -433,4 +433,4 @@
if(robot.mode == BOT_REPAIRING)
return TRUE
return FALSE
-
+
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 25f6509ad0..b343328e7f 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -254,7 +254,7 @@
show_controls(user)
else if(istype(W, /obj/item/reagent_containers/syringe/piercing))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_PIERERCING))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_PIERERCING))
to_chat(user, "You replace \the [src] syringe with a diamond-tipped one!")
upgrades |= UPGRADE_MEDICAL_PIERERCING
qdel(W)
@@ -268,7 +268,7 @@
to_chat(user, "The [src] already has a diamond-tipped syringe!")
else if(istype(W, /obj/item/hypospray/mkii))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_HYPOSPRAY))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_HYPOSPRAY))
to_chat(user, "You replace \the [src] syringe base with a DeForest Medical MK.II Hypospray!")
upgrades |= UPGRADE_MEDICAL_HYPOSPRAY
injection_time = 15 //Half the time half the death!
@@ -284,7 +284,7 @@
to_chat(user, "The [src] already has a DeForest Medical Hypospray base!")
else if(istype(W, /obj/item/circuitboard/machine/chem_dispenser))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_CHEM_BOARD))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_CHEM_BOARD))
to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
upgrades |= UPGRADE_MEDICAL_CHEM_BOARD
treatment_oxy = /datum/reagent/medicine/salbutamol //Replaces Dex with salbutamol "better" healing of o2
@@ -299,7 +299,7 @@
to_chat(user, "The [src] already has this upgrade!")
else if(istype(W, /obj/item/circuitboard/machine/cryo_tube))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_CRYO_BOARD))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_CRYO_BOARD))
to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
upgrades |= UPGRADE_MEDICAL_CRYO_BOARD
treatment_fire = /datum/reagent/medicine/oxandrolone //Replaces Kep with oxandrolone "better" healing of burns
@@ -314,7 +314,7 @@
to_chat(user, "The [src] already has this upgrade!")
else if(istype(W, /obj/item/circuitboard/machine/chem_master))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_CHEM_MASTER))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_CHEM_MASTER))
to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
upgrades |= UPGRADE_MEDICAL_CHEM_MASTER
treatment_brute = /datum/reagent/medicine/sal_acid //Replaces Bic with Sal Acid "better" healing of brute
@@ -329,7 +329,7 @@
to_chat(user, "the [src] already has this upgrade!")
else if(istype(W, /obj/item/circuitboard/machine/sleeper))
- if(bot_core.allowed(user) && open && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_SLEEP_BOARD))
+ if(bot_core.allowed(user) && open && !(upgrades & UPGRADE_MEDICAL_SLEEP_BOARD))
to_chat(user, "You add in the board upgrading \the [src] reagent banks!")
upgrades |= UPGRADE_MEDICAL_SLEEP_BOARD
treatment_tox = /datum/reagent/medicine/pen_acid //replaces charcoal with pen acid a "better" healing of toxins
@@ -359,7 +359,7 @@
audible_message("[src] buzzes oddly!")
flick("medibot_spark", src)
playsound(src, "sparks", 75, 1)
- if(!CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_PIERERCING))
+ if(!(upgrades & UPGRADE_MEDICAL_PIERERCING))
upgrades |= UPGRADE_MEDICAL_PIERERCING //Jabs even harder through the clothing!
if(user)
oldpatient = user
@@ -558,7 +558,7 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
- if (H.wear_suit && H.head && istype(H.wear_suit, /obj/item/clothing) && istype(H.head, /obj/item/clothing) && !CHECK_BITFIELD(upgrades,UPGRADE_MEDICAL_PIERERCING))
+ if (H.wear_suit && H.head && istype(H.wear_suit, /obj/item/clothing) && istype(H.head, /obj/item/clothing) && !(upgrades & UPGRADE_MEDICAL_PIERERCING))
var/obj/item/clothing/CS = H.wear_suit
var/obj/item/clothing/CH = H.head
if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL)
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 01a30bb90a..029adbe92f 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -367,7 +367,7 @@
if(vore_active)
if(isliving(target))
var/mob/living/L = target
- if(!client && L.Adjacent(src) && CHECK_BITFIELD(L.vore_flags, DEVOURABLE) && CHECK_BITFIELD(L.vore_flags, MOBVORE)) // aggressive check to ensure vore attacks can be made
+ if(!client && L.Adjacent(src) && (L.vore_flags & DEVOURABLE) && (L.vore_flags & MOBVORE)) // aggressive check to ensure vore attacks can be made
if(prob(voracious_chance))
vore_attack(src,L,src)
else
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
index 3940388625..79111d3de2 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
@@ -122,7 +122,7 @@
if(!client && ranged && ranged_cooldown <= world.time)
OpenFire()
if(L.Adjacent(src) && (L.stat != CONSCIOUS))
- if(vore_active && CHECK_BITFIELD(L.vore_flags,DEVOURABLE))
+ if(vore_active && (L.vore_flags & DEVOURABLE))
vore_attack(src,L,src)
LoseTarget()
else
diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm
index de5bb578b8..69dee76f34 100644
--- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm
@@ -49,10 +49,10 @@
// Simple animals have only one belly. This creates it (if it isn't already set up)
/mob/living/simple_animal/init_vore()
- ENABLE_BITFIELD(vore_flags, VORE_INIT)
- if(CHECK_BITFIELD(flags_1, HOLOGRAM_1))
+ vore_flags |= VORE_INIT
+ if((flags_1 & HOLOGRAM_1))
return
- if(!vore_active || CHECK_BITFIELD(vore_flags, NO_VORE)) //If it can't vore, let's not give it a stomach.
+ if(!vore_active || (vore_flags & NO_VORE)) //If it can't vore, let's not give it a stomach.
return
if(vore_active && !IsAdvancedToolUser()) //vore active, but doesn't have thumbs to grab people with.
verbs |= /mob/living/simple_animal/proc/animal_nom
@@ -133,6 +133,6 @@
if (stat != CONSCIOUS)
return
- if(!CHECK_BITFIELD(T.vore_flags,DEVOURABLE))
+ if(!(T.vore_flags & DEVOURABLE))
return
return vore_attack(src,T,src)
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 68de074e07..38149494bc 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -466,7 +466,7 @@
SStun = world.time + rand(20,60)
spawn(0)
- DISABLE_BITFIELD(mobility_flags, MOBILITY_MOVE)
+ mobility_flags &= ~(MOBILITY_MOVE)
if(user)
step_away(src,user,15)
sleep(3)
diff --git a/code/modules/mob/living/simple_animal/slime/slime_mobility.dm b/code/modules/mob/living/simple_animal/slime/slime_mobility.dm
index 5be5ff4e36..77f2bde864 100644
--- a/code/modules/mob/living/simple_animal/slime/slime_mobility.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime_mobility.dm
@@ -1,5 +1,5 @@
/mob/living/simple_animal/slime/update_mobility()
. = ..()
if(Tempstun && !buckled)
- DISABLE_BITFIELD(., MOBILITY_MOVE)
+ . &= ~(MOBILITY_MOVE)
mobility_flags = .
diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm
index 2a41b41d1d..04e8e62029 100644
--- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm
+++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm
@@ -139,7 +139,7 @@
/obj/item/ammo_casing/shotgun/dart/noreact/Initialize()
. = ..()
- ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags |= NO_REACT
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with an obscene amount of lethal reagents. God help whoever is shot with this."
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 0a7598cd79..07fc4bf9de 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -362,7 +362,7 @@
/obj/item/projectile/proc/process_hit(turf/T, atom/target, qdel_self, hit_something = FALSE) //probably needs to be reworked entirely when pixel movement is done.
if(QDELETED(src) || !T || !target) //We're done, nothing's left.
- if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
+ if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !(movement_type & UNSTOPPABLE)))
qdel(src)
return hit_something
permutated |= target //Make sure we're never hitting it again. If we ever run into weirdness with piercing projectiles needing to hit something multiple times.. well.. that's a to-do.
@@ -370,16 +370,16 @@
return process_hit(T, select_target(T), qdel_self, hit_something) //Hit whatever else we can since that didn't work.
var/result = target.bullet_act(src, def_zone)
if(result == BULLET_ACT_FORCE_PIERCE)
- if(!CHECK_BITFIELD(movement_type, UNSTOPPABLE))
+ if(!(movement_type & UNSTOPPABLE))
temporary_unstoppable_movement = TRUE
- ENABLE_BITFIELD(movement_type, UNSTOPPABLE)
+ movement_type |= UNSTOPPABLE
return process_hit(T, select_target(T), qdel_self, TRUE) //Hit whatever else we can since we're piercing through but we're still on the same tile.
else if(result == BULLET_ACT_TURF) //We hit the turf but instead we're going to also hit something else on it.
return process_hit(T, select_target(T), QDEL_SELF, TRUE)
else //Whether it hit or blocked, we're done!
qdel_self = QDEL_SELF
hit_something = TRUE
- if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
+ if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !(movement_type & UNSTOPPABLE)))
qdel(src)
return hit_something
@@ -775,7 +775,7 @@
if(.)
if(temporary_unstoppable_movement)
temporary_unstoppable_movement = FALSE
- DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
+ movement_type &= ~(UNSTOPPABLE)
if(fired && can_hit_target(original, permutated, TRUE))
Bump(original)
diff --git a/code/modules/projectiles/projectile/bullets/dart_syringe.dm b/code/modules/projectiles/projectile/bullets/dart_syringe.dm
index 318acb66b5..4978e679b4 100644
--- a/code/modules/projectiles/projectile/bullets/dart_syringe.dm
+++ b/code/modules/projectiles/projectile/bullets/dart_syringe.dm
@@ -25,7 +25,7 @@
"You were protected against \the [src]!")
..(target, blocked)
- DISABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT)
+ reagents.reagents_holder_flags &= ~(NO_REACT)
reagents.handle_reactions()
return BULLET_ACT_HIT
diff --git a/code/modules/projectiles/projectile/special/curse.dm b/code/modules/projectiles/projectile/special/curse.dm
index d967540e6a..6c682763ae 100644
--- a/code/modules/projectiles/projectile/special/curse.dm
+++ b/code/modules/projectiles/projectile/special/curse.dm
@@ -31,7 +31,7 @@
/obj/item/projectile/curse_hand/prehit(atom/target)
if(target == original)
- DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
+ movement_type &= ~(UNSTOPPABLE)
else if(!isturf(target))
return FALSE
return ..()
@@ -40,7 +40,7 @@
if(arm)
arm.End()
arm = null
- if(CHECK_BITFIELD(movement_type, UNSTOPPABLE))
+ if((movement_type & UNSTOPPABLE))
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
var/turf/T = get_step(src, dir)
var/obj/effect/temp_visual/dir_setting/curse/hand/leftover = new(T, dir)
diff --git a/code/modules/reagents/reagent_containers/chem_pack.dm b/code/modules/reagents/reagent_containers/chem_pack.dm
index 77d6067d3b..dde4d11c13 100644
--- a/code/modules/reagents/reagent_containers/chem_pack.dm
+++ b/code/modules/reagents/reagent_containers/chem_pack.dm
@@ -30,7 +30,7 @@
SplashReagents(user)
return
else
- DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
+ reagents.reagents_holder_flags &= ~(OPENCONTAINER)
ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAWABLE |INJECTABLE )
spillable = FALSE
sealed = TRUE
diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm
index 8a6e2bf2e7..c26ed4db31 100644
--- a/code/modules/reagents/reagent_containers/rags.dm
+++ b/code/modules/reagents/reagent_containers/rags.dm
@@ -141,11 +141,11 @@
/obj/item/reagent_containers/rag/towel/attack(mob/living/M, mob/living/user)
if(user.a_intent == INTENT_HARM)
- DISABLE_BITFIELD(item_flags, NOBLUDGEON)
+ item_flags &= ~(NOBLUDGEON)
. = TRUE
..()
if(.)
- ENABLE_BITFIELD(item_flags, NOBLUDGEON)
+ item_flags |= NOBLUDGEON
/obj/item/reagent_containers/rag/towel/equipped(mob/living/user, slot)
. = ..()
diff --git a/code/modules/vore/eating/belly_obj.dm b/code/modules/vore/eating/belly_obj.dm
index 8e74dd3c92..474c912c23 100644
--- a/code/modules/vore/eating/belly_obj.dm
+++ b/code/modules/vore/eating/belly_obj.dm
@@ -278,14 +278,14 @@
SEND_SIGNAL(OW, COMSIG_ADD_MOOD_EVENT, "emptypred", /datum/mood_event/emptypred)
SEND_SIGNAL(ML, COMSIG_ADD_MOOD_EVENT, "emptyprey", /datum/mood_event/emptyprey)
- if(CHECK_BITFIELD(ML.vore_flags,ABSORBED))
- DISABLE_BITFIELD(ML.vore_flags,ABSORBED)
+ if((ML.vore_flags & ABSORBED))
+ ML.vore_flags &= ~(ABSORBED)
if(ishuman(M) && ishuman(OW))
var/mob/living/carbon/human/Prey = M
var/mob/living/carbon/human/Pred = OW
var/absorbed_count = 2 //Prey that we were, plus the pred gets a portion
for(var/mob/living/P in contents)
- if(CHECK_BITFIELD(P.vore_flags,ABSORBED))
+ if((P.vore_flags & ABSORBED))
absorbed_count++
Pred.reagents.trans_to(Prey, Pred.reagents.total_volume / absorbed_count)
@@ -390,7 +390,7 @@
formatted_message = replacetext(formatted_message,"%pred",owner)
formatted_message = replacetext(formatted_message,"%prey",english_list(contents))
for(var/mob/living/P in contents)
- if(!CHECK_BITFIELD(P.vore_flags, ABSORBED)) //This is required first, in case there's a person absorbed and not absorbed in a stomach.
+ if(!(P.vore_flags & ABSORBED)) //This is required first, in case there's a person absorbed and not absorbed in a stomach.
total_bulge += P.mob_size
if(total_bulge >= bulge_size && bulge_size != 0)
return("[formatted_message]
")
@@ -485,7 +485,7 @@
// Handle a mob being absorbed
/obj/belly/proc/absorb_living(var/mob/living/M)
- ENABLE_BITFIELD(M.vore_flags, ABSORBED)
+ M.vore_flags |= ABSORBED
to_chat(M,"[owner]'s [lowertext(name)] absorbs your body, making you part of them.")
to_chat(owner,"Your [lowertext(name)] absorbs [M]'s body, making them part of you.")
@@ -499,7 +499,7 @@
for(var/belly in M.vore_organs)
var/obj/belly/B = belly
for(var/mob/living/Mm in B)
- if(CHECK_BITFIELD(Mm.vore_flags, ABSORBED))
+ if((Mm.vore_flags & ABSORBED))
absorb_living(Mm)
//Update owner
diff --git a/code/modules/vore/eating/bellymodes.dm b/code/modules/vore/eating/bellymodes.dm
index 8d64ee28f1..7828de8cde 100644
--- a/code/modules/vore/eating/bellymodes.dm
+++ b/code/modules/vore/eating/bellymodes.dm
@@ -76,7 +76,7 @@
play_sound = pick(pred_digest)
//Pref protection!
- if (!CHECK_BITFIELD(M.vore_flags, DIGESTABLE) || M.vore_flags & ABSORBED)
+ if (!(M.vore_flags & DIGESTABLE) || M.vore_flags & ABSORBED)
continue
//Person just died in guts!
@@ -165,7 +165,7 @@
for (var/mob/living/M in contents)
if(M.vore_flags & ABSORBED && owner.nutrition >= 100)
- DISABLE_BITFIELD(M.vore_flags, ABSORBED)
+ M.vore_flags &= ~(ABSORBED)
to_chat(M,"You suddenly feel solid again ")
to_chat(owner,"You feel like a part of you is missing.")
owner.adjust_nutrition(-100)
diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm
index 6bc44e6489..1f4950eaa7 100644
--- a/code/modules/vore/eating/living.dm
+++ b/code/modules/vore/eating/living.dm
@@ -33,7 +33,7 @@
return TRUE
/mob/living/proc/init_vore()
- ENABLE_BITFIELD(vore_flags, VORE_INIT)
+ vore_flags |= VORE_INIT
//Something else made organs, meanwhile.
if(LAZYLEN(vore_organs))
return TRUE
@@ -75,7 +75,7 @@
lazy_init_belly()
if(pred == prey) //you click your target
- if(!CHECK_BITFIELD(pred.vore_flags,FEEDING))
+ if(!(pred.vore_flags & FEEDING))
to_chat(user, "They aren't able to be fed.")
to_chat(pred, "[user] tried to feed you themselves, but you aren't voracious enough to be fed.")
return
@@ -85,11 +85,11 @@
feed_grabbed_to_self(user, prey)
else // click someone other than you/prey
- if(!CHECK_BITFIELD(pred.vore_flags,FEEDING))
+ if(!(pred.vore_flags & FEEDING))
to_chat(user, "They aren't voracious enough to be fed.")
to_chat(pred, "[user] tried to feed you [prey], but you aren't voracious enough to be fed.")
return
- if(!CHECK_BITFIELD(prey.vore_flags,FEEDING))
+ if(!(prey.vore_flags & FEEDING))
to_chat(user, "They aren't able to be fed to someone.")
to_chat(prey, "[user] tried to feed you to [pred], but you aren't able to be fed to them.")
return
@@ -122,7 +122,7 @@
testing("[user] attempted to feed [prey] to [pred], via [lowertext(belly.name)] but it went wrong.")
return
- if (!CHECK_BITFIELD(prey.vore_flags, DEVOURABLE))
+ if (!(prey.vore_flags & DEVOURABLE))
to_chat(user, "This can't be eaten!")
return FALSE
@@ -283,7 +283,7 @@
if(!client || !client.prefs)
to_chat(src,"You attempted to apply your vore prefs but somehow you're in this character without a client.prefs variable. Tell a dev.")
return FALSE
- ENABLE_BITFIELD(vore_flags,VOREPREF_INIT)
+ vore_flags |= VOREPREF_INIT
COPY_SPECIFIC_BITFIELDS(vore_flags, client.prefs.vore_flags, DIGESTABLE | DEVOURABLE | FEEDING | LICKABLE | SMELLABLE | ABSORBABLE | MOBVORE)
vore_taste = client.prefs.vore_taste
vore_smell = client.prefs.vore_smell
diff --git a/code/modules/vore/eating/vorepanel.dm b/code/modules/vore/eating/vorepanel.dm
index 8e8cfc4935..a44760ae69 100644
--- a/code/modules/vore/eating/vorepanel.dm
+++ b/code/modules/vore/eating/vorepanel.dm
@@ -181,15 +181,15 @@
data["selected"] = selected_list
data["prefs"] = list(
- "digestable" = CHECK_BITFIELD(host.vore_flags, DIGESTABLE),
- "devourable" = CHECK_BITFIELD(host.vore_flags, DEVOURABLE),
- "feeding" = CHECK_BITFIELD(host.vore_flags, FEEDING),
- "absorbable" = CHECK_BITFIELD(host.vore_flags, ABSORBABLE),
- "allowmobvore" = CHECK_BITFIELD(host.vore_flags, MOBVORE),
- "vore_sounds" = CHECK_BITFIELD(host.client.prefs.cit_toggles, EATING_NOISES),
- "digestion_sounds" = CHECK_BITFIELD(host.client.prefs.cit_toggles, DIGESTION_NOISES),
- "lickable" = CHECK_BITFIELD(host.vore_flags, LICKABLE),
- "smellable" = CHECK_BITFIELD(host.vore_flags, SMELLABLE),
+ "digestable" = (host.vore_flags & DIGESTABLE),
+ "devourable" = (host.vore_flags & DEVOURABLE),
+ "feeding" = (host.vore_flags & FEEDING),
+ "absorbable" = (host.vore_flags & ABSORBABLE),
+ "allowmobvore" = (host.vore_flags & MOBVORE),
+ "vore_sounds" = (host.client.prefs.cit_toggles & EATING_NOISES),
+ "digestion_sounds" = (host.client.prefs.cit_toggles & DIGESTION_NOISES),
+ "lickable" = (host.vore_flags & LICKABLE),
+ "smellable" = (host.vore_flags & SMELLABLE),
)
return data
@@ -307,49 +307,49 @@
unsaved_changes = TRUE
return TRUE
if("toggle_digest")
- TOGGLE_BITFIELD(host.vore_flags, DIGESTABLE)
+ (host.vore_flags ^= DIGESTABLE)
if(host.client.prefs)
COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, DIGESTABLE)
unsaved_changes = TRUE
return TRUE
if("toggle_devour")
- TOGGLE_BITFIELD(host.vore_flags, DEVOURABLE)
+ (host.vore_flags ^= DEVOURABLE)
if(host.client.prefs)
COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, DEVOURABLE)
unsaved_changes = TRUE
return TRUE
if("toggle_feed")
- TOGGLE_BITFIELD(host.vore_flags, FEEDING)
+ (host.vore_flags ^= FEEDING)
if(host.client.prefs)
COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, FEEDING)
unsaved_changes = TRUE
return TRUE
if("toggle_absorbable")
- TOGGLE_BITFIELD(host.vore_flags, ABSORBABLE)
+ (host.vore_flags ^= ABSORBABLE)
if(host.client.prefs)
COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, ABSORBABLE)
unsaved_changes = TRUE
return TRUE
if("toggle_mobvore")
- TOGGLE_BITFIELD(host.vore_flags, MOBVORE)
+ (host.vore_flags ^= MOBVORE)
if(host.client.prefs)
COPY_SPECIFIC_BITFIELDS(host.client.prefs.vore_flags, host.vore_flags, MOBVORE)
unsaved_changes = TRUE
return TRUE
if("toggle_vore_sounds")
- TOGGLE_BITFIELD(host.client.prefs.cit_toggles, EATING_NOISES)
+ (host.client.prefs.cit_toggles ^= EATING_NOISES)
unsaved_changes = TRUE
return TRUE
if("toggle_digestion_sounds")
- TOGGLE_BITFIELD(host.client.prefs.cit_toggles, DIGESTION_NOISES)
+ (host.client.prefs.cit_toggles ^= DIGESTION_NOISES)
unsaved_changes = TRUE
return TRUE
if("toggle_lickable")
- TOGGLE_BITFIELD(host.vore_flags, LICKABLE)
+ (host.vore_flags ^= LICKABLE)
unsaved_changes = TRUE
return TRUE
if("toggle_smellable")
- TOGGLE_BITFIELD(host.vore_flags, SMELLABLE)
+ (host.vore_flags ^= SMELLABLE)
unsaved_changes = TRUE
return TRUE