From e548b0d5f112e74afa477238166e83779b04a520 Mon Sep 17 00:00:00 2001 From: ryceg Date: Sun, 18 Apr 2021 22:59:44 +1000 Subject: [PATCH 01/23] Add more flavour --- lib/src/badges.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/src/badges.ts b/lib/src/badges.ts index 3308fdaf3..29a7ecfb6 100644 --- a/lib/src/badges.ts +++ b/lib/src/badges.ts @@ -220,6 +220,20 @@ export const badges = { message: 'AI Dungeon', logo: 'AI Dungeon' // link: 'https://play.aidungeon.io/' + }, + { + label: 'No Brain', + message: 'Required' + }, + { + label: 'I Cast', + message: 'Fireball', + color: 'red' + }, + { + label: 'Do we', + message: 'level up yet', + color: 'green' } ] as Badge[], stats: { From b855e5a92db0258e8a49b86d6c981edb125946f5 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 20:03:49 +1000 Subject: [PATCH 02/23] Add interfaces --- lib/src/createMagic.ts | 12 +++++++++++- lib/src/createRing.ts | 22 +++++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/lib/src/createMagic.ts b/lib/src/createMagic.ts index 81f1a2707..0c9e78747 100644 --- a/lib/src/createMagic.ts +++ b/lib/src/createMagic.ts @@ -3,7 +3,7 @@ import { magicData, MagicType } from './magicData' import { random } from './random' import { assign } from './utils' -export function createMagic (type: T | 'ring') { +export function createMagic (type: T | 'ring'): MagicItem { console.log(`Type: ${type}`) if (type === 'ring') { @@ -33,3 +33,13 @@ export function createMagic (type: T | 'ring') { console.log(magic) return magic } + +export interface MagicItem { + type: string + description: string + name: string + prefix?: string + suffix?: string + prefixProperty?: string + suffixProperty?: string +} diff --git a/lib/src/createRing.ts b/lib/src/createRing.ts index c5554f954..a2a3dd2df 100644 --- a/lib/src/createRing.ts +++ b/lib/src/createRing.ts @@ -1,3 +1,4 @@ +import { MagicItem } from '@lib' import { articles } from './articles' import { getRandomValue } from './getRandomValue' import { random } from './random' @@ -9,7 +10,21 @@ interface Options { activation: string } -export function createRing (base?: Partial) { +interface MagicRing extends MagicItem { + works: string + material: string + decoration: string + gemstone: string + intendedowner: string + importance: string + setting: string + cut: string + power: string + cost: string + activation: string +} + +export function createRing (base?: Partial): MagicRing { const ringData = createRingData() const ring = { @@ -193,6 +208,11 @@ export function createRing (base?: Partial) { ]) }) + assign(ring, { + type: 'ring', + name: `${ring.gemstone} Ring`, + description: ring.firstOutputs + }) return ring } From 1343b1c850b0da45439dd6ab7249e19b2954dff8 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 20:04:11 +1000 Subject: [PATCH 03/23] Remove unused duplicate properties --- src/NPCGeneration/npcData.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/NPCGeneration/npcData.js b/src/NPCGeneration/npcData.js index 4beecf4f2..0ce2e58c7 100644 --- a/src/NPCGeneration/npcData.js +++ b/src/NPCGeneration/npcData.js @@ -1,6 +1,5 @@ setup.initNpcData = () => { setup.npcData = { - lifeEvents: { performed: { probability: 3, @@ -1224,7 +1223,6 @@ setup.initNpcData = () => { } } }, - skinColour: ['translucent', 'white', 'pale', 'fair', 'light', 'light tan', 'tan', 'pale', 'fair', 'light', 'light tan', 'tan', 'dark tan', 'brown'], idle: ['sitting, with a piece of bread in hand', 'sitting, mug in hand', 'poring over some map', 'reading some letter intently', 'reading a book', 'shuffling a pack of cards', 'chewing on a piece of hay', 'sharpening a knife', 'buffing a piece of armour', 'polishing a shield', 'sharpening the blade on a fearsome looking dagger', 'cutting an apple into bite sized pieces', 'biting into an apple', 'eating an apple while looking at some book', 'eating a hunk of cheese while reading a book', 'sipping out of a huge mug while reading a book', "reading a book titled '<>'", "reading a book titled '<>'", "reading a book titled '<>'"], reading: ["a piece of history- my forefather's journal, detailing his life in $town.name when it was just a settlement.", 'my journal, from many years ago.', "my mother's journal, from just before she disappeared", 'a document which I received by postboy two days ago... I believe it is in code, and somebody is trying to tell me something.', "a traitor's memoirs, extremely rare... I thought it would be a good laugh, but some of what he says is concerningly accurate.", "some sort of spell, though I don't know how to read it.", 'a document I bought at the flea market; it looks to be a set of instructions on how to make a golem.', "a book which I bought, believing it to be blank, and suitable for a journal. However, now there's this strange foreign script that I can't read in it.", 'a book that I bought as a gift for my mother, who loves beautiful covers, despite not being able to read.'], @@ -1234,8 +1232,6 @@ setup.initNpcData = () => { adventure: ['retired from adventuring', 'currently looking for an adventure', 'looking for assistance', 'recuperating from an adventure', 'on a holiday from adventuring', 'taking a short break from adventuring'], hairColour: ['brunette', 'brunette', 'brown', 'brownish', 'auburn', 'amber', 'hazel', 'red', 'dark red', 'blonde', 'dark blonde', 'white', 'platinum', 'black', 'black'], hairType: ['thick', 'wispy', 'straight', 'straight', 'wavy', 'wavy', 'curly', 'wiry', 'oily', 'lush', 'poofy', 'long', 'braided', 'very long', 'greasy', 'unruly', 'unusually styled', 'short cropped'], - dndClass: ['barbarian', 'bard', 'cleric', 'druid', 'fighter', 'monk', 'rogue', 'ranger', 'paladin', 'sorcerer', 'warlock', 'wizard'], - background: ['acolyte', 'charlatan', 'criminal', 'entertainer', 'folk hero', 'guild artisan', 'hermit', 'noble', 'outlander', 'sage', 'sailor', 'soldier', 'urchin'], pockets: ['5 cp', '6 cp', '15 cp', '22 cp', '27 cp', '5 sp', '5 sp', '6 sp', '7 sp', '2 gp', '34 cp and 4 sp', '12 sp and 7 gp', 'a clove of garlic', 'a vial of ink worth 8sp', 'hardtack', 'an explosive rune, dealing 2d4 fire damage', 'a palm-sized glass sphere', 'a wooden comb', 'fragments of a shattered sword', 'a deck of tarot cards', 'map of a nearby castle', 'map of the local area', 'a tin spoon', 'a mess kit', 'lacy undergarments', 'spectacles worth 5gp', 'a spool of thread', 'a piece of chalk', 'a necklace of animal teeth', "a headhunter's contract", 'a list of people in a nearby city', 'a worn leather strap', 'a ring of iron keys', 'a flask full of salt water', 'a box of candles', 'a vial of quicksilver', "a traveller's journal", 'a lead amulet', 'a signet ring for a noble house', 'a list of local taverns', 'a golden yellow topaz gem worth 50gp', 'a page torn from a spellbook', 'scraps of bad poetry', 'a pair of bloodstained gloves', 'thirteen mouse teeth', 'a pouch full of dried berries', 'an invitation to a wedding that happened a few weeks ago', 'a brass ring', 'a shopping list', 'the cork from a wine bottle', 'a scrap of paper with unintelligible writing on it', 'a smoking pipe', 'a pouch of ruby powder', 'a deed to a ruined tower', 'a bottle of honey', 'a sling with 10 bullets', 'a broken buckle', 'a knot of silk ribbons', 'a silver pearl worth 10gp', 'a potion of Polymorph Self worth 350gp', '1pp wrapped in a crude map', 'pocket sand', 'a wedge of cheese', 'a string of wooden prayer beads', 'a lock of hair', 'a dead mouse', 'a compass', 'an empty flask', '85gp', 'three diamonds worth 30gp each', 'a black pearl worth 50gp', 'a black opal worth 100gp'], value: ['experience', 'family', 'progeny', 'learning', 'wealth', 'masterwork', 'revenge', 'intelligence', 'discovery', 'pilgrimage', 'invention', 'miracle', 'secret', 'martyrdom', 'collection', 'patronage', 'fame'], drive: ['health', 'beauty', 'thrills', 'knowledge', 'power', 'partnership', 'networking', 'glory', 'entertainment', 'helpfulness', 'bravery', 'compassion', 'piety', 'solitude', 'relationships', 'hedonism', 'privacy'], From 6d88ce4a9f7eec5bad0954f40fd8bacf397e5d47 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 22:44:52 +1000 Subject: [PATCH 04/23] Shift notification down slightly --- src/Settings/Plugins/notify.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Settings/Plugins/notify.css b/src/Settings/Plugins/notify.css index d9eee43c2..7cd6fabaa 100644 --- a/src/Settings/Plugins/notify.css +++ b/src/Settings/Plugins/notify.css @@ -7,7 +7,8 @@ position : fixed; display : block; width : 16em; - right : -20em; top : 2em; + right : -20em; + top : 3em; padding : 0.5em; background-color : #fff; color : #000; From ef26ba167f38b65d84138f0ebc9b2dc5258f6e7d Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 22:45:03 +1000 Subject: [PATCH 05/23] Remove useless file --- src/NPCGeneration/exportNPC.js | 52 ---------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/NPCGeneration/exportNPC.js diff --git a/src/NPCGeneration/exportNPC.js b/src/NPCGeneration/exportNPC.js deleted file mode 100644 index 8d94ce127..000000000 --- a/src/NPCGeneration/exportNPC.js +++ /dev/null @@ -1,52 +0,0 @@ -setup.exportNPC = function (npc) { - const npcExport = { - character: { - // firstName: npc.firstName, - // lastName: npc.lastName, - name: `${npc.firstName} ${npc.lastName}`, - age: npc.age, - class: npc.dndClass, - classes: [{ - isStartingClass: true, - level: npc.level | 1, - definition: { - name: npc.dndClass, - subclassDefinition: null - } - }], - background: { - definition: { - name: npc.background, - description: npc.backgroundOrigin, - featureDescription: npc.backgroundOrigin - } - }, - race: { - racialTraits: null, - fullName: npc.race - }, - hair: npc.hair, - eyes: npc.eyes, - skin: npc.skinColour, - traits: { - bonds: npc.bond, - ideal: npc.ideal, - flaws: npc.trait, - personalityTraits: `${npc.name} is ${npc.calmTrait} when calm, and ${npc.stressTrait} when stressed.`, - appearance: `${npc.name} is ${lib.articles.output(npc.age)} ${npc.malefemale} ${npc.race}. ${npc.heshe.toUpperFirst()} is ${npc.height} and ${npc.weight}, and has ${npc.eyes} eyes, with ${npc.skinColour} skin. The most notable physical trait of ${npc.firstName} is that ${npc.heshe} has ${npc.physicalTrait}.` - }, - bio: `${npc.name} is ${lib.articles.output(npc.age)} ${npc.malefemale} ${npc.race}. ${npc.heshe.toUpperFirst()} is ${npc.height} and ${npc.weight}, and has ${npc.eyes} eyes, with ${npc.skinColour} skin. The most notable physical trait of ${npc.firstName} is that ${npc.heshe} has ${npc.physicalTrait}. - I was born ${npc.birthplace}, and was raised by ${npc.familyUnit}. I had ${lib.articles.output(npc.familyLifestyle)} upbringing in ${npc.familyHome}. ${npc.childhoodMemories}. ${npc.backgroundOrigin} ${npc.professionOrigin}. - `, - gmnotes: `${npc.name} ${npc.trait}. ${npc.heshe.toUpperFirst()} is ${npc.calmTrait} when calm, and ${npc.stressTrait} when stressed.`, - inplayerjournals: 'all', - notes: { - backstory: `I was born ${npc.birthplace}, and was raised by ${npc.familyUnit}. I had ${lib.articles.output(npc.familyLifestyle)} upbringing in ${npc.familyHome}. ${npc.childhoodMemories}. ${npc.backgroundOrigin} ${npc.professionOrigin}.` - }, - - cp: npc.wealth - - } - } - return JSON.stringify(npcExport) -} From 8b82c86e3f7ecc5068f06afb8ec9748d956e67c2 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 22:45:33 +1000 Subject: [PATCH 06/23] Shift createFamilyHouse to outside createFamily --- lib/npc-generation/familyRelationships.ts | 4 ++-- src/NPCGeneration/expandNPC.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/npc-generation/familyRelationships.ts b/lib/npc-generation/familyRelationships.ts index 3feb992b7..4221f0044 100644 --- a/lib/npc-generation/familyRelationships.ts +++ b/lib/npc-generation/familyRelationships.ts @@ -1,6 +1,7 @@ import { roads } from '../town/roads' import { Town } from '../town/_common' import { Family, NPC } from './_common' +import { random } from '../src/random' export const familyRelationships = { /** @@ -107,7 +108,6 @@ export function createFamily (town: Town, npc: NPC) { road: '' } } - createFamilyHouse(town, family) town.families[key] = family npc.family = key } @@ -115,7 +115,7 @@ export function createFamily (town: Town, npc: NPC) { export function createFamilyHouse (town: Town, family: Family) { const road = town.roads[family.home.road] || roads.findExisting(town) || - lib.random(Object.keys(town.roads)) + random(Object.keys(town.roads)) // roads.assign(town) for (const member in family.members) { diff --git a/src/NPCGeneration/expandNPC.ts b/src/NPCGeneration/expandNPC.ts index 1c5332ed5..e2c379a69 100644 --- a/src/NPCGeneration/expandNPC.ts +++ b/src/NPCGeneration/expandNPC.ts @@ -1,4 +1,4 @@ -import type { NPC, Town } from '@lib' +import { createFamilyHouse, NPC, Town } from '@lib' import { createHistory } from './createHistory' import { createLifeEvents } from './createLifeEvents' import { createFriends } from './Relationships/createFriends' @@ -27,6 +27,8 @@ export const expandNPC = (town: Town, npc: NPC) => { }) }) + createFamilyHouse(town, town.families[npc.family]) + createHistory(town, npc) createFriends(town, npc) console.groupEnd() From c53713b04adaf146eb4e99d92a4d12522fd72e45 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 22:57:58 +1000 Subject: [PATCH 07/23] Convert death --- src/NPCGeneration/setupDeath.d.ts | 20 --- .../{SetupDeath.js => setupDeath.ts} | 130 +++++++++++------- src/main.ts | 7 +- 3 files changed, 88 insertions(+), 69 deletions(-) delete mode 100644 src/NPCGeneration/setupDeath.d.ts rename src/NPCGeneration/{SetupDeath.js => setupDeath.ts} (65%) diff --git a/src/NPCGeneration/setupDeath.d.ts b/src/NPCGeneration/setupDeath.d.ts deleted file mode 100644 index 130c124b3..000000000 --- a/src/NPCGeneration/setupDeath.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NPC } from '../../lib/npc-generation/_common' -import { Town } from '../../lib/town/_common' - -interface Setup { - createDeadNPC(town: Town, base: Partial): NPC - npcDeath(town: Town, npc: NPC, base: Partial): NPC -} - -export type DeathData = { - whileAdventuring(town: Town, npc: NPC, text: string): string - cause: CauseOfDeath[] - burialConditions(town: Town, npc: NPC, base: Partial): NPC - bodyCondition: [number, string][] -} - -interface CauseOfDeath { - probability?: number - exclusions(town: Town, npc: NPC): boolean - function(town: Town, npc: NPC): string -} diff --git a/src/NPCGeneration/SetupDeath.js b/src/NPCGeneration/setupDeath.ts similarity index 65% rename from src/NPCGeneration/SetupDeath.js rename to src/NPCGeneration/setupDeath.ts index 0c1d35b27..5c9a3a9be 100644 --- a/src/NPCGeneration/SetupDeath.js +++ b/src/NPCGeneration/setupDeath.ts @@ -1,9 +1,35 @@ // uses setup.createNPC, setup.createRelationship, setup.profile -/** - * @type {import("./setupDeath").DeathData} - */ -const death = { - whileAdventuring (town, npc, text) { + +import { NPC, Town } from '@lib' + +export type DeadNPC = NPC & { + isAlive: false + roll: { + deathConditions: number + } + death: { + graveStandard: string + cause: string + murderer?: string + timeSinceDeath: number + } +} + +export type DeathData = { + whileAdventuring(town: Town, npc: NPC, text: string): string + cause: CauseOfDeath[] + burialConditions(town: Town, npc: NPC, base: Partial): NPC + bodyCondition: [number, string][] +} + +interface CauseOfDeath { + probability?: number + exclusions(town: Town, npc: NPC): boolean + function(town: Town, npc: NPC): string +} + +export const death = { + whileAdventuring (town: Town, npc: NPC, text: string) { const whilst = [ 'returning from an adventure', `on ${npc.hisher} way to an adventure`, @@ -17,42 +43,42 @@ const death = { cause: [ // ______ { - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return npc.profession === 'surgeon' }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died from a disease caught from a patient while performing a surgery on them.` } }, { - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return lib.findProfession(town, npc).sector === 'construction' }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died in a workplace accident.` } }, // { // probability: 3, - // function (town, npc) { + // function (town: Town, npc: NPC) { // const text = `${npc.firstName} was killed by a wild animal.` // return text // } // }, { - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return lib.findProfession(town, npc).sector === 'arts' }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} was killed in a freak accident at an art show.` } }, { probability: 1, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return lib.findProfession(town, npc).sector === 'arts' }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { console.log('Hello! Creating a murderer.') const murderer = setup.createNPC(town, { socialClass: npc.socialClass || 'commoner', @@ -65,33 +91,33 @@ const death = { }, { probability: 2, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return lib.findProfession(town, npc).sector === 'government and law' }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { const murderer = setup.createNPC(town, { socialClass: npc.socialClass }) setup.createRelationship(town, npc, murderer, { relationship: 'murderer', reciprocalRelationship: `someone who ${murderer.heshe} murdered.` }) - npc.death.murderer = murderer.key + if (npc.death) npc.death.murderer = murderer.key return `${npc.firstName} was murdered by ${setup.profile(murderer, 'someone with a grudge')}.` } }, { probability: 50, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return ['settled adult', 'elderly', 'vulnerably elderly'].includes(npc.ageStage) }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died from ${['exposure', 'cancer', 'a plague', 'diptheria', 'cholera', 'dysentery', 'malaria', 'the flu', 'typhoid fever', 'smallpox', 'leprosy'].random()}.` } }, { probability: 50, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return npc.hasClass === true }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { const text = `${npc.firstName} ${['died from', 'was killed by'].random()} ${['a monster', 'a trap in a dungeon', 'a rival adventuring party', 'some goblins', 'a kobold ambush', 'a powerful foe', 'a wild animal', 'a dragon', 'a particularly sneaky mimic'].random()}` death.whileAdventuring(town, npc, text) return text @@ -99,46 +125,54 @@ const death = { }, { probability: 30, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return ['settled adult', 'elderly', 'vulnerably elderly'].includes(npc.ageStage) }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died in ${['a riot', 'a war', 'a religious crusade', 'a raid', 'a mugging'].random()}.` } }, { probability: 30, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return ['young adult', 'settled adult', 'elderly', 'vulnerably elderly'].includes(npc.ageStage) }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died from an ${['infected arm', 'infected leg', 'infection', 'infection from a broken arm', 'infection from a broken leg'].random()}.` } }, { probability: 50, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return npc.gender === 'woman' }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died during childbirth.` } }, { probability: 90, - exclusions (town, npc) { + exclusions (town: Town, npc: NPC) { return ['child'].includes(npc.ageStage) }, - function (town, npc) { + function (town: Town, npc: DeadNPC) { return `${npc.firstName} died from ${['falling from a tree', 'being trampled underfoot by a horse', 'the flu', 'cholera'].random()}.` } } ], - burialConditions (town, npc, base) { + burialConditions (town: Town, npc: NPC, base: Partial) { console.log('Burial conditions...') - - /** @type {[number, string, number, string][]} */ - const burialConditions = [ + const newNPC = { + isAlive: false, + roll: { + deathConditions: 0 + }, + death: { + graveStandard: '', + burialConditions: '' + } + } + const burialConditions: [number, string, number, string][] = [ // [lifestyleModifier, lifestyleType, graveRoll, graveDescription] [70, 'aristocratic', 80, 'a beautiful ornate coffin on a private plot'], [50, 'wealthy', 60, 'a beautiful ornate coffin'], @@ -149,15 +183,15 @@ const death = { [-25, 'wretched', 0, 'a mass grave as an afterthought'] ] - npc.roll.deathConditions = lib.fm(random(1, 100), (town.roll.welfare - 50) / 2) - console.log('deathConditions roll:', npc.roll.deathConditions) + newNPC.roll.deathConditions = lib.fm(random(1, 100), (town.roll.welfare - 50) / 2) + console.log('deathConditions roll:', newNPC.roll.deathConditions) const lifestyle = lib.npcLifestyleStandard(town, npc).lifestyleStandard let townHelpDescription = '' for (const burialCondition of burialConditions) { if (lifestyle === burialCondition[1]) { - lib.fm(npc.roll.deathConditions, burialCondition[0]) + lib.fm(newNPC.roll.deathConditions, burialCondition[0]) if ((town.roll.welfare - burialCondition[2]) > 20) { townHelpDescription = ' with help from the government.' } if ((town.roll.welfare - burialCondition[2]) < -20) { @@ -170,14 +204,15 @@ const death = { } for (const burialCondition of burialConditions) { - if (npc.roll.deathConditions > burialCondition[2]) { - npc.death.graveStandard = base.graveStandard || burialCondition[3] + if (newNPC.roll.deathConditions > burialCondition[2]) { + newNPC.death.graveStandard = base?.death?.graveStandard || burialCondition[3] break } } - npc.death.burialConditions = `${npc.heshe.toUpperFirst()} was buried in ${npc.death.graveStandard}${townHelpDescription}` - return npc + newNPC.death.burialConditions = `${npc.heshe.toUpperFirst()} was buried in ${newNPC.death.graveStandard}${townHelpDescription}` + lib.assign(npc, newNPC) + return npc as DeadNPC }, bodyCondition: [ [0, 'The body is as fresh as they come, and rigor mortis has not set in yet.'], @@ -186,23 +221,22 @@ const death = { ] } -setup.createDeadNPC = (town, base = {}) => { +export const createDeadNPC = (town: Town, base: Partial = {}) => { console.groupCollapsed('Creating a dead NPC!') const npc = setup.createNPC(town, base) console.log('RIP', npc.firstName) - setup.npcDeath(town, npc, base) + npcDeath(town, npc, base) return npc } -setup.npcDeath = (town, npc, base = {}) => { +export const npcDeath = (town: Town, npc: NPC, base: Partial = {}) => { npc.passageName = 'NPCDeadProfile' - npc.death = {} + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore npc.death = { - cause: lib.weightedRandomFetcher(town, death.cause, npc), - murderer: null, + cause: lib.weightedRandomFetcher(town, death.cause, npc) as string, timeSinceDeath: lib.dice(2, 60), - ...base, - ...npc.death + ...base } death.burialConditions(town, npc, base) return npc diff --git a/src/main.ts b/src/main.ts index 64421f1dd..10ad05d94 100644 --- a/src/main.ts +++ b/src/main.ts @@ -49,6 +49,7 @@ import { outputGMBinder } from './Tools/Exports/outputGMBinder' import { copyText } from './Tools/Exports/clipboard' import { createGuardhouse, createGuardhouseName } from './MiniEstablishments/Guardhouse/createGuardhouse' import { createStartBuildings } from './Town/js/createStartBuildings' +import { npcDeath, createDeadNPC } from './NPCGeneration/SetupDeath' declare global { interface Setup { @@ -112,6 +113,8 @@ declare global { createGuardhouse: typeof createGuardhouse createGuardhouseName: typeof createGuardhouseName createStartBuildings: typeof createStartBuildings + npcDeath: typeof npcDeath + createDeadNPC: typeof createDeadNPC } } @@ -175,7 +178,9 @@ Object.assign(setup, { outputGMBinder, createGuardhouse, createGuardhouseName, - createStartBuildings + createStartBuildings, + npcDeath, + createDeadNPC }) /** From a7af1d57be98e3631318f73c6e850049ce1d2f74 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 22:58:39 +1000 Subject: [PATCH 08/23] Change to HSL --- src/Settings/CSS/stylesheet.css | 88 ++++++++++++++++----------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/Settings/CSS/stylesheet.css b/src/Settings/CSS/stylesheet.css index e5a695197..c456b46fd 100644 --- a/src/Settings/CSS/stylesheet.css +++ b/src/Settings/CSS/stylesheet.css @@ -1,50 +1,50 @@ :root { - --text-normal: #111; - --text-muted: #72767d; - --text-link: #35c; - --text-link-hover: #57e; - --header-primary: #58180D; - --header-secondary: #c9ad6a; - --interactive-normal: #d5e4d5; - --interactive-hover: #a4c7a4; - --interactive-active: #a5c0a5; - --interactive-muted: #b0c5b0; - --blockquote-color: #e5e4c1; - --table-green: #e0e5c1; - --background-primary: #dedede; - --background-accent: #a6a794; - --background-secondary: #cccccc; - --background-secondary-alt: #d4c8c8; - --background-tertiary: #fffde2; - --background-floating: #e6e6e6; - --monster-yellow: #FDF1DC; - --descriptive-yellow: #faf7ea; + --text-normal: hsl(0, 0%, 10%); + --text-muted: hsl(220, 5%, 50%); + --text-link: hsl(230, 60%, 50%); + --text-link-hover: hsl(230, 80%, 60%); + --header-primary: hsl(10, 75%, 20%); + --header-secondary: hsl(40, 50%, 60%); + --interactive-normal: hsl(120, 25%, 85%); + --interactive-hover: hsl(120, 25%, 70%); + --interactive-active: hsl(120, 15%, 70%); + --interactive-muted: hsl(120, 15%, 60%); + --blockquote-color: hsl(60, 40%, 80%); + --table-green: hsl(70, 40%, 80%); + --background-primary: hsl(0, 0%, 90%); + --background-accent: hsl(60, 10%, 60); + --background-secondary: hsl(0, 0%, 80%); + --background-secondary-alt: hsl(0, 15%, 80%); + --background-tertiary: hsl(55, 100%, 95%); + --background-floating: hsl(0, 0%, 90%); + --monster-yellow: hsl(40, 89%, 95%); + --descriptive-yellow: hsl(50, 60%, 95%); } html[data-theme="dark"], html.dark { - --text-normal: #dcddde; - --text-link: #7289da; - --background-primary: #1c1c1e; - --background-secondary: #333333; - --background-tertiary: #202020; - --blockquote-color: #313131; - --interactive-normal: #3f3f3f; - --interactive-hover: #6d6d6d; - --header-primary: #c73f3b; - --header-secondary: #8f896b; - --interactive-active: #744b4b; - --interactive-hover: rgb(143, 84, 84); - --interactive-muted: rgb(97, 30, 30); - --table-green: #3a3b35; - --background-accent: #966767; - - /* --background-primary: #36393f; + --text-normal: hsl(210, 5%, 90%); + --text-link: hsl(230, 60%, 65%); + --background-primary: hsl(240, 5%, 10%); + --background-secondary: hsl(0, 0%, 20%); + --background-tertiary: hsl(0, 0%, 15%); + --blockquote-color: hsl(0, 0%, 20%); + --interactive-normal: hsl(0, 0%, 25%); + --interactive-hover: hsl(0, 0%, 40%); + --header-primary: hsl(2, 55%, 50%); + --header-secondary: hsl(50, 14%, 50%); + --interactive-active: hsl(0, 20%, 40%); + --interactive-hover: hsl(0, 25%, 45%); + --interactive-muted: hsl(0, 50%, 25%); + --table-green: hsl(70, 5%, 25%); + --background-accent: hsl(0, 20%, 50%); + + /* --background-primary: #36093f; --background-secondary: #2f3136; */ - --background-secondary-alt: #292b2f; - --background-tertiary: #202225; - --background-floating: #18191c; - --descriptive-yellow: #4b483c; + --background-secondary-alt: hsl(220, 7%, 17%); + --background-tertiary: hsl(216, 7%, 14%); + --background-floating: hsl(225, 8%, 10%); + --descriptive-yellow: hsl(48, 11%, 25%); } body { @@ -189,9 +189,9 @@ body[data-tags~="force-one-column"] { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom: 3px solid var(--header-secondary); - box-shadow: 4px 4px 36px rgb(48 32 0 / 12%); + box-shadow: 4px 4px 36px rgb(48 32 0 / 15%); z-index: 90; - /* Subtract the border size */ + /* Subtract the border size */ padding-bottom: calc(0.4em - 3px); } @@ -767,7 +767,7 @@ input, select, textarea { input:not(:disabled):focus, select:not(:disabled):focus, textarea:not(:disabled):focus, input:not(:disabled):hover, select:not(:disabled):hover, textarea:not(:disabled):hover { /* background-color: rgb(240, 217, 140); - border-color: rgb(194, 163, 61); */ + border-color: rgb(194, 160, 61); */ background-color: var(--interactive-normal); border-color: var(--interactive-hover) } From 87940653ed9f557f5333f812545fcf0cdcd30896 Mon Sep 17 00:00:00 2001 From: ryceg Date: Mon, 19 Apr 2021 22:58:52 +1000 Subject: [PATCH 09/23] minor change --- src/Settings/CSS/stylesheet.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Settings/CSS/stylesheet.css b/src/Settings/CSS/stylesheet.css index c456b46fd..188e884c3 100644 --- a/src/Settings/CSS/stylesheet.css +++ b/src/Settings/CSS/stylesheet.css @@ -189,7 +189,7 @@ body[data-tags~="force-one-column"] { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom: 3px solid var(--header-secondary); - box-shadow: 4px 4px 36px rgb(48 32 0 / 15%); + box-shadow: 4px 4px 36px rgb(48 32 0 / 12%); z-index: 90; /* Subtract the border size */ padding-bottom: calc(0.4em - 3px); From 3f48a12c55db3c21b897b47c4439223220c9d5de Mon Sep 17 00:00:00 2001 From: ryceg Date: Thu, 22 Apr 2021 22:10:12 +1000 Subject: [PATCH 10/23] Formatting --- src/Alchemist/AlchemistOutput.twee | 14 ++-- src/Blacksmith/SmithyOutput.twee | 7 +- src/GeneralStore/GeneralStoreOutput.twee | 1 + .../Brothel/BrothelOutput.twee | 7 +- .../Graveyard/GraveyardOutput.twee | 11 ++- .../Guardhouse/GuardhouseOutput.twee | 3 +- .../Market/MarketsOutput.twee | 76 +++++++++++-------- src/MiniEstablishments/Posters.twee | 12 +-- .../Temple/TempleOutput.twee | 10 +-- .../TownSquare/TownSquareOutput.twee | 32 +++++--- src/Settings/CSS/stylesheet.css | 27 +++++++ src/Tavern/TavernOutput.twee | 23 +++--- src/Town/TownMicroEventsOutput.twee | 27 ++++--- 13 files changed, 146 insertions(+), 104 deletions(-) diff --git a/src/Alchemist/AlchemistOutput.twee b/src/Alchemist/AlchemistOutput.twee index ddde17d9e..45e654381 100644 --- a/src/Alchemist/AlchemistOutput.twee +++ b/src/Alchemist/AlchemistOutput.twee @@ -1,15 +1,13 @@ -:: AlchemistOutput [alchemist] -\<> -\<><> -\<> -\

$building.name

-\<> -<>

You enter $building.name, <>. <> There is a chemist behind the shop counter currently <>.

+:: AlchemistOutput [alchemist nobr] +<> +<><> +<> +

$building.name

<><>

You enter $building.name, <>. <> There is a chemist behind the shop counter currently <>.

Chemist

The $associatedNPC.weight chemist <> <>. <> introduces $associatedNPC.himherself as <>, the $associatedNPC.owner of the shop, and asks what $associatedNPC.heshe can do for you.

<Talk with $associatedNPC.name" t8n>>
$associatedNPC.name
<><
>
<Generate plothook">><><><><>
<> "$associatedNPC.plot"
<
><
> <> <> -<
><> \ No newline at end of file +<
> \ No newline at end of file diff --git a/src/Blacksmith/SmithyOutput.twee b/src/Blacksmith/SmithyOutput.twee index 96b401082..ae16119cb 100644 --- a/src/Blacksmith/SmithyOutput.twee +++ b/src/Blacksmith/SmithyOutput.twee @@ -1,13 +1,14 @@ -:: SmithyOutput +:: SmithyOutput [nobr] <> <> <> -<>

$building.name

+

$building.name

+<>
<>

You make your way down <>, and enter $building.name and see that inside, the $building.structure.descriptor is $building.size. <> There is a blacksmith currently <>.

<>

Blacksmith

The blacksmith <> <>. <> introduces $associatedNPC.himherself as <>, the $associatedNPC.owner of the smithy, and asks what $associatedNPC.heshe can do for you.

<>
<Generate plothook">><><><><><>
<> "$associatedNPC.plot"
<
><
> <> -<
><> \ No newline at end of file +<
> \ No newline at end of file diff --git a/src/GeneralStore/GeneralStoreOutput.twee b/src/GeneralStore/GeneralStoreOutput.twee index 83c929da1..110ef48ed 100644 --- a/src/GeneralStore/GeneralStoreOutput.twee +++ b/src/GeneralStore/GeneralStoreOutput.twee @@ -4,6 +4,7 @@ <> <>

$building.name

<> +<>

You make your way down <>, and enter $building.structure.descriptor and see that inside, the $building.size building is $building.cleanliness.<> $building.clutter<> You notice $building.note. The store's shopkeep is currently $building.idle.

Shopkeeper

The shopkeep <> <>. <> introduces $associatedNPC.himherself as <>, the $associatedNPC.owner of the General Store, and $building.say. $building.shopkeepNote.

diff --git a/src/MiniEstablishments/Brothel/BrothelOutput.twee b/src/MiniEstablishments/Brothel/BrothelOutput.twee index ec9b8d221..d720ab41f 100644 --- a/src/MiniEstablishments/Brothel/BrothelOutput.twee +++ b/src/MiniEstablishments/Brothel/BrothelOutput.twee @@ -1,11 +1,8 @@ -:: BrothelOutput [brothel] -<> +:: BrothelOutput [brothel nobr] <> <> <> -

$building.name

-<><
> -You make your way down <>, and enter $building.name $building.structure.descriptor. Inside, the $building.size $building.structure.material.noun building is $building.cleanliness. You notice $building.notice. +

$building.name

<>

You make your way down <>, and enter $building.name $building.structure.descriptor. Inside, the $building.size $building.structure.material.noun building is $building.cleanliness. You notice $building.notice. When people talk about $building.name, they say $building.talk. Apparently, it specialises in $building.specialty. Rumours abound in whorehouses, and $building.name is no different; apparently, $building.rumour.

Brothel $associatedNPC.title

diff --git a/src/MiniEstablishments/Graveyard/GraveyardOutput.twee b/src/MiniEstablishments/Graveyard/GraveyardOutput.twee index c8dbb7094..90b6969a1 100644 --- a/src/MiniEstablishments/Graveyard/GraveyardOutput.twee +++ b/src/MiniEstablishments/Graveyard/GraveyardOutput.twee @@ -1,9 +1,8 @@ -:: GraveyardOutput -\<> -\<> -\<> -\

$building.name

-

You walk down <> to the $building.wordNoun. It is $building.location, and is $building.size. You enter the $building.wordNoun $building.entrance. It's mostly $building.cleanliness. As you enter you notice $building.feature.

+:: GraveyardOutput [nobr] +<> +<> +<> +

$building.name

You walk down <> to the $building.wordNoun. It is $building.location, and is $building.size. You enter the $building.wordNoun $building.entrance. It's mostly $building.cleanliness. As you enter you notice $building.feature.

Gravedigger

$building.gravediggerLook. The gravedigger greets you as you come near, and introduces $associatedNPC.himherself as <>. <> says $building.gravediggerChat.

<><><><><><> diff --git a/src/MiniEstablishments/Guardhouse/GuardhouseOutput.twee b/src/MiniEstablishments/Guardhouse/GuardhouseOutput.twee index 55462a453..ab5fd4ba3 100644 --- a/src/MiniEstablishments/Guardhouse/GuardhouseOutput.twee +++ b/src/MiniEstablishments/Guardhouse/GuardhouseOutput.twee @@ -3,8 +3,7 @@ <> <> <> -

$currentPassage.name

-

You make your way down <>, and enter $currentPassage.name $currentPassage.structure.descriptor. $currentPassage.name is known for $currentPassage.notableFeature

+

$currentPassage.name

You make your way down <>, and enter $currentPassage.name $currentPassage.structure.descriptor. $currentPassage.name is known for $currentPassage.notableFeature

It is run by <>, who are $currentPassage.expertise. At the moment, <>

<> diff --git a/src/MiniEstablishments/Market/MarketsOutput.twee b/src/MiniEstablishments/Market/MarketsOutput.twee index 77fa06c3e..783cbac86 100644 --- a/src/MiniEstablishments/Market/MarketsOutput.twee +++ b/src/MiniEstablishments/Market/MarketsOutput.twee @@ -1,37 +1,47 @@ -:: MarketOutput [market] -<><> +:: MarketOutput [market nobr] +<> <><><><> -<><><>

$building.name

-\

You wander through the streets of $town.name, and come across the market, which is located in $building.location. It seems that the vendors are organised by $building.organisation. The market is known for $building.draw, and is $building.cleanliness. Today the market is $building.crowd.

+<><> +

$building.name

You wander through the streets of $town.name, and come across the market, which is located in $building.location. It seems that the vendors are organised by $building.organisation. The market is known for $building.draw, and is $building.cleanliness. Today the market is $building.crowd.

Merchants

-\<> -\

<> <> is _seller.selling from a _seller.tent.

+<> +

<> <> is _seller.selling from a _seller.tent.

<
>
-<Who else is there?">> -<><><><> -<> -<><><><>There's <> selling $building.moreSeller.merchant.selling from <>.<><> -A <> is selling magical trinkets from <>. Or, at least, they're supposedly magical items. - -- <> - + + <Who else is there?">> + <><><><> + <> + <> + <> + <> + + <> +

There's <> selling $building.moreSeller.merchant.selling from <>.

+ <
> + <
> +
+ + A <> is selling magical trinkets from <>. Or, at least, they're supposedly magical items. + -- <> + \ No newline at end of file diff --git a/src/MiniEstablishments/Posters.twee b/src/MiniEstablishments/Posters.twee index 878606a4d..698d0b6fa 100644 --- a/src/MiniEstablishments/Posters.twee +++ b/src/MiniEstablishments/Posters.twee @@ -1,8 +1,8 @@ -:: Posters +:: Posters [nobr] <> -\
<><>$poster<><>
+
<><>$poster<><>
diff --git a/src/MiniEstablishments/Temple/TempleOutput.twee b/src/MiniEstablishments/Temple/TempleOutput.twee index 5c663de9d..f63c95e6c 100644 --- a/src/MiniEstablishments/Temple/TempleOutput.twee +++ b/src/MiniEstablishments/Temple/TempleOutput.twee @@ -1,5 +1,5 @@ -:: TempleOutput -<><> +:: TempleOutput [nobr] +<> <> <>

$building.name

You come across $building.structure.templeDescriptor. $building.guardReadout

@@ -9,7 +9,7 @@

$building.priestLook. The priest greets you, and introduces $associatedNPC.himherself as <>. $building.priestChat.

<Get Temple Blessing" t8n>>
Blessing

$building.blessing

<
> -<
><Buy something" t8n>> +<Buy something" t8n>> <> <> <> @@ -29,5 +29,5 @@ } }>> <> -<><> -<
><> \ No newline at end of file +<> +<
> \ No newline at end of file diff --git a/src/MiniEstablishments/TownSquare/TownSquareOutput.twee b/src/MiniEstablishments/TownSquare/TownSquareOutput.twee index d6fea49c8..d25ff803f 100644 --- a/src/MiniEstablishments/TownSquare/TownSquareOutput.twee +++ b/src/MiniEstablishments/TownSquare/TownSquareOutput.twee @@ -1,11 +1,23 @@ -:: TownSquareOutput -<>

The Town Square

You're in the town square. It's $building.size, and $building.cleanliness. It features $building.feature As you <>, you see <> -There's <> There's also a noticeboard, which has various posters, requests, and announcements tacked to it.

-<> -
<><><> $building.associatedNPC<><>
+:: TownSquareOutput [nobr] +<> +

The Town Square

You're in the town square. +It's $building.size, and $building.cleanliness. It features $building.feature +As you <>, you see <>

+

There's <> There's also a noticeboard, which has various posters, requests, and announcements tacked to it.

+ + <> +
+ <> + <> + <> $building.associatedNPC + <> + <> +
+
<> diff --git a/src/Settings/CSS/stylesheet.css b/src/Settings/CSS/stylesheet.css index 188e884c3..f35a5334a 100644 --- a/src/Settings/CSS/stylesheet.css +++ b/src/Settings/CSS/stylesheet.css @@ -499,6 +499,9 @@ p { line-height: 1.75em; } +p:empty { + display: hidden; +} /* P+P */ @@ -557,10 +560,34 @@ h1+ p::first-line { font-family: Scaly Sans Caps; } +h1+ button + p::first-line { + font-family: Scaly Sans Caps; +} + +h1+ button + br + p::first-line { + font-family: Scaly Sans Caps; +} + + + +h1 + blockquote + p::first-line { + font-family: Scaly Sans Caps; +} + +h1+ button + blockquote + p::first-line { + font-family: Scaly Sans Caps; +} + +h1+ p button + blockquote + p::first-line { + font-family: Scaly Sans Caps; +} + #passages .first-character + p + p { text-indent: 0; } + + blockquote { font-family: Scaly Sans; box-sizing: border-box; diff --git a/src/Tavern/TavernOutput.twee b/src/Tavern/TavernOutput.twee index 9a6c289c7..304b252f1 100644 --- a/src/Tavern/TavernOutput.twee +++ b/src/Tavern/TavernOutput.twee @@ -1,24 +1,23 @@ -:: TavernOutput [tavern] -\
<>
-\<> -\<> -\<> -\

$building.name

-\You make your way through the $town.type of $town.name until you come to <>, which is called $building.name, <> $building.structure.descriptor that the locals know best for its $building.draw.

+:: TavernOutput [tavern nobr] +
<>
+<> +<> +<> +

$building.name

<>

You make your way through the $town.type of $town.name until you come to <>, which is called $building.name, <> $building.structure.descriptor that the locals know best for its $building.draw.

The Tavern

-\

<> $building.feature +

<> $building.feature <>

<> <>

The Bar

Behind the counter is who you would assume to be the bartender, <> who is currently <>. You walk up to the bar, and strike up conversation with the $associatedNPC.manwoman, who introduces $associatedNPC.himherself as <>, the $associatedNPC.owner of $building.name.

-\<> +<> <> <>

Tavern Entertainment

-\$building.entertainment +$building.entertainment <> -\<><><><> -\<><>

$building.carousing

<
><
>
+<><><><> +<><>

$building.carousing

<
><
>
<>
<
> <> \ No newline at end of file diff --git a/src/Town/TownMicroEventsOutput.twee b/src/Town/TownMicroEventsOutput.twee index 1e26ea3d7..692e84fac 100644 --- a/src/Town/TownMicroEventsOutput.twee +++ b/src/Town/TownMicroEventsOutput.twee @@ -1,15 +1,14 @@ -:: TownMicroEventsOutput +:: TownMicroEventsOutput [nobr] <> -\ <>Looking for the sliders? They're currently set to <>. You can change them in the settings.<> -\<> -\ <>Want to get straight to the action, sans slider screen? They're currently set to <>. You can change them in the settings.<> -\<> -\< 2>> -\
-\ As you make your way along -\ <> -\ <> -\ <> -\ the road, -\ <> -\ <>
<
> \ No newline at end of file + <>Looking for the sliders? They're currently set to <>. You can change them in the settings.<> +<> + <>Want to get straight to the action, sans slider screen? They're currently set to <>. You can change them in the settings.<> +<> +< 2>>
+ As you make your way along + <> + <> + <> + the road, + <> + <>
<
> \ No newline at end of file From d79d29a69b778a5e114649cc9a13609a3f0758e6 Mon Sep 17 00:00:00 2001 From: ryceg Date: Thu, 22 Apr 2021 22:16:26 +1000 Subject: [PATCH 11/23] Add message for local --- src/Settings/Setting.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Settings/Setting.js b/src/Settings/Setting.js index a875830c6..4dc7f5f9a 100644 --- a/src/Settings/Setting.js +++ b/src/Settings/Setting.js @@ -58,6 +58,7 @@ function isPatron () { } function patreonContent () { + if (location.origin === 'file://') return 'Patreon content is unlocked because you are running a local copy.' if (isPatron()) return 'Patreon content is unlocked.' return 'Patreon content is not currently unlocked.' } From 150442465cf1ee6df9b39ac8a6640a2dd82385cf Mon Sep 17 00:00:00 2001 From: ryceg Date: Thu, 22 Apr 2021 22:27:14 +1000 Subject: [PATCH 12/23] Fixed an issue with tippy not initialising --- src/Buildings/Components/CreateNewNPC.twee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Buildings/Components/CreateNewNPC.twee b/src/Buildings/Components/CreateNewNPC.twee index 5778ba835..7fc28f847 100644 --- a/src/Buildings/Components/CreateNewNPC.twee +++ b/src/Buildings/Components/CreateNewNPC.twee @@ -15,6 +15,7 @@ <> <><><> <><><> + <> <> <> <> From c6c1d70009222ca7d763a5a4453d5b26927bc273 Mon Sep 17 00:00:00 2001 From: ryceg Date: Thu, 22 Apr 2021 22:27:24 +1000 Subject: [PATCH 13/23] Remove h4 --- src/Alchemist/AlchemistOutput.twee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Alchemist/AlchemistOutput.twee b/src/Alchemist/AlchemistOutput.twee index 45e654381..2b345d9de 100644 --- a/src/Alchemist/AlchemistOutput.twee +++ b/src/Alchemist/AlchemistOutput.twee @@ -5,9 +5,9 @@ <>

$building.name

<><>

You enter $building.name, <>. <> There is a chemist behind the shop counter currently <>.

Chemist

The $associatedNPC.weight chemist <> <>. <> introduces $associatedNPC.himherself as <>, the $associatedNPC.owner of the shop, and asks what $associatedNPC.heshe can do for you.

-<Talk with $associatedNPC.name" t8n>> +<>
$associatedNPC.name
<><
>
-<Generate plothook">><><><><>
<> "$associatedNPC.plot"
<
><
> +<><><><><>
<> "$associatedNPC.plot"
<
><
> <> <> <
> \ No newline at end of file From 08fb93261353fcbfaed5333447cec5ccc48d37db Mon Sep 17 00:00:00 2001 From: ryceg Date: Thu, 22 Apr 2021 22:28:59 +1000 Subject: [PATCH 14/23] Formatting --- src/Alchemist/ChemistTalk.twee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Alchemist/ChemistTalk.twee b/src/Alchemist/ChemistTalk.twee index e75b08582..0785c89f0 100644 --- a/src/Alchemist/ChemistTalk.twee +++ b/src/Alchemist/ChemistTalk.twee @@ -1,2 +1,2 @@ -:: ChemistTalk -$associatedNPC.firstName looks <>, and idly shifts a box of <> as $associatedNPC.heshe talks. The $associatedNPC.raceNote <> as you peruse the shop. $associatedNPC.firstName tells you that $associatedNPC.heshe is working on <>, and points to the <>. Looking inside the $building.brew.vesselType, you see <> bubbling away<>. +:: ChemistTalk [nobr] +$associatedNPC.firstName looks <>, and idly shifts a box of <> as $associatedNPC.heshe talks. The $associatedNPC.raceNote <> as you peruse the shop. $associatedNPC.firstName tells you that $associatedNPC.heshe is working on <>, and points to the <>. Looking inside the $building.brew.vesselType, you see <> bubbling away<>. From df911ef4e0916dabf8f1828780f853a68ec25ba6 Mon Sep 17 00:00:00 2001 From: ryceg Date: Thu, 22 Apr 2021 22:39:44 +1000 Subject: [PATCH 15/23] formatting --- .../NPCProfile/Components/NPCEarlyLife.twee | 2 +- .../NPCProfile/Components/NPCHeader.twee | 2 +- src/NPCGeneration/NPCProfile/NPCProfile.twee | 47 ++++++++++--------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/NPCGeneration/NPCProfile/Components/NPCEarlyLife.twee b/src/NPCGeneration/NPCProfile/Components/NPCEarlyLife.twee index ba2d84d45..50f2de803 100644 --- a/src/NPCGeneration/NPCProfile/Components/NPCEarlyLife.twee +++ b/src/NPCGeneration/NPCProfile/Components/NPCEarlyLife.twee @@ -1,4 +1,4 @@ -:: NPCEarlyLife +:: NPCEarlyLife [nobr]
Early Life
I was born $currentNPC.birthplace, and was raised by $currentNPC.familyUnit<> as an only child.<> with my brother.<>, along with my $currentNPC.siblingNumber siblings.<> I had <> upbringing in $currentNPC.familyHome. <>I didn't know my parents growing up.<><>$currentNPC.parentalLineage.<> $currentNPC.childhoodMemories.
diff --git a/src/NPCGeneration/NPCProfile/Components/NPCHeader.twee b/src/NPCGeneration/NPCProfile/Components/NPCHeader.twee index 8ae7fbaaa..c31c85992 100644 --- a/src/NPCGeneration/NPCProfile/Components/NPCHeader.twee +++ b/src/NPCGeneration/NPCProfile/Components/NPCHeader.twee @@ -15,7 +15,7 @@ $currentNPC.title rerender: true, dialogOpts: $npcs[$currentPassage.key] })>> - <> + <>
<> /*
\ No newline at end of file diff --git a/src/Settings/Setting.js b/src/Settings/Setting.js index 4dc7f5f9a..72d279031 100644 --- a/src/Settings/Setting.js +++ b/src/Settings/Setting.js @@ -44,6 +44,28 @@ $(document).on(':dialogopened', function () { } } ) + setup.addSettingButton({ + target: 'pantheon', + name: 'customImages', + description: 'Add custom images.', + buttonDescription: 'Open Image Importer' + }, + () => { + if (isPatron()) { + setup.openDialog({ + header: 'Import Images', + passage: 'CustomImages', + rerender: true + }) + } else { + setup.openDialog({ + header: 'Patreon Content', + passage: 'ImportPatreon', + rerender: true + }) + } + } + ) } }) @@ -72,23 +94,18 @@ Setting.addToggle('darkMode', { default: window.matchMedia('(prefers-color-scheme: dark)').matches }) -Setting.addToggle('showCelsius', { - label: 'Show celsius?' -}) - -Setting.addToggle('showMetric', { - label: 'Show metric?' -}) - Setting.addToggle('showBiomeGeneration', { label: 'Edit biome before generation?', desc: 'If you want to specify the biome and demographics before town creation, enable this.', onChange: settingShowBiomeGeneration }) -Setting.addToggle('showSliders', { - label: 'Show sliders?', - desc: 'If you would like to change the variables of buildings, enable this. Warning: feature is in beta.' +Setting.addToggle('showCelsius', { + label: 'Show celsius?' +}) + +Setting.addToggle('showMetric', { + label: 'Show metric?' }) Setting.addToggle('silverStandard', { diff --git a/src/Start/Start.twee b/src/Start/Start.twee index 075060975..65c8ea4d4 100644 --- a/src/Start/Start.twee +++ b/src/Start/Start.twee @@ -6,5 +6,4 @@ <> <> <> -<> -[[CustomImages]] \ No newline at end of file +<> \ No newline at end of file diff --git a/src/Start/StoryInit.twee b/src/Start/StoryInit.twee index 6bd85f968..913f135e7 100644 --- a/src/Start/StoryInit.twee +++ b/src/Start/StoryInit.twee @@ -5,7 +5,7 @@ <> <