|
virtual void | Initialize (FSubsystemCollectionBase &Collection) override |
|
virtual void | Deinitialize () override |
|
void | RequestFundsFromBank (const FOperatingSystemUser &TargetUser, const FOperatingSystemRequestFund &FundDetails, FGenericError &OutError) |
| Requests funds from a bank for a specific user. The method checks if there is already a pending request for the user, if the user is a valid registered user, and if the fund details are valid. If any of these conditions are not met, an error is returned. Otherwise, a timer is set for the specified time to approve the fund request. Upon approval, the funds will be transferred to the user's account. If the request is not approved, an error will be logged. Finally, the user who requested the funds and the corresponding JSON file will be removed.
|
|
FORCEINLINE FTimerHandle & | AddUserWhoRequestedFund (const FOperatingSystemUser &TargetUser) |
| Adds a user who requested funds to the list. This method adds a user who requested funds to the list of users who requested funds from the bank.
|
|
FORCEINLINE void | RemoveUserWhoRequestedFund (const FOperatingSystemUser &TargetUser) |
| Removes a user who requested funds from the list of users who requested funds from the bank. The method removes the specified TargetUser from the UsersRequestedForFund array and then compacts and shrinks the array to remove any empty slots.
|
|
This class represents the game subsystem for the operating system. It provides functionality for requesting funds from a bank.
Requests funds from a bank for a specific user. The method checks if there is already a pending request for the user, if the user is a valid registered user, and if the fund details are valid. If any of these conditions are not met, an error is returned. Otherwise, a timer is set for the specified time to approve the fund request. Upon approval, the funds will be transferred to the user's account. If the request is not approved, an error will be logged. Finally, the user who requested the funds and the corresponding JSON file will be removed.
- Parameters
-
TargetUser | The user for whom funds are being requested. |
FundDetails | The details of the fund request, including the account number, amount, and time to approve. |
OutError | An output parameter to hold any error that may occur during the fund request process. |