diff --git a/code/datums/matrix_editor.dm b/code/datums/matrix_editor.dm index c31720014d45..891364a1e368 100644 --- a/code/datums/matrix_editor.dm +++ b/code/datums/matrix_editor.dm @@ -7,7 +7,7 @@ set name = "Matrix Editor" set category = "Debug" - if(!usr.client || !usr.client.admin_holder || !(usr.client.admin_holder.rights & R_DEBUG|R_ADMIN)) + if(!usr.client || !usr.client.admin_holder || !(usr.client.admin_holder.rights & (R_DEBUG|R_ADMIN))) to_chat(usr, SPAN_DANGER("develop man only >:(")) return @@ -49,7 +49,7 @@ show_browser(usr, data, "Matrix Editor", "matrixeditor\ref[src]", "size=600x450") /client/proc/matrix_editor_Topic(href, href_list) - if(!usr.client || !usr.client.admin_holder || !(usr.client.admin_holder.rights & R_DEBUG|R_ADMIN)) + if(!usr.client || !usr.client.admin_holder || !(usr.client.admin_holder.rights & (R_DEBUG|R_ADMIN))) to_chat(usr, SPAN_DANGER("develop man only >:(")) return diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index bacfedf4717f..04f070f5aceb 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -1070,7 +1070,7 @@ var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags - if((ammo_flags & AMMO_FLAME) && (src.caste.fire_immunity & FIRE_IMMUNITY_NO_IGNITE|FIRE_IMMUNITY_NO_DAMAGE)) + if((ammo_flags & AMMO_FLAME) && (caste.fire_immunity & (FIRE_IMMUNITY_NO_IGNITE|FIRE_IMMUNITY_NO_DAMAGE))) to_chat(src, SPAN_AVOIDHARM("You shrug off the glob of flame.")) bullet_message(P, damaging = FALSE) return diff --git a/code/modules/shuttle/docking.dm b/code/modules/shuttle/docking.dm index df89ee5bdf42..acd220538c59 100644 --- a/code/modules/shuttle/docking.dm +++ b/code/modules/shuttle/docking.dm @@ -194,7 +194,7 @@ for(var/i in 1 to length(old_turfs)) CHECK_TICK - if(!(old_turfs[old_turfs[i]] & MOVE_CONTENTS | MOVE_TURF)) + if(!(old_turfs[old_turfs[i]] & (MOVE_CONTENTS|MOVE_TURF))) continue var/turf/oldT = old_turfs[i] var/turf/newT = new_turfs[i] diff --git a/code/modules/vehicles/multitile/multitile_interaction.dm b/code/modules/vehicles/multitile/multitile_interaction.dm index d7ecdf7ba543..b3aa9c67bbb2 100644 --- a/code/modules/vehicles/multitile/multitile_interaction.dm +++ b/code/modules/vehicles/multitile/multitile_interaction.dm @@ -297,7 +297,7 @@ if(P.runtime_iff_group && get_target_lock(P.runtime_iff_group)) return - if(ammo_flags & AMMO_ANTISTRUCT|AMMO_ANTIVEHICLE) + if(ammo_flags & (AMMO_ANTISTRUCT|AMMO_ANTIVEHICLE)) // Multiplier based on tank railgun relationship, so might have to reconsider multiplier for AMMO_SIEGE in general damage = floor(damage*ANTISTRUCT_DMG_MULT_TANK) if(ammo_flags & AMMO_ACIDIC) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index 891c17fea4b6..be2278a34452 100644 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -154,6 +154,13 @@ if grep -P '^/*var/' $code_files; then st=1 fi; +part "ambiguous bitwise or" +if grep -P '^(?:[^\/\n]|\/[^\/\n])*(&[ \t]*\w+[ \t]*\|[ \t]*\w+)' $code_files; then + echo + echo -e "${RED}ERROR: Likely operator order mistake with bitwise OR. Use parentheses to specify intention.${NC}" + st=1 +fi; + part "map json naming" if ls maps/*.json | grep -P "[A-Z]"; then