Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Mersid

#1
"I'm not very impressed. Heard three prisoners died today."

"Shut it. Remember that those bastards killed Anna, and kidnapped James too."

"So... what do we do?"

"Wanna go grab a beer?"

Removes the mood penalties for killing or selling prisoners. Comes with some rather... interesting... thoughts.

Mod originally by some guy at the Nexus Mods forum. This is updated for B18.

https://github.com/Mersid/Rimworld_NoMoodLossPrisonerDied/releases/latest
#2
Outdated / [B18] Fast Grass Growth
April 01, 2018, 03:32:59 AM
"Hey Elisa, have you noticed our town's barren as a desert?"

"Yep. Grass dies before they get to us."

"Why?"

"No idea. Grass seems to grow fine beyond our base, for some reason..."

Grass now spreads roughly ten times faster. Great if your grass dies before it gets to the middle of the map. Growth rates are unaffected.

https://github.com/Mersid/Rimworld_FastPlantGrowth/releases/latest
#3
"We just learned how to make double doors, guys."

"Well now learn to make triple doors!"

"..."

Adds a 1x3 Gate to the Doors Expanded mod.

https://github.com/Mersid/Rimworld_TripleGate/releases/latest
#4
Outdated / [B18] Expanded Generator Fuel Capacity
April 01, 2018, 03:26:43 AM
"Bob, go refuel the generators."

"We just did it the other day!"

"Well, they're empty. Refuel it. Now."

"What if we... made the tanks bigger?"

"..."

"..."

Generators now hold more fuel, reducing the strain on your haulers.

https://github.com/Mersid/Rimworld_ExpandedGeneratorFuelCapacity/releases/latest
#5
Outdated / [B18] Transport Pods Extended
March 29, 2018, 04:17:14 PM
"Hey Mark! I need you to send this boomrat to the next town over!"

"Oh, alright. Just chuck it in this transport pod here. Anything else?"

"Erm... fuel's expensive. Nope!"

"You do know that we use the same fuel to launch one boomrat, or an entire army of them, right?"

"..."

"..."


This mod overhauls the transport pod's fueling system, and makes a number of changes to the pods themselves.

- Fuel consumption is now heavily dependent on the cargo load. Empty cargoes will use less fuel, and can travel farther.
- Increased fuel capacity to 250
- Pods now carry up to 1200 kg. Be careful, as this severely reduces your max range.

Get the mod at https://github.com/Mersid/Rimworld_TransportPodsExtended/releases/latest

Massive thanks to all the guys over at the Discord channel.
#6
So the first HarmonyPatch method (MaxLaunchDistanceAtFuelLevel) is working fine, but (FuelNeededToLaunchAtDist) is never accessed when it needs to be. How would I fix this?


using System.Reflection;

using UnityEngine;

using RimWorld;
using RimWorld.Planet;
using Verse;
using Harmony;

namespace TransportPodsExtended
{

[StaticConstructorOnStartup]
public static class TPE_HarmonyPatch
{
static TPE_HarmonyPatch()
{
HarmonyInstance harmony = HarmonyInstance.Create("TransportPod");
harmony.PatchAll(Assembly.GetExecutingAssembly());
var methods = harmony.GetPatchedMethods();
foreach (var method in methods)
{
Log.Warning(method.ToString());
}

}
}

[HarmonyPatch(typeof(CompLaunchable))]
[HarmonyPatch("MaxLaunchDistanceAtFuelLevel")]
static class MaxDistancePatch
{
static void Postfix(ref int __result, float fuelLevel)
{
__result = Mathf.FloorToInt(fuelLevel / 10f);
}
}



#region FuelNeededToLaunchAtDist
[HarmonyPatch(typeof(CompLaunchable))]
[HarmonyPatch("FuelNeededToLaunchAtDist")]
static class FuelNeededPatch
{
static FuelNeededPatch()
{
Log.Error("Hello!");
}

static void Postfix(ref float __result, float dist)
{
__result = 10 * dist;
}
}
#endregion

}


Here are the methods they patch


public static int MaxLaunchDistanceAtFuelLevel(float fuelLevel)
{
return Mathf.FloorToInt(fuelLevel / 2.25f);
}

public static float FuelNeededToLaunchAtDist(float dist)
{
return 2.25f * dist;
}