Created
September 25, 2023 19:38
-
-
Save Boboss74/e1301261338f543a4ba21403af552108 to your computer and use it in GitHub Desktop.
CyberPunk 2077 Mod: Reset Attributes always available (Redscript)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CyberPunk 2077 Mod: Reset Attributes always available | |
// https://www.nexusmods.com/cyberpunk2077/mods/9240 | |
// Authors: snogthemo, Boboss74, yakuzadeso | |
@wrapMethod(NewPerksCategoriesGameController) | |
private final func ResolveResetAttributesButtonVisibility() -> Void { | |
if (IsDefined(this.m_questSystem) && this.m_questSystem.GetFact(n"ResetAttributeDisabled") == 1) { | |
this.m_questSystem.SetFact(n"ResetAttributeDisabled", 0); | |
} | |
wrappedMethod(); | |
} | |
@wrapMethod(NewPerksCategoriesGameController) | |
protected cb func OnResetConfirmed(data: ref<inkGameNotificationData>) -> Bool { | |
wrappedMethod(data); | |
// On reset confirmation, keep button visible and reset "ResetAttributeDisabled" state. | |
this.ResolveResetAttributesButtonVisibility(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to get color syntax, I set the extension to
.swift
instead of.reds