Thread: CoreRPG WindowManager suggestion
-
February 28th, 2023, 15:05 #1
CoreRPG WindowManager suggestion
I'm not really sure where to post this...
The new ordering mechanism for power actions broke one of my extensions which added power actions directly to the spell record window. Players could now longer open spell records without receiving errors.
The culprit lies in the manager_window.lua script, which sets an order node to a node not owned by the executing session (player in this regard):
Code:function setInitialOrder(w) if not w or not w.windowlist then return; end local node = w.getDatabaseNode(); if not node or (DB.getValue(node, "order", 0) ~= 0) then return; end local tOrder = {}; for _,v in ipairs(DB.getChildList(w.windowlist.getDatabaseNode(), "")) do tOrder[DB.getValue(v, "order", 0)] = true; end local i = 1; while tOrder[i] do i = i + 1; end DB.setValue(node, "order", "number", i); end
Code:function setInitialOrder(w) if not w or not w.windowlist then return; end local node = w.getDatabaseNode(); if not node or (DB.getValue(node, "order", 0) ~= 0) or not DB.isOwner(node) then return; end local tOrder = {}; for _,v in ipairs(DB.getChildList(w.windowlist.getDatabaseNode(), "")) do tOrder[DB.getValue(v, "order", 0)] = true; end local i = 1; while tOrder[i] do i = i + 1; end DB.setValue(node, "order", "number", i); end
GitHub
Ruleset: FFd20
Extensions: Advanced Charsheet - Attack Modifiers - Big Portraits - Enhanced Skills - Legacy Items - Spell Action Info - Spell Record Actions - Tooltips
-
February 28th, 2023, 18:15 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,626
This is part of the update for CoreRPG today.
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks