Пример #1
0
    internal bool TryRepair(Enterprise enterprise, out float repairTime)
    {
        repairTime = enterprise.DamagedSystemCount * 0.1f + _repairDelay;
        if (repairTime >= 1)
        {
            repairTime = 0.9f;
        }

        _io.Write(Strings.RepairEstimate, repairTime);
        if (_io.GetYesNo(Strings.RepairPrompt, IReadWriteExtensions.YesNoMode.TrueOnY))
        {
            foreach (var system in enterprise.Systems)
            {
                system.Repair();
            }
            return(true);
        }

        repairTime = 0;
        return(false);
    }