|
|
@@ -215,8 +215,18 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
|
|
|
if (item != null && item.Item == MaintenanceItemEnum.BoatRecipeThickness1.ToString())
|
|
|
{
|
|
|
- Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, thickness);
|
|
|
- SetCurrentFilmThickness(Singleton<ScheduleMaintenanceDataManager>.Instance.GetItem(item.Item).CurrentValue);
|
|
|
+ var currentValue = Singleton<ScheduleMaintenanceDataManager>.Instance.GetItem(item.Item).CurrentValue;
|
|
|
+ if ((currentValue + thickness) <= 0)
|
|
|
+ {
|
|
|
+ Singleton<ScheduleMaintenanceDataManager>.Instance.SetValue(item.Item, 0);
|
|
|
+ currentValue = 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, thickness);
|
|
|
+ }
|
|
|
+ SetCurrentFilmThickness(currentValue);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|