From 71b4329b9ea25d9af90f5a375576e9d162499b5a Mon Sep 17 00:00:00 2001 From: Kim Ravn Hansen Date: Sun, 14 Sep 2025 20:44:42 +0200 Subject: [PATCH] Things and stufffffff --- .gitignore | 1 + bottomless.md | 33 +++++++++++++ castle-ascii-art.txr | 39 +++++++++++++++ name_adjectives.txt | 110 +++++++++++++++++++++++++++++++++++++++++++ prompts.txt | 109 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 292 insertions(+) create mode 100644 .gitignore create mode 100755 bottomless.md create mode 100644 castle-ascii-art.txr create mode 100644 name_adjectives.txt create mode 100644 prompts.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a32604c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +libs_for_randomizing_names_and_Stuff diff --git a/bottomless.md b/bottomless.md new file mode 100755 index 0000000..d583178 --- /dev/null +++ b/bottomless.md @@ -0,0 +1,33 @@ +Got it — you’d like the chain of accessed properties to “remember” its path, so you can do things like: + +```js +console.log(foo.bar.baz.toString()); // "bar.baz" +``` + +You can extend the Proxy trick for that: + +```js +function Bottomless(path = []) { + return new Proxy(() => {}, { + get(_, prop) { + if (prop === "toString" || prop === "valueOf") { + return () => path.join("."); + } + return Bottomless([...path, prop]); + }, + }); +} + +const foo = Bottomless(); + +console.log(foo.bar.baz.toString()); // "bar.baz" +console.log(foo.hello.world.toString()); // "hello.world" +``` + +⚡ Notes: + +- `toString` (and `valueOf`) are trapped so you can stringify naturally. +- The chain isn’t “real” objects anymore, but function proxies that track their path. +- You could also add a `.path` property if you prefer structured access. + +Want me to make it so it **still supports assignment** (`foo.bar = 123`) _and_ path stringifying? diff --git a/castle-ascii-art.txr b/castle-ascii-art.txr new file mode 100644 index 0000000..b173ea8 --- /dev/null +++ b/castle-ascii-art.txr @@ -0,0 +1,39 @@ + ▄ + █▐▀▀▀▌▄ + █ ▐▀▀▀▌▌▓▌ + █ ▄▄ ▄▄▀ + █ ▐▀▀▀▀ + ▄█▄ + ▓▀ ▀▌ + ▓▀ ▓▄ + ▄▓ ▐▓ + ▄▓ ▀▌ + ▓▀▀▀▀▀▓ ▓▀▀▀▀▓ ▐█▀▀▀▀▓ + █ █ █ ▓░ ▓▌ ▓░ + █ ▀▀▀▀▀ ▀▀▀▀▀ ▓░ + ▓▒ ▓░ + ▀▓▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ + ▐▌ █ + ▓▀▀▀▀█ ▐█▀▀▀█ ▐█▀▀▀▓▒ ▐▌ █ ▐▓▀▀▀▓▒ ▓▀▀▀▓▒ █▀▀▀▀▓ + █ █ ▐▌ █ ▐▌ ▓▒ ▐▌ ▐██░ █ ▐█ ▓▄ █ ▐▌ █ ▐█ + ▓░ ▐▀▀▀ ▐▀▀▀ █░ ▐▌ ▓██▌ █ ▐█ ▀▀▀▀ ▀▀▀ ▐▌ + ▓▒ █ ▐▌ ▀██▌ █ █ ▐▌ + ▀▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▓▀ ▐▌ █ ▀▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▓ + ▐▌ █ ▐▌ █ █ ▐▌ + ▐▌ █ ▐▌ █ █ ▐▌ + ▐▌ ▓▌ █▀▀▀▀▀█ ▐▌▐▌▀▀▀▀█ ▓▀▀▀▀▓▄ █ █▀▀▀▀▀█ ▓▌ ▐▌ + ▓▌ ██▌ █ █ ▓▌▓▒ █ █ ▐▌ █ █ █ ▓██ ▐▓ + ▓▒ ▐██▌ █ █ ▓██░ ▐█ + ▓ ▐▐ █ █ ▐▐ █ + █ █ █ █ + █ █ ▄▄▄ █ █ + █ █ ▄▀▀ ▀▀▓▄ █ █ + █ █ ▄▌ ▀▓ █ █ + ▐█ █ ▓▀ ▐█ █ ▓▒ + ▐▌ █ ▐▓ ▐▌ ▐█ ▓▒ + ▐▌ █ █ █ ▐█ ▐▌ + ▐▌ ▓░ █ █ ▐▌ ▐▌ + ▓▒ ▓░ █ ▓▒ ▐▌ ▐▓ + ▓░ ▓░ ▐▌ ▀▌ ▐▌ ▐█ + ▀▌▄▄ ▓▄▄ ▐█ ▓▌ ▄▄▄▐▌ ▄▄▄▀ + ▐▐▐▀▀▀▀▐▐▐ ▐▐▀▀▀▀▀▀▐▐ diff --git a/name_adjectives.txt b/name_adjectives.txt new file mode 100644 index 0000000..aae05da --- /dev/null +++ b/name_adjectives.txt @@ -0,0 +1,110 @@ + const ADJECTIVES = [ + 'admiring', + 'adoring', + 'affectionate', + 'agitated', + 'amazing', + 'angry', + 'awesome', + 'beautiful', + 'blissful', + 'bold', + 'boring', + 'brave', + 'busy', + 'charming', + 'clever', + 'cool', + 'compassionate', + 'competent', + 'condescending', + 'confident', + 'cranky', + 'crazy', + 'dazzling', + 'determined', + 'distracted', + 'dreamy', + 'eager', + 'ecstatic', + 'elastic', + 'elated', + 'elegant', + 'eloquent', + 'epic', + 'exciting', + 'fervent', + 'festive', + 'flamboyant', + 'focused', + 'friendly', + 'frosty', + 'funny', + 'gallant', + 'gifted', + 'goofy', + 'gracious', + 'great', + 'happy', + 'hardcore', + 'heuristic', + 'hopeful', + 'hungry', + 'infallible', + 'inspiring', + 'interesting', + 'intelligent', + 'jolly', + 'jovial', + 'keen', + 'kind', + 'laughing', + 'loving', + 'lucid', + 'magical', + 'mystifying', + 'modest', + 'musing', + 'naughty', + 'nervous', + 'nice', + 'nifty', + 'nostalgic', + 'objective', + 'optimistic', + 'peaceful', + 'pedantic', + 'pensive', + 'practical', + 'priceless', + 'quirky', + 'quizzical', + 'recursing', + 'relaxed', + 'reverent', + 'romantic', + 'sad', + 'serene', + 'sharp', + 'silly', + 'sleepy', + 'stoic', + 'strange', + 'stupefied', + 'suspicious', + 'sweet', + 'tender', + 'thirsty', + 'trusting', + 'unruffled', + 'upbeat', + 'vibrant', + 'vigilant', + 'vigorous', + 'wizardly', + 'wonderful', + 'xenodochial', + 'youthful', + 'zealous', + 'zen', +] diff --git a/prompts.txt b/prompts.txt new file mode 100644 index 0000000..606f271 --- /dev/null +++ b/prompts.txt @@ -0,0 +1,109 @@ + _ _ ____ _ _ +| \ | | ___ _ __ ___ ___ _ __ ___ / ___|| |_ __ _| |_ ___ ___ +| \| |/ _ \ | '_ ` _ \ / _ \| '__/ _ \ \___ \| __/ _` | __/ _ \/ __| +| |\ | (_) | | | | | | | (_) | | | __/ ___) | || (_| | || __/\__ \ +|_| \_|\___/ |_| |_| |_|\___/|_| \___| |____/ \__\__,_|\__\___||___/ +====================================================================== + +* States omdøbes til prompts +* det er prompten selv, der skal stille spørgsmålet. Dette sker onAttach. +* onAttach() omdøbes til start() +* onMessage() omdøbes til onReply() +* Man skal ikke længere selv queue en ny message handler op. +* this.prompt() blur meje simplere +* Det kan svare sig at gøre det her ordentligt, for vi kommer til + at få MANGE! prompts + + + ____ ____ _____ _ _ _____ ____ +/ ___| / ___| | ____| | \ | | | ____| / ___| +\___ \ | | | _| | \| | | _| \___ \ + ___) | | |___ | |___ | |\ | | |___ ___) | +|____/ \____| |_____| |_| \_| |_____| |____/ +----------------------------------------------- + +Scenes er en samling af prompts, resourcer, events, etc. + +* Authentication Scene + * Username prompt + * ==> Player creation scene + * Password prompt + * Password prompt + +* Player Creation Scene + * Username prompt + * Password prompt + * Confirm password prompt + +* Just logged in Scene + * ==> Character Creation Scene + * ==> Welcome Back scene + + + _ _ ____ + ___| |_ __ _ _ __| |_ / /\ \ +/ __| __/ _` | '__| __| | | | +\__ \ || (_| | | | |_| | | | +|___/\__\__,_|_| \__| | | | + \_\/_/ +-------------------------------- + +Stiller spørgsmålet. That's it, ikke mere end det. + + + + + + _ ____ + _ __ ___ _ __ | |_ _ / /\ \ +| '__/ _ \ '_ \| | | | | | | | +| | | __/ |_) | | |_| | | | | +|_| \___| .__/|_|\__, | | | | + |_| |___/ \_\/_/ + +modtager al tekst undtaget "kolon" kommandoer. + +Er ansvarlig for at processere sin info og så +ellers smide en ny prompt på. + + + + + + _ _ ____ +| |__ ___| |_ __ / /\ \ +| '_ \ / _ \ | '_ \| | | | +| | | | __/ | |_) | | | | +|_| |_|\___|_| .__/| | | | + |_| \_\/_/ + +Håndter :help kommandoer der ikke har et emne, + + + + _ _ __ ____ +| |__ ___| |_ __ / _| ___ ___ / /\ \ +| '_ \ / _ \ | '_ \ | |_ / _ \ / _ \| | | | +| | | | __/ | |_) | | _| (_) | (_) | | | | +|_| |_|\___|_| .__/___|_| \___/ \___/| | | | + |_| |_____| \_\/_/ + +Håndterer :help kommanduer med Xxx suffix/emne Hvis der ikke findes en +onHelpXxx funktion, så siger serveren at der ikke er noget hjælp med det emne +tilgængeligt. + +F.eks. + +`:help fishing` => `prompt.help_fishing()`; + + + + _ __ ____ + ___ ___ _ __ ___ _ __ ___ __ _ _ __ __| | / _| ___ ___ / /\ \ + / __/ _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` | | |_ / _ \ / _ \| | | | +| (_| (_) | | | | | | | | | | | (_| | | | | (_| | | _| (_) | (_) | | | | + \___\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___|_| \___/ \___/| | | | + |_____| \_\/_/ + +Håndterer kolon-kommandoer (udover :quit og :help) +