[Vector Art]: separate hair colours for head and pubic hair
As requested in #166 (closed) .
Merge request reports
Activity
Might as well separate underarm hair while you are at it. Is it even a thing? I didn't notice it when I tried to fix things.
Edited by Pregmoddermentioned in commit 2e1d2419
@prndev I've been investigating doing hair highlight art (maybe just a simple linear gradient for art simplicity), but for us short-bus kids.... how would I go about 'activating' the new art with this change?
When I looked in the salon.tw file everything (primary [main color] and secondary [highlights] hair colors) seemed to be rolled into .hColor and it seemed very unclear how I would do highlights overlaying the primary color.
I did see that there was a HairArtColorJS (or whatever the name is) that seems to be related because of 'ExtractHairColor'.
Do you have any tips on how I would go about doing that?
I am not sure if I understand your question correctly. Can it be phrased as "How to find out what colour a slaves's hair's highlights are (if any)?"?
First of all, you are right, .hColor is actually a .hColorDescription as it is a string describing the hair colour. I wrote extractHairColor to do some guesswork based on what is written in the string.
The clean solution would be to go through all the code, including salon, slave generation, predefined slave databases, description widgets, etc. so the description is the description and the actual colour (as in "usable for art") is stored in a separate variable.
The unclean, but much quicker done solution would writing a function exctractHairHighlightColor which guesses the highlight colour from the .hColor string. Would that be sufficient for your needs? It would be something like
var highlights = hColor.match(/with .+(?= highlights)/); // not all browsers support positive regex lookaheads, yet. if (highlights) { highlights = highlights[0].replace("with ",""); } return highlights;
Edited by prndev