With the following in memory: (this can be copy/pasted directly into the Memory tab and committed)
{
"creeps": {},
"spawns": {},
"DEBUG": true,
"q": {
"[spawn Spawn1]": [
[
[
"work",
"carry",
"carry",
"move",
"move"
],
"harvester_1",
{
"type": "harvester"
}
],
[
[
"tough",
"attack",
"move",
"move"
],
"guard2",
{
"type": "guard"
}
],
[
[
"work",
"carry",
"carry",
"move",
"move"
],
"harvester_3",
{
"type": "harvester"
}
],
[
[
"ranged_attack",
"move",
"move",
"move",
"move"
],
"fighter4",
{
"type": "ranged_fighter"
}
],
[
[
"heal",
"heal",
"move",
"move",
"move"
],
"healer5",
{
"type": "healer"
}
]
]
}
}
The following code returns 0:
console.log(Object.keys(Memory.q).length);
When it's obvious that Memory.q in fact holds a reference to a spawning location.
logging just (Memory.q) outputs the [Object object] reference, so I know it exists somewhere.
What am I missing? Or is this just bugged?