Seems female humans have gender dysphoria, they will get their gender variable changed by something other than runtime code. I changed every thing in the code to set gender using the setgender proc, it is supposed to runtime and cry when somebody tries to change my human into an IT, they, xir or transfat thing, yet the issue still occurs without anything showing up in the runtime log.
Numbered Steps to Reproduce Problem:
Its hit or miss when it will happen.
Code Snippet (if applicable) to Reproduce Problem:
/datum/proc/setGender(gend = FEMALE)
if(!("gender" in vars))
CRASH("Oh MODERATOR EDIT the [src] doesn't have a gender variable.")
if(ishuman(src))
ASSERT(gend != PLURAL && gend != NEUTER)
src:gender = gend
/mob/living/carbon/human/setGender(gend = FEMALE)
if(gend == PLURAL || gend == NEUTER || (gend != FEMALE && gend != MALE))
CRASH("SOMEBODY SET A BAD GENDER ON [src] [gend]")
src.prev_gender = src.gender
src.gender = gend
testing("Set [src]'s gender to [gend], old gender [prev_gender]")
Expected Results:
A human will never get their gender set to something not MALE or FEMALE(sorry i'm cisgendered scum I know)
Actual Results:
Something is setting the gender that is not using this proc.
Does the problem occur:
Every time? Or how often?
It happens mostly with turning females into ITs
When does the problem NOT occur?
Seems males dont have gender dysphoria
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
Another thing to look for is if this datum is getting saved or loaded anywhere. It's possible that you're seeing old datums being loaded from before the time you implemented any sanity checks.
I also had to edit your report because you used the N word in your code. Dude, seriously? There's no excuse for that on the forum. I don't care if it's something that slipped through a copy-paste without you realizing it--what's it doing in your code in the first place? That isn't acceptable.