Things and stufffffff

This commit is contained in:
Kim Ravn Hansen
2025-09-14 20:44:42 +02:00
parent aeb9d776fc
commit 71b4329b9e
5 changed files with 292 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
libs_for_randomizing_names_and_Stuff

33
bottomless.md Executable file
View File

@@ -0,0 +1,33 @@
Got it — youd 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 isnt “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?

39
castle-ascii-art.txr Normal file
View File

@@ -0,0 +1,39 @@
█▐▀▀▀▌▄
█ ▐▀▀▀▌▌▓▌
█ ▄▄ ▄▄▀
█ ▐▀▀▀▀
▄█▄
▓▀ ▀▌
▓▀ ▓▄
▄▓ ▐▓
▄▓ ▀▌
▓▀▀▀▀▀▓ ▓▀▀▀▀▓ ▐█▀▀▀▀▓
█ █ █ ▓░ ▓▌ ▓░
█ ▀▀▀▀▀ ▀▀▀▀▀ ▓░
▓▒ ▓░
▀▓▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
▐▌ █
▓▀▀▀▀█ ▐█▀▀▀█ ▐█▀▀▀▓▒ ▐▌ █ ▐▓▀▀▀▓▒ ▓▀▀▀▓▒ █▀▀▀▀▓
█ █ ▐▌ █ ▐▌ ▓▒ ▐▌ ▐██░ █ ▐█ ▓▄ █ ▐▌ █ ▐█
▓░ ▐▀▀▀ ▐▀▀▀ █░ ▐▌ ▓██▌ █ ▐█ ▀▀▀▀ ▀▀▀ ▐▌
▓▒ █ ▐▌ ▀██▌ █ █ ▐▌
▀▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▓▀ ▐▌ █ ▀▌▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▓
▐▌ █ ▐▌ █ █ ▐▌
▐▌ █ ▐▌ █ █ ▐▌
▐▌ ▓▌ █▀▀▀▀▀█ ▐▌▐▌▀▀▀▀█ ▓▀▀▀▀▓▄ █ █▀▀▀▀▀█ ▓▌ ▐▌
▓▌ ██▌ █ █ ▓▌▓▒ █ █ ▐▌ █ █ █ ▓██ ▐▓
▓▒ ▐██▌ █ █ ▓██░ ▐█
▓ ▐▐ █ █ ▐▐ █
█ █ █ █
█ █ ▄▄▄ █ █
█ █ ▄▀▀ ▀▀▓▄ █ █
█ █ ▄▌ ▀▓ █ █
▐█ █ ▓▀ ▐█ █ ▓▒
▐▌ █ ▐▓ ▐▌ ▐█ ▓▒
▐▌ █ █ █ ▐█ ▐▌
▐▌ ▓░ █ █ ▐▌ ▐▌
▓▒ ▓░ █ ▓▒ ▐▌ ▐▓
▓░ ▓░ ▐▌ ▀▌ ▐▌ ▐█
▀▌▄▄ ▓▄▄ ▐█ ▓▌ ▄▄▄▐▌ ▄▄▄▀
▐▐▐▀▀▀▀▐▐▐ ▐▐▀▀▀▀▀▀▐▐

110
name_adjectives.txt Normal file
View File

@@ -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',
]

109
prompts.txt Normal file
View File

@@ -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)