Skip to main content

RespawnShrineFuelDockController

A class in Root.Township, ATT.Respawn.

Server: turns fuel items docked into a powered shrine's pickup dock into shrine fuel, and pushes out anything over the cap.

Constructors​

MemberWhat it is
RespawnShrineFuelDockController()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private PickupDock pickupDockDock players put fuel into.
private PoweredRespawnShrine poweredRespawnShrineThe shrine that gets the fuel.
private Transform refundLocationWhere extra fuel items are placed.

Properties​

1 private and internal property
MemberWhat it is
private IRespawnSystemSettings SystemSettings { get; }The global RespawnSystemSettings.

Methods​

5 private and internal methods
MemberWhat it is
private void AddFuelToPickupDock(int fuelQuantityToAdd, Guid shrineId)Spawns the shrine's fuel resource and docks a quantity of it. Not called in this build.
private void Awake()Hooks the dock's quantity changes.
private void OnDestroy()Unhooks the dock's quantity changes.
private void OnQuantityChanged()Server: undocks the extra if the shrine would overfill, otherwise adds the docked amount as fuel and destroys the items.
private bool RefundExtraItems(PickupDock dock, int quantityToRefund)Undocks the given quantity and moves it to the refund point. Returns false if there was nothing to refund.