Skip to content

Instantly share code, notes, and snippets.

@penev92
Last active August 29, 2015 14:18
Show Gist options
  • Save penev92/1ac5737b98829a5835fa to your computer and use it in GitHub Desktop.
Save penev92/1ac5737b98829a5835fa to your computer and use it in GitHub Desktop.
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