Implement weight fuuckery for zompiercer
This commit is contained in:
@@ -15,9 +15,11 @@ namespace Zompiercer {
|
||||
private const string PluginVersion = "1.0.0";
|
||||
|
||||
public static ConfigEntry<bool> debug;
|
||||
public static ConfigEntry<float> weightMultiplier;
|
||||
|
||||
public void Awake() {
|
||||
debug = Config.Bind("General", "Debug", false);
|
||||
weightMultiplier = Config.Bind("General", "Weight Multiplier", 1.0f, "Multiplier for the weight of the tank");
|
||||
|
||||
Logger.LogInfo("Cyka mod loaded");
|
||||
HarmonyFileLog.Enabled = true;
|
||||
|
@@ -1,13 +1,24 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace Zompiercer {
|
||||
[HarmonyPatch]
|
||||
public class Patches {
|
||||
//[HarmonyPrefix]
|
||||
//[HarmonyPatch(typeof(ManLicenses), "AddXP")]
|
||||
//static void XpMulti(FactionSubTypes corporation, ref int xp, bool showUI = true) {
|
||||
// xp = (int)(xp * Main.xpMultiplier.Value);
|
||||
//}
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(InventoryItem), "GetWeight")]
|
||||
static void GetWeight(ref float __result) {
|
||||
if (Main.debug.Value)
|
||||
Console.WriteLine("GetWeight: " + __result);
|
||||
__result = __result * Main.weightMultiplier.Value;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(InventoryItem), "GetWeightOfOneItem")]
|
||||
static void GetWeightOfOneItem(ref float __result) {
|
||||
if (Main.debug.Value)
|
||||
Console.WriteLine("GetWeightOfOneItem: " + __result);
|
||||
__result = __result * Main.weightMultiplier.Value;
|
||||
}
|
||||
|
||||
//[HarmonyPrefix]
|
||||
//[HarmonyPatch(typeof(ManPlayer), "AddMoney")]
|
||||
|
Reference in New Issue
Block a user