Properly checks flags with & instead of == (#70130)

* Makes flags properly check themselves

Byond ref: https://www.byond.com/docs/ref/#/operator/&
Basically, flags should use & instead of ==
We can have more than 1 slot on any item, so it's preferred that we do this instead. Even if it doesn't immediately fix any problems, it's something that should be the standard anyways to prevent it from ever being a problem.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
John Willard
2022-09-27 21:51:45 +00:00
committed by GitHub
co-authored by MrMelbert
parent f014ecdbd1
commit 243231eb48
74 changed files with 107 additions and 107 deletions
@@ -57,7 +57,7 @@
var/list/data = get_header_data()
var/turf/turf = get_turf(computer)
data["atmozphereMode"] = atmozphere_mode
data["clickAtmozphereCompatible"] = computer.hardware_flag == PROGRAM_TABLET
data["clickAtmozphereCompatible"] = (computer.hardware_flag & PROGRAM_TABLET)
switch (atmozphere_mode) //Null air wont cause errors, don't worry.
if(ATMOZPHERE_SCAN_ENV)
var/datum/gas_mixture/air = turf?.return_air()
@@ -77,7 +77,7 @@
atmozphere_mode = ATMOZPHERE_SCAN_ENV
UnregisterSignal(computer, COMSIG_ITEM_ATTACK_SELF_SECONDARY)
return TRUE
if(computer.hardware_flag != PROGRAM_TABLET)
if(!(computer.hardware_flag & PROGRAM_TABLET))
computer.say("Device incompatible for scanning objects!")
return FALSE
atmozphere_mode = ATMOZPHERE_SCAN_CLICK