protected function jsLoadBoard() { parent::jsLoadBoard(); if ($this->phase == 'Builds') { // Expand the allowed SupplyCenters array to include non-home SCs. libHTML::$footerIncludes[] = '../variants/Modern2/resources/supplycenterscorrect.js'; foreach (libHTML::$footerScript as $index => $script) { libHTML::$footerScript[$index] = str_replace('loadBoard();', 'loadBoard();SupplyCentersCorrect();', $script); } } }
protected function jsLoadBoard() { parent::jsLoadBoard(); if ($this->phase == 'Builds') { // Expand the allowed SupplyCenters array to include non-home SCs. libHTML::$footerIncludes[] = l_jf('../variants/BuildAnywhere/resources/supplycenterscorrect.js'); foreach (libHTML::$footerScript as $index => $script) { if (strpos($script, l_jf('loadBoard') . '();')) { libHTML::$footerScript[$index] = str_replace(l_jf('loadBoard') . '();', l_jf('loadBoard') . '();' . l_jf('SupplyCentersCorrect') . '();', $script); } } } }