80 Commits

Author SHA1 Message Date
dumb-kevin 8522605684 Use flat_set for item/itype/pocket flag storage
- Swap std::set<flag_id> for cata::flat_set<flag_id>
- Update FlagsSetType in item, itype, and pocket_data
- Replace emplace with insert on tag caches
- Adjust bionics_test cast to std::set<json_character_flag>
2026-04-24 18:33:04 +04:00
maniak1349 bf5649e6f5 Make bionic shutdown on emty fuel an option
* Add parameter and logic to bionic
* Add ability to toggle it in bionics UI with a hotkey
* Shutdown on empty fuel is off by default
2025-12-25 13:03:51 +03:00
maniak1349 0cb3222a53 Make run-clang-tidy happy 2025-12-22 17:36:34 +03:00
maniak1349 634945514d Adjust power bionic tests
* Adjust power bionic tests for new behavior
* Add a test for metabolic interchange
2025-12-22 10:56:02 +03:00
DukePaulAtreid3s a09f168d63 Initial Removal of the Solar Backpack (#81880)
* Initial Commit

* Update migration_items.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* remove the test that checks bio_cable works with solar backpack

* Please clang tidy

* Yeet

* Update migration_items.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update bionics_test.cpp

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com>
Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>
2025-08-14 14:55:06 +02:00
PatrikLundell f9900fccc2 Merge pull request #79670 from PatrikLundell/mapify
mapify: split ammo remaining into link and non link
2025-02-16 14:49:56 -06:00
PatrikLundell 30b83d6c34 add needed includes 2025-02-13 09:15:16 +01:00
PatrikLundell 7bfa56fa99 Merge branch 'master' into mapify 2025-02-13 08:46:56 +01:00
PatrikLundell 0ac675121c mapified a little item prompting a lot of vehicle 2025-02-11 15:10:00 +01:00
moxian 2ee44002fd Mechanically IWYU the tests
python3 ~/github/include-what-you-use/iwyu_tool.py -j5 -p build $( find
src/ tests/ -maxdepth 1 -name '*.cpp' | grep -v -f
tools/iwyu/bad_files.txt )  --  -Xiwyu --comment_style=long -Xiwyu -
-max_line_length=1000 -Xiwyu --cxx17ns -Xiwyu
--mapping_file=../tools/iwyu/cata.imp   | tee out/iwyu/f-a-01.txt >
/dev/null

followed by

cat out/iwyu/f-a-02.txt | python3
~/github/include-what-you-use/fix_includes.py --reorder --nosafe_headers

followed by manual fixups of <stddef.h> -> <cstddef> and similar.

tests/generic_factory_test.cpp gets mangled very badly (IWYU bug) so
it's excluded from the list.

Code size:
includes:
$ cat obj/tiles/*.inc | wc
 288068  576136 17898260
$ cat tests/obj/tiles/*.inc | wc
 167044  334088 10465766

post-processed source (clang -E):
./make_preproc.sh src/
68567896 177775140 2134075721
./make_preproc.sh tests/
39341957 102891720 1243323710
2025-02-10 00:46:57 -08:00
Procyonae 2a922a6c59 Appease our clang overlords
Failing to remember Z before a strikes again
2025-01-10 20:14:36 +00:00
Procyonae 982df19d0f Change /tests remaining uses of raw string item initialisation to use itype_id s
"remaining uses" being somewhat of an understatement -_-
2025-01-10 15:31:15 +00:00
PatrikLundell fbf71a0f66 typified game.h and .cpp 2024-12-07 15:55:25 +01:00
Kamayana 64aedcae31 General refinements to the link/cable code (#70692)
* Remove unused `plug_in` iuse declaration

* Simplify `has_loose_end` calculation

* Make `get_remote_part` use vpart_reference

* Rename set_link_traits to update_link_traits

* Adds link_to to simplify link initialization

Also reorders many link-related lines for consistency/readability

* Rename "s_vp" to "sel_vp

* Use rl_dist for length check on connection

* Move app connection code into link_to

* Move `has_state` functions out of the link struct

This lets them be used on items without an active link without segfaulting

* Rename t_veh_safe to t_veh & s/t_state to source/target

These names have bothered me for a while. t_abs_pos and s_bub_pos are also wordy but at least provide important distinction.

* Make link a private variable safely accessed via link()

* Add force_reset_link, which ignores the unspooling threshold

* Make the respool threshold a static const

* Clean up extension cable inventory filter

* Use a variable to reduce link() calls in link_up_actor::use

* Add comments to new link functions

* Remove unnecessary checks of both can_link_up and has_link_data

* Move valid connection checks into link_to

* Adds link_name function for getting cable names

Used to reduce code repitition in choosing between, for ex., "cable" and "smart phone's cable". Should make it easy to expand if the link system ever gets used for anything other than an electrical cable in the future.

* Edit process_link's length checks for clarity

* Minor comment change

* Change force_reset_link into a parameter of reset_link

* Fix links breaking in saves from old versions

Sadly this means giving up on the nicely-ordered groups in the link_state enum. Should've given each group a set start value, past-version-of-me!

* Unused lambda

* Fix CBM cable links

* Unused variables

* clang tidy
2024-01-08 23:11:49 -06:00
mqrause bd211963e6 move item_pocket::pocket_type to it's own header 2023-11-27 13:22:35 +01:00
Alexey 07356b65a5 Normalize TEST_CASE names (#66241)
* Convert integer parsing test to use normal TEST_CASEs

* Rename test name too similar to another

* Test to enforce normalized test names

* Normalize TEST_CASE names (scripted)
2023-06-17 13:57:19 -03:00
Alexey 7cc39bbce7 More test state resets (#66173)
* Restore map's abs_sub after map_coordinate_conversion_functions

./tests/cata_test "map_coordinate_conversion_functions","Mattack dialog condition test"

* Rewind time in biometrics tests

./tests/cata_test "basal metabolic rate with various size and metabolism","mutations may affect character metabolic rate"

* Don't place avatar on invalid zlevels

./tests/cata_test "npc_compare_int","npc_can_target_player"
./tests/cata_test "npc_arithmetic","npc_can_target_player"

* Martial art test should clear map

./tests/cata_test "walls should connect to walls as end pieces","Martial art technique conditionals"

* Clear map in turrets test

./tests/cata_test "vehicle_ramp_test_61","vehicle_turret"

* Clear map in gun repair test

./tests/cata_test "cube_direction_add_om_direction","Gun repair with degradation"

* Fix bionic test order dependency

./tests/cata_test "fueled bionics"

* Build light cache in player_activities_test

./tests/cata_test "grenade_lethality_scaling_with_size","activity interruption by distractions"

* Clear map in pockets test

./tests/cata_test "character should lose moves when opening or closing doors or windows","multipocket liquid transfer test"

* Make explicit flag for crafting cache invalidation

* Clear more avatar fields

* Clear time in weary_recovery

./tests/cata_test craft_available_via_vehicle_rig,vision_see_wall_in_moonlight,vision_moncam_basic,weary_recovery
2023-06-15 11:08:46 -03:00
Ruminator24 d971500cbb UPS no longer automatically gets drained (#66020)
* Update electronics.json

* Update electronics.json

* Update electronics.json

* Update electronics.json

* Update data/json/items/tool/electronics.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update data/json/items/tool/electronics.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update data/json/items/tool/electronics.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update data/json/items/tool/electronics.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update electronics.json

* Update electronics.json

* Update electronics.json

* Update migration_items.json

* Update migration_items.json

* Update electronics.json

* Update vehicle_interact_test.cpp

* Update electronics.json

* Update data/json/items/tool/electronics.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update data/json/obsoletion/migration_items.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update tool_quality_test.cpp

* Update crafting_test.cpp

* Update npc_attack_test.cpp

* Update bionics_test.cpp

* Update electronics.json

* Update power_supplies.json

* Update activities_hobbies.json

* Update clothing.json

* Update gear.json

* Update defense_mode.json

* Update electronics.json

* Update lab_security.json

* Update locations.json

* Update locations_commercial.json

* Update main.json

* Update military.json

* Update science_and_tech.json

* Update shops_trades.json

* Update tools.json

* Update tool_armor.json

* Update microlab_special_tiles.json

* Update classes.json

* Update items_generic.json

* Update NC_SOLDIER.json

* Update robofac_intercom_missions.json

* Update nested.json

* Update tools_electronic.json

* Update electronics.json

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-09 09:24:55 -03:00
Kamayana dbcd9a3ce9 Connect items to electrical grid; improved cables (#64334)
* Move power cord from appliances to cables; rename POWER_CORD flag to AUTO_CABLE

* Add message when attaching extension cord

* Fix shift() calling actualize too early

* Remove unnecessary variable

* Use variable for has_item; spacing

* Change ordering in preparation

* Reel in disconnected cables when picking them up again

* Add CABLE pocket type

* Add device power cord

* Add PLUG_IN action to laptop

* Rewrote process_cable to allow cables to stay active outside player inventory

* Have device plugged into electrical grid gain battery charge

* Revamp finding active cables for processing, instead find via plugged in devices. Much more CPU efficient.

* Reset cable max charges read variable

* Add variables for cable charge inverval and efficiency

* Add a warning when a carried cable is stretched to its limit

* Change plug_in from iuse to an iuse_actor

* Adjust cable messages

* Add const version of cables()

* get_cable_target() use const p to be usable in more places

* Add ammo_sufficient() overload that checks connected electrical grid, use in invoke_item

* ammo_consume draw power from connected grid

* Calculate charge interval by wattage

* astyle

* Make cable length more intuitive

* Lowered plug in movecost

* Fix cable reference

* Add TODO

* Adjust cable CBM message wording

* Change all cable state names to be more descriptive

* Reuse plugged in tag

* Don't collate plugged in items

* Don't spill cable pockets

* Update lit laptop's cable wattage

* Copy EBOOK pocket for CABLE pocket

* Add CABLE_PORTS tag for vehicle parts that should accept cable connections

* Add unplug functionality

* Create cable_link struct for containing information about cable links. Replaces get_cable_target and most of the cable item variables

* Remove cables properly via container processing

* Improve feedback for plug in action, such as highlighting valid tiles

* Remove bracket I missed

* Plug in item before processing it

* Update cable connection points when their connected vehicle moves

* Truncation

* Replace remaining cable variable usage

* Only give loose cable alert once

* If a cable exists already, use it to plug in

* Rename wattage to charge_rate, adjust jo loading

* Move cable reference addition after everything

* Cable link power draw

* Include tool power draw

* Cable debug message

* Reuse variable

* Move cable_link state to top

* Item active power draw

* Add a "check links" bool to ammo_remaining to ensure the inclusion of cabled ammo only affects functions we want it to

* Moved cable_state enum to enums.h/item_factory and adjusted it

* Serialization of cable variables

* Move cable handling from vehicles to the map; made cable loading more robust

* Add vehicle item processing to actualize, so cables inside vehicles don't break when entering the reality bubble

* Add TODO

* Add debug_mode check

* Move max length to cable struct for optimization

* Missing std namespace

* Only process cables when they're fully in bounds

* Serialize max_length

* Make Minimum cable slack 0 instead of 1

* Disable spooling time for now

* Use absolute charge_rate for interval

* Move remaining cable item vars to the struct

* Moved linked battery charging to its own function; improved efficiency by checking interval early; added negative power draw functionality to allow charging vehicles with linked items

* Add warning about cables longer than the reality bubble

* Rename AUTO_CABLE to AUTO_DELETE_CABLE - better name for what it is; replace some uses of it to use CABLE_SPOOL instead

* astyle

* Unified cable language, all cable items are "cable" and connecting them "link"

* Documentation for link up action

* Add some more error messages

* Use label instead of tname to stop incongruous messages like "device (plugged in) has become disconnected!"

* More info

* JSON lint

* Tag rename in tests

* Added smartphone cable again

* Update part function

* Simplify setup link

* Add time processing to battery drain; will now only drain once a turn, and will drain extra for time spent outside reality bubble

* Add safe_reference functionality to vehicle

* Fix charge_linked_batteries to return consistent charge values in spite of staggered charge timing

* BIG rewrite, focused on simplification, optimization, and adding comments to everything.

* More documentation.

* astyle

* Made debug cable even longer, since cables can now be longer than the reality bubble. Added "debug" to name to make it easier to find for testing

* Rebase fixes

* Moved cables.json from \vehicle to \tool

* AUTO_DELETE_CABLE doc

* std::optional update

* nullptr parent_item check

* net_battery_charge_rate always add cable link power

* Use vehicle pointers for cable power transfer

* remove comment

* Update src/iuse_actor.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Remove prev_state since it's unused

* Make link data use value_ptr

* Set vehicle pointer on load

* Move link debugmsg to reset_cable

* Move turns elapsed into the parent_item section since nothing else uses it

* Only initialize link when needed

* Also exit active cable early with no_attachments

* Unified all cable use functions; split cable state in two for each side of the link; renamed some things

* Made tow cables not disconnect when unrelated parts are removed

* Process solarpacks like the UPS

* Don't allow linking already linked vehicles

* Add valid vp check to cables

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix test types

* Separating && statement

* Add reeling activity for long disconnected cables

* Better info for cable action description

* Rebase cleanup

* Refining documentation

* Split vehicle connections between dashboard ports and battery; jumper cables only attach to batteries, other cables only to ports

* Fix compilation errors

* Cable VP unmount now removes remote parts and drops undamaged item

* Disconnect cables when cabled vehicle gets racked

* Tone down loose cable message

* Disable single target autoselection feature for cable linking specifically

* Move parent item disconnect earlier

* Update comments

* Misc fixes

* Change link_up default targets

* Remove rendundant cable_links parameter from ammo_remaining

* Make cabled devices use reeling activity

* Make cable pockets automatically created for non-cable items with link_up actions, to avoid having to add the same exact CABLE pocket to every single device with link_up

* Add link_up action to eink tablet, mp3 player, and portable game

* Add NOLINT(cata-serialize)

* Remove unneeded includes

* NOLINT

* Separate && and ||

* Refine menu collation for cables

* Re-add the cable_links parameter for ammo_remaining

* Remove unneeded parameter

* Update vehicle part functions

* Re-add unlubricated

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-28 10:03:52 +02:00
Anton Simakov af4a7b3d35 Fog and mist weather (#64954)
* initial commit

* no message

* improve calculations, currently uses test values

* oops

* no message

* no message

* fixing the wrong values, remove debug message

* tests: override weather in tests that need clear vision

* Andrei's fix of vision test

* vision_junction_reciprocity fix

* weather realism test fix

---------

Co-authored-by: andrei <a12l+git@runbox.com>
2023-04-21 16:24:02 -03:00
Binrui Dong 32774b37da Migrate from cata::optional<T> to std::optional<T> (#64333)
Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
2023-03-20 20:11:23 -07:00
Hirmuolio 4ee9085113 Rewrite bionic fuel system (#61049)
* energy_consumption as energy

* units::energy fuel

* units::energy material

* item fuel adjustments

* bionuc reload window

* bionic reload window

* typo

* bionic power from pedaling

* adjust electric vehicle tests

* mods

* mods

* rename some variables

* cleanup

* temp fix bionic

* temp fix treshold

* fuel tests

* adjust mod

* adjust mod

* adjust mod

* rename variable

* gasoline json

* flags

* get fuels

* remote ups

* veh and solar

* auto toggle

* testing

* fueled bionic

* cable vehicle

* cable solar

* metaboilism

* solar

* cleanup

* metaboilism messages

* remove old

* rename

* combine with passive

* fuel in bionic window

* remove fuel eating

* more tanks

* fix restriction

* fix restriction

* base test pocket

* material limit

* doc

* more items

* fuel from container pockets

* lint

* flat_set

* remove unused get_fuel_available

* remove unused

* remove unused

* remove unused

* remove unused

* astyle and tests

* migration

* mods

* broken npc code

* remove autostart

* treshold improvements

* treshold for muscle

* improved treshold

* add only missing

* remnants of fuel eating

* applies only to fueled

* fuel consumption display

* unused

* itype

* rename

* carble connection fixes

* sort

* tests

* muscle check

* astyle

* comment

* cable test

* cable solar

* better test

* sort

* better cables

* test empty battery

* fix corpses being made out of "

* name typo

Co-authored-by: Fris0uman <41293484+Fris0uman@users.noreply.github.com>

* name typo

Co-authored-by: Fris0uman <41293484+Fris0uman@users.noreply.github.com>

* not npc usable now

* fuel saving ui

* astyle

* get fuels only when necessary

* reorganize bionic functions

* fuel saving for cable

* test for running out of fuel

* fix running out of fuel

* fix test

* may not count by charges

* avoid warning

* test mod fix

* clang

* cleanup test

* fuel_energy per unit

* unnecessary comment

* outdated vehicle code

* maybe fixes test

Co-authored-by: Fris0uman <41293484+Fris0uman@users.noreply.github.com>
2022-09-21 13:33:23 +02:00
mqrause 979718d90a change return type of Character::get_wielded_item to item_location (#58666)
Co-authored-by: mqrause <martin@qrause.de>
2022-07-09 02:03:09 -04:00
Álvaro 86b07980a0 Swappable weapons in CBMs (#53253) 2021-12-23 17:29:16 -08:00
Álvaro a1c3b69715 Rework maximum bionic power calc (#53165)
Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
2021-12-12 22:34:50 -08:00
John Bytheway e95a4fc9b8 Promote string_id constants to global statics
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.
2021-11-19 19:10:09 -05:00
Hirmuolio 5dbeafa1b9 Refactor magazine code to be less picky (#51994)
Co-authored-by: Wishbringer <wishbringer@telia.com>
2021-11-11 23:08:20 -08:00
Hirmuolio ee70ec52a4 Remove remnants of fuel eating (#51849)
* remove can_consume
2021-09-25 08:50:52 -07:00
Ramza13 56bb28b0ae Ding dong 2021-08-25 17:38:36 -04:00
Eric 51520f6245 Move more player to character (#50971)
* player to character

* Update npc_talk_test.cpp
2021-08-23 00:58:51 -07:00
John Bytheway ebd549b300 Fix StringMaker ODR violations in tests
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.
2021-07-03 07:42:06 -07:00
Binrui Dong 9fdb7ef59c Run IWYU
* 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++
2021-02-06 00:18:41 -05:00
Fris0uman 8986639e43 fix test 2020-11-21 13:24:48 +01:00
John Bytheway b285a13080 Make time_point( int ) constructor explicit
Resolves a TODO on that constructor, and one more TODO elsewhere due to
the resulting refactoring.

time_point was implicitly convertible from int.  This led to unclear
code.  In particular, the item constructor took a time_point and a
quantity, and these two ints appeared adjacent with no obvious way to
see what they meant at call sites.

Make the constructor explicit, so the conversion is no longer implicit.
Update the rest of the code accordingly.

In most cases switched from 0 to calendar::turn_zero, which is
equivalent.  In a couple of places, used start_of_cataclysm instead,
when it seemed more appropriate (such as birthday of toilet water).
It's possible there are more cases which should have been something
other than turn_zero.
2020-11-10 11:21:02 -08:00
KorGgenT d6bfde51a1 change give_and_activate_bionic to just add_bionic 2020-09-01 13:18:06 -04:00
Kevin Granade c5ccf0c2c7 IWYU for tests (#42806) 2020-08-09 09:46:57 +03:00
Kevin Granade 6d1841ac67 Precompiled Catch2 header (#42453)
* Hoist catch.hpp include to the top of files

* Precompile the catch header in tests
2020-07-29 01:28:26 +03:00
UrbanCMC 3a7caf6602 Update bionics tests 2020-07-16 13:53:12 +02:00
Kevin Granade 438774d386 Global getters (#41347)
* Make Character::stat into a standalone enum class

Enables forward declaration

* Remove player centric overload and unecessary include

* Remove player.h dependency from trap.cpp

* Add singleton-like accessors for avatar, map, weather and event_bus

* use accessors to remove includes of game.h
2020-06-16 16:48:45 +03:00
KorGgenT efabc25ab0 update tests with new logic 2020-05-20 16:49:20 -04:00
KorGgenT a97958db0a Update bionics_test.cpp 2020-05-02 16:05:18 -04:00
John Bytheway e189957ff2 Run IWYU 20200408 (#39364)
* Helper script to run IWYU

* Run IWYU

* Update deprecated headers

* Run IWYU again

* Re-suppress cxxabi.h

This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.

* Remove extra SDL header includes

* Fix ime.cpp headers

Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.

* Update game.h

* Move new point.h includes inside #ifdef

* Re-add platform_win.h to mapsharing.cpp

* Apply suggestions from code review

Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>
2020-04-10 12:16:19 +03:00
Eric Pierce baf07c1a23 Add tests for food fun_for (#38678)
* Add first draft and TODOs of Character::fun_for
Includes:
- non-food is no fun
- sickness makes food less fun
- rotten food is disgusting (except to saprovore/phage)
* Add tests for cold and melted food
* Add dog/cat food fun tests
Change "avatar" to "character" (although tests use an avatar to make
things easier, it is a Character class method being tested).

Also note a couple TODOs for possible refactoring - although the
`fun_for` method is part of the Character class, a couple of its
calculations do not depend in any way on the character (namely, the COLD
and MELTS modifiers). These could be moved to the base
`get_comestible_fun` method, since they are inherent properties of the
food and its condition/flags, not on the Character.

* Add gourmand test; tidy up names and tags
* Factor out give_and_activate_bionic
Moving to tests/player_helpers.h so other tests can use it
* Add tests for monotony, taste blocker CBM
2020-03-14 07:35:58 +00:00
Kevin Granade 5fa9146f83 Revert string centralization (#38321)
* Revert "Moved more string consts into single file (#38237)"

This reverts commit 49877426ce.

* Revert "Moved more string consts into single file (#38220)"

This reverts commit d9c6079762.

* Revert "Move string consts into single file (#38195)"

This reverts commit b1b48badff.

* Revert "More string consts into single file (#38189)"

This reverts commit 4fffd96143.

* Revert "More string consts into single file (#38183)"

This reverts commit 05940bfe3a.

* Revert "Move string consts into single file (#38184)"

This reverts commit 19c569826b.

* Revert "Move string consts into single file (#38181)"

This reverts commit 55cabb794c.

* Revert "Move more string consts into single file (#38175)"

This reverts commit 571efb2f8e.

* Revert "Merge pull request #38176 from Ramza13/string_consts_and_more"

This reverts commit 9c9835ff08, reversing
changes made to 07995cdda5.

* Revert "Move more string consts into single file (#38169)"

This reverts commit 07995cdda5.

* Revert "Merge pull request #38168 from Ramza13/even_more_string_consts"

This reverts commit 2bf1c1ea18, reversing
changes made to 24a32c0d1a.

* Revert "Merge pull request #38141 from ZhilkinSerg/sa-2020-02-18"

This reverts commit 142295b1dc, reversing
changes made to f98c67d3c3.

* Revert "Move string consts into single file (#38158)"

This reverts commit 50059c8a24.

* Revert "Merge pull request #38157 from Ramza13/string_consts_more_flags"

This reverts commit 8ec8e78959, reversing
changes made to 72ef0222a0.

* Revert "Move string_consts"

This reverts commit 0a6bf67436.

* Revert "Merge pull request #38146 from Ramza13/battery"

This reverts commit 9286722b74, reversing
changes made to e9f1cd7787.

* Revert "Merge pull request #38134 from AMurkin/rename-blob"

This reverts commit 06f72d2b7d, reversing
changes made to bcfe0741e1.

* Revert "Yet more string consts moved out (#38130)"

This reverts commit b5f18f3574.

* Revert "Merge pull request #38115 from Ramza13/string_consts_game"

This reverts commit 98076577b0, reversing
changes made to 036465f517.

* Fixup to the picked_up

* RE-inline item_location initialization

* Update character.h

* Update item.cpp

* Update item.h

* Update item_action.cpp

* Update item_factory.cpp

* Update point.h

* Update safemode_ui.cpp
2020-02-25 23:00:09 +03:00
Ramza13 e6cb983381 Move string consts/rename string consts 2020-02-19 22:31:10 -05:00
ZhilkinSerg e1f432d11f Code style (2020-01-13) (#37021)
* Appease clang
* Remove excessive empty lines
* Remove excessive whitespaces before semicolons
* Remove excessive empty lines (tests)
* Remove excessive whitespaces before semicolons (tests)
2020-01-14 01:31:43 +00:00
John Bytheway 095bd51974 Use C++-style includes
Convert all C library includes to their C++ equivalents (stdio.h ->
cstdio, etc.).
2019-12-24 17:04:16 -05:00
Fris0uman e83f389ba0 Move battery system CBM to json (#35093) 2019-10-30 00:01:19 -07:00
Curtis Merrill 3ece2826bc Encapsulate bionic power (#34517)
* make power_level and max_power_level private

adds setters, getters, and some other helper functions for use as well

* change charge_poewr to mod_poewr_level

* update tests to use power level getters and setters

* reviewer suggestion
2019-10-08 10:26:44 +03:00
Fris0uman 52ca729dbc Uses the units::energy infrastructure for bionic power (#34288) 2019-10-01 23:58:21 -07:00