Skip to content

Commit

Permalink
Merge branch 'hotfix/jira-dev-1112'
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssonrpg committed Jun 13, 2024
2 parents 7d68782 + 7de8015 commit eadd2b8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Plugins/Core/sceneinlua/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module sdkVersion="3.7">
<module sdkVersion="3.7b">
<!--O id identifica seu plugin globalmente. Deve ser único, conter apenas caracteres alfanuméricos, underlines, pontos e deve conter ao menos 5 caracteres e um máximo de 40. Uma vez definido o ID, você não deve alterar ele ;) -->
<id>BR.COM.RRPG.SCENE3_IN_LUA</id>
<!--version é a versão do seu plugin. Quando for lançar uma nova versão do seu módulo, altere aqui =) -->
Expand Down
Binary file modified Plugins/Core/sceneinlua/output/sceneinlua.rpk
Binary file not shown.
21 changes: 15 additions & 6 deletions Plugins/Core/sceneinlua/rrpgScene_MovementHistory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,36 @@ end;

function MOVHIST_AddTrackHistory(token, track)
local userData = token.userData;

if type(userData) ~= "table" then
return nil;
end;

local novoHistoryNode = nil;
NDB.beginUpdate(userData);

tryFinally(
function()
local movHist = userData.movHist;

if type(movHist) ~= "table" then
if type(movHist) ~= "table" then
userData.movHist = {};
movHist = userData.movHist;
end;

if movHist ~= nil then
novoHistoryNode = NDB.createChildNode(movHist, "h");
local trackTable = track:save();

for k2, v2 in pairs(trackTable) do
novoHistoryNode[k2] = v2;

if novoHistoryNode ~= nil then
local trackTable = track:save();

for k2, v2 in pairs(trackTable) do
novoHistoryNode[k2] = v2;
end;

novoHistoryNode.date = NDB.getServerUTCTime(userData);
end;

novoHistoryNode.date = NDB.getServerUTCTime(userData);
removerExcessoMovHist(movHist);
end;
end,
Expand Down
10 changes: 8 additions & 2 deletions Plugins/Core/sceneinlua/sdk/ndb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,13 @@ function ndb.createChildNode(nodeObj, childName)
local node = localNDB.getNodeObjectFromFacade(nodeObj);

if node ~= nil then
return node:addChild(childName):getFacade();
local childNode = node:addChild(childName);

if childNode ~= nil then
return childNode:getFacade();
else
return nil;
end;
else
return nil;
end;
Expand Down Expand Up @@ -917,7 +923,7 @@ function pairs(obj)
end;

function ipairs(obj)
if rawget(obj, "__nodeFacadeFlag") then
if (obj ~= nil) and rawget(obj, "__nodeFacadeFlag") then
-- Node Façade
local state = _prepareNodeFacadePairsState(obj);
return oldIPairsFunc(state);
Expand Down
8 changes: 8 additions & 0 deletions Plugins/Core/sceneinlua/sdk/rrpgGUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,8 @@ gui.GridRecordList.eves["onGroupShow"] = "id, header";
gui.GridRecordList.eves["onGroupHide"] = "id, header";
gui.GridRecordList.eves["onEmptyState"] = "";
gui.GridRecordList.eves["onPagingStateChange"] = "";
gui.GridRecordList.eves["onBeginOrganization"] = "";
gui.GridRecordList.eves["onEndOrganization"] = "";

--[[ Objeto GridRecordListPgCtrl ]]--

Expand Down Expand Up @@ -1357,6 +1359,9 @@ function gui.RichEdit:getSelectionFontFamily() if System.checkAPIVersion(87, 4)
function gui.RichEdit:getSelectionFontStyle() if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGetSelectionFontStyle"); else return {}; end; end;
function gui.RichEdit:getSelectionFloat() if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGetSelectionFloat"); else return "none"; end; end;
function gui.RichEdit:getSelectionParaAlign() if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGetSelectionParaAlign"); else return "left"; end; end;
function gui.RichEdit:getSelectionParaLineSpacing() if System.checkAPIVersion(88, 3) then return _obj_invokeEx(self.handle, "LGetSelectionParaLineSpacing"); else return 1.0; end; end;
function gui.RichEdit:getSelectionParaTopMargin() if System.checkAPIVersion(88, 3) then return _obj_invokeEx(self.handle, "LGetSelectionParaTopMargin"); else return 0; end; end;
function gui.RichEdit:getSelectionParaBottomMargin() if System.checkAPIVersion(88, 3) then return _obj_invokeEx(self.handle, "LGetSelectionParaBottomMargin"); else return 0; end; end;

function gui.RichEdit:gotoStart(holdSelection) if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGotoStart", holdSelection); end; end;
function gui.RichEdit:gotoEnd(holdSelection) if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGotoEnd", holdSelection); end; end;
Expand Down Expand Up @@ -1392,6 +1397,9 @@ function gui.RichEdit:setSelectionFontFamily(family) if System.checkAPIVersion(8
function gui.RichEdit:setSelectionFontStyle(style) if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LEditOp_SetSelectionFontStyle", style); end; end;
function gui.RichEdit:setSelectionFloat(floatMode) if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LEditOp_SetSelectionFloat", floatMode); end; end;
function gui.RichEdit:setSelectionParaAlign(paraAlign) if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LEditOp_SetSelectionParaAlign", paraAlign); end; end;
function gui.RichEdit:setSelectionParaLineSpacing(value) if System.checkAPIVersion(88, 3) then return _obj_invokeEx(self.handle, "LEditOp_SetSelectionParaLineSpacing", value); end; end;
function gui.RichEdit:setSelectionParaTopMargin(value) if System.checkAPIVersion(88, 3) then return _obj_invokeEx(self.handle, "LEditOp_SetSelectionParaTopMargin", value); end; end;
function gui.RichEdit:setSelectionParaBottomMargin(value) if System.checkAPIVersion(88, 3) then return _obj_invokeEx(self.handle, "LEditOp_SetSelectionParaBottomMargin", value); end; end;

function gui.RichEdit:getLengthInChars() if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGetLengthInChars"); else return 0; end; end;
function gui.RichEdit:getLengthInGlyphs() if System.checkAPIVersion(87, 4) then return _obj_invokeEx(self.handle, "LGetLengthInGlyphs"); else return 0; end; end;
Expand Down
4 changes: 3 additions & 1 deletion Plugins/Core/sceneinlua/sdk/serpent.dlua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ local c, d = "Paul Kulchenko", "Lua serializer and pretty printer"
local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'}
local badtype = {thread = true, userdata = true, cdata = true}
local getmetatable = debug and debug.getmetatable or getmetatable
local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+

-- local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+ -- it should use pairs because of nodeDatabase

local keyword, globals, G = {}, {}, (_G or _ENV)
for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false',
'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat',
Expand Down
4 changes: 2 additions & 2 deletions Plugins/plugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dataType>
</dataTypes>
</element>
<element id="Ambesek.Auto.Updater" name="Plugin Auto Updater" url="https://github.com/rrpgfirecast/firecast/blob/master/Plugins/TablesDock/AutoUpdater/output/AutoUpdater.rpk?raw=true" fileName="AutoUpdater.rpk" repositoryPath="TablesDock/AutoUpdater/" author="Ambesek" description="Verifica seus plugins e macros, e encontra quais tem atualizações disponíveis no git do firecast. Também permite acesso a plugins não instalados do git." version="1.2" compilationDate="09042024150153" compilationDigest="0a9256dc0aec2b38d66c6be4d84fcceeea776f2e">
<element id="Ambesek.Auto.Updater" name="Plugin Auto Updater" url="https://github.com/rrpgfirecast/firecast/blob/master/Plugins/TablesDock/AutoUpdater/output/AutoUpdater.rpk?raw=true" fileName="AutoUpdater.rpk" repositoryPath="TablesDock/AutoUpdater/" author="Ambesek" description="Verifica seus plugins e macros, e encontra quais tem atualizações disponíveis no git do firecast. Também permite acesso a plugins não instalados do git." version="1.3" compilationDate="22052024031024" compilationDigest="e88b4f73f773c88970baa56ad03bfc3eae98f2fe">
<info lang="pt-BR" name="Plugin Auto Updater" description="Verifica seus plugins e macros, e encontra quais tem atualizações disponíveis no git do firecast. Também permite acesso a plugins não instalados do git." author="Ambesek" site="http://pt-br.rpgmeister.wikia.com/wiki/Main_Page"/>
<info lang="en" description="Check your plugins and macros, and find which ones have updates available in Firecast git. It also allows access to not installed git plugins."/>
<dataTypes>
Expand Down Expand Up @@ -496,7 +496,7 @@
</dataType>
</dataTypes>
</element>
<element id="BR.COM.RRPG.SCENE3_IN_LUA" name="Núcleo do Scene 3" url="https://github.com/rrpgfirecast/firecast/blob/master/Plugins/Core/sceneinlua/output/sceneinlua.rpk?raw=true" fileName="sceneinlua.rpk" repositoryPath="Core/sceneinlua/" author="Firecast - AlyssonRPG" description="Plug-in que possui funcionalidades básicas para o tabuleiro de combate, também conhecido como Scene 3" version="1.0" compilationDate="18052024133147" compilationDigest="1f692ac10000077f956d872434858d0951e8886e">
<element id="BR.COM.RRPG.SCENE3_IN_LUA" name="Núcleo do Scene 3" url="https://github.com/rrpgfirecast/firecast/blob/master/Plugins/Core/sceneinlua/output/sceneinlua.rpk?raw=true" fileName="sceneinlua.rpk" repositoryPath="Core/sceneinlua/" author="Firecast - AlyssonRPG" description="Plug-in que possui funcionalidades básicas para o tabuleiro de combate, também conhecido como Scene 3" version="1.0" compilationDate="13062024121128" compilationDigest="ee60a52d7096f56181f34eadd8717534eecf2d4f">
<info lang="en" name="Scene 3 Core" description="Plug-in that has basic features for the combat grid, also known as Scene 3"/>
<info lang="pt" name="Núcleo do Scene 3" description="Plug-in que possui funcionalidades básicas para o tabuleiro de combate, também conhecido como Scene 3" author="Firecast - AlyssonRPG" site="http://www.rrpg.com.br"/>
</element>
Expand Down
8 changes: 7 additions & 1 deletion SDK3/API/ndb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,13 @@ function ndb.createChildNode(nodeObj, childName)
local node = localNDB.getNodeObjectFromFacade(nodeObj);

if node ~= nil then
return node:addChild(childName):getFacade();
local childNode = node:addChild(childName);

if childNode ~= nil then
return childNode:getFacade();
else
return nil;
end;
else
return nil;
end;
Expand Down

0 comments on commit eadd2b8

Please sign in to comment.