Skip to content

Commit 09f9d9e

Browse files
committed
removeMIability() fix
* Fixed removeMIability() which was deleting across all sheets rather than just selected sheet.
1 parent 3554770 commit 09f9d9e

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

MagicMaster/4.0.4/MagicMaster.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,16 @@ API_Meta.MagicMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
9696
* v4.0.3 05/04/2025 Fixed error in memorize spells dialog misdisplaying spells with empty (as opposed to
9797
* undefined) strings.
9898
* v4.0.4 08/04/2025 Added ability for --message command to take any number of variables as arguments (after
99-
* API call argument) referenced by ^^#^^
99+
* API call argument) referenced by ^^#^^. Fixed removeMIability() which was deleting
100+
* across all sheets rather than just selected sheet.
100101
*/
101102

102103
var MagicMaster = (function() {
103104
'use strict';
104105
var version = '4.0.4',
105106
author = 'RED',
106107
pending = null;
107-
const lastUpdate = 1744360269;
108+
const lastUpdate = 1745087741;
108109

109110
/*
110111
* Define redirections for functions moved to the RPGMaster library
@@ -2538,7 +2539,8 @@ var MagicMaster = (function() {
25382539

25392540
if (!Items.tableFind( fields.Items_name, itemName ) && !Items.tableFind( fields.Items_trueName, itemName )) {
25402541
let MIobjs = filterObjs( obj => {
2541-
if (obj.type !== 'ability' && obj.type !== 'attribute') return false;
2542+
if (obj.get('_type') !== 'ability' && obj.get('_type') !== 'attribute') return false;
2543+
if (obj.get('_characterid') !== charCS.id) return false;
25422544
return (obj.name === itemName || obj.name.startsWith(fields.ItemVar[0]+itemName.hyphened()));
25432545
});
25442546
if (MIobjs) _.each(MIobjs,MIobj => MIobj.remove());

MagicMaster/MagicMaster.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,16 @@ API_Meta.MagicMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
9696
* v4.0.3 05/04/2025 Fixed error in memorize spells dialog misdisplaying spells with empty (as opposed to
9797
* undefined) strings.
9898
* v4.0.4 08/04/2025 Added ability for --message command to take any number of variables as arguments (after
99-
* API call argument) referenced by ^^#^^
99+
* API call argument) referenced by ^^#^^. Fixed removeMIability() which was deleting
100+
* across all sheets rather than just selected sheet.
100101
*/
101102

102103
var MagicMaster = (function() {
103104
'use strict';
104105
var version = '4.0.4',
105106
author = 'RED',
106107
pending = null;
107-
const lastUpdate = 1744360269;
108+
const lastUpdate = 1745087741;
108109

109110
/*
110111
* Define redirections for functions moved to the RPGMaster library
@@ -2538,7 +2539,8 @@ var MagicMaster = (function() {
25382539

25392540
if (!Items.tableFind( fields.Items_name, itemName ) && !Items.tableFind( fields.Items_trueName, itemName )) {
25402541
let MIobjs = filterObjs( obj => {
2541-
if (obj.type !== 'ability' && obj.type !== 'attribute') return false;
2542+
if (obj.get('_type') !== 'ability' && obj.get('_type') !== 'attribute') return false;
2543+
if (obj.get('_characterid') !== charCS.id) return false;
25422544
return (obj.name === itemName || obj.name.startsWith(fields.ItemVar[0]+itemName.hyphened()));
25432545
});
25442546
if (MIobjs) _.each(MIobjs,MIobj => MIobj.remove());

MagicMaster/magicMaster.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,16 @@ API_Meta.MagicMaster={offset:Number.MAX_SAFE_INTEGER,lineCount:-1};
9696
* v4.0.3 05/04/2025 Fixed error in memorize spells dialog misdisplaying spells with empty (as opposed to
9797
* undefined) strings.
9898
* v4.0.4 08/04/2025 Added ability for --message command to take any number of variables as arguments (after
99-
* API call argument) referenced by ^^#^^
99+
* API call argument) referenced by ^^#^^. Fixed removeMIability() which was deleting
100+
* across all sheets rather than just selected sheet.
100101
*/
101102

102103
var MagicMaster = (function() {
103104
'use strict';
104105
var version = '4.0.4',
105106
author = 'RED',
106107
pending = null;
107-
const lastUpdate = 1744360269;
108+
const lastUpdate = 1745087741;
108109

109110
/*
110111
* Define redirections for functions moved to the RPGMaster library
@@ -2538,7 +2539,8 @@ var MagicMaster = (function() {
25382539

25392540
if (!Items.tableFind( fields.Items_name, itemName ) && !Items.tableFind( fields.Items_trueName, itemName )) {
25402541
let MIobjs = filterObjs( obj => {
2541-
if (obj.type !== 'ability' && obj.type !== 'attribute') return false;
2542+
if (obj.get('_type') !== 'ability' && obj.get('_type') !== 'attribute') return false;
2543+
if (obj.get('_characterid') !== charCS.id) return false;
25422544
return (obj.name === itemName || obj.name.startsWith(fields.ItemVar[0]+itemName.hyphened()));
25432545
});
25442546
if (MIobjs) _.each(MIobjs,MIobj => MIobj.remove());

0 commit comments

Comments
 (0)