diff --git a/Esper_Genesis_5E/EG_Sheet.html b/Esper_Genesis_5E/EG_Sheet.html
index c9f28ca621..65d48549bf 100644
--- a/Esper_Genesis_5E/EG_Sheet.html
+++ b/Esper_Genesis_5E/EG_Sheet.html
@@ -6963,7 +6963,21 @@ const dropHelpers = {
var lastDropID = '';
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) {
- 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']) {
lastDropID = v['drop_name'];
} else if(v['character_id']) {
@@ -15102,6 +15116,7 @@ const globalAttributesByCategory = {
};
on("sheet:opened", function(eventinfo) {
+ lastDropID = "";
versioning(function() {
var getInfo = function(sections, callback, results) {
results = results || {};
diff --git a/Esper_Genesis_5E/sheetworkers.js b/Esper_Genesis_5E/sheetworkers.js
index 4a84a8c1be..b44ad9d450 100644
--- a/Esper_Genesis_5E/sheetworkers.js
+++ b/Esper_Genesis_5E/sheetworkers.js
@@ -56,6 +56,7 @@ const globalAttributesByCategory = {
};
on("sheet:opened", function(eventinfo) {
+ lastDropID = "";
versioning(function() {
var getInfo = function(sections, callback, results) {
results = results || {};
diff --git a/Esper_Genesis_5E/src/dragndrop/DragAndDrop.js b/Esper_Genesis_5E/src/dragndrop/DragAndDrop.js
index 73c64ffd4e..7f6655214d 100644
--- a/Esper_Genesis_5E/src/dragndrop/DragAndDrop.js
+++ b/Esper_Genesis_5E/src/dragndrop/DragAndDrop.js
@@ -19,7 +19,21 @@ on("change:drop_category", function(eventinfo) {
var lastDropID = '';
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) {
- 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']) {
lastDropID = v['drop_name'];
} else if(v['character_id']) {
@@ -45,7 +59,6 @@ var handle_drop = function(category, eventinfo) {
});
});
-
};
var processDrop = function(page, currentData, repeating, looped) {