-
January 31st, 2021, 23:48 #1
getActor(sActorType, varActor) - deprecation notice - what is it telling me?
I came across this while tracing code into CoreRPG - what is this telling me?
1. The method is deprecated? (normally what I assume a "DEPRECATED" in front means.
2. The sName member should no longer be accessed?
3. ?
-- DEPRECATED v3.3.6 - .sName actor member no longer used
function getActor(sActorType, varActor)
-
February 1st, 2021, 00:20 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
Yes, the .sName variable should no longer be used. There is an ActorManager.getDisplayName(rActor) function to be used to get the actor's display name. I will be removing at some point in the near future; and people left using it in their systems will run into errors.
Also, getActor is being deprecated next month, and ActorManager.resolveActor(node) will be used instead. See this thread:
https://www.fantasygrounds.com/forum...uleset-Updates
Regards,
JPG
-
February 1st, 2021, 01:03 #3
Ok I did a quick search on .sName and got multiple hits in CoreRPG and 5E and several of my extensions that get dice rolls back for rSource. So... I think I need some clarification on this particular statement about the .sName variable no longer being used. Especially as I don't know where what I'm receiving is coming from and have done what CoreRPG and 5E do currently. Scary statement that was.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
February 1st, 2021, 01:33 #4
-
February 1st, 2021, 02:50 #5
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
@SilentRuin,
.sName is used in several places in CoreRPG as a generic variable within a table. I'm talking about specific usage for actor records, which have been previously removed from CoreRPG, 5E and others that I maintain. The only current reference is the one that creates it to prevent other rulesets from breaking. However, since it requires a fair bit of lookup code to look up the name, it doesn't make sense to look up the name unless you actually need it for your use of the actor record.
Regards,
JPG
-
February 1st, 2021, 02:57 #6
Yup that makes total sense - decouples the two actions and increases granularity.
If you need sName, he listed a method to get it - just need to make a separate call.
-
February 1st, 2021, 04:16 #7
I have I think 68 instances in MoreCore
Some testing to be done!
-
February 1st, 2021, 04:55 #8Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks