Antares
Spell Reviewer
- Joined
- Dec 13, 2009
- Messages
- 1,020
You want to put the configurable parts of your system into the header of your script as constants, such as
That way, the user doesn't have to scour your code for the point of where to edit that number. This is not a problem for a script as small as this one, but it becomes a necessity if it grows.
The filter of using 100% health to determine whether the Lumber Mill is fully constructed is quite awkward. You can use
to determine whether a building is fully constructed.
Even with those fixes, this is a overly simple and specific system and I don't see a reason why someone looking for something like this wouldn't just write it themselves. For it to be approved, it needs to be more flexible or do something less basic.
Rejected
JASS:
globals
constant real INCOME_PER_LUMBER_MILL = 25
endglobals
The filter of using 100% health to determine whether the Lumber Mill is fully constructed is quite awkward. You can use
JASS:
GetUnitAbilityLevel(structure, 'ABnP') == 0 //Ability Building in Progress
Even with those fixes, this is a overly simple and specific system and I don't see a reason why someone looking for something like this wouldn't just write it themselves. For it to be approved, it needs to be more flexible or do something less basic.
Rejected