4 {
5 switch (item.GetHealthLevel(damage_zone))
6 {
7 case GameConstants.STATE_PRISTINE:
8 break;
9 case GameConstants.STATE_RUINED:
10 #ifdef DEVELOPER
11 Debug.Log(
"repairing from GameConstants.STATE_RUINED");
12 #endif
13 CalculateHealth(player, repair_kit, item, specialty_weight, damage_zone, use_kit_qty);
14 break;
15 case GameConstants.STATE_WORN:
17 {
18 CalculateHealth(player, repair_kit, item, specialty_weight, damage_zone, use_kit_qty);
19 }
20 break;
21 default:
22 CalculateHealth(player, repair_kit, item, specialty_weight, damage_zone, use_kit_qty);
23 break;
24 }
25
26 return true;
27 }
bool CanRepairToPristine(PlayerBase player)
Player can repair items to 100%; currently unused.
void CalculateHealth(PlayerBase player, ItemBase kit, Object item, float specialty_weight, string damage_zone="", bool use_kit_qty=true)
bool CanBeRepairedToPristine(Object item)
Item can be repaired to 100%.