Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Star Wars - Fully Functional Lightsabers - Patch - Removes the glow effect from Star Wars - Fully Functional Lightsabers.
- (https://steamcommunity.com/sharedfiles/filedetails/?id=2074246443)
- Star Wars - Fully Functional Lightsabers
- (https://steamcommunity.com/sharedfiles/filedetails/?id=918200645)
- */
- using HarmonyLib;
- using RimWorld;
- using System;
- using System.Reflection;
- using SWSaber;
- using Verse;
- namespace SWSaberPatch {
- [StaticConstructorOnStartup]
- public static class SWSaberPatch {
- static SWSaberPatch() {
- var harmony = new Harmony("rimworld.davcin.projectjedi.lightsabers.patch");
- var mg = typeof(CompLightsaberActivatableEffect).GetMethod("MakeGlower", BindingFlags.Instance | BindingFlags.Public);
- if (mg == null) {
- throw new Exception("Failed to get method to patch.");
- }
- var pmg = typeof(SWSaberPatch).GetMethod("PatchedMakeGlower", BindingFlags.Static | BindingFlags.Public);
- if (pmg == null) {
- throw new Exception("Failed to get patch method.");
- }
- harmony.Patch(mg, new HarmonyMethod(pmg), null);
- Log.Message("[SWSaberPatch]: Star Wars - Fully Functional Lightsabers patched.");
- }
- public static bool PatchedMakeGlower() {
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment