« first day (2621 days earlier)      last day (2389 days later) » 

1:38 AM
I'm trying to decide how much pain I want to inflict in one day...
I've completely rewritten my color system to use biomes.
The next step is to have the biomes be defined completely from the config file, and get rid of the enum that I use in a TON of places...
 
1:55 AM
100 references to it... Sigh.
I think I'll do one more thing first.
 
2:19 AM
Actually, it will be more than one thing... Sigh.
 
 
16 hours later…
6:42 PM
@StephaneHockenhull I'll take a shot at it after a comp match in overwatch if it stays unanswered by then
 
 
3 hours later…
9:34 PM
Any C#/ lambda function gurus out there?
 
9:57 PM
Never mind, asked on SO, had answer in minutes. Should have done it hours ago... Sigh.
1
Q: Lambda functions using defined variables

PearsonArtPhotoI would like to test a condition based on values pulled from a configuration file (XML file, FYI). I have something like this to do the checks: List<Condition> conditions = new List<Condition>(); float fVal; foreach (XmlAttribute attr in conNode.Attributes) { switch (attr.Name.ToLower()) ...

Of course, it took some time to figure out exactly where the problem was such that a person could answer it on SO that quickly, but...
Now I get to do the really "fun" part, switching an enum used in a hundred places to a string...
 
@PearsonArtPhoto why would you change it to a string?
 
I haven't decided to a class or string yet.
Basically, I need the enum to go away so I can specify things via a config file.
 
um
enum is better in code
make something the reads the config file and sets up the enum,
 
Sets up an enum in realtime?
 
I really doubt strings are the right way to do this
Ok I'm not sure what you're doing
"switch enum to string" just sounds really bad
 
10:03 PM
Before I had a single enum called "Biome".
 
you in C#?
 
I've now moved all of the hardcoded parameters related to this to a config file.
Yes, I'm in C#.
Right now I've tested that the old and new values are the same.
I certainly need to remove the code that determines which biome I'm in.
But if I want to leave this open for the future, I need to have the config file be the sole source of biome information. As you can't make an enum at runtime, and I want to be able to change this without compiling, I have to drop the use of the enum.
Does that make sense?
 
so you want data-driven biomes
 
what data are in a biome?
 
10:06 PM
The main thing is colors, although the biomes can be referenced by the goods file, which is also data driven.
 
i'd like to help if i can, send me some info via email. I ahve to go at hte moment.
almo2001@yahoo.com
:)
 
I'm not convinced at the moment that I need the help, but...
Thanks for the offer!
 
11:02 PM
Reduced it down to "only" 54 places to change...
Bleh. Time to do something more interesting for a while.
I'll finish the conversion another time.
But before I do that, I think I will do something besides a string, because you are right about that likely causing issues in the future.
Eh, never mind...
I think I'll keep the string in, because otherwise it will be a real pain to figure out what to do if someone saves/loads.
 
11:56 PM
@PearsonArtPhoto SURE :)
 
LOL
I'm well into the conversion.
I might need a different kind of help after this is all done...
 
heheh
 

« first day (2621 days earlier)      last day (2389 days later) »