diff --git a/config/AcediaSystem.ini b/config/AcediaSystem.ini index fdc0466..bd94299 100644 --- a/config/AcediaSystem.ini +++ b/config/AcediaSystem.ini @@ -11,6 +11,16 @@ ; This is the least offensive side effect of AcediaCore and there should ; be no reason to prevents its `GameRules` from being added. allowAddingGameRules=true +; If allowed, AcediaCore can provide some additional information about +; itself and other packages through "help" / "status" / "version" / "credits" +; mutate commands, as well as allow to use "mutate acediacommands" to +; emergency-enable `Commands` feature. +; However that required access to "mutate" command events, which might not +; always be desirable from `AcediaCore` library. This setting allows you to +; disable such hooks. +; NOTE: setting this to `false` will not prevent `Commands` feature from +; hooking into mutate on its own. +allowHookingIntoMutate=true ; Unfortunately, thanks to the TWI's code, there's no way to catch events ; of when certain kinds of damage are dealt: from welder, bloat's bile and ; siren's scream. At least not without something drastic, like replacing game diff --git a/sources/BaseRealm/Global.uc b/sources/BaseRealm/Global.uc index 15e96d8..724b722 100644 --- a/sources/BaseRealm/Global.uc +++ b/sources/BaseRealm/Global.uc @@ -79,7 +79,6 @@ protected function Initialize() db = DBAPI(memory.Allocate(class'DBAPI')); avarice = AvariceAPI(memory.Allocate(class'AvariceAPI')); environment = AcediaEnvironment(memory.Allocate(class'AcediaEnvironment')); - class'InfoQueryHandler'.static.StaticConstructor(); } public function DropCoreAPI() diff --git a/sources/CoreRealm/API/SideEffects/SideEffect.uc b/sources/CoreRealm/API/SideEffects/SideEffect.uc index 7b95877..3b1296f 100644 --- a/sources/CoreRealm/API/SideEffects/SideEffect.uc +++ b/sources/CoreRealm/API/SideEffects/SideEffect.uc @@ -49,7 +49,7 @@ class SideEffect extends AcediaObject * this is not a side effect. Such mods are likely not going to have to specify * any side effects whatsoever. * - * ## Implemention your own `SideEffect`s + * ## Implementiong your own `SideEffect`s * * Simply make a non-abstract child class based on `SideEffect`, create its * instance filled with necessary data and register it in `SideEffectAPI` once diff --git a/sources/CoreRealm/SideEffects.uc b/sources/CoreRealm/SideEffects.uc index 104ab12..8ad922a 100644 --- a/sources/CoreRealm/SideEffects.uc +++ b/sources/CoreRealm/SideEffects.uc @@ -37,6 +37,19 @@ class SideEffects extends AcediaObject */ var public const config bool allowAddingGameRules; +/** + * If allowed, AcediaCore can provide some additional information about + * itself and other packages through "help" / "status" / "version" / "credits" + * mutate commands, as well as allow to use "mutate acediacommands" to + * emergency-enable `Commands` feature. + * However that required access to "mutate" command events, which might not + * always be desirable from `AcediaCore` library. This setting allows you to + * disable such hooks. + * NOTE: setting this to `false` will not prevent `Commands` feature from + * hooking into mutate on its own. + */ +var public const config bool allowHookingIntoMutate; + /** * Unfortunately, thanks to the TWI's code, there's no way to catch events * of when certain kinds of damage are dealt: from welder, bloat's bile and @@ -87,6 +100,7 @@ var public const config BroadcastAPI.InjectionLevel broadcastHandlerInjectionLev defaultproperties { allowAddingGameRules = true + allowHookingIntoMutate = true allowReplacingDamageTypes = true broadcastHandlerInjectionLevel = BHIJ_Root } \ No newline at end of file diff --git a/sources/ServerRealm/ServerGlobal.uc b/sources/ServerRealm/ServerGlobal.uc index b91c024..746cedc 100644 --- a/sources/ServerRealm/ServerGlobal.uc +++ b/sources/ServerRealm/ServerGlobal.uc @@ -59,12 +59,14 @@ public final function bool ConnectServerLevelCore() return false; } Initialize(); - class'UnrealService'.static.Require(); - // TODO: this is hack as fuck, needs to be redone _ = class'Global'.static.GetInstance(); - _.unreal.mutator.OnMutate( - ServiceAnchor(_.memory.Allocate(class'ServiceAnchor'))) - .connect = EnableCommandsFeature; + if (class'SideEffects'.default.allowHookingIntoMutate) + { + class'InfoQueryHandler'.static.StaticConstructor(); + _.unreal.mutator.OnMutate( + ServiceAnchor(_.memory.Allocate(class'ServiceAnchor'))) + .connect = EnableCommandsFeature; + } return true; }