11 Debug.
Log(
"repairing from GameConstants.STATE_RUINED");
16 if (CanRepairToPristine(
player) || CanBeRepairedToPristine(
item))
33 entity.SetAllowDamage(
true);
44 if (!CanRepairToPristine(
player) && !CanBeRepairedToPristine(
item))
73 entity.ProcessInvulnerabilityCheck(
entity.GetInvulnerabilityTypeString());
116 return item.CanBeRepairedToPristine();
Super root of all classes in Enforce script.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
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)
float GetKitRepairCost(ItemBase repair_kit, Object item)
bool CanRepair(ItemBase repair_kit, Object item, string damage_zone="")
bool Repair(PlayerBase player, ItemBase repair_kit, Object item, float specialty_weight, string damage_zone="", bool use_kit_qty=true)
bool CanBeRepairedToPristine(Object item)
Item can be repaired to 100%.
bool IsRepairValid(int repair_kit_type, int repairable_with_type)
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.