Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9c1f40c6c8 | |||
c849601598 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -362,3 +362,4 @@ MigrationBackup/
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
/.config/dotnet-tools.json
|
||||
.idea/.idea.ASS/.idea
|
||||
|
43
ASS.csproj
43
ASS.csproj
@@ -37,40 +37,40 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>BepInEx\core\0Harmony.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\BepInEx\core\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx, Version=5.4.21.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\BepInEx\core\BepInEx.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\BepInEx\core\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\Comfort.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\Comfort.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort.Unity, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\Comfort.Unity.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\Comfort.Unity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ConfigurationManager">
|
||||
<HintPath>F:\SPT-AKI-DEV\BepInEx\plugins\ConfigurationManager.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\BepInEx\plugins\ConfigurationManager.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ItemComponent.Types, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\ItemComponent.Types.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\ItemComponent.Types.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ItemTemplate.Types, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\ItemTemplate.Types.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\ItemTemplate.Types.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="spt-common">
|
||||
<HintPath>F:\SPT-AKI-DEV\BepInEx\plugins\spt\spt-common.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\BepInEx\plugins\spt\spt-common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="spt-reflection">
|
||||
<HintPath>F:\SPT-AKI-DEV\BepInEx\plugins\spt\spt-reflection.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\BepInEx\plugins\spt\spt-reflection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -82,17 +82,17 @@
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\UnityEngine.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.IMGUIModule">
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.TextRenderingModule">
|
||||
<HintPath>F:\SPT-AKI-DEV\EscapeFromTarkov_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
|
||||
<HintPath>C:\Games\Escape from Tarkov\Escape from Tarkov\EscapeFromTarkov_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -102,17 +102,4 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy "$(TargetPath)" "F:\SPT-AKI-DEV\BepInEx\plugins\$(TargetName).dll"
|
||||
|
||||
if "$(ConfigurationName)" == "Debug" (
|
||||
copy "$(TargetDir)$(TargetName).pdb" "F:\SPT-AKI-DEV\BepInEx\plugins\$(TargetName).pdb"
|
||||
) else (
|
||||
del "F:\SPT-AKI-DEV\BepInEx\plugins\$(TargetName).pdb"
|
||||
)
|
||||
|
||||
if "$(ConfigurationName)" == "Release" (
|
||||
powershell -ExecutionPolicy Bypass -NoProfile -NonInteractive -File "$(ProjectDir)PackageMods.ps1" -ConfigurationName "$(ConfigurationName)" -TargetPath "F:\SPT-AKI-DEV\BepInEx\plugins\$(TargetName).dll" -TargetName "$(TargetName)" -TargetDir "F:\SPT-AKI-DEV\BepInEx\plugins"
|
||||
)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
11
Component.cs
11
Component.cs
@@ -65,7 +65,7 @@ namespace armorMod
|
||||
RepairItems(weaponSlotDictionary, false);
|
||||
}
|
||||
|
||||
timeSinceLastRepair = 0f;
|
||||
timeSinceLastRepair = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,15 +98,16 @@ namespace armorMod
|
||||
if (item.TryGetItemComponent<RepairableComponent>(out var component))
|
||||
{
|
||||
float maxCap = isArmor ? AssPlugin.MaxDurabilityCap.Value : AssPlugin.weaponMaxDurabilityCap.Value;
|
||||
float maxRepairableDurability = (maxCap / 100) * component.MaxDurability;
|
||||
float maxRepairableDurability = (maxCap / 100) * component.TemplateDurability;
|
||||
// Logger.LogInfo(component.Item.Id + " " + component.TemplateDurability + " " + component.MaxDurability);
|
||||
|
||||
if (component.Durability < maxRepairableDurability)
|
||||
{
|
||||
#if DEBUG
|
||||
Logger.LogWarning($"Repairing {item.Name.Localized()} in {slot} with {component.Durability} / {component.MaxDurability} durability");
|
||||
#endif
|
||||
component.Durability = Mathf.Min(component.Durability + repairRate, component.MaxDurability);
|
||||
component.MaxDurability = Mathf.Max(component.MaxDurability - maxDurabilityDrainRate, 0);
|
||||
component.Durability = Mathf.Min(component.Durability + repairRate, component.TemplateDurability);
|
||||
component.MaxDurability = Mathf.Max(component.TemplateDurability - maxDurabilityDrainRate, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,4 +138,4 @@ namespace armorMod
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user