add hooks framework and add hook for portal added (fixes #87)

This commit is contained in:
Stefan Breunig
2013-02-10 23:07:33 +01:00
parent d0df5b84a3
commit 1bbbe05a86
3 changed files with 55 additions and 0 deletions

View File

@ -276,6 +276,8 @@ window.renderPortal = function(ent) {
window.renderResonators(ent);
window.runHooks('portalAdded', {portal: p});
// portalLevel contains a float, need to round down
p.addTo(portalsLayers[parseInt(portalLevel)]);
}