about summary refs log tree commit diff
path: root/users/grfn/xanthous/src/Xanthous/Game (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-04-14 r/3945 feat(grfn/xanthous): Add a help panelGriffin Smith1-4/+77
Change-Id: I581a37df0a20fa54878da4446007dbe677e057da Reviewed-on: https://cl.tvl.fyi/c/depot/+/5444 Autosubmit: grfn <grfn@gws.fyi> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-04-11 r/3942 chore(3p/sources): Bump channels & overlayssterni2-2/+1
Use nixos-unstable-small which fixes CVE-2018-25032 (out of bounds write while compressing). * //users/grfn/xanthous: - Supporting random-fu 0.3 requires considerable changes and patching random-extras (https://github.com/aristidb/random-extras/pull/5). For now we downgrade random-fu and its dependency rvar to 0.2.*, forcing us to build xanthous with GHC 8.10.7, due to random-fu 0.2.* not supporting that version. Nix expressions for the downgraded packages are checked in to avoid the potential need to compile Haskell at pipeline eval time. - generic-arbitrary exposes a GenericArbitrary newtype now. This means we no longer have to implement it in xanthous downstream and patch generic-arbitrary to expose the GArbitrary type class. - Minor adjustments for lens 5.0: Xanthous.Game.Memo: clear needs to use ASetter' instead of Lens' Xanthous.Data.EntityMap: TraversableWithIndex no longer has an itraversed function. - Xanthous.Orphans: adjust for aeson's KeyMap, use KM.size explicitly instead of relying on MonoTraversable's length * //nix/buildLisp: the CCL issue has resurfaced, disabling the implementation once again. * //3p/arion: remove, as depot uses the nixpkgs package of it anyways. * //users/wpcarro: accomodate GHC 9.0.1's stricter parsing of operators. * //users/tazjin: disable rustfmt as it stopped respecting settings * //3p/overlays: upgrade home-manager until fix for serivce generation has landed upstream * //users/grfn/system: remove rr override, as the pinned commit is part of the 5.5.0 release shipped by nixpkgs. Change-Id: If229e7317ba48498f85170b57ee9053f6997ff8a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5428 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: wpcarro <wpcarro@gmail.com>
2021-11-22 r/3081 refactor(gs/xanthous): Break out inventory into a common moduleGriffin Smith1-0/+1
Creatures are going to have an inventory too now in addition to characters, so all the data types and lenses and stuff that define inventory need to be broken out into a separate module so the Creature entity can use them. Change-Id: I83f1c70d316afaaf2e75901f9dc28f79fd2cd31f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3901 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-11-08 r/3023 fix(gs/xanthous): Don't take up half-width for promptsGriffin Smith1-4/+2
txtWrap takes up half the available width in the viewport, causing the input for prompts to display way too far to the right of the actual prompt. I'm not aware of any actual mutiline prompts, so using txt here makes way more sense. Change-Id: I7f62066f1b07b5d6ba2c7ffed77c87ae33b1dfa5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3814 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-07 r/3017 feat(gs/xanthous): Allow disabling savingGriffin Smith1-2/+20
Add a command-line parameter to disable the Save command, so people don't save and fill up my disk when I'm running this on the internet. Change-Id: I2408e60de2d99764ac53c21c3ea784282576d400 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3808 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-11-06 r/3008 feat(gs/xanthous): Default to the current save fileGriffin Smith5-18/+48
When saving, default to the save file that was loaded for the game if any. To support this, this also makes text prompts support a default, which will be used if no value is input. Change-Id: I72a826499d6e987b939e3465a2d29167e53416be Reviewed-on: https://cl.tvl.fyi/c/depot/+/3801 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-10-30 r/2994 feat(gs/xanthous): Allow throwing rocksGriffin Smith3-21/+70
Implement a first pass at a "fire" command, which allows throwing rocks, the max distance and the damage of which is based on the weight of the item and the strength of the player. Currently the actual numbers here likely need some tweaking, as the rocks are easily throwable at good distances but don't really deal any damage. Change-Id: Ic6ad0599444af44d8438b834237a1997b67f220f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3764 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2682 fix(xanthous): Only use alphabetic chars for menu itemsGriffin Smith1-2/+3
Previously, we were using `smallestNotIn` for selecting new characters for menu items with duplicate chatacters - this uses the 'Bounded' instance for the type, which for Char meant the first character we would always select was \NUL - making it look like the menu item had no character, and making it impossible to actually select the menu item. This introduces an AlphaChar newtype, which is a wrapper around Char whose Bounded and Enum instances only use alphabetic characters (a-ZA-Z) and uses that for menu characters instead. Change-Id: If34ed9e9ce84f2bcb1cb87432cc6273f40b69f72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3229 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-23 r/2680 feat(xanthous): Add a command to describe an item in the inventoryGriffin Smith1-0/+1
Add a new DescribeInventory command, bound to I, to prompt for an item in the inventory (anywhere in the inventory, including wielded) and display a (new) panel describing it in detail. This description includes the description, the long description, and the item's physical properties (volume, density, and weight). Change-Id: Idc1a05ab16b4514728d42aa6b520f93bea807c07 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3227 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2675 feat(xanthous): Add an auto-rest commandGriffin Smith1-0/+1
Add a command that automatically rests (essentially just stepping the game forwards) until the character's hitpoints are back to full. Currently due to the time it takes for the character to heal this takes a bit too long - my thought there is to make the per-step delay for autocommands different depending on the specific autocommand. Change-Id: I40378c29d3d9d19e9787af1f015bde65fd08868c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3221 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-18 r/2669 fix(xanthous): Wipe memoized vision when the game updatesGriffin Smith1-3/+7
If the game steps forward, entities could be moving around, so we need to wipe the memoized character vision. Change-Id: If6ea6a8c4bed7aefef90a0a2ab17eff0af9b9bbe Reviewed-on: https://cl.tvl.fyi/c/depot/+/3215 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2661 feat(xanthous): Gormlaks yell in gormlak when they see the characterGriffin Smith1-2/+14
Add a new "greetedCharacter" field to the creature hippocampus type, which tracks whether or not that creature has greeted the character yet. In the gormlak AI, when the gormlak sees the character and starts running towards them, if that field is set to False send a message that says that the gormlak yells a single randomly-generated gormlak word at the character, then set the field to true The gormlak yells "gukblom"! Change-Id: I17a388393693a322c2e09390884ed718911b2fc4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3207 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-14 r/2660 feat(xanthous): Add a method to get the name for a type of entityGriffin Smith1-0/+6
I didn't end up using this directly for the thing I was doing, but it still seems generally useful enough that I'm keeping it around for now Change-Id: I05c8902d75845f2230ec2373a9677d61cfaafafd Reviewed-on: https://cl.tvl.fyi/c/depot/+/3206 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-06-12 r/2653 feat(xanthous): Memoize characterVisiblePositionsGriffin Smith5-53/+125
Memoize the return value of characterVisiblePositions to a new, semi-abstracted "memo" field on the GameState, recalcuclated if the character position ever changes. I'm 90% sure that the perf issues we were encountering were actually caused by characterVisiblePositions getting called once for *every tile* on draw, but this slightly larger change also makes the game perform relatively-usably again. Since this is only recalculated if the character position changes, if we ever get non-transparent entities moving around without the characters influence (maybe something building or knocking down walls?) we'll have an issue there where the vision won't be updated as a result of those changes if they happen while the character is taking a non-moving action - but we can cross that bridge when we come to it. Change-Id: I3fc745ddf0014d6f164f735ad7e5080da779b92a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3185 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-04-12 r/2485 refactor(users/glittershark): Rename to grfnGriffin Smith6-0/+1210
Rename my //users directory and all places that refer to glittershark to grfn, including nix references and documentation. This may require some extra attention inside of gerrit's database after it lands to allow me to actually push things. Change-Id: I4728b7ec2c60024392c1c1fa6e0d4a59b3e266fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/2933 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: glittershark <grfn@gws.fyi>