Quote:
|
Originally Posted by Earth-Fury
You pollute the global textmacro name table with the inaptly named "Macro".
|
Who care really ? This part of the code should not be edited.
Quote:
|
Originally Posted by Earth-Fury
You declare variables outside of the macro that should be inside the macro. I do believe scope initializers work when nested in libraries, so you have no excuse for not using a scope with an initializer in the macro.
|
Ok i will edit that. I though it was just more readable.
Quote:
|
Originally Posted by Earth-Fury
You use the type conditionfunc instead of boolexpr. While Filter() and Condition() return subtypes of boolexpr, all functions take values of type boolexpr. Using the subtypes is just unnecessary and confusing, adding needlessly to code complexity. The subtypes act the same, so use the parent type.
|
Ok.
Quote:
|
Originally Posted by Earth-Fury
Register$TYPE$Exchange breaks with the convention of trigger event registration functions starting with "TriggerRegister".
|
I though it was annoying long, or not ?
Quote:
|
Originally Posted by Earth-Fury
Your whole system breaks JASS convention by specifying a pair of function sets, instead of a single function set which take a constant.
|
You want mean something like that ?
TriggerRegisterResourceExchange(<yourTrigger>,<yourForce>, <an integer constant names like GOLD, LUMBER>)
Quote:
|
Originally Posted by Earth-Fury
Your Get functions to get the value of things inside the trigger are not thread-safe. Attach data to the trigger and retrieve it on Get call to make them thread-safe. (GetTriggeringTrigger() is your friend.)
|
But what happens if a trigger is destroyed ?
I know that's a bad thing and we should recycle them.
But is there a safe method to "store" triggers and manage the leaks if the user create and destroy triggers during the game ?
Quote:
|
Originally Posted by Earth-Fury
You provide two internal implementations. For a system this simple, that's bad. Pick the best way, and stick to it.
|
True i will make only one.
Quote:
|
Originally Posted by Earth-Fury
I'm too lazy to examine the actual logic and functionality of this, but I think my current gripes are enough for now.
|
Enough, that's the word :p