new callbacks are only supported in some modes, so leave backwards compatiblity in
This commit is contained in:
parent
4ab3bf7650
commit
8ab5d384da
@ -36,7 +36,7 @@ class ScriptManager {
|
|||||||
* @param bool $enable
|
* @param bool $enable
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function enableScriptCallbacks($enable = true) {
|
public function enableScriptCallbacks() {
|
||||||
if (!$this->isScriptMode()) {
|
if (!$this->isScriptMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,14 @@ class ScriptManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO verify that the old S_ isnt needed anymore
|
//TODO remove later, than only the last 2 lines are needed in future
|
||||||
|
if (!array_key_exists('S_UseScriptCallbacks', $scriptSettings)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$scriptSettings['S_UseScriptCallbacks'] = true;
|
||||||
|
$this->maniaControl->getClient()->setModeScriptSettings($scriptSettings);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->maniaControl->getModeScriptEventManager()->enableCallbacks();
|
$this->maniaControl->getModeScriptEventManager()->enableCallbacks();
|
||||||
Logger::logInfo("Script Callbacks successfully enabled!");
|
Logger::logInfo("Script Callbacks successfully enabled!");
|
||||||
|
Loading…
Reference in New Issue
Block a user