Commit graph

10526 commits

Author SHA1 Message Date
Vincent Ambo
86c2ebc096 feat(emacs.d): Enable edwina package for window management
Configures edwina using `s-w` as the key prefix (in line with my other
EXWM-related commands).

An additional function is added that switches to a buffer (borrowing
the implementation from `ivy-switch-buffer`) but splitting it into a
new window instead.
2019-12-24 15:30:25 +01:00
Griffin Smith
1351691136 Don't send the welcome message when loading
Don't re-send the welcome message when loading the game if it's already
been sent. This is done by just tracking whether or not we've sent it as
a boolean in the game state, which may be a bit of a hack but should be fine
2019-12-23 18:20:08 -05:00
Griffin Smith
32421916e0 Update the vision every time we step the game
Recalculate the character's lines of sight every time we step the game,
rather than just every time the character *moves*. I had originally
thought this was a non-contiguous lines-of-sight bug - which there's a
test disproving - but it actually turned out to be that actions like
eating or attacking would step the game forward (thus moving gormlaks)
without re-calculating the positions visible to the character.
2019-12-23 17:55:28 -05:00
Griffin Smith
a58966d43f Confirm before quitting
Prompt to confirm before quitting the game with the Quit command
2019-12-23 17:22:56 -05:00
Griffin Smith
f701a0be40 Preserve entityIDs in atPosition's setter
Make the setter for the atPosition lens preserve entityIDs for
already-existing entities at the position, so that when we plop
something in the same tile as the character the character's entity ID
doesn't disappear.
2019-12-23 17:22:56 -05:00
Griffin Smith
052bc8455a Add a drop command
Add a drop command, bound to 'd', which prompts the character for an
item in their inventory, removes it from the inventory, and places it on
the ground. Along the way I had to fix a bug in the
`EntityMap.atPosition` lens, which was always appending to the existing
entities at the position on set, without removing the entities that were
already there - the rabbit hole of quickchecking the lens laws here also
lead to replacing the target of this lens with a newtype called
`VectorBag`, which ignores order (since the entitymap makes no
guarantees about order of entities at a given position).
2019-12-23 17:22:56 -05:00
Griffin Smith
bf7d139c1a Use attack messages when attacking
When attacking, use either:
- the message defined on the entity raw of the wielded item, if any
- the generic attack message, if an item without an attack message is wielded
- the fists attack message, if no item is wielded
2019-12-23 10:59:45 -05:00
Griffin Smith
8ecefddbd4 Use wielded items to calculate damage
Use whatever items the character has wielded, if any, to calculate the
damage they deal when attacking. Currently this shortcuts handedness to
just use the *first* item they have equipped, which is fine since it's
currently only possible to equip something in the right hand.
2019-12-23 10:47:09 -05:00
Vincent Ambo
ccd31b8898 feat(emacs.d): Bind 's-g m' to notmuch UI 2019-12-23 16:05:05 +01:00
Vincent Ambo
41eea96e63 feat(third_party/lieer): Overwrite included client secret 2019-12-23 13:26:30 +01:00
Vincent Ambo
a260eba3cf refactor(ops/kms_pass): Pin encrypted secrets into Nix store 2019-12-23 13:26:09 +01:00
Vincent Ambo
d11cda367f feat(third_party): Check in derivation for lieer 2019-12-23 12:20:31 +01:00
Griffin Smith
6622dd3018 Add a wield command
Add a Wield command, which prompts for a wieldable item, if any, to take
out of the character's inventory and put in their right hand.

Eventually we should support other hands, but for now hardcoding the
right hand should be fine.
2019-12-22 23:22:25 -05:00
Griffin Smith
5b1c7799a7 Add wielded, wieldable items
Split the character's inventory up into wielded items (in one or both
hands) and the backpack, and display wielded items when drawing the
inventory panel. Currently there's no way to actually *wield* items
though, so this is all unused/untested.

Also, add the ability for items to be "wieldable", which gives specific
descriptions for when attacking with them and also modified damage.
2019-12-22 22:46:43 -05:00
Griffin Smith
0f754eb2a0 Fix rendering string prompts
Rendering an editor with txtWrap makes brick blow up because editors
have an internal viewport, but txtWrap advertises an infinite width.
2019-12-22 22:42:05 -05:00
Vincent Ambo
a36e9f817d fix(cheddar): Fix errors if filename does not have an extension 2019-12-22 15:21:23 +00:00
Vincent Ambo
f1c018af18 feat(emacs): Install edwina package
No configuration for this yet, I just want to try it out. It seems
like an interesting way of managing Emacs windows!
2019-12-22 14:30:28 +00:00
Vincent Ambo
9ad4796538 feat(cgit-taz): Add patches for subtree about/ handling
1. Generate links to subtree about pages.
2. Render README files in subtrees, too.
2019-12-21 23:36:39 +00:00
Vincent Ambo
03acae2f85 feat(cheddar): Style pre-elements for better readability
Uses GitHub-like styling for <pre> elements, i.e. slight padding and
background colour highlighting.
2019-12-21 16:18:26 +00:00
Vincent Ambo
f904951384 feat(cheddar): Render code blocks in Markdown via syntect
Implements fully static (i.e. no JavaScript!) highlighting of code
blocks when rendering Markdown.

This works by walking through the Comrak AST and replacing any code
blocks with pre-rendered HTML blocks.

Syntaxes are chosen based on the "block info", which is the string
users put after the block's opening fence. This can either be
a (case-insensitive) name of a syntax, or alternatively a file
extension associated with the desired syntax.

The theme is set to one that imitates GitHub.
2019-12-21 15:57:02 +00:00
Vincent Ambo
671dbc7f72 docs(cheddar): Mention cgit filter compatibility in README 2019-12-21 15:56:44 +00:00
Vincent Ambo
42564b3956 chore(third_party): Remove pulldown-cmark again 2019-12-21 14:51:52 +00:00
Vincent Ambo
a210610023 chore(build): Add cheddar to ci-builds.nix 2019-12-21 14:51:12 +00:00
Vincent Ambo
34e2570a8c feat(cgit-taz): Use cheddar as the about-filter
This will render about pages using the Comrak renderer defined in
Cheddar.

Note that due to the way its implemented this will have one
interesting behaviour: Markdown files in the tree will *also* be
rendered as HTML.

I will need to see how that works out before deciding whether or not
to disable it.
2019-12-21 14:50:21 +00:00
Vincent Ambo
d6c255a35d feat(cheddar): Render Markdown via Comrak
Renders any ".md" file by pushing it through the Comrak rendering
pipeline.

This does not yet implement syntax highlighting of fenced blocks, but
we're getting there.
2019-12-21 14:49:35 +00:00
Vincent Ambo
d35aa4ae46 refactor(cheddar): Set up scaffolding for Markdown rendering
Generalises the two bits of the program that will be required either
way (extension parsing and syntax loading).

A dependency on Comrak is introduced as I think GitHub-flavoured
Markdown (with all its fancy extensions) is desirable!
2019-12-21 14:09:12 +00:00
Vincent Ambo
eb650eb8d8 docs(nix/readTree): Add a very descriptive README for readTree 2019-12-21 05:42:52 +00:00
Vincent Ambo
4a9c6ab6a2 refactor(nix/readTree): Move readTree to its own subfolder 2019-12-21 05:42:49 +00:00
Vincent Ambo
cbc3409ce0 feat(cgit-taz): Make use of cheddar for syntax highlighting 2019-12-21 04:57:55 +00:00
Vincent Ambo
81d9b81b06 feat(cheddar): Use syntax highlighting assets from bat
This uses Nix to inject the path to the syntax highlighting assets
that ship with the bat source code into the cheddar build at compile
time, where the Rust compiler then inserts it into the binary via
macros.

bat has a lot of custom syntax highlighting definitions that they
collected from all over the place (including for languages like Nix!)
and this makes them accessible to cheddar.

Also if you're reading this, can you just take a moment to appreciate
how incredible it is that Nix just lets us do something like this?!
2019-12-21 04:55:10 +00:00
Vincent Ambo
4681c07bde feat(tools/cheddar): Check in new syntax highlighting tool
The first step with this tool will be to use it as a source-filter for
cgit. The second step is to use it as the Markdown renderer by
depending on one of the Markdown libraries, with integration for
rendering code snippets directly.
2019-12-21 04:54:57 +00:00
Vincent Ambo
87cf3a2c6f chore(net/stomp_erl): Remove erlang.mk
The project should be migrated to one of the newer mechanisms, like
rebar.
2019-12-21 03:05:51 +00:00
Vincent Ambo
bec4eb23d0 feat(cgit-taz): Use pulldown-cmark as the about filter
It renders GitHub-flavoured Markdown, which is nice for most
use-cases.
2019-12-21 03:01:41 +00:00
Vincent Ambo
19ced1ac41 feat(third_party): Add derivation for pulldown-cmark 2019-12-21 02:55:48 +00:00
Vincent Ambo
b6a3490816 docs(README): Fix link to dottime overview page 2019-12-21 01:48:11 +00:00
Vincent Ambo
d820b4d6bf docs(README): Update list of highlights
Now that a whole bunch more stuff has been checked in, there's a few
worthy mentions in this list.
2019-12-21 01:46:54 +00:00
Vincent Ambo
ad07fc31ed merge(crimp): Integrate at //net/crimp 2019-12-21 01:28:09 +00:00
Vincent Ambo
48c738b1b5 chore(crimp): Prepare for depot merge 2019-12-21 01:27:49 +00:00
Vincent Ambo
ec826db87a merge(alcoholic_jwt): Integrate at //net/alcoholic_jwt 2019-12-21 01:24:22 +00:00
Vincent Ambo
14462d5ecd chore(alcoholic_jwt): Prepare for depot merge 2019-12-21 01:24:02 +00:00
Vincent Ambo
1a281d3bb9 merge(stomp.erl): Integrate at //net/stomp_erl
This currently has no build configuration.
2019-12-21 01:21:19 +00:00
Vincent Ambo
32d16e2b02 chore(stomp.erl): Prepare for depot merge 2019-12-21 01:20:41 +00:00
Vincent Ambo
5f4924cfa7 feat(watchblob): Check in Nix expression with buildGo 2019-12-21 01:13:58 +00:00
Vincent Ambo
96b82a8033 merge(watchblob): Integrate at //fun/watchblob 2019-12-21 01:11:40 +00:00
Vincent Ambo
24b075bdeb chore(watchblob): Prepare for depot merge 2019-12-21 01:11:29 +00:00
Vincent Ambo
58f2f6f12d feat(bootstrapping-2018): Fix build and check in built presentation
This lets people browse the folder more easily, should they be so
inclined for whatever reason.
2019-12-21 01:07:29 +00:00
Vincent Ambo
5a28a1a94c merge(bs-talk): Integrate at //presentations/bootstrapping-2018 2019-12-21 00:59:46 +00:00
Vincent Ambo
28200fb059 chore(bootstrapping-2018): Prepare for depot merge 2019-12-21 00:59:27 +00:00
Vincent Ambo
1c767a1748 merge(elblog): Integrate at //fun/elblog 2019-12-21 00:56:26 +00:00
Vincent Ambo
3253e4c4fb chore(elblog): Prepare for depot merge 2019-12-21 00:56:13 +00:00