finishing dnd modules

This commit is contained in:
Kyle
2021-07-08 10:33:42 -07:00
parent b25c13689b
commit 70979fa63e
24 changed files with 304 additions and 5 deletions

View File

@@ -686,7 +686,7 @@ function writeText(textObject, targetContext) {
var splitString = '6GJt7eL8';
var rawText = textObject.text
if (params.get('copyright') != null && textObject.name == 'wizards' && card.margins) {
rawText = params.get('copyright'); //so people using CC for custom card games can customize their copyright info
rawText = params.get('copyright'); //so people using CC for custom card games without WotC's IP can customize their copyright info
}
var splitText = rawText.replace(/\n/g, '{line}').replace(/{flavor}/g, '{lns}{bar}{lns}{fixtextalign}{i}').replace(/{/g, splitString + '{').replace(/}/g, '}' + splitString).replace(/ /g, splitString + ' ' + splitString).split(splitString);
splitText = splitText.filter(item => item);
@@ -1482,10 +1482,12 @@ function importCard(cardObject) {
importIndex.innerHTML = null;
var optionIndex = 0;
cardObject.forEach(card => {
var option = document.createElement('option');
option.innerHTML = `${card.name} (${card.type_line})`;
option.value = optionIndex;
importIndex.appendChild(option);
if (card.type_line != 'Card') {
var option = document.createElement('option');
option.innerHTML = `${card.name} (${card.type_line})`;
option.value = optionIndex;
importIndex.appendChild(option);
}
optionIndex ++;
});
changeCardIndex();

View File

@@ -1,5 +1,6 @@
loadFramePacks([
{name:'Generic Margins', value:'Margin-1'},
{name:'D&D Module Margin', value:'MarginDNDModule'},
{name:'Mystical Archive Margin', value:'MarginMysticalArchive'},
{name:'Unstable Basics Margin', value:'MarginUnstable'}
])

View File

@@ -5,6 +5,8 @@ availableFrames = [
{name:'Black Frame', src:'/img/frames/dndModule/b.svg'},
{name:'Red Frame', src:'/img/frames/dndModule/r.svg'},
{name:'Green Frame', src:'/img/frames/dndModule/g.svg'},
{name:'Multicolored Frame', src:'/img/frames/dndModule/m.svg'},
{name:'Artifact Frame', src:'/img/frames/dndModule/a.svg'},
{name:'Colorless Frame', src:'/img/frames/dndModule/c.svg'}
];
//disables/enables the "Load Frame Version" button

View File

@@ -0,0 +1,20 @@
//Create objects for common properties across available frames
var bounds = {x:-0.044, y:-1/35, width:1.088, height:37/35};
var ogBounds = {x:0, y:0, width:1, height:1};
//defines available frames
availableFrames = [
{name:'White Extension', src:'/img/frames/dndModule/margin/w.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Blue Extension', src:'/img/frames/dndModule/margin/u.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Black Extension', src:'/img/frames/dndModule/margin/b.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Red Extension', src:'/img/frames/dndModule/margin/r.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Green Extension', src:'/img/frames/dndModule/margin/g.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Multicolored Extension', src:'/img/frames/dndModule/margin/m.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Artifact Extension', src:'/img/frames/dndModule/margin/a.svg', bounds:bounds, ogBounds:ogBounds},
{name:'Colorless Extension', src:'/img/frames/dndModule/margin/c.svg', bounds:bounds, ogBounds:ogBounds}
];
//disables/enables the "Load Frame Version" button
document.querySelector('#loadFrameVersion').disabled = false;
//defines process for loading this version, if applicable
document.querySelector('#loadFrameVersion').onclick = loadMarginVersion;
//loads available frames
loadFramePack();