Problems I encountered with the existing antinuke coverage widget:
1. Sometimes it would die (no circles at all), putting you in a very awkward situation
2. If the enemy spams anti frames, or just started a few antinukes, it is hard to see where you are able to nuke
3. To see the intercepting circles, you need to issue F command, always makes me nervous due to the possible misclick
4. The functionality is partially overlapped with the "show defence range" settings, which creates messed up colors
So I rewrote the widget, making the following changes:
1. Regarding building progress of antinukes, instead of two states ("in build" , "finished"), they are now have three possible states:
a. "Initial" -- building progress < 40% (configurable in the code). The idea is that you have a good chance that the nuke will not be intercepted by this (if you nuke immediately upon the scout).
b. "Advanced" -- building progress > 40%, not finished yet.
Each stage is shown in different color (see below)
2. To check where you can nuke, it is enough now to select the nuke, no need for F command.
3. Unified (better IMO) color scheme:
a. Intended use is to have all 'Show Ally/Enemy/Spectator Nuke Defence' in 'settings -> interface -> defense ranges' disabled
b. When no nuke is selected, all antinuke circles (allied, enemy, spectating) are shown in the following colors:
"initial" - faded gray
"advanced" - faded cyan
"finished" - faded green
The lines are thin, but if you want to focus on the antinukes situation, you can press F5 (configurable), then (while the key is pressed) the lines become much thicker.
c. If your nuke is selected (doesn't matter if the F command is issued, or even whether the nuke is finished), it will show the potential interception (circles and line to mouse pointer) with the following colors:
"intercepted by initial" - yellow
"intercepted by advanced" - orange
"intercepted by finished" - red
"not intercepted" - the line will be green
4. Dropped mini-map drawing (since I'm not using it)
5. Made the code, on the one hand, simplified (especially rewarding was the replacing of "LuaRules/Gadgets/Include/GetNukeIntercepted.lua" -- a long function, testing whether an anti is able to protect a given target, using trigonometric formulae, space transformations, quadratic solver, edge cases, and so on -- with 3 lines of simple arithmetic with no use of math library at all), and on the other hand, properly (IMO) commented, including detailed widget description. Personally, I find the code of Spring in general, and of ZK in particular, being heavily under-commented.Widget