stash starting inv that doesn't fit
fix save load order
initialize string hint in android build to none
reuse free assigned invlet and move it
Update npc.cpp
Update character_inventory.cpp
Update src/avatar.cpp
Update src/npc.cpp
Update src/avatar.cpp
Co-Authored-By: dobbry-vechur <dumbkevin@proton.me>
update EOC to mention the 'default' option
changed 'map_prefix' to 'world_prefix' where appropriate. Began some work on making monsters work while swapping
moved 'world_prefix' to 'map.h'
made overmap save it's data to /worlds subdirectory if world_prefix is set
monsters are now preserved between worlds
added map memory to things that are saved
add a check to stop teleports in other worlds from causing a world swap
add mention of the EOC change in EFFECT_ON_CONDITION.md
hacky way of preventing toilet related mapgen
add a seperate bool variable from 'new_game', 'swapping_worlds'. Also added a check to prevent revification when swapping worlds, as that might cause crashes.
savefile now stores the world_prefix the player was on
moved world swap functions over to new 'multiworld.h/cpp' files and fixed issues with the maps not being properly saved when swapping
don't teleport player to saved in world before the game has even loaded
add 'u_in_world' and add an example usage to 'EOC_world_swap'
made u_teleport display a succesful message if either the teleport or the world swap succeded
Delete sta1xwkz
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bump savegame version number on test
apply clang tidy suggestions
applied more clang-tidy suggestions
Apply suggestions from code review
Co-authored-by: Brambor <tondadrd@seznam.cz>
remove pointless comment
Update multiworld.cpp
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
add code optimization
remove redundant declarations
Update multiworld.h
* Remove STATIC macro a-f
Fixes a typo in character_armor where a damage type was somehow being implicitly cast to a bool?
* Remove STATIC macro g-i
Trusts a post 0.H todo comment to do with cables, the PR was huge so I'm just hoping this got migrated properly
* Remove STATIC macro j-z
* Remove make_static.h includes
* Cleanup
* Remove STATIC macro /tests
* Remove comments yesterday me left for today me
* Update clang for STATIC macro removal
* Cleanup round 2
* Cleanup round 2
The A-Z before a-z thing gets me every time >-<
* get rid of npctalk_var_ prefix for eoc variables
* cleanup after #77055
* deprecate more of type and context
* migrate item vars, make migration happen only once
* doc updates
* migrate u/npc/monster variables
* fix context var migration
* remove `substr( 12 )` in math parser
* move migration to a single function where possible
* no auto
* please clang
* Please clang more
* fix submap load test
* clean up after #77656
* cleanups after #77520
On the overmap, there is either no information about a tile, or full
information. This is limited, and makes scouting a fairly boring affair
of going to high places with binoculars for full map information, and it
gives a lot of meta information.
Replace that with five levels of vision:
unseen, vague, outlines, details, full.
This just does the grunt work of adding the levels, and working them
through all the various places they're needed.
* Copy wheel_caster item, vehicle part, and recipe
* Change desc & values for item, recipe, and vehicle part
* Change a few vehicles to use large casters
Update a test to match
* Autoformatting
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Gambeson fixes
Warmth can't be defined per portion.
* Fix EOC iuse actor fields
EOCs can't take/don't have these fields.
* Fix palette comments
* Remove ups_charges from monster guns
Now energy drain.
A
* common is an NPC class attribute
Not an NPC attribute
* Typo fix
* use_lose_var does not have a value
* Restore unvisited member checking
* Enable clang-tidy check modernize-avoid-c-arrays
Convert various arrays to std::array
* Fix more array warnings
These issues were found in CI due to it compiling with different
features than me.
* Don't us sizeof( std::array )
It's clearer to use .size().
Our string_id constants were a mixture of temporaries, locals, and
globals. Pull them all out as globals, for consistency and efficiency.
The efficiency comes from the fact that each string_id instance caches
its respective int_id, and sharing one instance means that value need
not be recomputed.
Catch2 provides a customization point for converting our types to
strings by specializing the StringMaker template.
We have some specializations in stringmaker.h, but this feature was only
working intermittently. I finally figured out that was due to an ODR
violation. The test files that didn't include stringmaker.h were
compiling a different specialization than the ones that did.
Re-jig the test includes so that any file including catch.hpp also
includes stringmaker.h, thereby ensuring that the custom
specializations are used everywhere and there is no ODR violation.
I achieved this by adding a new cata_catch.h header and making all
existing headers include catch.hpp via the new header.
* Initial check for static int_ids
int_ids with static storage duration are dangerous because they can
start to refer to the wrong thing when game data reloads. This has
caused problems in the past.
Add a check for such variables, and some tests.
* Remove some static int_ids
Fix issues detected by new check by replacing some static int_ids with
their respective string_ids.
Some were just unused, so got deleted instead.
Some cases suppressed, including the furniture and terrain ids, since
they were the most numerous and widely used, so that seemed the riskiest
change.
* Change _ctype.h and __locale to cctype and clocale
* Change _wctype.h to cwctype in game.cpp
* Change __functional_base to functional
* Remove libcxx internal headers
* Remove UNIX system headers
* Fix clang-tidy error with -nostdinc++
calorie precision is only used internally, all external methods should
be dealing with kcal.
Having calorie precision just enables removing rng-based rounding from
metabolism functions, without losing detail.
There was a very minor change in the Calories of some crafted items, as
is caught in the tests.
Add tests for each part of submap loading (except for camps, which
appear to be obsolete).
Each test tests a single separate area to prevent cross-contamination,
and as such each has a separate JSON definition.
For tests using the four corners and the point (4,7), this is to ensure
no rotation or anything occurs, and the extra point is to make sure
testing just the corners doesn't bite us somewhere.
All JSON is either taken from or inspired by real JSON produced by our
submap deserializer.