Rename actor bootstrap flow to welcome new actors
- Rename the ActorStore method to `welcomeNewActor` - Update the bank account created event handler and token name to match
This commit is contained in:
parent
7b7eb2a0f0
commit
b182212ecf
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if (isNil QEGVAR(common,EventBus)) then { call EFUNC(common,eventBus); };
|
if (isNil QEGVAR(common,EventBus)) then { call EFUNC(common,eventBus); };
|
||||||
if (isNil QGVAR(BankAccountCreatedEventTokens)) then {
|
if (isNil QGVAR(BankAccountCreatedEventTokens)) then {
|
||||||
private _bootstrapNewActorFromBankAccount = {
|
private _welcomeNewActor = {
|
||||||
params ["_event"];
|
params ["_event"];
|
||||||
|
|
||||||
private _uid = _event getOrDefault ["uid", ""];
|
private _uid = _event getOrDefault ["uid", ""];
|
||||||
@ -19,10 +19,10 @@ if (isNil QGVAR(BankAccountCreatedEventTokens)) then {
|
|||||||
_actor set ["uid", _uid];
|
_actor set ["uid", _uid];
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(ActorStore) call ["bootstrapNewActor", [_uid, _actor]];
|
GVAR(ActorStore) call ["welcomeNewActor", [_uid, _actor]];
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(BankAccountCreatedEventTokens) = [
|
GVAR(BankAccountCreatedEventTokens) = [
|
||||||
EGVAR(common,EventBus) call ["on", ["bank.account.created", _bootstrapNewActorFromBankAccount, "actor.newActor.bootstrap"]]
|
EGVAR(common,EventBus) call ["on", ["bank.account.created", _welcomeNewActor, "actor.newActor.welcome"]]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -203,7 +203,7 @@ GVAR(ActorBaseStore) = compileFinal createHashMapFromArray [
|
|||||||
|
|
||||||
true
|
true
|
||||||
}],
|
}],
|
||||||
["bootstrapNewActor", compileFinal {
|
["welcomeNewActor", compileFinal {
|
||||||
params [["_uid", "", [""]], ["_actor", createHashMap, [createHashMap]]];
|
params [["_uid", "", [""]], ["_actor", createHashMap, [createHashMap]]];
|
||||||
|
|
||||||
if (_uid isEqualTo "") exitWith { false };
|
if (_uid isEqualTo "") exitWith { false };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user