Jump to content

OnItemRepair bug

Pending 1.7.8

TrickFrancis
TrickFrancis

Posted

Hey, I tested SkillTree 1.7.8 and found what looks like a logic bug in the OnItemRepair path, even though the plugin compiles and loads.

In HandleMaxRepair(), the code currently does:

if (Interface.CallHook("STOnItemRepairWithMaxRepair", item) == null) return;

That seems inverted. In the normal case, CallHook(...) returns null when no other plugin handles the hook, so MaxRepair exits immediately and does nothing unless another plugin explicitly returns a value. Changing it to this fixed the issue for me:

if (Interface.CallHook("STOnItemRepairWithMaxRepair", item) != null) return;

After that change, the repair perk started working correctly.

One other odd thing I noticed: Oxide briefly reported a compile error like "} expected | Line: 660, Pos: 99", but reloading again succeeded without any code change in that area. That looked unrelated/noisy on my end, because line 660 was valid and the plugin loaded fine on retry.

 

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.5m
Total downloads
Customers
10.9k
Customers served
Files Sold
157.4k
Marketplace sales
Payments
3.4m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.