Skip to content

Commit

Permalink
Mod compat & disable logging (#65)
Browse files Browse the repository at this point in the history
* Disable missing patch logging for now.

* More mod compatibility.
  • Loading branch information
Epicguru authored Jul 29, 2024
1 parent 8884e56 commit e78b5ce
Show file tree
Hide file tree
Showing 42 changed files with 499 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/1.5/AnimationMod/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace AM;
[HotSwapAll]
public class Core : Mod
{
public const bool ENABLE_PATCH_REQUEST_API = false;

public static readonly HashSet<ThingDef> ForceConsiderTheseMeleeWeapons = new HashSet<ThingDef>();
public static Func<Pawn, float> GetBodyDrawSizeFactor = _ => 1f;
public static string ModTitle => ModContent?.Name;
Expand Down Expand Up @@ -258,7 +260,8 @@ private void LoadAllTweakData()
Warn($"{pair.Key} '{pair.Value.name}' has {pair.Value.wc} missing weapon tweak data.");
}

if (Settings.SendStatistics && !Settings.IsFirstTimeRunning)
#pragma warning disable CS0162 // Unreachable code detected
if (Settings.SendStatistics && !Settings.IsFirstTimeRunning && ENABLE_PATCH_REQUEST_API)
{
var modBuildTime = GetBuildDate(Assembly.GetExecutingAssembly());

Expand All @@ -282,11 +285,12 @@ private void LoadAllTweakData()
Warn($"Reporting missing mod/weapons failed with exception:\n{t.Exception}");
});
}
#pragma warning restore CS0162 // Unreachable code detected
else
{
Log(Settings.IsFirstTimeRunning
? "Mod is running for the first time - log sending is disabled."
: "Skipping reporting of missing mod/weapons because user opted out.");
: "Skipping reporting of missing mod/weapons because user opted out or the feature is disabled by the developer.");
}

if (!Settings.IsFirstTimeRunning)
Expand Down
19 changes: 19 additions & 0 deletions WeaponTweakData/CAT_PlasmaCleaverBladelink_cat.plasmapack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"TextureModID": "cat.plasmapack",
"ItemDefName": "CAT_PlasmaCleaverBladelink",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.514182448,
"Rotation": 45.0,
"ScaleX": 1.3,
"ScaleY": 1.3,
"BladeStart": 0.340222269,
"BladeEnd": 1.307008,
"MeleeWeaponType": 6,
"TrailTint": {
"r": 0.9,
"g": 0.689,
"b": 0.11,
"a": 1.0
}
}
19 changes: 19 additions & 0 deletions WeaponTweakData/CAT_PlasmaCleaver_cat.plasmapack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"TextureModID": "cat.plasmapack",
"ItemDefName": "CAT_PlasmaCleaver",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.514182448,
"Rotation": 45.0,
"ScaleX": 1.3,
"ScaleY": 1.3,
"BladeStart": 0.340222269,
"BladeEnd": 1.307008,
"MeleeWeaponType": 6,
"TrailTint": {
"r": 0.9,
"g": 0.689,
"b": 0.11,
"a": 1.0
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"TextureModID": "onyxae.dragonsdescent",
"ItemDefName": "DD_Gun_DragonfireLauncher",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.230920166,
"OffY": 0.0554205142,
"Rotation": 5.0,
"BladeStart": 0.08467071,
"BladeEnd": 0.706615865,
"MeleeWeaponType": 8
}
11 changes: 11 additions & 0 deletions WeaponTweakData/DV_MeleeWeapon_SparkSabre_det.spacerarsenal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"TextureModID": "det.spacerarsenal",
"ItemDefName": "DV_MeleeWeapon_SparkSabre",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.298656642,
"OffY": -0.0307893753,
"BladeStart": 0.1585649,
"BladeEnd": 0.7774312,
"MeleeWeaponType": 6
}
14 changes: 14 additions & 0 deletions WeaponTweakData/HAR_NM_Weapon_Sword_a_ayameduki.harnearmare.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"TextureModID": "ayameduki.harnearmare",
"ItemDefName": "HAR_NM_Weapon_Sword_a",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.7112341,
"OffY": -0.0492633022,
"Rotation": 1.001124,
"ScaleX": 2.0,
"ScaleY": 2.0,
"BladeStart": 0.244775042,
"BladeEnd": 1.70727,
"MeleeWeaponType": 6
}
11 changes: 11 additions & 0 deletions WeaponTweakData/Kurin_MeleeWeapon_Longsword_inoshishi3.kttfde.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"TextureModID": "inoshishi3.kttfde",
"ItemDefName": "Kurin_MeleeWeapon_Longsword",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.360235333,
"Rotation": 45.0,
"BladeStart": 0.09698615,
"BladeEnd": 0.9190624,
"MeleeWeaponType": 6
}
10 changes: 10 additions & 0 deletions WeaponTweakData/MR_C_CO_vamv.maruracemod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"TextureModID": "vamv.maruracemod",
"ItemDefName": "MR_C_CO",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.16934143,
"OffY": 0.03386849,
"BladeStart": 0.08774957,
"MeleeWeaponType": 48
}
11 changes: 11 additions & 0 deletions WeaponTweakData/MR_C_CT_vamv.maruracemod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"TextureModID": "vamv.maruracemod",
"ItemDefName": "MR_C_CT",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.160104826,
"OffY": 0.0338682234,
"BladeStart": 0.08467071,
"BladeEnd": 0.6327212,
"MeleeWeaponType": 48
}
12 changes: 12 additions & 0 deletions WeaponTweakData/MR_WH_COT_vamv.maruracemod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"TextureModID": "vamv.maruracemod",
"ItemDefName": "MR_WH_COT",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.415656358,
"OffY": -0.00615822524,
"Rotation": 43.55044,
"BladeStart": 0.09698615,
"BladeEnd": 0.7435627,
"MeleeWeaponType": 9
}
12 changes: 12 additions & 0 deletions WeaponTweakData/MR_WH_CO_vamv.maruracemod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"TextureModID": "vamv.maruracemod",
"ItemDefName": "MR_WH_CO",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.415656358,
"OffY": -0.00615822524,
"Rotation": 43.55044,
"BladeStart": 0.09698615,
"BladeEnd": 0.7435627,
"MeleeWeaponType": 9
}
12 changes: 12 additions & 0 deletions WeaponTweakData/MR_WH_CTT_vamv.maruracemod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"TextureModID": "vamv.maruracemod",
"ItemDefName": "MR_WH_CTT",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.415656358,
"OffY": -0.00615822524,
"Rotation": 43.55044,
"BladeStart": 0.09698615,
"BladeEnd": 0.7435627,
"MeleeWeaponType": 9
}
12 changes: 12 additions & 0 deletions WeaponTweakData/MR_WH_CT_vamv.maruracemod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"TextureModID": "vamv.maruracemod",
"ItemDefName": "MR_WH_CT",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.415656358,
"OffY": -0.00615822524,
"Rotation": 43.55044,
"BladeStart": 0.09698615,
"BladeEnd": 0.7435627,
"MeleeWeaponType": 9
}
13 changes: 13 additions & 0 deletions WeaponTweakData/MeleeWeapon_BreachAxe_vanillaexpanded.vtexe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "vanillaexpanded.vtexe",
"ItemDefName": "MeleeWeapon_BreachAxe",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.144498765,
"OffY": -0.0394088663,
"ScaleX": 1.1,
"ScaleY": 1.1,
"BladeStart": 0.328407615,
"BladeEnd": 0.6765197,
"MeleeWeaponType": 18
}
15 changes: 15 additions & 0 deletions WeaponTweakData/MeleeWeapon_Spoon_inoshishi3.kttfde.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"TextureModID": "inoshishi3.kttfde",
"ItemDefName": "MeleeWeapon_Spoon",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.113920361,
"OffY": 0.01231619,
"Rotation": 9.493865,
"ScaleX": 0.35,
"ScaleY": 0.35,
"HandsMode": 1,
"BladeStart": 0.06619704,
"BladeEnd": 0.2878801,
"MeleeWeaponType": 8
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "miho.fortifiedoutremer",
"ItemDefName": "Miho_Weapon_PowerHammer",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.3663936,
"OffY": -0.0184734464,
"ScaleX": 1.3,
"ScaleY": 1.3,
"BladeStart": 0.09390729,
"BladeEnd": 0.9406149,
"MeleeWeaponType": 5
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "miho.fortifiedoutremer",
"ItemDefName": "Miho_Weapon_RifleRecoillessSharp",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.252472669,
"OffY": 0.0215525329,
"ScaleX": 1.25,
"ScaleY": 1.25,
"BladeStart": 0.100065015,
"BladeEnd": 0.845167637,
"MeleeWeaponType": 1
}
14 changes: 14 additions & 0 deletions WeaponTweakData/Milian_KnightHalberd_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milian_KnightHalberd",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.591156,
"OffY": -0.0307891183,
"Rotation": 46.63805,
"ScaleX": 1.5,
"ScaleY": 1.5,
"BladeStart": 0.5003271,
"BladeEnd": 1.50098133,
"MeleeWeaponType": 7
}
13 changes: 13 additions & 0 deletions WeaponTweakData/Milian_KnightHammer_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milian_KnightHammer",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.2832623,
"OffY": -0.00615799427,
"ScaleX": 1.2,
"ScaleY": 1.2,
"BladeStart": 0.358695924,
"BladeEnd": 0.67890507,
"MeleeWeaponType": 1
}
13 changes: 13 additions & 0 deletions WeaponTweakData/Milian_KnightLance_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milian_KnightLance",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.628102839,
"Rotation": 45.0,
"ScaleX": 1.4,
"ScaleY": 1.4,
"BladeStart": 0.429511279,
"BladeEnd": 1.56871772,
"MeleeWeaponType": 5
}
13 changes: 13 additions & 0 deletions WeaponTweakData/Milian_KnightSword_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milian_KnightSword",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.42181462,
"OffY": -0.0153945684,
"ScaleX": 1.5,
"ScaleY": 1.5,
"BladeStart": 0.1739597,
"BladeEnd": 1.10071969,
"MeleeWeaponType": 6
}
14 changes: 14 additions & 0 deletions WeaponTweakData/Milian_RookBladeII_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milian_RookBladeII",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.2740252,
"OffY": -0.0123156905,
"Rotation": 45.0,
"ScaleX": 1.5,
"ScaleY": 1.5,
"BladeStart": -0.0323290564,
"BladeEnd": 1.29469252,
"MeleeWeaponType": 6
}
13 changes: 13 additions & 0 deletions WeaponTweakData/Milian_RookBlade_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milian_RookBlade",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.387946129,
"OffY": 0.0123159587,
"ScaleX": 1.5,
"ScaleY": 1.5,
"BladeStart": 0.217064783,
"BladeEnd": 1.09456146,
"MeleeWeaponType": 6
}
14 changes: 14 additions & 0 deletions WeaponTweakData/Milira_Hammer_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milira_Hammer",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.6712079,
"OffY": 0.00307884812,
"Rotation": 45.0,
"ScaleX": 1.5,
"ScaleY": 1.5,
"BladeStart": 1.03298271,
"BladeEnd": 1.350113,
"MeleeWeaponType": 1
}
13 changes: 13 additions & 0 deletions WeaponTweakData/Milira_Lance_ancot.milirarace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"TextureModID": "ancot.milirarace",
"ItemDefName": "Milira_Lance",
"ItemType": "ThingDef",
"ItemTypeNamespace": "Verse",
"OffX": 0.591156065,
"Rotation": 45.0,
"ScaleX": 1.5,
"ScaleY": 1.5,
"BladeStart": 0.7620364,
"BladeEnd": 1.58719146,
"MeleeWeaponType": 5
}
Loading

0 comments on commit e78b5ce

Please sign in to comment.