Custom memory inspector widget(s)
-
It would be really nice to have the ability to define "widgets" that appear in the info bar (on the right side of the screen) when clicking on an object.
As an example, all of my creeps have a memory.role = "XXX" where XXX is used by my code to determine their behaviour.
Rather than resorting to the console (or memory watch) to see what role (or other memory data) the creep has, it would be nice to have this appear as part of the "inspector" UI.
Example:
Game.inspectors = {
"creep": [
"role",
"..."
],
"spawn": [
"..."
]
]Would define "inspectors" for creeps and spawns. (Replace ... with whatever memory.XXX keys you are interested in).
And if you wanted to get really fancy you could even define "control types" for each field i.e. gauges, icons, coloured text, etc. to specially format this information.
-
I would very much like to see this.
-
bump
-
oh god, yes. I meant to suggest something similar! This would be so nice... though I'd go for this to add a nice label as well:
Game.inspectors = {
"creep": {
"role": "Current <b>Role</b>",
"foo": "<i>Bar</i>"
},
"spawn": {
"foo": '<span style="color:red">Bar</span>'
}
]This way we can make it fancy ourselves. Even better might be:
Game.inspectors = {
"creep": [
{
value: "role",
prefix: '<span style="color:green">',
suffix: '</span>',
label: "Current <b>Role</b>"
},
...
],
"spawn": [
...
]
]