{"action":"created","issue":{"url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1945","labels_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1945/labels{/name}","comments_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1945/comments","events_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1945/events","html_url":"https://github.com/MovingBlocks/Terasology/issues/1945","id":107958360,"number":1945,"title":"Support complex components","user":{"login":"msteiger","id":1820007,"avatar_url":"https://avatars.githubusercontent.com/u/1820007?v=3","gravatar_id":"","url":"https://api.github.com/users/msteiger","html_url":"https://github.com/msteiger","followers_url":"https://api.github.com/users/msteiger/followers","following_url":"https://api.github.com/users/msteiger/following{/other_user}","gists_url":"https://api.github.com/users/msteiger/gists{/gist_id}","starred_url":"https://api.github.com/users/msteiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msteiger/subscriptions","organizations_url":"https://api.github.com/users/msteiger/orgs","repos_url":"https://api.github.com/users/msteiger/repos","events_url":"https://api.github.com/users/msteiger/events{/privacy}","received_events_url":"https://api.github.com/users/msteiger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MovingBlocks/Terasology/labels/Architecture","name":"Architecture","color":"A13027"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-23T16:33:11Z","updated_at":"2015-09-25T03:55:08Z","closed_at":null,"body":"I'm currently re-writing the Quests module and designed the following format to define player quests:\r\n```json\r\n\"Quest\" : {\r\n    \"shortName\" : \"TestQuest\",\r\n    \"tasks\" : [\r\n        {\r\n            \"id\" : \"collectDirt\",\r\n            \"type\" : \"CollectBlocksTask\",\r\n            \"data\" : { \"amount\" : 3 }\r\n        },\r\n        {\r\n            \"id\" : \"returnHome\",\r\n            \"type\" : \"GoToBeaconTask\",\r\n            \"dependsOn\" : [\"collectDirt\"],\r\n            \"data\" : {  }\r\n        }\r\n    ]\r\n}\r\n```\r\nThe different parts of a quests (=tasks) are nested inside a single quest component, because different instances of a class can exist. For example: collect 3 dirt blocks and 2 wood blocks.\r\n\r\nThis is not yet  working,  because the `tasks` element are not parsed (no entry in type serialization library?) even though a default Gson instance can read it just fine.\r\n\r\nAlso, the factories to convert `type` and `data` json into actual `Task` implementations need to be manually added the because ModuleEnvironment.getSubtypesOf() method is not available for modules.\r\n\r\nIdeas? Feedback? Sending a ping to @nh-99 @MarcinSc @Josharias  and @immortius."},"comment":{"url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/comments/143117663","html_url":"https://github.com/MovingBlocks/Terasology/issues/1945#issuecomment-143117663","issue_url":"https://api.github.com/repos/MovingBlocks/Terasology/issues/1945","id":143117663,"user":{"login":"immortius","id":1388872,"avatar_url":"https://avatars.githubusercontent.com/u/1388872?v=3","gravatar_id":"","url":"https://api.github.com/users/immortius","html_url":"https://github.com/immortius","followers_url":"https://api.github.com/users/immortius/followers","following_url":"https://api.github.com/users/immortius/following{/other_user}","gists_url":"https://api.github.com/users/immortius/gists{/gist_id}","starred_url":"https://api.github.com/users/immortius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immortius/subscriptions","organizations_url":"https://api.github.com/users/immortius/orgs","repos_url":"https://api.github.com/users/immortius/repos","events_url":"https://api.github.com/users/immortius/events{/privacy}","received_events_url":"https://api.github.com/users/immortius/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T03:55:08Z","updated_at":"2015-09-25T03:55:08Z","body":"You probably just need to put a ```@MappedContainer``` annotation on whatever class you use to hold task."}}