swlegion / tts

Table Top Simulator Mod for Star Wars: Legion
MIT License
43 stars 27 forks source link

Fix small spawning issues #542

Closed JackParkes1 closed 2 years ago

JackParkes1 commented 2 years ago
  1. Large base minis now spawn in the first spawn row instead of always in the second one. The issue was that the basesPerRow value equates to 0 for large bases. Set a minimum of 1 to basesPerRow

image

image

  1. UnitID tokens would not number above 5, and everythin after 5 would remain as 1. This was due to a strange behaviour of math.fmod() resulting in negative values, e.g. fmod(6,10) -> -4. A change to the % modulo operator addresses this and also allows for covering the 10th index case, unlike fmod

  2. UnitID tinting was only applied to unitID tokens that hadn't had their state changed. Added a reassignment of the unitId token upon state change to carry the new object GUID through

image

image