public static string GetVariantEmoji(string baseEmoji, NPCIdentityData identityData) { string skinToneSuffix = Emoji.GetSkinTones()[identityData.GetSkinToneIndex()]; string genderSuffix = Emoji.GetGenderSuffixes()[identityData.GetGenderIndex()]; return(baseEmoji + skinToneSuffix + genderSuffix); }
private void Stream(SaveStream stream) { if (!stream.IsWriting()) { NPCIdentifier.currentMaxID = 0; } mInventory.Stream(stream); mRoom.Stream(stream); mGameTime.Stream(stream); int numNPCData = mNPCIdentities.Count; stream.Stream(ref numNPCData, SaveUtils.GetNumBitsToStoreValue(NPCIdentifier.maxNumNPCs)); if (stream.IsWriting()) { foreach (KeyValuePair <int, NPCIdentityData> pair in mNPCIdentities) { int id = pair.Key; stream.Stream(ref id, SaveUtils.GetNumBitsToStoreValue(NPCIdentifier.maxNumNPCs - 1)); pair.Value.Stream(stream); } } else { mNPCIdentities.Clear(); for (int npcIdentityIndex = 0; npcIdentityIndex < numNPCData; npcIdentityIndex++) { int id = 0; NPCIdentityData data = new NPCIdentityData(); stream.Stream(ref id, SaveUtils.GetNumBitsToStoreValue(NPCIdentifier.maxNumNPCs - 1)); data.Stream(stream); mNPCIdentities[id] = data; } } }