{"action":"opened","issue":{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12570","labels_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12570/labels{/name}","comments_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12570/comments","events_url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/issues/12570/events","html_url":"https://github.com/CleverRaven/Cataclysm-DDA/issues/12570","id":85867648,"number":12570,"title":"Give item/creature classes a map of \"flags with parameters\"","user":{"login":"Coolthulhu","id":1878860,"avatar_url":"https://avatars.githubusercontent.com/u/1878860?v=3","gravatar_id":"","url":"https://api.github.com/users/Coolthulhu","html_url":"https://github.com/Coolthulhu","followers_url":"https://api.github.com/users/Coolthulhu/followers","following_url":"https://api.github.com/users/Coolthulhu/following{/other_user}","gists_url":"https://api.github.com/users/Coolthulhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Coolthulhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coolthulhu/subscriptions","organizations_url":"https://api.github.com/users/Coolthulhu/orgs","repos_url":"https://api.github.com/users/Coolthulhu/repos","events_url":"https://api.github.com/users/Coolthulhu/events{/privacy}","received_events_url":"https://api.github.com/users/Coolthulhu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels/Enhancement","name":"Enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/CleverRaven/Cataclysm-DDA/labels/Suggestion%20(Discuss)","name":"Suggestion (Discuss)","color":"FF3399"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-07T07:10:46Z","updated_at":"2015-06-07T07:10:46Z","closed_at":null,"body":"We could have a `map<string, int>` for non-performance-intensive variables in item and creature (and item type and monster type) classes.\r\nThis would mimic the current flag set, except with an extra bit (64 bits more, to be precise) of extra customization.\r\n\r\nPossible uses:\r\n* `\"bite_damage\": 8` read in `monattack::bite`, letting tough zeds bite harder and decayed zeds infect more\r\n* Nicely handling `LIGHT_x` flags instead of hardcoding them\r\n* Giving creatures some customized AI information without using a horrid hack like in `monattack::searchlight`. This could be, for example, giving NPCs proper timed designations instead of the current `effect` method, which is a bit of an overkill\r\n* Charger guns not re-using `poison` member, because even though it works, it sounds just silly\r\n* Non-consumable items not even having the `poison` variable\r\n* Multiples of the same mod. Quad battery flashlight! Double leather-reinforced leather chaps!\r\n\r\n\r\nAnything wrong with this idea?"}}