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
A minor but annoying thing I have noticed is a lot of unnecessary or duplicate scoping. There are three examples I can name of the top of my head, but they are all broadly the same thing.
trigger = {
NOT = {
is_in_faction_with = GER
}
NOT = {
has_government = totalist
}
}
Is clearly just a longer version of
trigger = {
NOT = {
is_in_faction_with = GER
has_government = totalist
}
}
None of these are major errors, but they do make code longer and harder to read, and now can also be a sign of a bug where someone meant to type in a different scope
The text was updated successfully, but these errors were encountered:
Some people also use OR where it isn't needed, but I think that's fine, can make long code blocks with lots of NOT and OR in easier. Though, if possible, I will say that:
trigger = {
OR = {
is_in_faction_with = GER
has_government = totalist
OR = {
has_capitulated = yes
is_subject_of = ROOT
}
}
}
Should throw an error, as that isn't more clear than
trigger = {
OR = {
is_in_faction_with = GER
has_government = totalist
has_capitulated = yes
is_subject_of = ROOT
}
}
Although that one is really rare, so don't worry about it if it is a pain to do.
A minor but annoying thing I have noticed is a lot of unnecessary or duplicate scoping. There are three examples I can name of the top of my head, but they are all broadly the same thing.
Is clearly just a longer version of
Again here
Can be shorten to
Finally, mistakes like this
Which can be cut down
None of these are major errors, but they do make code longer and harder to read, and now can also be a sign of a bug where someone meant to type in a different scope
The text was updated successfully, but these errors were encountered: