Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicguru committed Mar 3, 2023
2 parents 95c2eb6 + 706c0e8 commit e55176a
Show file tree
Hide file tree
Showing 17 changed files with 7,861 additions and 36 deletions.
4 changes: 2 additions & 2 deletions About/About.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
<packageId>co.uk.epicguru.advancedmeleeanimation</packageId>
<name>Advanced Melee Animation</name>
<packageId>co.uk.epicguru.meleeanimation</packageId>
<name>Melee Animation</name>
<author>Epicguru</author>
<supportedVersions>
<li>1.4</li>
Expand Down
Binary file modified About/Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Source/AAMRetextureSupport/RetextureUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public static IEnumerable<ActiveTextureReport> GetModWeaponReports(ModContentPac

}

[DebugOutput("Advanced Melee Animation")]
[DebugOutput("Melee Animation")]
private static void LogAllTextureReports()
{
var meleeWeapons = DefDatabase<ThingDef>.AllDefsListForReading.Where(d => d.IsMeleeWeapon);
Expand Down
2 changes: 1 addition & 1 deletion Source/CompatibilityReportGenerator/Template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Compatible Mods List
`Updated {3}.`

**Advanced Melee Animation supports {0} weapons from {1} mods.**
**Melee Animation supports {0} weapons from {1} mods.**

Mods listed here are fully compatible with this mod.
Weapons from mods that are not listed here will not be able to be used in animations.
Expand Down
7,832 changes: 7,832 additions & 0 deletions Source/Content/PDN/Preview.pdn

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Source/ThingGenerator/AnimDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static IEnumerable<AnimDef> GetExecutionAnimationsForPawnAndWeapon(Pawn p
d.Probability > 0);
}

[DebugAction("Advanced Melee Animation", "Reload all animations", actionType = DebugActionType.Action)]
[DebugAction("Melee Animation", "Reload all animations", actionType = DebugActionType.Action)]
public static void ReloadAllAnimations()
{
foreach (var def in allDefs)
Expand Down
14 changes: 7 additions & 7 deletions Source/ThingGenerator/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace AAM
[HotSwapAll]
public class Core : Mod
{
private static readonly string GistID = "d1c22be7a26feb273008c4cea948be53";
private const string GIST_ID = "d1c22be7a26feb273008c4cea948be53";

public static Func<Pawn, float> GetBodyDrawSizeFactor = _ => 1f;
public static string ModTitle => ModContent?.Name;
Expand All @@ -29,25 +29,25 @@ public class Core : Mod

public static void Log(string msg)
{
Verse.Log.Message($"<color=#66ffb5>[Adv.MeleeAnim]</color> {msg}");
Verse.Log.Message($"<color=#66ffb5>[MeleeAnim]</color> {msg}");
}

public static void Warn(string msg)
{
Verse.Log.Warning($"<color=#66ffb5>[Adv.MeleeAnim]</color> {msg}");
Verse.Log.Warning($"<color=#66ffb5>[MeleeAnim]</color> {msg}");
}

public static void Error(string msg, Exception e = null)
{
Verse.Log.Error($"<color=#66ffb5>[Adv.MeleeAnim]</color> {msg}");
Verse.Log.Error($"<color=#66ffb5>[MeleeAnim]</color> {msg}");
if (e != null)
Verse.Log.Error(e.ToString());
}

[DebugAction("Advanced Melee Animation", actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.Entry)]
[DebugAction("Melee Animation", actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.Entry)]
private static void LogModRequests()
{
var task = Task.Run(() => new ModRequestClient(GistID).GetModRequests());
var task = Task.Run(() => new ModRequestClient(GIST_ID).GetModRequests());
task.ContinueWith(t =>
{
if (!t.IsCompletedSuccessfully)
Expand Down Expand Up @@ -147,7 +147,7 @@ private void LoadAllTweakData()

private static async Task UploadMissingModData(Dictionary<string, int> modAndWeaponCounts)
{
var client = new ModRequestClient(GistID);
var client = new ModRequestClient(GIST_ID);

bool UpdateAction(string modID, ModData data)
{
Expand Down
10 changes: 5 additions & 5 deletions Source/ThingGenerator/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ public static T RandomElementByWeightExcept<T>(this IEnumerable<T> items, Func<T
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool GetOccupiedMaskBitZ(this uint mask, int z) => (((uint)1 << 1 + (z + 1) * 3) & mask) != 0;

[DebugAction("Advanced Melee Animation", "Spawn all melee weapons (tiny)", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
[DebugAction("Melee Animation", "Spawn all melee weapons (tiny)", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
private static void GimmeMeleeWeaponsTiny() => GimmeMeleeWeapons(WeaponSize.Tiny);

[DebugAction("Advanced Melee Animation", "Spawn all melee weapons (medium)", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
[DebugAction("Melee Animation", "Spawn all melee weapons (medium)", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
private static void GimmeMeleeWeaponsMedium() => GimmeMeleeWeapons(WeaponSize.Medium);

[DebugAction("Advanced Melee Animation", "Spawn all melee weapons (colossal)", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
[DebugAction("Melee Animation", "Spawn all melee weapons (colossal)", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
private static void GimmeMeleeWeaponsColossal() => GimmeMeleeWeapons(WeaponSize.Colossal);

[DebugAction("Advanced Melee Animation", "Spawn all melee weapons", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
[DebugAction("Melee Animation", "Spawn all melee weapons", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
private static void GimmeMeleeWeaponsAll() => GimmeMeleeWeapons(null);

private static void GimmeMeleeWeapons(WeaponSize? onlySize)
Expand Down Expand Up @@ -229,7 +229,7 @@ private static void GimmeMeleeWeapons(WeaponSize? onlySize)
}
}

[DebugAction("Advanced Melee Animation", "Spawn army", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
[DebugAction("Melee Animation", "Spawn army", actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
private static List<DebugActionNode> SpawnArmy()
{
List<DebugActionNode> list = new List<DebugActionNode>();
Expand Down
2 changes: 1 addition & 1 deletion Source/ThingGenerator/GameComp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GameComp : GameComponent
public readonly Game Game;
public static ulong FrameCounter;

[TweakValue("Advanced Melee Animation")]
[TweakValue("Melee Animation")]
private static bool drawTextureExtractor;

private string texPath;
Expand Down
2 changes: 1 addition & 1 deletion Source/ThingGenerator/Grappling/KnockbackFlyer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace AAM.Grappling;

public class KnockbackFlyer : PawnFlyer
{
[DebugAction("Advanced Melee Animation", actionType = DebugActionType.ToolMapForPawns)]
[DebugAction("Melee Animation", actionType = DebugActionType.ToolMapForPawns)]
private static void TestKnockback(Pawn victim)
{
var end = GetEndCell(victim, IntVec3.East, 20);
Expand Down
6 changes: 3 additions & 3 deletions Source/ThingGenerator/Idle/IdleClassifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ namespace AAM.Idle;

public static class IdleClassifier
{
[TweakValue("Advanced Melee Animation", 0f, 8f)]
[TweakValue("Melee Animation", 0f, 8f)]
public static float ColossalSizeThreshold = 1.37f;

[TweakValue("Advanced Melee Animation", 0f, 5f)]
[TweakValue("Melee Animation", 0f, 5f)]
public static float TinySizeThreshold = 0.63f;

public static (WeaponSize size, WeaponCat category) Classify(ItemTweakData tweakData)
Expand Down Expand Up @@ -39,7 +39,7 @@ private struct TableRow
public WeaponCat Category;
}

[DebugOutput("Advanced Melee Animation")]
[DebugOutput("Melee Animation")]
private static void LogTextureCategories()
{
var data = from def in DefDatabase<ThingDef>.AllDefsListForReading
Expand Down
2 changes: 1 addition & 1 deletion Source/ThingGenerator/OutcomeUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ref struct AdditionalArgs
public float TargetDamageAmount;
}

[DebugAction("Advanced Melee Animation", "Compare Lethality", allowedGameStates = AllowedGameStates.PlayingOnMap, actionType = DebugActionType.ToolMapForPawns)]
[DebugAction("Melee Animation", "Compare Lethality", allowedGameStates = AllowedGameStates.PlayingOnMap, actionType = DebugActionType.ToolMapForPawns)]
private static void CompareLethalityDebug(Pawn pawn)
{
Pawn selected = Find.Selector.SelectedPawns.FirstOrDefault();
Expand Down
4 changes: 2 additions & 2 deletions Source/ThingGenerator/Processing/MapPawnProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ namespace AAM.Processing;

public class MapPawnProcessor : IDisposable
{
[TweakValue("Advanced Melee Animation", 0f, 5f)]
[TweakValue("Melee Animation", 0f, 5f)]
public static float PawnPerThreadThreshold = 0.2f;
[TweakValue("Advanced Melee Animation")]
[TweakValue("Melee Animation")]
public static bool LogPerformanceToDesktop;

private static readonly Dictionary<int, Task[]> taskArrayPool = new Dictionary<int, Task[]>();
Expand Down
2 changes: 1 addition & 1 deletion Source/ThingGenerator/Tweaks/TweakDataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static bool Register(ItemTweakData td)
return true;
}

[DebugOutput("Advanced Melee Animation")]
[DebugOutput("Melee Animation")]
private static void LogAllRetextureCompletion()
{
var all = from td in DefDatabase<ThingDef>.AllDefsListForReading
Expand Down
2 changes: 1 addition & 1 deletion Source/ThingGenerator/UI/Dialog_AnimationDebugger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Dialog_AnimationDebugger : Window
private static float trailTime = 0.1f;
private static ExecutionOutcome executionOutcome = ExecutionOutcome.Kill;

[DebugAction("Advanced Melee Animation", "Open Debugger", actionType = DebugActionType.Action)]
[DebugAction("Melee Animation", "Open Debugger", actionType = DebugActionType.Action)]
private static void OpenInt()
{
Open();
Expand Down
4 changes: 2 additions & 2 deletions Source/ThingGenerator/UI/Dialog_TweakEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public class Dialog_TweakEditor : Window
{
private static ItemTweakData clipboard;

[DebugAction("Advanced Melee Animation", "Open Tweak Editor", actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.Playing)]
[DebugAction("Melee Animation", "Open Tweak Editor", actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.Playing)]
private static void OpenInt() => Open();
[DebugAction("Advanced Melee Animation", "Open Tweak Editor", actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.Entry)]
[DebugAction("Melee Animation", "Open Tweak Editor", actionType = DebugActionType.Action, allowedGameStates = AllowedGameStates.Entry)]
private static void OpenInt2() => Open();

public static Dialog_TweakEditor Open()
Expand Down
7 changes: 0 additions & 7 deletions loadfolders.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<loadFolders>
<v1.3>
<li>/</li>
<li>1.3</li>
<li IfModActive="Nals.FacialAnimation">Patch_FacialAnimation/1.3</li>
<li IfModActive="Mlie.StarWarsFullyFunctionalLightsabers">Patch_Lightsabers/1.3</li>
<li IfModActive="erdelf.humanoidalienraces">Patch_AlienRaces/1.3</li>
</v1.3>
<v1.4>
<li>/</li>
<li>1.4</li>
Expand Down

0 comments on commit e55176a

Please sign in to comment.