Arugh, are you so oblivious?
This would mean that you would have to keep a master list of all categories used in _post and if you did not keep this list up to date, bad (or interesting, depending on your point of view) things would happen. It's kludgy and messy. Moreover it is not consistent with the whitelist behavior, and as a result is quite ugly.
Blacklist target category
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Blacklist target category
No you wouldn't.
Re: Blacklist target category
You can construct the category list in a quick pass over all units. No need to write it explicitly.FLOZi wrote:No you wouldn't.
Code: Select all
categories = {}
for _, unitDef in pairs(UnitDefs) do
categories[unitDef.category] = true
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Blacklist target category
Yes.Forboding Angel wrote:You're still advocating a blacklist derived from a whitelist. Honestly am I the only one who sees the issues with that and the added needless complexity?Google_Frog wrote:Correct, not everything should be done in lua. But now look at this case. Implementing this in _posts (or somewhere similar):Forboding Angel wrote:Just because something can be done in lua doesn't mean it should be. Knorke's workaround is a kludgy hack and is extremely inflexible at best.
A blacklist should have been the default in the engine, not a whitelist, but realistically, there should be both a blacklist and a whitelist.So the benefits of lua (saving the engine from complexity, implementation flexibility) are there without the common drawbacks (performance).
- Has no performance impact.
- Adds some code complexity but saves the engine internals from that complexity (which is better imo because the engine seems more fragile to me).
- Allows you to quickly change your mind and use different types of lists.
Re: Blacklist target category
Yes.
But you are free to fork the engine. and push and pull
https://github.com/spring/spring
It seems you used up all your knorkes for today. You must construct additional knorkes.
But you are free to fork the engine. and push and pull
https://github.com/spring/spring
It seems you used up all your knorkes for today. You must construct additional knorkes.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Blacklist target category
To me also the suggested unitdefs/_post implementation seems natural. Although it is a bit annoying only having 32 categories.
If it was possible to both blacklist and whitelist in the unitdef, then since a single unitdef belongs to multiple categories, it doesn't look fun to try and decide the "expected behavior" or suitable error msg for cases which did both at the same time in a logically inconsistent way.
If it was possible to both blacklist and whitelist in the unitdef, then since a single unitdef belongs to multiple categories, it doesn't look fun to try and decide the "expected behavior" or suitable error msg for cases which did both at the same time in a logically inconsistent way.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Blacklist target category
Ok, that's all fine and good, but in the end, you are using a whitelist to create a blacklist and in turn output a whitelist.hokomoko wrote:You can construct the category list in a quick pass over all units. No need to write it explicitly.FLOZi wrote:No you wouldn't.
Code: Select all
categories = {} for _, unitDef in pairs(UnitDefs) do categories[unitDef.category] = true
Re: Blacklist target category
I'm glad we agree.Ok, that's all fine and good
Re: Blacklist target category
How about we agree to call it greylist and move on to wish each other a happy easter?