public virtual bool ResetFailedModuleIfExists()
    {
        foreach (GameObject obj in hardDrives)
        {
            RackModule rm = obj.GetComponent <RackModule>();
            if (!rm.Active)
            {
                rm.ResetModule();
                rm.ActivateModule();
                return(true);
            }
        }

        return(false);
    }
Example #2
0
    protected virtual void ResetFailedModule()
    {
        foreach (GameObject obj in Modules)
        {
            RackModule rm = obj.GetComponent <RackModule>();
            if (!rm.Active)
            {
                rm.ResetModule();
                rm.ActivateModule();
                moduleFailed = false;
                smokeEffect.Stop();
                return;
            }
        }

        Debug.LogError("Tried to reset a module but none appear damaged");
    }