PDA

View Full Version : 5E manager_power



rhagelstrom
February 8th, 2023, 21:33
Couple of things I noticed sniffing around

line 866 - index j is at global scope
line 957 - sDmgType is never defined

table.insert(rDamageFixed.clauses, { dice = {}, modifier = 0, stat = aAbilities[i], dmgtype = sDmgType });
line 1372 - rSave is at global scope

rSave = {};

Request - functions in this file are really difficult to hook into because in many places function calls are made local to the and not called via the PowerManager. I'm sure most would agree replaces some of this functions just to and PowerManager in front of a few function calls is not an ideal way to go about things.
Specifically, I was hoping to get local calls in the following functions to be prefaced with PowerManager.
performPCPowerAction
parsePower

Thank you for the consideration.

Moon Wizard
February 8th, 2023, 22:27
Thanks for the reports. The move towards an indirect referencing within scripts is a lengthy migration process; so I have been tackling as I rework scripts with a focus on CoreRPG scripts primarily.

I've pushed an update that uses indirect referencing for the 5E PowerManager global script.

Regarding your other mentions:
* Line 866 - j is local from line 774
* Line 957 - Fixed
* Line 1372 - Fixed. (Note: the global vs. local is just for encapsulation and to prevent accidental overlaps; it didn't make a difference in this case.)

Regards,
JPG