Skip to main content

RepairBoxDevControlPanel

A class in Root.Township, Alta.UI.

Developer-only panel on a repair box with build and destroy buttons. It deletes itself unless the local player is a developer.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private PhysicalButton buildButtonButton that sends the build command.
private PhysicalButton destroyButtonButton that sends the destroy command.
private TextRenderer messageTextText on the panel, refreshed on start.
private RepairBox repairBoxThe repair box the commands go to.

Methods​

5 private and internal methods
MemberWhat it is
private void Awake()Deletes the panel if there is no repair box or the local player is not a developer; otherwise hooks the buttons.
private void FilterInteraction(Interactor interactor, Interactable interactable, ref bool result)Only lets developers press the buttons.
private void HandleBuildPressed(Interactable arg1, Interactor arg2)Asks the server to build the repair box.
private void HandleDestroyPressed(Interactable arg1, Interactor arg2)Asks the server to destroy the repair box.
private void OnDestroy()Unhooks the buttons.