Compare commits
2 Commits
master
...
9c1f40c6c8
Author | SHA1 | Date | |
---|---|---|---|
9c1f40c6c8 | |||
c849601598 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -362,3 +362,4 @@ MigrationBackup/
|
|||||||
# Fody - auto-generated XML schema
|
# Fody - auto-generated XML schema
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
/.config/dotnet-tools.json
|
/.config/dotnet-tools.json
|
||||||
|
.idea/.idea.ASS/.idea
|
||||||
|
41
ASS.csproj
41
ASS.csproj
@@ -37,40 +37,40 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="BepInEx, Version=5.4.21.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="BepInEx, Version=5.4.21.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="Comfort, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Comfort, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="Comfort.Unity, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Comfort.Unity, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="ConfigurationManager">
|
<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>
|
||||||
<Reference Include="ItemComponent.Types, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ItemComponent.Types, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="ItemTemplate.Types, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ItemTemplate.Types, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="spt-common">
|
<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>
|
||||||
<Reference Include="spt-reflection">
|
<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>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -82,17 +82,17 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<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>
|
||||||
<Reference Include="UnityEngine.IMGUIModule">
|
<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>
|
||||||
<Reference Include="UnityEngine.TextRenderingModule">
|
<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>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -102,17 +102,4 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<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>
|
@@ -98,15 +98,16 @@ namespace armorMod
|
|||||||
if (item.TryGetItemComponent<RepairableComponent>(out var component))
|
if (item.TryGetItemComponent<RepairableComponent>(out var component))
|
||||||
{
|
{
|
||||||
float maxCap = isArmor ? AssPlugin.MaxDurabilityCap.Value : AssPlugin.weaponMaxDurabilityCap.Value;
|
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 (component.Durability < maxRepairableDurability)
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
Logger.LogWarning($"Repairing {item.Name.Localized()} in {slot} with {component.Durability} / {component.MaxDurability} durability");
|
Logger.LogWarning($"Repairing {item.Name.Localized()} in {slot} with {component.Durability} / {component.MaxDurability} durability");
|
||||||
#endif
|
#endif
|
||||||
component.Durability = Mathf.Min(component.Durability + repairRate, component.MaxDurability);
|
component.Durability = Mathf.Min(component.Durability + repairRate, component.TemplateDurability);
|
||||||
component.MaxDurability = Mathf.Max(component.MaxDurability - maxDurabilityDrainRate, 0);
|
component.MaxDurability = Mathf.Max(component.TemplateDurability - maxDurabilityDrainRate, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user