You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidCharacter::build_mut_dependency_map( const trait_id &mut,
std::unordered_map<trait_id, int> &dependency_map, int distance )
{
// Skip base traits and traits we've seen with a lower distanceconstauto lowest_distance = dependency_map.find( mut );
if( !has_base_trait( mut ) && ( lowest_distance == dependency_map.end() ||
distance < lowest_distance->second ) ) {
dependency_map[mut] = distance;
// Recurse over all prerequisite and replacement mutationsconst mutation_branch &mdata = mut.obj();
for( const trait_id &i : mdata.prereqs ) {
build_mut_dependency_map( i, dependency_map, distance + 1 );
}
for( const trait_id &i : mdata.prereqs2 ) {
build_mut_dependency_map( i, dependency_map, distance + 1 );
}
for( const trait_id &i : mdata.replacements ) {
build_mut_dependency_map( i, dependency_map, distance + 1 );
}
}
}
The function has_base_trait is not checking for whether something is a possible starting trait; it's checking for whether this character has that trait (and not through mutation?), as far as I can tell. Why? (If my thinking is correct, this means that not only do starting traits that are in a category not push you toward that category, they make it harder to get that category, possibly counterbalanced by being a prerequisite... at least, if they're a prerequisite for mutations in that category - which is frequently not true - and if the prerequisite isn't satisfied by an alternative.)
In other words, two questions:
Is my thinking correct re the effects of the code?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
From character.cpp:
The function
has_base_trait
is not checking for whether something is a possible starting trait; it's checking for whether this character has that trait (and not through mutation?), as far as I can tell. Why? (If my thinking is correct, this means that not only do starting traits that are in a category not push you toward that category, they make it harder to get that category, possibly counterbalanced by being a prerequisite... at least, if they're a prerequisite for mutations in that category - which is frequently not true - and if the prerequisite isn't satisfied by an alternative.)In other words, two questions:
Ping: @I-am-Erk, @Venera3?
Beta Was this translation helpful? Give feedback.
All reactions