-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
494b57e
commit ecd6941
Showing
15 changed files
with
113 additions
and
48 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+24 KB
(100%)
Source/TurretExtensions/.vs/TurretExtensions/v16/Server/sqlite3/storage.ide
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Source/TurretExtensions/TurretExtensions/HarmonyPatches/Patch_VerbProperties.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Reflection; | ||
using System.Reflection.Emit; | ||
using System.Runtime.CompilerServices; | ||
using RimWorld; | ||
using Verse; | ||
using HarmonyLib; | ||
using UnityEngine; | ||
|
||
namespace TurretExtensions | ||
{ | ||
|
||
public static class Patch_VerbProperties | ||
{ | ||
|
||
[HarmonyPatch(typeof(VerbProperties), nameof(VerbProperties.AdjustedFullCycleTime))] | ||
public static class AdjustedFullCycleTime | ||
{ | ||
|
||
public static bool Prefix(VerbProperties __instance, Verb ownerVerb, Pawn attacker, ref float __result) | ||
{ | ||
// Vanilla gun turret | ||
if (ownerVerb.Caster is Building_TurretGun gunTurret) | ||
{ | ||
__result = TurretExtensionsUtility.AdjustedTurretBurstWarmupTicks(gunTurret.def.building.turretBurstWarmupTime.SecondsToTicks(), gunTurret).TicksToSeconds() + | ||
NonPublicMethods.Building_TurretGun_BurstCooldownTime(gunTurret) + ((__instance.burstShotCount - 1) * __instance.ticksBetweenBurstShots).TicksToSeconds(); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+5 Bytes
(100%)
...urretExtensions/TurretExtensions/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
Binary file modified
BIN
+3.7 KB
(990%)
...urretExtensions/TurretExtensions/obj/Debug/TurretExtensions.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified
BIN
+1 KB
(100%)
Source/TurretExtensions/TurretExtensions/obj/Debug/TurretExtensions.dll
Binary file not shown.