SD-1774
This commit is contained in:
@@ -6963,7 +6963,21 @@ const dropHelpers = {
|
|||||||
var lastDropID = '';
|
var lastDropID = '';
|
||||||
var handle_drop = function(category, eventinfo) {
|
var handle_drop = function(category, eventinfo) {
|
||||||
getAttrs(["speed", "hp_max", "hp", "drop_name", "drop_data", "drop_content", "character_id", "npc_legendary_actions", "strength_mod", "dexterity_mod", "npc", "base_level", "strength_base", "dexterity_base", "constitution_base", "wisdom_base", "intelligence_base", "charisma_base", "class_resource_name", "other_resource_name", "multiclass1_lvl", "multiclass2_lvl", "multiclass3_lvl"], function(v) {
|
getAttrs(["speed", "hp_max", "hp", "drop_name", "drop_data", "drop_content", "character_id", "npc_legendary_actions", "strength_mod", "dexterity_mod", "npc", "base_level", "strength_base", "dexterity_base", "constitution_base", "wisdom_base", "intelligence_base", "charisma_base", "class_resource_name", "other_resource_name", "multiclass1_lvl", "multiclass2_lvl", "multiclass3_lvl"], function(v) {
|
||||||
if((v['drop_name'] && v['drop_name'] == lastDropID) || (v['character_id'] && v['character_id'] == lastDropID)) return;
|
setAttrs({
|
||||||
|
drop_category: "",
|
||||||
|
drop_name: "",
|
||||||
|
drop_data: "",
|
||||||
|
drop_content: "",
|
||||||
|
}, {silent: true});
|
||||||
|
if((v['drop_name'] && v['drop_name'] == lastDropID) || (v['character_id'] && v['character_id'] == lastDropID)) {
|
||||||
|
lastDropID = "";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log("cleaning last ID");
|
||||||
|
lastDropID = "";
|
||||||
|
}, 2000);
|
||||||
|
};
|
||||||
if(v['drop_name']) {
|
if(v['drop_name']) {
|
||||||
lastDropID = v['drop_name'];
|
lastDropID = v['drop_name'];
|
||||||
} else if(v['character_id']) {
|
} else if(v['character_id']) {
|
||||||
@@ -15102,6 +15116,7 @@ const globalAttributesByCategory = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
on("sheet:opened", function(eventinfo) {
|
on("sheet:opened", function(eventinfo) {
|
||||||
|
lastDropID = "";
|
||||||
versioning(function() {
|
versioning(function() {
|
||||||
var getInfo = function(sections, callback, results) {
|
var getInfo = function(sections, callback, results) {
|
||||||
results = results || {};
|
results = results || {};
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ const globalAttributesByCategory = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
on("sheet:opened", function(eventinfo) {
|
on("sheet:opened", function(eventinfo) {
|
||||||
|
lastDropID = "";
|
||||||
versioning(function() {
|
versioning(function() {
|
||||||
var getInfo = function(sections, callback, results) {
|
var getInfo = function(sections, callback, results) {
|
||||||
results = results || {};
|
results = results || {};
|
||||||
|
|||||||
@@ -19,7 +19,21 @@ on("change:drop_category", function(eventinfo) {
|
|||||||
var lastDropID = '';
|
var lastDropID = '';
|
||||||
var handle_drop = function(category, eventinfo) {
|
var handle_drop = function(category, eventinfo) {
|
||||||
getAttrs(["speed", "hp_max", "hp", "drop_name", "drop_data", "drop_content", "character_id", "npc_legendary_actions", "strength_mod", "dexterity_mod", "npc", "base_level", "strength_base", "dexterity_base", "constitution_base", "wisdom_base", "intelligence_base", "charisma_base", "class_resource_name", "other_resource_name", "multiclass1_lvl", "multiclass2_lvl", "multiclass3_lvl"], function(v) {
|
getAttrs(["speed", "hp_max", "hp", "drop_name", "drop_data", "drop_content", "character_id", "npc_legendary_actions", "strength_mod", "dexterity_mod", "npc", "base_level", "strength_base", "dexterity_base", "constitution_base", "wisdom_base", "intelligence_base", "charisma_base", "class_resource_name", "other_resource_name", "multiclass1_lvl", "multiclass2_lvl", "multiclass3_lvl"], function(v) {
|
||||||
if((v['drop_name'] && v['drop_name'] == lastDropID) || (v['character_id'] && v['character_id'] == lastDropID)) return;
|
setAttrs({
|
||||||
|
drop_category: "",
|
||||||
|
drop_name: "",
|
||||||
|
drop_data: "",
|
||||||
|
drop_content: "",
|
||||||
|
}, {silent: true});
|
||||||
|
if((v['drop_name'] && v['drop_name'] == lastDropID) || (v['character_id'] && v['character_id'] == lastDropID)) {
|
||||||
|
lastDropID = "";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log("cleaning last ID");
|
||||||
|
lastDropID = "";
|
||||||
|
}, 2000);
|
||||||
|
};
|
||||||
if(v['drop_name']) {
|
if(v['drop_name']) {
|
||||||
lastDropID = v['drop_name'];
|
lastDropID = v['drop_name'];
|
||||||
} else if(v['character_id']) {
|
} else if(v['character_id']) {
|
||||||
@@ -45,7 +59,6 @@ var handle_drop = function(category, eventinfo) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var processDrop = function(page, currentData, repeating, looped) {
|
var processDrop = function(page, currentData, repeating, looped) {
|
||||||
|
|||||||
Reference in New Issue
Block a user