This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hides pet stats and disables the annoying pet ring-menu. No more pets getting in the way of talking to NPCs or accidentally opening their menu in the middle of a fight! Fuck pets!
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
function FKPETS.fkMenus(actor, isOn) | ||
return; -- Do nothing | ||
end | ||
|
||
function FKPETS.fkStats(frame, handle) | ||
|
||
_G["UPDATE_COMPANION_TITLE_OLD"](frame, handle); | ||
|
||
local frame = tolua.cast(frame, "ui::CObject"); | ||
|
||
local StGauge = GET_CHILD_RECURSIVELY(frame, "StGauge"); | ||
local HpGauge = GET_CHILD_RECURSIVELY(frame, "HpGauge"); | ||
local pcinfo_bg_L = GET_CHILD_RECURSIVELY(frame, "pcinfo_bg_L"); | ||
local pcinfo_bg_R = GET_CHILD_RECURSIVELY(frame, "pcinfo_bg_R"); | ||
|
||
StGauge:ShowWindow(0); | ||
HpGauge:ShowWindow(0); | ||
pcinfo_bg_L:ShowWindow(0); | ||
pcinfo_bg_R:ShowWindow(0); | ||
|
||
frame:Invalidate() | ||
|
||
end | ||
|
||
function FKPETS.setHooks(newFunction, oldFunction) | ||
-- This is the SET_HOOK function directly from Excrulon's utility.lua | ||
|
||
local storedFunction = oldFunction .. "_OLD"; | ||
|
||
if _G[storedFunction] == nil then | ||
_G[storedFunction] = _G[oldFunction]; | ||
_G[oldFunction] = newFunction; | ||
else | ||
_G[oldFunction] = newFunction; | ||
end | ||
|
||
end | ||
|
||
function FKPETS.init() | ||
|
||
if (FKPETS.isLoaded ~= true) then | ||
|
||
FKPETS.setHooks(FKPETS.fkMenus, "DIALOG_COMPANION"); | ||
FKPETS.setHooks(FKPETS.fkStats, "UPDATE_COMPANION_TITLE"); | ||
|
||
FKPETS.frame:ShowWindow(1); | ||
FKPETS.isLoaded = true; | ||
|
||
ui.SysMsg("[ADDON] F**k Pets loaded!"); | ||
|
||
end | ||
|
||
end | ||
|
||
FKPETS.init(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if _G["ADDONS"] == nil then _G["ADDONS"] = {}; end | ||
|
||
_G["ADDONS"]["FKPETS"] = {}; | ||
FKPETS = _G["ADDONS"]["FKPETS"]; | ||
|
||
function FKPETS_ON_INIT(addon, frame) | ||
|
||
FKPETS.addon = addon; | ||
FKPETS.frame = frame; | ||
|
||
dofile("../addons/fkpets.lua"); | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<uiframe name="fkpets" x="420" y="30" width="280" height="100" create="open"> | ||
<frame title="Reload Addon" snapclient="true" snapframe="true" layout_gravity="top left" margin="420 30 0 0"/> | ||
<option visible="true" closebutton="false" useimageitem="true" piptype="right" autoopen="true" hideable="false"/> | ||
<input hittestframe="true"/> | ||
<layer layerlevel="31"/> | ||
<draw blend="100" drawtitlebar="false" drawframe="false"/> | ||
<controls> | ||
<button name="open_changejobui" rect="0 0 240 80" margin="0 0 0 0" layout_gravity="center center" MouseOffAnim="btn_mouseoff" MouseOnAnim="btn_mouseover" caption="{@st43}Reload Addon" clicksound="button_click_3" oversound="button_cursor_over_2" skin="btn_lv3" LBtnDownScp="dofile('..\\addons\\fkpets.lua');"> | ||
<uieffect effect="I_screen_button" scale="63" overlab="No" sound="None" offset="0 0" playtime="1" duration="1" conditon="active" event="LBUTTONDOWN"/> | ||
</button> | ||
</controls> | ||
</uiframe> |