sarbian / ModuleManager

178 stars 95 forks source link

[Enhancement Request] bitwise operations for value manipulation #122

Open ubuntufreakdragon opened 6 years ago

ubuntufreakdragon commented 6 years ago

some values are bitmasks for flags e.g. some science experiment has the values situationMask and biomMask representing the allowed places for experiment execution and whether there are different results in different bioms. where 1 landed 2 splashed 4 low atmosphere 8 high atmosphere 16 low space 32 high space for manipulating these I need bitwise 'or' and 'and' ('|' '&') because 12 + 16 == 28 == 12 | 16 but 12 + 24 == 36 == 32 + 4 != 16 | 8 | 4 == 12 | 16