* show weight instead of size in loot dialog
* chore: auto-format with clang-format
* added configuration
* chore: auto-format with clang-format
* added percentage mode only
* chore: auto-format with clang-format
* use percentage for simple indiator in containers, remove the percentage mode only, change default to simple indicator
* Update src/settings.h
typo
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
* changed the threshold to be applicable only to the containers and se it to 50%.. changed the colors for the weight indicator and the party member name in the loot dialog.. also tweaked label position for bigger critters like Marcus
* restore font to the previous value in case threshold filters out the indicator
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* missing leading space in weight indicator comments in fallout2.cfg
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* use actual runtime value of the size of the columns instead of trusting the setting value
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
* minor reformulation of the comments in fallout2.cfg
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
* explicitly use std::ceil() over ceil() to follow convention in this file and to make copilot happy
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mike Klaas <mike.klaas@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add equipment slots to the companion loot screen.
Items can be equipped directly from player or companion inventory. This also allows switching between party members so you can manage all companion's inventories easily. Does not allow equipping items that would otherwise be disallowed.
Also:
Calls HOOK_UNWIELD when adding/removing equipment, meaning mods like npc armor work
Uses HOOK_CANUSE for weapon use checks
Ctrl-click to equip is not implemented since it already transfers items between the two inventories. I tried making it work only for equippable items (and otherwise transfer), but that felt awkward and random. Ctrl-click unequip is implemented.
* Change `use_walk_distance` to match sfall setting
It's pointless to set this to 0,1 because you don't move if the target is adjacent or yourself, so sfall changes this to "number of spaces" between player and target. We were reading the old ddraw.ini setting before, incorrectly.
Also add a small optimization to not compute path for adjacent targets
* add comment
* return true when distance is self/adjacent
Similar to HRP/Sfall, except:
Does not support non-aspect-ratio-preserving scale mode
Uses vanilla art if it fits without scaling (e.g. 640x480 or non-scaling res like 800x480). The scaled-down HR assets looks considerably worse.
* Bundle Sfall's gl_highlight.ssl
Most mods/distributions assume this is exists since it is bundled with Sfall. It's also a highly requested feature
I decided to merge this as a first-class game config instead of continuing to read mods/sfall-mods.ini. I think most people to this to be a default capability that can be toggled in-engine. Open to other thoughts on the matter. Lost of people will already have sfall-mods.ini configured, which is a reason to keep it the way it was.
* PR feedback
* HRP's edg file support (WIP)
* Update docs and fix bug
* chore: auto-format with clang-format
* EDG: proper scroll blocking based on pre-calculated rects, exactly as in HRP
* chore: auto-format with clang-format
* EDG: fix scrolling past pixel-space bounds with sub-hex map edge mod
* EDG: review fixes
* EDG: proper edge clipping matching HRP logic
* chore: auto-format with clang-format
* EDG: code review fixes and refactoring
* chore: auto-format with clang-format
* EDG: fix clamping
* EDG: show arrow cursor and block events when over clipped area
* chore: auto-format with clang-format
* EDG: option to disable
* EDG: deobfuscate code
* chore: auto-format with clang-format
* EDG: get rid of rect2 and simplify algebra
* EDG: update docs, clarify that squareRect is not implemented
* EDG: square mask support
* chore: auto-format with clang-format
* Code review fixes
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add "trade/loot" context menu for party members.
This was an idea I saw listed on NMA. Veterans of classic Fallout know you can trade with your companions much more easily using the steal skill, But this would be difficult for most new players to discover. This replaces the dialogue option in the long press (which is redundant since it is the default action) with the hand, which is normally used to loot from containers and corpses.
This does introduce a slight inconsistency in the default action, not being present when you long press. how almost everyone will be single-clicking to talk to NPCs.
Also, "you plant..." and "you steal..." messages when trading with companions this way. Put this behind the same flag in case someone wants the original experience.
* Full context menu
* container -> target
* PR feedback
* rebase on main
* rename function
* [HRP] Enable HR dialog screen
(It's not really "hi resolution", just adds a border so it looks less funny.)
Also, picked up @NovaRain's suggestion of centering dialog on the play area if it is large enough, which matches Sfall.
* Expanded barter window from sfall
* Refactor: FrmImage class to lock based on file name, refactor code from last commit
* Soft limit on named art cache size
* Support localized paths for art loaded by name
* Fix visual issue from original sfall implementation where barter window were scrolling down incorrectly + bufToBuf const correctness
* Fix build error and extra destructor call when adding NamedCacheEntry
* Review fixes
* Update src/art.cc
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Review issues fixed, window made transparent to remove black area below the overlap during scroll down
* chore: auto-format with clang-format
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Extended AP bar from sfall
* Rewrote using new Buffer2D and blitBuffer2D + code review fixes
* chore: auto-format with clang-format
* Add ConstBuffer2D + other fixes
* chore: auto-format with clang-format
* Linux build fix attempt
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add basic content config structure
* Moved non-file related settings from ddraw.ini to game.cfg
* Various fixes from self review
* Moved remaining worldmap settings to game.cfg
* Migrate character and text related settings
* Update docs
* chore: auto-format with clang-format
* Add hard-coded foce_base.dat to have reliable location to load CE-provided content from
* Move game.cfg to new base mod
* Automatic migration from ddraw.ini
* chore: auto-format with clang-format
* Removed option to disable cities limit fix
* Minor review comment fixes
* Migrate to /data instead of CE dat
* Migrate to local game#patch.cfg and skip fields with default values
- This was if some mod modifies/overwrites game.cfg later, only fields that user cares about will be loaded from user's override, and said mod is less likely to break
* Fix potential issue when "master_patches" is an absolute path and move recursive mkdir into a helper function
* Refactor code and fix some edge cases: data folder not exists when migrating, ddraw.ini doesn't exist
* Rename face_base.dat -> ce.dat
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>