Skip to content

Commit

Permalink
Merge pull request drl2#25 from drl2/v10-compatibility
Browse files Browse the repository at this point in the history
Equipment fix
  • Loading branch information
drl2 authored Jun 29, 2024
2 parents a6f6167 + c94b386 commit a0efd9e
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 28 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ This project is free and open source, but if you're feeling generous and would l

## Change Log

### [1.1.4] - 2024-06-28
- Fixed disappearing equipment bug introduced from last version's cleanup

### [1.1.3] - 2024-05-27
- Minor fixes for Foundry v12 compatibililty
- Addressed usage of some older methods that will be phased out in future Foundry versions
Expand Down
3 changes: 0 additions & 3 deletions module/ezitem.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ export default class EZItem extends Item {
await super._preUpdate(changed, options, userId);

if (foundry.utils.hasProperty(changed.system, "equipmenttype")) {
console.warn(changed);
const splitArray = changed.system["equipmenttype"].toLowerCase().split(".");
console.warn(splitArray[0]);
const img = EZD6.EquipmentTypeImages[splitArray[0]];
console.warn(img);
changed.img = img;
}
}
Expand Down
17 changes: 10 additions & 7 deletions module/sheets/EZD6CharacterSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,26 @@ export default class EZD6CharacterSheet extends ActorSheet {
}

if (i.type === 'equipment') {
switch (i.system["equipmenttype"]) {
case 'EQUIPMENT.Gear':
// workaround for selectOptions injecting short name instead of long name previously used
let x = i.system["equipmenttype"].split('.');
let eqType = x[x.length-1].toLowerCase();
switch (eqType) {
case 'gear':
equipment_gear.push(i);
break;
case 'EQUIPMENT.Weapon':
case 'weapon':
equipment_weapons.push(i);
break;
case 'EQUIPMENT.Scroll':
case 'scroll':
equipment_scrolls.push(i);
break;
case 'EQUIPMENT.Potion':
case 'potion':
equipment_potions.push(i);
break;
case 'EQUIPMENT.Magic':
case 'magic':
equipment_magic.push(i);
break;
case 'EQUIPMENT.Other':
case 'other':
equipment_other.push(i);
break;
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packs/ezd6-system-macros/CURRENT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MANIFEST-000079
MANIFEST-000083
16 changes: 8 additions & 8 deletions packs/ezd6-system-macros/LOG
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
2024/05/27-15:42:09.841064 b3bff400 Recovering log #77
2024/05/27-15:42:09.846927 b3bff400 Delete type=0 #77
2024/05/27-15:42:09.847027 b3bff400 Delete type=3 #75
2024/05/27-15:43:45.458415 af5ff400 Level-0 table #82: started
2024/05/27-15:43:45.458506 af5ff400 Level-0 table #82: 0 bytes OK
2024/05/27-15:43:45.461113 af5ff400 Delete type=0 #80
2024/05/27-15:43:45.469396 af5ff400 Manual compaction at level-0 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
2024/05/27-15:43:45.469521 af5ff400 Manual compaction at level-1 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
2024/06/27-19:09:21.609021 b3bff400 Recovering log #81
2024/06/27-19:09:21.615312 b3bff400 Delete type=3 #79
2024/06/27-19:09:21.615444 b3bff400 Delete type=0 #81
2024/06/28-15:26:14.102409 b04ff400 Level-0 table #86: started
2024/06/28-15:26:14.102545 b04ff400 Level-0 table #86: 0 bytes OK
2024/06/28-15:26:14.105704 b04ff400 Delete type=0 #84
2024/06/28-15:26:14.138015 b04ff400 Manual compaction at level-0 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
2024/06/28-15:26:14.158939 b04ff400 Manual compaction at level-1 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
16 changes: 8 additions & 8 deletions packs/ezd6-system-macros/LOG.old
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
2024/05/27-00:40:09.023517 b33fe400 Recovering log #73
2024/05/27-00:40:09.029586 b33fe400 Delete type=0 #73
2024/05/27-00:40:09.029686 b33fe400 Delete type=3 #71
2024/05/27-15:40:34.594395 af5ff400 Level-0 table #78: started
2024/05/27-15:40:34.594452 af5ff400 Level-0 table #78: 0 bytes OK
2024/05/27-15:40:34.596854 af5ff400 Delete type=0 #76
2024/05/27-15:40:34.597091 af5ff400 Manual compaction at level-0 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
2024/05/27-15:40:34.597189 af5ff400 Manual compaction at level-1 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
2024/05/27-15:42:09.841064 b3bff400 Recovering log #77
2024/05/27-15:42:09.846927 b3bff400 Delete type=0 #77
2024/05/27-15:42:09.847027 b3bff400 Delete type=3 #75
2024/05/27-15:43:45.458415 af5ff400 Level-0 table #82: started
2024/05/27-15:43:45.458506 af5ff400 Level-0 table #82: 0 bytes OK
2024/05/27-15:43:45.461113 af5ff400 Delete type=0 #80
2024/05/27-15:43:45.469396 af5ff400 Manual compaction at level-0 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
2024/05/27-15:43:45.469521 af5ff400 Manual compaction at level-1 from '!macros!6GSdLhN1nG8XNnDZ' @ 72057594037927935 : 1 .. '!macros!zD81BcFzbzxVRKgE' @ 0 : 0; will stop at (end)
Binary file not shown.
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A FoundryVTT system implementation of Scotty McFarland's EZD6 system",
"url": "https://github.com/drl2/ezd6-fvtt",
"license": "LICENSE.txt",
"version": "1.1.3",
"version": "1.1.4",
"compatibility": {
"minimum": "9",
"verified": "12"
Expand Down

0 comments on commit a0efd9e

Please sign in to comment.