{"action":"closed","issue":{"url":"https://api.github.com/repos/frogatto/frogatto/issues/187","labels_url":"https://api.github.com/repos/frogatto/frogatto/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/frogatto/frogatto/issues/187/comments","events_url":"https://api.github.com/repos/frogatto/frogatto/issues/187/events","html_url":"https://github.com/frogatto/frogatto/issues/187","id":105962111,"number":187,"title":"Replace all usage of objects which \"change type to keep particles from dying\" with some new 'attached-object' system","user":{"login":"rkettering","id":863312,"avatar_url":"https://avatars.githubusercontent.com/u/863312?v=3","gravatar_id":"","url":"https://api.github.com/users/rkettering","html_url":"https://github.com/rkettering","followers_url":"https://api.github.com/users/rkettering/followers","following_url":"https://api.github.com/users/rkettering/following{/other_user}","gists_url":"https://api.github.com/users/rkettering/gists{/gist_id}","starred_url":"https://api.github.com/users/rkettering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkettering/subscriptions","organizations_url":"https://api.github.com/users/rkettering/orgs","repos_url":"https://api.github.com/users/rkettering/repos","events_url":"https://api.github.com/users/rkettering/events{/privacy}","received_events_url":"https://api.github.com/users/rkettering/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/frogatto/frogatto/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/frogatto/frogatto/labels/Content/Object%20Development","name":"Content/Object Development","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-11T07:59:18Z","updated_at":"2015-09-24T07:04:41Z","closed_at":"2015-09-24T07:04:41Z","body":"We need to do something not terribly unlike hittable attache (but much simpler, because it doesn't need to track any collisions, ever), to handle attaching particle systems to objects that may die.\r\n\r\nWe have an old idiom for this situation:  consider an object with a particle system *which specifically needs to take an extended period of time; maybe half a second, maybe a few, to visually dissipate*.  If this object dies and is immediately removed from the game, any local 'particle systems' it has attached to it are immediately deleted, too.  Imagine a mushroom cloud just suddenly disappearing halfways into erupting, etc.\r\n\r\nCurrently we solve this by altering the 'type' of the object (which contains all the applicable event handlers, properties, etc) to a different type that's got very few properties, no graphics, and will consistently delete itself after a user-specified delay.\r\n\r\nThis breaks under our strict mode;  we need to replace this whole system.  What our replacement needs to be, is something where any such particle systems are no longer attached to the object they're coming from, but are attached to a secondary object which can persist a short while after its parent dies.  Like hittable attache, it needs to have its own decent disposal mechanisms and so forth.\r\n\r\nCommon instances of this are frogatto's energy shot and arcane shot, the moth attacks, and we can text-search for this via 'set(type'\r\n"}}