Convert the functions to async functions that return Promise<0|1>.

Constructors

Properties

serverShopItemTextureHints: string[] = ...
serverShopPageTextureHints: string[] = ...

Accessors

Methods

  • Opens the UI for creating a new server shop.

    Parameters

    Returns Promise<1>

    returns a promise that resolves with a value of one when the player closes the UI, either by clicking the x button or saving the new shop they created.

  • Handles the server shop system settings interface and its interactions.

    Parameters

    Returns Promise<0 | 1>

    A promise that resolves to 0 or 1 based on the user's interaction with the interface.

    • 0: Indicates that the user chose to close the interface.
    • 1: Indicates that the user chose to go back or an action was completed successfully.

    The function performs the following steps:

    1. Checks if the sourceEntitya is an instance of executeCommandPlayerW and extracts the player.
    2. Asserts that the sourceEntity is defined.
    3. If ultraSecurityModeEnabled is true, checks if the player has the required permission to access the settings.
      • If the player lacks permission, shows an "Access Denied" message and returns based on the user's choice.
    4. Creates an ActionFormData form with options to manage shops, main settings, and shop item settings.
    5. Displays the form to the player and handles the user's selection:
      • manageShops: Calls ServerShopManager.manageServerShops and recursively calls serverShopSystemSettings if needed.
      • mainSettings: Calls ServerShopManager.serverShopSystemSettings_main and recursively calls serverShopSystemSettings if needed.
      • shopItemSettings: Shows a message indicating that the shop item does not exist yet and recursively calls serverShopSystemSettings if needed.
      • back: Returns 1.
      • close: Returns 0.
    6. Catches any errors that occur during the process, logs them, and shows an error message to the player.