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.
- Listed in ATT, Features and other game namespaces
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
RespawnShrineFuelDockController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private PickupDock pickupDock | Dock players put fuel into. |
private PoweredRespawnShrine poweredRespawnShrine | The shrine that gets the fuel. |
private Transform refundLocation | Where extra fuel items are placed. |
Properties
1 private and internal property
| Member | What it is |
|---|---|
private IRespawnSystemSettings SystemSettings { get; } | The global RespawnSystemSettings. |
Methods
5 private and internal methods
| Member | What 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. |