{"action":"created","issue":{"url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/issues/1168","repository_url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine","labels_url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/issues/1168/labels{/name}","comments_url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/issues/1168/comments","events_url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/issues/1168/events","html_url":"https://github.com/TeamPorcupine/ProjectPorcupine/issues/1168","id":175162148,"number":1168,"title":"Stats prototypes not loaded properly","user":{"login":"koosemose","id":6334643,"avatar_url":"https://avatars.githubusercontent.com/u/6334643?v=3","gravatar_id":"","url":"https://api.github.com/users/koosemose","html_url":"https://github.com/koosemose","followers_url":"https://api.github.com/users/koosemose/followers","following_url":"https://api.github.com/users/koosemose/following{/other_user}","gists_url":"https://api.github.com/users/koosemose/gists{/gist_id}","starred_url":"https://api.github.com/users/koosemose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koosemose/subscriptions","organizations_url":"https://api.github.com/users/koosemose/orgs","repos_url":"https://api.github.com/users/koosemose/repos","events_url":"https://api.github.com/users/koosemose/events{/privacy}","received_events_url":"https://api.github.com/users/koosemose/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-06T05:19:21Z","updated_at":"2016-09-06T14:31:43Z","closed_at":null,"body":"Somewhere along the lines reading the prototype stats from Stats.xml fails, so no stats are created. \r\n\r\nAdditionally, (this may be caused by the first problem, I'm not completely sure) when trying to read the stats from a save with a character that is also holding inventory, it will fail with the following:\r\n```\r\nArgumentNullException: Argument cannot be null.\r\nParameter name: key\r\nSystem.Collections.Generic.Dictionary`2[System.String,Stat].TryGetValue (System.String key, .Stat& value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:588)\r\nCharacter.GetStat (System.String statType) (at Assets/Scripts/Models/Character.cs:524)\r\nCharacter.ReadStatsFromSave (System.Xml.XmlReader reader) (at Assets/Scripts/Models/Character.cs:573)\r\nCharacter.ReadXml (System.Xml.XmlReader reader) (at Assets/Scripts/Models/Character.cs:456)\r\nWorld.ReadXml_Characters (System.Xml.XmlReader reader) (at Assets/Scripts/Models/World.cs:823)\r\nWorld.ReadXml (System.Xml.XmlReader reader) (at Assets/Scripts/Models/World.cs:525)\r\nSystem.Xml.Serialization.XmlSerializationReader.ReadSerializable (IXmlSerializable serializable)\r\nSystem.Xml.Serialization.XmlSerializationReaderInterpreter.ReadXmlSerializableElement (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable)\r\nSystem.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject (System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, Boolean checkType)\r\nSystem.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap)\r\nSystem.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot ()\r\nSystem.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader)\r\n```\r\n\r\nThis leads to a cascade of NREs."},"comment":{"url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/issues/comments/244968899","html_url":"https://github.com/TeamPorcupine/ProjectPorcupine/issues/1168#issuecomment-244968899","issue_url":"https://api.github.com/repos/TeamPorcupine/ProjectPorcupine/issues/1168","id":244968899,"user":{"login":"mikejbrown","id":855931,"avatar_url":"https://avatars.githubusercontent.com/u/855931?v=3","gravatar_id":"","url":"https://api.github.com/users/mikejbrown","html_url":"https://github.com/mikejbrown","followers_url":"https://api.github.com/users/mikejbrown/followers","following_url":"https://api.github.com/users/mikejbrown/following{/other_user}","gists_url":"https://api.github.com/users/mikejbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/mikejbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikejbrown/subscriptions","organizations_url":"https://api.github.com/users/mikejbrown/orgs","repos_url":"https://api.github.com/users/mikejbrown/repos","events_url":"https://api.github.com/users/mikejbrown/events{/privacy}","received_events_url":"https://api.github.com/users/mikejbrown/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T14:31:43Z","updated_at":"2016-09-06T14:31:43Z","body":"Ah okay. Probably needs to go here:\r\nModsManager.cs:25\r\n```\r\n    public void LoadPrototypes()\r\n    {\r\n        PrototypeManager.Furniture.LoadPrototypes(mods);\r\n        PrototypeManager.Inventory.LoadPrototypes(mods);\r\n        PrototypeManager.Need.LoadPrototypes(mods);\r\n        PrototypeManager.Trader.LoadPrototypes(mods);\r\n        PrototypeManager.SchedulerEvent.LoadPrototypes(mods);\r\n\r\n        FurnitureActions.LoadModsScripts(mods);\r\n        NeedActions.LoadModsScripts(mods);\r\n    }\r\n```"}}
{"actor":{"display_login":"mikejbrown"}}