You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since these enums are implemented as bitwise operators, if we want to do an action based only on a part of the CreatureAlignment, right now we need:
// Do something if the creature is Lawful.if(creature.alignment===CreatureAlignment.LawfulGood||creature.alignment===CreatureAlignment.LawfulNeutral||creature.alignment===CreatureAlignment.LawfulEvil){// ...}
While we could have a simpler, shorter form:
// Do something if the creature is Lawful.if(creature.alignment&CreatureAttitude.Lawful){// ...}
We would need to export the CreatureMorality and CreatureAttitude enumerables in the @xethya/definitions package.
The text was updated successfully, but these errors were encountered:
Since these enums are implemented as bitwise operators, if we want to do an action based only on a part of the
CreatureAlignment
, right now we need:While we could have a simpler, shorter form:
We would need to export the
CreatureMorality
andCreatureAttitude
enumerables in the@xethya/definitions
package.The text was updated successfully, but these errors were encountered: