0.1.7 - DEV-3 : fixed repair tools, added few QoL changes, added few game systems to RPG stats

This commit is contained in:
Elvanos 2021-05-07 15:57:16 +02:00
parent 342db40199
commit f57f5f147b
13 changed files with 301 additions and 159 deletions

View file

@ -323,6 +323,22 @@
v-model="options.preventAutoScroll"
/>
</div>
<div class="col-12 col-md-6 col-lg-4 optionWrapper">
<div class="optionTitle">
DEVELOPMENT - Show document IDs
<q-icon name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip :delay="500">
If this is ticked on, document body will also show the internal document ID value.
</q-tooltip>
</q-icon>
</div>
<q-toggle
v-model="options.showDocumentID"
/>
</div>
</div>
</q-scroll-area>
@ -965,6 +981,7 @@ export default class ProgramSettings extends DialogBase {
allowQuickPopupSameKeyClose: false,
disableDocumentCounts: false,
compactDocumentCount: false,
showDocumentID: false,
invertCategoryPosition: false,
hideWelcomeScreenSocials: false,
hideTooltipsStart: false,

View file

@ -12,7 +12,7 @@
<q-card-section class="row justify-center q-mx-xl">
<div>
If you are working with project created (or added via Merge) before version 0.1.6, this process might significantly improve your performance.
If you are working with project created (or added via Merge) before version 0.1.7, this process might significantly improve your performance.
<br>
<br>
However, before proceeding, please export your current project first to prevent a <span class="text-bold text-secondary">POSSIBLE CORRUPTION</span> of your current project data!
@ -175,12 +175,28 @@ export default class RepairProjectDialog extends DialogBase {
const optionsSnapShot = extend(true, {}, this.SGET_options)
// @ts-ignore
optionsSnapShot.pre016check = false
optionsSnapShot.pre017check = false
// @ts-ignore
this.SSET_options(optionsSnapShot)
}
async remapDocument (document: I_ShortenedDocument, blueprint: I_Blueprint) {
const statFieldIDS = [
"strength",
"constitution",
"dexterity",
"intellect",
"wisdom",
"charisma"
]
const transeferedStats = {
id: "statsList",
value: []
}
const obsoleteFieldIDs: string[] = []
const allSingleToNoneFields = blueprint.extraFields.filter(e => e.type === "singleToNoneRelationship")
const allSingleToSingleFields = blueprint.extraFields.filter(e => e.type === "singleToSingleRelationship")
const allSingleToManyFields = blueprint.extraFields.filter(e => e.type === "singleToManyRelationship")
@ -212,9 +228,6 @@ export default class RepairProjectDialog extends DialogBase {
allManyToSingleFields.find(e => e.id === field.id) ||
allManyToManyFields.find(e => e.id === field.id)) {
if (field.value && field.value.value) {
if (field.id === "pairedLocations") {
console.log(field.value.value)
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
for (const [i, subValue] of field.value.value.entries()) {
const blueprintField = blueprint.extraFields.find(e => e.id === field.id)
@ -229,8 +242,50 @@ export default class RepairProjectDialog extends DialogBase {
}
}
}
// Fix stat fields
if (statFieldIDS.includes(field.id)) {
if (field.value.length > 0) {
transeferedStats.value.push({
// @ts-ignore
value: field.value,
// @ts-ignore
affix: field.id.charAt(0).toUpperCase() + field.id.slice(1)
})
}
obsoleteFieldIDs.push(field.id)
}
}
if (transeferedStats.value.length > 0) {
const statFieldIndex = document.extraFields.findIndex(e => e.id === "statsList")
// If new stats/attributes field doesn't exist yet, create a new one
if (statFieldIndex === -1) {
document.extraFields.push(transeferedStats)
}
// If the field already exists
else {
document.extraFields[statFieldIndex].value = [
...document.extraFields[statFieldIndex].value,
...transeferedStats.value]
}
}
if (document._id === "e1e24951-e2af-4513-8e4c-50fb93fd94d9") {
console.log(obsoleteFieldIDs)
}
// Clean out obsolete fields that will cause bugs if left alone
obsoleteFieldIDs.forEach(i => {
const fieldIndex = document.extraFields.findIndex(e => e.id === i)
// Cut out the legacy field
document.extraFields.splice(fieldIndex, 1)
})
if (document._id === "e1e24951-e2af-4513-8e4c-50fb93fd94d9") {
console.log(document.extraFields)
}
this.processedDocument++
await this.sleep(25)

View file

@ -25,10 +25,10 @@
</q-item-section>
<q-item-section>
<span class="text-weight-medium">
{{input.value}}
{{(isReversed) ? localInput[index].affix : input.value}}
</span>
<span v-if="localInput[index].affix" class="inline-block q-ml-xs text-italic listNote">
({{localInput[index].affix}})
{{(!isReversed) ? `(${localInput[index].affix})` : ` - ${input.value}`}}
</span>
</q-item-section>
</q-item>
@ -85,10 +85,24 @@
</q-tooltip>
</q-btn>
<template v-if="isReversed">
<q-input
v-if="hasExtraInput && filteredLocalExtraInput.length === 0"
style="min-width: 350px; width: 350px; max-width: 350px;"
v-model="localInput[index].affix"
class="grow-1 q-mr-lg"
:class="`listField_prefix${index}_${inputDataBluePrint.id}`"
dense
autogrow
:label="(inputAffix) ? inputAffix : ''"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
>
</q-input>
<q-select
style="min-width: 350px; width: 350px;"
dense
v-if="hasExtraInput"
v-if="hasExtraInput && filteredLocalExtraInput.length > 0"
class="listAtributeSelect q-mr-lg"
:options="filteredLocalExtraInput"
use-input
@ -195,8 +209,22 @@
:filled="isDarkMode"
>
</q-input>
<q-input
v-if="hasExtraInput && filteredLocalExtraInput.length === 0"
style="min-width: 350px; width: 350px; max-width: 350px;"
v-model="localInput[index].affix"
class="grow-1 q-mr-lg"
:class="`listField_prefix${index}_${inputDataBluePrint.id}`"
dense
autogrow
:label="(inputAffix) ? inputAffix : ''"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
>
</q-input>
<q-select
v-if="hasExtraInput"
v-if="hasExtraInput && filteredLocalExtraInput.length > 0"
style="min-width: 350px; width: 350px;"
dense
class="listAtributeSelect q-mr-lg"

View file

@ -21,8 +21,21 @@
</q-item>
</q-list>
<q-input
v-if="editMode && extraInput.length === 0"
style="width: 100%;"
v-model="localInput"
class="grow-1 q-mr-lg"
:ref="`singleSelectField${this.inputDataBluePrint.id}`"
dense
autogrow
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
>
</q-input>
<q-select
v-if="editMode"
v-if="editMode && extraInput.length > 0"
style="width: 100%;"
dense
dark

View file

@ -20,12 +20,17 @@
### New features
- **Added on-the-fly relationship documents generation**
- **Added stat/attribute support for multiple RPG systems**
- **Added option to search through the `Other names` field via `@` modifier**
- Added reverse display for lists
- Added category adding for lists
- Added precise mode search to full-field search in the relationship search inputs
- Added option to search through the `Other names` field via `@` modifier
- Added option: Prevent filled note board showing
- Added `Other Names & Epithets` to `Chapters` document type
- Revamped `Member count` field in all types of groups document types
- Added `Follower/Subject count` field to all types of groups document types
- Added dev option to the menu for quick document ID copying
- Updated the legacy project repair tool to also transfer old stat fields into the new setup
### QoL adjustments
@ -33,6 +38,7 @@
- Added input reseting after adding/selection in the relationship fields
- Revamped the field order in all document types since `Other names` field moved to `Document settings` from `Basic information` as it is not a mandatory system field specially used in advanced search
- Added tooltips to `Member count` and `Follower/Subject count` fields in all groups document types
- Updated selects to act as text input fields in case there are no prdefixed values in the list
## 0.1.6a

View file

@ -7,15 +7,15 @@
@trigger-dialog-close="repairProjectDialogClose"
/>
<q-dialog v-model="pre016check" seamless position="bottom">
<q-dialog v-model="pre017check" seamless position="bottom">
<q-card style="width: 100vw; min-width: 100vw;" dark class="text-accent bg-secondary">
<q-card-section class="row items-center no-wrap justify-center">
<div>
If you are working with a pre-0.1.6 version project, then please <span class="q-mx-lg"><q-btn outline label="Repair your project" color="accent" @click="repairProjectAssignUID" /></span>
If you are working with a pre-0.1.7 version project, then please <span class="q-mx-lg"><q-btn outline label="Repair your project" color="accent" @click="repairProjectAssignUID" /></span>
</div>
<q-btn outline round icon="close" v-close-popup @click="close016Notification" class="notifClose" />
<q-btn outline round icon="close" v-close-popup @click="close017Notification" class="notifClose" />
</q-card-section>
</q-card>
</q-dialog>
@ -173,7 +173,7 @@ export default class DocumentLayout extends BaseClass {
*/
splitterModel = 375
pre016check = false
pre017check = false
/**
* Special class for the splitter
@ -202,7 +202,7 @@ export default class DocumentLayout extends BaseClass {
this.hideHierarchyTree = options.hideHierarchyTree
// @ts-ignore
this.pre016check = options.pre016check
this.pre017check = options.pre017check
if (options.treeWidth && !this.hideHierarchyTree) {
this.splitterModel = options.treeWidth
@ -232,9 +232,9 @@ export default class DocumentLayout extends BaseClass {
*/
optionsSnapShot = {} as OptionsStateInteface
close016Notification () {
close017Notification () {
this.optionsSnapShot = extend(true, {}, this.SGET_options)
this.optionsSnapShot.pre016check = false
this.optionsSnapShot.pre017check = false
this.SSET_options(this.optionsSnapShot)
}

View file

@ -125,6 +125,11 @@
</q-btn>
</div>
<div class="col-12 q-mt-xl justify-end" v-if="showDocumentID">
<q-input style="width: 100%;" readonly outlined label="Document ID" stack-label @click="copyID" ref="idCopy" v-model="currentData._id">
</q-input>
</div>
<div
v-for="field in bluePrintData.extraFields"
:key="`${field.id}`"
@ -325,8 +330,11 @@ export default class PageDocumentDisplay extends BaseClass {
this.isDarkMode = options.darkMode
this.hideEmptyFields = options.hideEmptyFields
this.preventAutoScroll = options.preventAutoScroll
this.showDocumentID = options.showDocumentID
}
showDocumentID = false
/**
* Determines if the documents will recall their scroll distances and auto-scroll on switching ot not.
*/
@ -966,6 +974,21 @@ export default class PageDocumentDisplay extends BaseClass {
})
}
}
copyID () {
const copyText = this.$refs.idCopy
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
copyText.select()
document.execCommand("copy")
this.$q.notify({
group: false,
type: "positive",
message: "Document ID Copied"
})
}
}
</script>

View file

@ -207,48 +207,6 @@ export const charactersBlueprint: I_Blueprint = {
extraSelectValueList: RPGSystemsStats
}
},
{
id: "strength",
name: "Strength",
type: "text",
icon: "fas fa-dumbbell",
sizing: 2
},
{
id: "constitution",
name: "Constitution",
type: "text",
icon: "mdi-shield",
sizing: 2
},
{
id: "dexterity",
name: "Dexterity",
type: "text",
icon: "mdi-run-fast",
sizing: 2
},
{
id: "intellect",
name: "Intellect",
type: "text",
icon: "mdi-brain",
sizing: 2
},
{
id: "wisdom",
name: "Wisdom/Willpower",
type: "text",
icon: "fas fa-yin-yang",
sizing: 2
},
{
id: "charisma",
name: "Charisma",
type: "text",
icon: "mdi-drama-masks",
sizing: 2
},
{
id: "pairedOriginLocation",
name: "Place of origin",

View file

@ -177,48 +177,6 @@ export const itemsBlueprint: I_Blueprint = {
extraSelectValueList: RPGSystemsStats
}
},
{
id: "strength",
name: "Strength change",
type: "text",
icon: "fas fa-dumbbell",
sizing: 2
},
{
id: "constitution",
name: "Constitution change",
type: "text",
icon: "mdi-shield",
sizing: 2
},
{
id: "dexterity",
name: "Dexterity change",
type: "text",
icon: "mdi-run-fast",
sizing: 2
},
{
id: "intellect",
name: "Intellect change",
type: "text",
icon: "mdi-brain",
sizing: 2
},
{
id: "wisdom",
name: "Wisdom/Willpower change",
type: "text",
icon: "fas fa-yin-yang",
sizing: 2
},
{
id: "charisma",
name: "Charisma change",
type: "text",
icon: "mdi-drama-masks",
sizing: 2
},
{
id: "pairedItems",
name: "Connected to other Items",

View file

@ -260,48 +260,6 @@ export const racesBlueprint: I_Blueprint = {
extraSelectValueList: RPGSystemsStats
}
},
{
id: "strength",
name: "Strength",
type: "text",
icon: "fas fa-dumbbell",
sizing: 2
},
{
id: "constitution",
name: "Constitution",
type: "text",
icon: "mdi-shield",
sizing: 2
},
{
id: "dexterity",
name: "Dexterity",
type: "text",
icon: "mdi-run-fast",
sizing: 2
},
{
id: "intellect",
name: "Intellect",
type: "text",
icon: "mdi-brain",
sizing: 2
},
{
id: "wisdom",
name: "Wisdom/Willpower",
type: "text",
icon: "fas fa-yin-yang",
sizing: 2
},
{
id: "charisma",
name: "Charisma",
type: "text",
icon: "mdi-drama-masks",
sizing: 2
},
{
id: "traits",
name: "Defining Features & Traits",

View file

@ -243,13 +243,9 @@ export const RPGSystemsStats = [
title: "GURPS (3rd & 4th edition)",
values: [
"Strength",
"Agility",
"Wits",
"Empathy",
"Damage",
"Fatigue",
"Confusion",
"Doubt"
"Dexterity",
"Health",
"Intelligence"
]
},
{
@ -370,6 +366,134 @@ export const RPGSystemsStats = [
"Banality"
]
},
{
title: "Microlite20 (expert rules)",
values: [
"Strength",
"Dexterity",
"Intellect",
"Charisma",
"Physical",
"Knowledge",
"Subterfuge",
"Communication",
"Survival",
"Hit Points",
"Armor Class"
]
},
{
title: "Conspiracy X",
values: [
"Strength",
"Size",
"Agility",
"Reflexes",
"Intelligence",
"Willpower",
"Perception",
"Good Luck",
"Bad Luck",
"Influence"
]
},
{
title: "Call of Cthulu - Characteristics/Stats (7th edition)",
values: [
"Strength",
"Constitution",
"Power",
"Dexterity",
"Appearance",
"Size",
"Intelligence",
"Education",
"Movement Rate",
"Hit Points",
"Sanity",
"Luck",
"Magic Points",
"Damage Bonus",
"Build",
"Dodge"
]
},
{
title: "Call of Cthulu - Investigator Skills (7th edition)",
values: [
"Accounting",
"Anthropology",
"Appraise",
"Archaeology",
"Art/Craft",
"Charm",
"Climb",
"Credit Rating",
"Cthulu Mythos",
"Disguise",
"Dodge",
"Drive Auto",
"Electric Repair",
"Fast Talk",
"Fighting (brawl)",
"Firearms (handgun)",
"Firearms (rifle/shotgun)",
"First Aid",
"History",
"Intimidate",
"Jump",
"Language (other)",
"Language (own)",
"Law",
"Library Use",
"Listen",
"Locksmith",
"Mechanical Repair",
"Medicine",
"Natural World",
"Navigate",
"Occult",
"Operate Heavy",
"Machine",
"Persuade",
"Pilot",
"Psychology",
"Psychoanalysis",
"Ride",
"Science",
"Sleight of Hand",
"Spot Hidden",
"Stealth",
"Survival",
"Swim",
"Throw",
"Track"
]
},
{
title: "Mork Borg",
values: [
"Melee",
"Ranged",
"Defence",
"Agility - Defend",
"Agility - Balance",
"Agility - Swim",
"Agility - Flee",
"Presence - Perceive",
"Presence - Aim",
"Presence - Charm",
"Presence - Wield Powers",
"Strength - Crush",
"Strength - Lift",
"Strength - Strike",
"Strength - Grapple",
"Toughness - Resist Poison",
"Toughness - Resist Cold",
"Toughness - Resist Heat",
"Toughness - Survive Falling"
]
},
"Absorption",
"Alertness",

View file

@ -3,15 +3,13 @@
* Toggles dev tools in the current window
*/
export const tipsTricks: string[] = [
"It is possible to search through all documents and all of their fields at once using the following in either the Quick search popup or any of the relationship searches: \"%:whatever-you-need\"",
"Any field in the document editing mode with the small dropdown arrow allows for custom values! Just close the menu of predefined values with ESC, type your desired value and confirm with ENTER.",
"It is possible to search through all documents and all of their fields at once using the following in either the Quick search popup or any of the relationship searches: \"%field-name:whatever-you-need\"",
"There is a whole list of really helpful keybinds that can make your use of FA a lot quicker and easier!",
"The settings menu contains a whole assortment of both big and small tweaks to tailor the app to your needs!",
"FA has a Dark Mode that is no mere afterthought and is fully serviceable!",
"Many parts of the app react to a middle-mouse click. For example, you can close document tabs or open hierarchical tree items with it directly!",
"Any field in the document editing mode with the small dropdown arrow that is not a Relationship field allows for custom values! Just close the menu of predefined values with ESC, type your desired value and confirm with ENTER.",
"Fantasia Archive is free; no strings attached: No ads, no trackers, no crypto-mining happening on your PC and all your data is all yours!",
"This software is actually a local website pretending to be a desktop application! Technology is crazy!",
"If you ever need a good, offline map-making software, look at Wonderdraft and Dungeondraft by Megasploot!",
"If these tips annoy you, there is a switch to turn them off in the program settings.",
"The Relationship searching functionality is packed to the brim with extra features you can use to find what you need! Read all about it in the \"Advanced search guide\" in the Help menu!",
"Your project gets auto-saved on exit, but it is recommended to use the \"Export\" function once in a while to make sure the data stays safe.",
@ -19,7 +17,9 @@ export const tipsTricks: string[] = [
"Don't hesitate to add as many sub-categories as you want. You can always move stuff around later and reorganize your project structure.",
"Tags are a very powerful feature that allow you to add semi-categories to the project tree and create additional search parameters to aid navigation.",
"There is a roadmap of planned features on Patreon! If you are curious about what will eventually come, feel free to read it.",
"DISCLAIMER: No magical creatures were harmed during the making of this software.",
"This software is actually a local website pretending to be a desktop application! Technology is crazy!",
"If you ever need a good, offline map-making software, look at Wonderdraft and Dungeondraft by Megasploot!",
"The adorable little arcane dragon you might have seen while using the app is called Fantasia and she is the official mascot of FA!",
"If you ever feel like sponsoring the development, there is Patreon. If you can't/don't want to; that is perfectly fine too - just have fun with the app and build something cool with it!"
"If you ever feel like sponsoring the development, there is Patreon. If you can't/don't want to; that is perfectly fine too - just have fun with the app and build something cool with it!",
"DISCLAIMER: No magical creatures were harmed during the making of this software."
]

View file

@ -34,10 +34,11 @@ export interface OptionsStateInteface {
hideTreeIconEdit: boolean
hideTreeIconView: boolean
hidePlushes: boolean
showDocumentID: boolean
userKeybindList: any[]
treeWidth?: number
pre016check?: boolean
pre017check?: boolean
}
function state (): OptionsStateInteface {
@ -76,9 +77,10 @@ function state (): OptionsStateInteface {
hideTreeIconAddUnder: false,
hideTreeIconEdit: false,
hideTreeIconView: false,
showDocumentID: false,
treeWidth: 374,
userKeybindList: [],
pre016check: true
pre017check: true
}
}