Having spent a buttload of time supporting new content and ASH improvements recently, I've stepped back for now, and am mostly looking only at Bugs.
I did consider this and examined AfterLifeRequest, which looks at KoL's "path id" numbers:
Code:
switch ( path )
{
case 0:
builder.append( "no" );
break;
case 1:
builder.append( "a Boozetafarians" );
break;
case 2:
builder.append( "a Teetotaler" );
break;
case 3:
builder.append( "an Oxygenarian" );
break;
case 4:
builder.append( "a Bees Hate You" );
break;
case 6:
builder.append( "a Way of the Surprising Fist" );
break;
case 7:
builder.append( "a Trendy" );
break;
case 8:
builder.append( "an Avatar of Boris" );
break;
case 9:
builder.append( "a Bugbear Invasion" );
break;
case 10:
builder.append( "a Zombie Slayer" );
break;
case 11:
builder.append( "a Class Act" );
break;
case 12:
builder.append( "an Avatar of Jarlsberg" );
break;
case 14:
builder.append( "a BIG!" );
break;
case 15:
builder.append( "a KOLHS" );
break;
case 16:
builder.append( "a Class Act II: A Class For Pigs" );
break;
case 17:
builder.append( "an Avatar of Sneaky Pete" );
break;
case 18:
builder.append( "a Slow and Steady" );
break;
case 19:
builder.append( "a Heavy Rains" );
break;
case 21:
builder.append( "a Picky" );
break;
case 22:
builder.append( "the Standard" );
break;
case 23:
builder.append( "an Actually Ed the Undying" );
break;
case 24:
builder.append( "the One Crazy Random Summer" );
break;
case 25:
builder.append( "a Community Service" );
break;
case 26:
builder.append( "an Avatar of West of Loathing" );
break;
case 27:
builder.append( "a The Source" );
break;
case 28:
builder.append( "a Nuclear Autumn" );
break;
case 29:
builder.append( "a Gelatinous Noob" );
break;
case 30:
builder.append( "a License to Adventure" );
break;
case 31:
builder.append( "a Live. Ascend. Repeat." );
break;
case 32:
builder.append( "a Pocket Familiars" );
break;
case 33:
builder.append( "a G-Lover" );
break;
case 34:
builder.append( "a Disguises Delimit" );
break;
case 35:
builder.append( "a Dark Gyffte" );
break;
case 36:
builder.append( "a Two Crazy Random Summer" );
break;
case 37:
builder.append( "a Kingdom of Exploathing" );
break;
case 38:
builder.append( "a Path of the Plumber" );
break;
case 39:
builder.append( "a Low Key Summer" );
break;
default:
builder.append( "(Path " );
builder.append( String.valueOf( path ) );
builder.append( ")" );
break;
}
builder.append( " path," );
So, yeah, there are paths even for the consumption restrictions.
But it made me think that maybe, internally, we should have an Enum, with path descriptor and ID and (other stuff).
And then, rather than storing your current path as a String, store it as an enum value?
And would it be worth it to have a $path datatype in ASH?
(We used to have (and removed) a "zodiac" type. Although KoL has changed its own terminology: even though they are named after constellations, they are "moon" signs. Huh?)
Which is to say, this looked more and more like a code refactoring than a simple "function to map a string to an integer".
I'm not rejecting your idea, but I think it takes actual thought and design.
If we made "path" a data type, you're asking for
path my_path()
int to_int( path )
Which is all a little "project". Assuming we wanted to go that route.