I've got a module/trigger logic question for anyone that knows. Modules always have some initialization trigger which is run when the card gets added to the class, with a line that usually looks like this:
What's the purpose of doing that as opposed to:
I've seen the latter in a few modules, but the former seems to be way more common.
On a related note, triggers will usually gate the logic with this kind of check:
Shouldn't the default be false there? If the module hasn't been properly initialized then why would you want the trigger logic running regardless?
ThisCard.SetBool(ModuleName) = ThisCard.GetBool(key: ModuleName, default: true)
What's the purpose of doing that as opposed to:
ThisCard.SetBool(ModuleName) = true
I've seen the latter in a few modules, but the former seems to be way more common.
On a related note, triggers will usually gate the logic with this kind of check:
If (ThisCard.getBool(key: ModuleName, default: true) then
Shouldn't the default be false there? If the module hasn't been properly initialized then why would you want the trigger logic running regardless?