Browse Source

Add `OnModifyLogin()` signal support

new
Anton Tarasenko 3 years ago
parent
commit
0274c0c31f
  1. 11
      sources/Packages.uc

11
sources/Packages.uc

@ -41,6 +41,7 @@ var private config bool useGameModes;
var VotingHandlerAdapter votingAdapter; var VotingHandlerAdapter votingAdapter;
var Mutator_OnMutate_Signal onMutateSignal; var Mutator_OnMutate_Signal onMutateSignal;
var Mutator_OnModifyLogin_Signal onModifyLoginSignal;
var Mutator_OnCheckReplacement_Signal onCheckReplacementSignal; var Mutator_OnCheckReplacement_Signal onCheckReplacementSignal;
var private LoggerAPI.Definition infoFeatureEnabled; var private LoggerAPI.Definition infoFeatureEnabled;
@ -154,6 +155,8 @@ private function SetupMutatorSignals()
service = UnrealService(class'UnrealService'.static.Require()); service = UnrealService(class'UnrealService'.static.Require());
onMutateSignal = Mutator_OnMutate_Signal( onMutateSignal = Mutator_OnMutate_Signal(
service.GetSignal(class'Mutator_OnMutate_Signal')); service.GetSignal(class'Mutator_OnMutate_Signal'));
onModifyLoginSignal = Mutator_OnModifyLogin_Signal(
service.GetSignal(class'Mutator_OnModifyLogin_Signal'));
onCheckReplacementSignal = Mutator_OnCheckReplacement_Signal( onCheckReplacementSignal = Mutator_OnCheckReplacement_Signal(
service.GetSignal(class'Mutator_OnCheckReplacement_Signal')); service.GetSignal(class'Mutator_OnCheckReplacement_Signal'));
} }
@ -177,6 +180,14 @@ function Mutate(string command, PlayerController sendingController)
super.Mutate(command, sendingController); super.Mutate(command, sendingController);
} }
function ModifyLogin(out string portal, out string options)
{
if (onModifyLoginSignal != none) {
onModifyLoginSignal.Emit(portal, options);
}
super.ModifyLogin(portal, options);
}
defaultproperties defaultproperties
{ {
useGameModes = false useGameModes = false