Last active
August 29, 2015 14:18
-
-
Save penev92/1ac5737b98829a5835fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Dictionary<string, PlayerReference> Players | |
{ | |
get | |
{ | |
return PlayerDefinitions | |
.Select(pr => new PlayerReference(new MiniYaml(pr.Key, pr.Value.Nodes))) | |
.ToDictionary(player => player.Name); | |
} | |
set | |
{ | |
PlayerDefinitions = value.Select(p => new MiniYamlNode("PlayerReference@{0}".F(p.Key), | |
FieldSaver.SaveDifferences(p.Value, new PlayerReference()))).ToList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment