Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/IceRaptor/CleverGirl
Browse files Browse the repository at this point in the history
# Conflicts:
#	CleverGirl/CleverGirl/CleverGirl.csproj
  • Loading branch information
IceRaptor committed Dec 27, 2019
2 parents ef60ee5 + 2d0f545 commit d75eff4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
24 changes: 14 additions & 10 deletions CleverGirl/CleverGirl/CleverGirl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CleverGirl</RootNamespace>
<AssemblyName>CleverGirl</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -44,17 +44,20 @@
<Reference Include="0Harmony">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\Mods\ModTek\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\BattleTech_Data\Managed\Assembly-CSharp.dll</HintPath>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="BattleTech.Common">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\BattleTech_Data\Managed\BattleTech.Common.dll</HintPath>
</Reference>
<Reference Include="CustomAmmoCategories">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\Mods\CustomAmmoCategories\CustomAmmoCategories.dll</HintPath>
<Reference Include="CustomAmmoCategories, Version=0.0.1.47, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\Mods\CustomAmmoCategories\CustomAmmoCategories.dll</HintPath>
</Reference>
<Reference Include="CustomComponents">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\Mods\CustomComponents\CustomComponents.dll</HintPath>
<Reference Include="CustomComponents, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\Mods\CustomComponents\CustomComponents.dll</HintPath>
</Reference>
<Reference Include="IRBTModUtils">
<HintPath>..\..\..\IRBTModUtils\IRBTModUtils\IRBTModUtils\bin\Debug\IRBTModUtils.dll</HintPath>
Expand All @@ -68,11 +71,12 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.dll</HintPath>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\..\..\..\..\..\Steam\steamapps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>E:\steam\SteamApps\common\BATTLETECH\BattleTech_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions CleverGirl/CleverGirl/Helper/AttackEvaluatorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public CandidateWeapons(AbstractActor attacker, ICombatant target) {
$"or has no LOF, skipping.");
}

if (cWeapon.First.Category == WeaponCategory.AntiPersonnel) {
if (cWeapon.First.WeaponCategoryValue.IsSupport) {
Mod.Log.Debug($" ({cWeapon.First.defId}) is anti-personnel, adding to melee and DFA sets.");
MeleeWeapons.Add(cWeapon);
DFAWeapons.Add(cWeapon);
Expand Down Expand Up @@ -315,7 +315,7 @@ public static CalledShotAttackOrderInfo MakeCalledShotOrder(AbstractActor attack
Mech mech2 = attackingUnit as Mech;
for (int i = 0; i < evaluatedAttack.WeaponList.Count; i++) {
Weapon weapon = evaluatedAttack.WeaponList[i];
if (weapon.Category == WeaponCategory.Melee || weapon.Type == WeaponType.Melee || (mech2 != null && (weapon == mech2.DFAWeapon || weapon == mech2.MeleeWeapon))) {
if (weapon.WeaponCategoryValue.IsMelee|| weapon.Type == WeaponType.Melee || (mech2 != null && (weapon == mech2.DFAWeapon || weapon == mech2.MeleeWeapon))) {
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion CleverGirl/CleverGirl/Helper/CACHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static Dictionary<WeaponMode, int> UsableModes(Weapon weapon) {
foreach (WeaponMode weaponMode in availableModes) {
CustomAmmoCategory ammoCategory = CustomAmmoCategories.find(weapon.AmmoCategoryValue.ToString());
// The weapon defaults to the base ammo type
if (extWeaponDef.AmmoCategory.BaseCategory == weapon.AmmoCategory) { ammoCategory = extWeaponDef.AmmoCategory; }
if (extWeaponDef.AmmoCategory.BaseCategory == weapon.AmmoCategoryValue) { ammoCategory = extWeaponDef.AmmoCategory; }
// The weapon mode doesn't match the default ammo type, change
if (weaponMode.AmmoCategory.Index != ammoCategory.Index) { ammoCategory = weaponMode.AmmoCategory; }
// Hardcode the comparison here b/c CustomAmmoCategories.NotSetCustomAmmoCategoty.Index is private
Expand Down
8 changes: 4 additions & 4 deletions CleverGirl/CleverGirl/app.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>

0 comments on commit d75eff4

Please sign in to comment.