public static void Patch() { QuickLogger.Info("Started patching. Version: " + QuickLogger.GetAssemblyVersion()); #if DEBUG QuickLogger.DebugLogsEnabled = true; QuickLogger.Debug("Debug logs enabled"); #endif try { LoadConfiguration(); FEHolderBuildable.PatchHelper(); var harmony = HarmonyInstance.Create("com.fireextinguishergholder.MAC"); harmony.PatchAll(Assembly.GetExecutingAssembly()); QuickLogger.Info("Finished patching"); } catch (Exception ex) { QuickLogger.Error(ex); } }
public bool CanDeconstruct(out string reason) { if (_hasTank) { reason = FEHolderBuildable.HolderNotEmptyMessage(); return(false); } reason = string.Empty; return(true); }
public void OnHandHover(GUIHand hand) { HandReticle main = HandReticle.main; if (!_hasTank) { main.SetInteractText(LanguageHelpers.GetLanguage(FEHolderBuildable.OnHandOverEmpty())); } else { main.SetInteractText(LanguageHelpers.GetLanguage(FEHolderBuildable.OnHandOverNotEmpty()), $"Fire Extinguisher: {Mathf.RoundToInt(_fuel)}%"); } main.SetIcon(HandReticle.IconType.Hand, 1f); }