mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
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:
co-authored by
MrMelbert
parent
f014ecdbd1
commit
243231eb48
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user