From b86aaf3307a1476033c012c8cd87fe2e928ce2e9 Mon Sep 17 00:00:00 2001 From: ZeWaka Date: Tue, 4 May 2021 22:37:56 -0700 Subject: [PATCH] Fixes bitwise flag negation errors. (#58870) These have been in the codebase for many years. Love, ZeWaka --- code/datums/quirks/neutral.dm | 2 +- code/game/objects/structures/tables_racks.dm | 2 +- code/modules/admin/verbs/ert.dm | 2 +- code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm | 2 +- code/modules/mob/living/ventcrawling.dm | 2 +- code/modules/research/nanites/nanite_programs.dm | 4 ++-- code/modules/vehicles/mecha/equipment/tools/other_tools.dm | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/datums/quirks/neutral.dm b/code/datums/quirks/neutral.dm index 2431c12bac1..5e927ab6f1e 100644 --- a/code/datums/quirks/neutral.dm +++ b/code/datums/quirks/neutral.dm @@ -68,7 +68,7 @@ var/datum/species/species = H.dna.species if(initial(species.liked_food) & MEAT) species.liked_food |= MEAT - if(!initial(species.disliked_food) & MEAT) + if(!(initial(species.disliked_food) & MEAT)) species.disliked_food &= ~MEAT /datum/quirk/snob diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index d78ba960d88..46a706dfada 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -126,7 +126,7 @@ to_chat(user, "Throwing [pushed_mob] onto the table might hurt them!") return var/added_passtable = FALSE - if(!pushed_mob.pass_flags & PASSTABLE) + if(!(pushed_mob.pass_flags & PASSTABLE)) added_passtable = TRUE pushed_mob.pass_flags |= PASSTABLE pushed_mob.Move(src.loc) diff --git a/code/modules/admin/verbs/ert.dm b/code/modules/admin/verbs/ert.dm index dd861692e36..591ef53d4ef 100644 --- a/code/modules/admin/verbs/ert.dm +++ b/code/modules/admin/verbs/ert.dm @@ -178,7 +178,7 @@ chosen_candidate.client.prefs.copy_to(ert_operative) ert_operative.key = chosen_candidate.key - if(ertemplate.enforce_human || !ert_operative.dna.species.changesource_flags & ERT_SPAWN) // Don't want any exploding plasmemes + if(ertemplate.enforce_human || !(ert_operative.dna.species.changesource_flags & ERT_SPAWN)) // Don't want any exploding plasmemes ert_operative.set_species(/datum/species/human) //Give antag datum diff --git a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm index 7da8c009a92..d82cf4948ae 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/rust_lore.dm @@ -30,7 +30,7 @@ var/check = FALSE if(ismob(target)) var/mob/living/mobster = target - if(!mobster.mob_biotypes & MOB_ROBOTIC) + if(!(mobster.mob_biotypes & MOB_ROBOTIC)) return FALSE else check = TRUE diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm index 032c767c24e..def0765f38b 100644 --- a/code/modules/mob/living/ventcrawling.dm +++ b/code/modules/mob/living/ventcrawling.dm @@ -96,7 +96,7 @@ // If the machinery is not in view or is not meant to be seen, continue if(!in_view_range(client.mob, pipenet_part)) continue - if(!pipenet_part.vent_movement & VENTCRAWL_CAN_SEE) + if(!(pipenet_part.vent_movement & VENTCRAWL_CAN_SEE)) continue if(!pipenet_part.pipe_vision_img) diff --git a/code/modules/research/nanites/nanite_programs.dm b/code/modules/research/nanites/nanite_programs.dm index e63964d477c..5f22b0bb063 100644 --- a/code/modules/research/nanites/nanite_programs.dm +++ b/code/modules/research/nanites/nanite_programs.dm @@ -251,7 +251,7 @@ software_error() /datum/nanite_program/proc/on_shock(shock_damage) - if(!program_flags & NANITE_SHOCK_IMMUNE) + if(!(program_flags & NANITE_SHOCK_IMMUNE)) if(prob(10)) host_mob.investigate_log("[src] nanite program received a software error due to shock.", INVESTIGATE_NANITES) software_error() @@ -260,7 +260,7 @@ qdel(src) /datum/nanite_program/proc/on_minor_shock() - if(!program_flags & NANITE_SHOCK_IMMUNE) + if(!(program_flags & NANITE_SHOCK_IMMUNE)) if(prob(10)) host_mob.investigate_log("[src] nanite program received a software error due to minor shock.", INVESTIGATE_NANITES) software_error() diff --git a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm index 58ba67b975f..04d45d23de2 100644 --- a/code/modules/vehicles/mecha/equipment/tools/other_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/other_tools.dm @@ -248,7 +248,7 @@ h_boost *= -2 else if(chassis.internal_damage && DT_PROB(8, delta_time)) for(var/int_dam_flag in repairable_damage) - if(!chassis.internal_damage & int_dam_flag) + if(!(chassis.internal_damage & int_dam_flag)) continue chassis.clear_internal_damage(int_dam_flag) repaired = TRUE