eronoobos / BABAR-The-Shardifant

Balanced Annihilation & Balanced Annilhation Reloaded configuration for Shard
2 stars 1 forks source link

module local variables need to be inspected #40

Open eronoobos opened 8 years ago

eronoobos commented 8 years ago

see https://github.com/eronoobos/BABAR-The-Shardifant/issues/10#issuecomment-229742053

To handle multiple ShardSpringLua teams correctly, any local variables in modules are potential problems. Constants are fine, but anything that's changed during the game by the module needs to be put inside a module function, within the module's table.

do:

function Module:DoStuff()
  self.thing = value
end

do not:

local thing
function Module:DoStuff()
  thing = value
end
eronoobos commented 8 years ago

I think the only thing left is mobMap in maphandler. It won't cause problems, but it is weirdly overwritten with each new AI instance