private void CoinsEjected() | Private: when the owner pulls the lever, empties the vendor out in front of it and frees it. |
private async void DeactivateVendor(bool isSendingToPostBox) | Private: empties stock, payments and tax to the owner's postbox or out of the vendor, cancels tax and clears the owner. |
private void DisableColliders(Interactor interactor, Pickup pickup, PickupDock dock) | Private: turns off colliders on items in the buyer's display dock. |
private bool EmptyDock(PickupDock dock, out List<Pickup> pouches) | Private: undocks everything in a dock as pouches. |
private void FailInteractionToBuyItemDisplayDock(Interactor interactor, Interactable interactable, ref bool result) | Private: puts a display copy back in the buyer display dock when someone tries to grab it. |
private void FailInteractionToSellItemDock(Interactor interactor, Interactable interactable, ref bool result) | Private: puts a display copy back in the seller item dock when someone tries to grab it. |
private void FilterTaxDocking(Interactor interactor, Pickup pickup, ref bool result) | Private: while owned, only the owner can dock coins into the tax dock. |
private void FilterWrongOwnerDock(Interactor interactor, Pickup pickup, ref bool result) | Private: only the owner can put items in the stock dock. |
private void FilterWrongOwnerInteraction(Interactor interactor, Interactable interactable, ref bool result) | Private: only the owner can take from the stock and payment docks. |
private void FixedDockToItemDisplayDock(Interactor interactor, Pickup interactable, PickupDock dock) | Private: sends a display copy back to the buyer display dock if it ends up in any other dock. |
private void FixedDockToSellItemDock(Interactor interactor, Pickup interactable, PickupDock dock) | Private: sends a display copy back to the seller item dock if it ends up in any other dock. |
private void FixValidate() | Private: on start, ejects leftovers from an unowned vendor and frees a vendor whose tax dock holds something other than coins. |
private void ForceAmountOnBothDocks(int amount) | Private: sets both the coin and item counters to one amount. |
private void InitializeDisplayDock(PickupDock displayDock) | Private: spawns one coin into a display dock. |
private void MarkChunk(Chunk chunk) | Private: marks the chunk as needing pre wipe work, so WipeOperation runs. |
private void MoneyEnteredBuyer(Interactor interactor, Pickup pickup, PickupDock dock) | Private: when a buyer pays, works out how many lots they can afford, spawns the items and moves the coins to payments. |
private void MoneyEnteredSeller(Interactor interactor, Pickup pickup, PickupDock dock) | Private: the first player to pay tax becomes the owner; enough tax starts the tax timer. |
private void OnDestroy() | Private: unhooks from the owner player. |
private void OwnerLeft(NetworkEntity entity, bool isUnload) | Private: clears the counters' active player when the owner leaves. The vendor stays owned. |
private void PlayerJoined(IPlayer player) | Private: reconnects the owner to the counters when they rejoin. |
private void ResetAmmounts() | Private: resets both counters to 1 and updates the status. |
private void ReturnToBuyDock(Interactable interactable, Interactor interactor) | Private: docks a display copy back into the buyer display dock after it is grabbed. |
private void ReturnToSellDock(Interactable interactable, Interactor interactor) | Private: docks a display copy back into the seller item dock after it is grabbed. |
private void SendToPostBox(PickupDock dock, PlayerPostboxStorage ownerStorage) | Private: empties a dock into the owner's postbox storage. |
private void SetOwnerPlayer(IPlayer player) | Private: sets or clears the owner, resets counters when it changes and syncs the owner to clients. |
private bool StatusChangedIsNull() | Private: whether nothing listens to StatusChanged. |
private void StockAdded(Interactor interactor, Pickup pickup, PickupDock dock) | Private: on the first stock item, spawns two display copies for the seller and buyer docks and caps the item counter. |
private void StockRemoved(Interactor interactor, Pickup pickup, PickupDock dock) | Private: when stock runs out, destroys the display copies and resets the counters. |
private void Sync(IPlayer player, Stream stream) | Private: syncs the owner id. Clients let only the owner touch the stock and payment docks. |
private void TaxFailed() | Private: frees the vendor and sends its contents to the postbox when tax can't be paid. |
private void UndockToLocation(PickupDock dock, Transform location) | Private: empties a dock and drops the pouches at a spawn point. |
private void UpdateStatus(ButtonCounter counter) | Private: sets the trade status to unoccupied, out of stock or open for sale and raises StatusChanged. |