Compare commits

..

1 Commits

Author SHA1 Message Date
Maleclypse 1f26c7b148 Update changelog.txt 2026-04-26 13:04:43 -05:00
48 changed files with 179 additions and 767 deletions
+1 -3
View File
@@ -146,7 +146,6 @@ jobs:
title: GCC 9, Curses, LTO
ccache_limit: 7.5G
ccache_key: linux-gcc-9-lto
extra_package: g++-9
- compiler: clang++-18
os: ubuntu-latest
@@ -187,7 +186,6 @@ jobs:
title: GCC 9, Ubuntu, Tiles, Sound, CMake
ccache_limit: 1G
ccache_key: linux-gcc-9-cmake
extra_package: g++-9
name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
@@ -244,7 +242,7 @@ jobs:
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev ccache gettext parallel ${{ matrix.extra_package }}
sudo apt-get install libncursesw5-dev ccache gettext parallel
sudo locale-gen en_US.UTF-8 de_DE.UTF-8
- name: install SDL2 dependencies (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.tiles == 1 }}
+1 -1
View File
@@ -89,7 +89,7 @@ jobs:
id: runvcpkg
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgGitCommitId: 'f6672d8e480ccdecddfad3fd1b838ba369ffe6cd'
vcpkgGitCommitId: '3b57fb2e1ff55613db14d2aaf0a30529289c7050'
- name: Integrate vcpkg
run: |
+1 -1
View File
@@ -173,7 +173,7 @@ jobs:
id: runvcpkg
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgGitCommitId: 'f6672d8e480ccdecddfad3fd1b838ba369ffe6cd'
vcpkgGitCommitId: '3b57fb2e1ff55613db14d2aaf0a30529289c7050'
- name: Install dependencies (windows msvc) (3/4)
if: runner.os == 'Windows'
run: |
+1 -136
View File
@@ -1,140 +1,9 @@
# 0.I-1
## Bugfixes and improvements:
Item info panel can now be scrolled properly
Game no longer shows an error about layering.json when using MSXotto+ tileset
Terminal version of the game no longer has up 100% CPU usage
Fixed LIXA teleportation, clarified text about entering LIXA and added alternative entry method
Fixed zone-related crashed on loading a save
Allow player to pick up items NPCs have reserved for tasks
Tools recharging from a car catch up their charging when returning to reality bubble
Show "not castable" message in spellbook menu only when spells are actually not castable
Actual NPC name shown instead of <npcname> for messages whe NPC wields an item
Wooden floors are now deconstructed with a nail puller instead of angle grinder
Removed error messages about inconsistent morale
Food heating UI now shows right amount of time and energy for charge-based items
AR glasses can now take photos and store data correctly
Fixed a bug that sometimes removed temporary morale bonuses
Aftershock: Lynx Explorer vehicle bought from salvor encampment is now your property, not UICA's
Magiclysm: Giant Growth spell can no longer be spammed
Mind Over Matter: monster taking unsourced damage with Obscurity in effect will no longer crash the game
Innawood: bronze tongs can be made without already having tongs
# 0.I
## Highlights:
Zombies can lie in wait for you, their armor can be shattered, and they'll decay into bones over time.
Trees are fully trees - they have tops and you can climb them!
Items can now have fixable faults, on the road to replacing generic damage.
Overmap locations have different vision levels. Some things are easy to see from afar, some things are more difficult.
You can now take over and loot camps, pending nobody is there to stop you.
Enjoy a beautiful sunrise or sunset. What a time to be alive.
Hub 01 expansion, including but not limited to missions, bespoke armor, and exoskeleton repairs.
Yrax shenanigans. They may be hard to find, but they're there...
Boomers can give you eye infections!
Duh-nuh-nuh-nuh-nuh-nuh-nuh-nuh, bat mutants.
More Exodii guns (also new normal firearms).
Several new eldritch abominations to kill you!
Revamped many maps, including hospitals and military outposts.
Long list of updates to mods like Aftershock, Xedra Evolved, Mind Over Matter, Sky Island, and many more.
Massive oil platform in the ocean.
Allow pushing/pulling furniture directly onto and off of vehicles that can load them. Get that fridge home!
The player can swap between defined outfits with the 'set of clothes' item.
River generation overhaul - rivers are more rivery!
Mutations, and your chances of getting bad ones, are based on how many mutation trees you've mutated into, and how many mutations you have.
ASCII art for hundreds of items.
Cities can have damage from the Cataclysm riots.
## Statistics:
7642 files changed, 1035565 insertions(+), 501329 deletions(-)
13,412 commits
486 authors
242 new authors
New game entities (core):
Items:
156 articles of clothing and armor, 31 books, 123 comestibles, 254 tools,
50 guns and gun related items, 14 ammunition variants
Mapgen:
1119 item spawn groups, -48 monster spawn groups,
6 city buildings, 1 vehicle spawn group, 7 overmap locations, 91 overmap terrains
Player Traits:
12 proficiencies, 13 practice actions, 15 professions, 47 effect types, 70 mutations
2 start locations, 6 starting scenarios, 10 fighting techniques
5 activity types, 7 morale types, 14 vitamins, 4 dreams, 4 bionics, 2 mutation types,
2 character stat modifiers, 1 proficiency category, 1 mutation category
UI and Sidebar:
40 nested categories, 173 ascii art, 346 widgets, 37 construction groups,
2 item categories
Crafting:
4 construction activities, 48 crafting requirements, 137 uncraft recipes
NPCs and Interactions:
376 conversation topics, 12 npc definitions, 3 npc classes, 3 missions, 1 faction
Achievements:
12 achievements, 1 event metadata entry
Map Traits:
62 furnitures, 119 terrains, 72 field types, 35 traps, 1 weather type
Monsters:
159 monster definitions, 32 harvest entries, 9 monster attacks, 93 monster barks
4 weakpoint sets, 36 monster factions, 2 monster species
Item Traits:
13 ammunition types, 8 ammunition effects, 17 materials, 4 tool qualities, 36 gun faults
Vehicles:
2 vehicle definitions, 58 vehicle parts
Magic:
52 spells, 17 enchantments
Misc:
231 effect on condition entries, 93 text snippets, 74 json flags, 14 loot zones
New game entities (mods):
Player Traits:
897 mutations, 537 effect types, 46 bionics, 143 professions, 41 proficiencies.
11 start locations, 35 body parts, 9 mutation categories, 8 mutation types.
1 practice actions, 25 starting scenarios, 11 morale types,
5 skills, 0 addiction types, 1 scent type
Items:
483 tools, 245 articles of clothing and armor,
90 guns and gun related items, 183 comestibles, 181 books, 76 ammunition variants
Mapgen:
227 mapgen entries, 851 item spawn groups,
37 map extra definitions, 53 city buildings, 6 overmap locations,
55 overmap special definitions
Magic:
746 spells, 69 enchantments
Crafting:
443 crafting recipes, 59 disassembly recipes,
141 crafting requirements, 9 constrution activities
Monsters:
727 monster definitons, 80 monster barks, 19 species, 30 monster factions.
81 harvest entries, 16 monster attacks, 10 weakpoint sets
NPCs and Interactions:
462 conversation topics, 122 missions, 47 npc definitions, 64 npc classes
Map Traits:
197 terrain types, 194 furniture types, 31 field types, 8 weather types
UI and Sidebar:
9 construction groups, 9 nested categories, 57 sidebar widgets, 178 trait groups.
6 proficiency categories, 3 recipe categories, 1 overlay order specifications
Item Traits:
27 ammunition types, 31 materials, 3 tool qualities, 3 relic definitions, 19 ammo effects
Vehicles:
16 vehicles
Achievements:
49 achievements
Misc:
2423 effect on condition entries, 38 json flags, 56 text snippets
## Features:
Toggle to highlight areas revealed by using map items
@@ -179,11 +48,7 @@ New characters get random natural hair color during character generation
Binoculars now also increase 'detailed' vision range, not only max vision range
Character randomization sometimes produces 'crossdressing' characters
Dialogue: JSON fields for displaying hidden responses
Added check for stealing prior to inserting items into container
Added check for stealing prior to wearing
Added check for stealing prior to obtaining book to read
Added check for stealing prior to reloading items
Added check for stealing prior to activating items
Added checks for stealing in many different ways
Adds throwing practice tools
EOCs modifying calories track spent calories
Mutations can have a custom activation message
+20 -20
View File
@@ -55,7 +55,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "60 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "2x4", "count": [ 7, 15 ] }, { "item": "nail", "charges": [ 15, 30 ] } ],
"pre_terrain": "t_window_empty",
"post_terrain": "t_floor"
@@ -185,7 +185,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "30 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "2x4", "count": [ 5, 10 ] }, { "item": "splinter", "count": [ 10, 20 ] } ],
"pre_terrain": "t_floor",
"post_terrain": "t_dirt"
@@ -198,7 +198,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "30 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "2x4", "count": [ 5, 10 ] }, { "item": "splinter", "count": [ 10, 20 ] } ],
"pre_terrain": "t_floor_noroof",
"post_terrain": "t_dirt"
@@ -211,7 +211,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "30 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "2x4", "count": [ 5, 10 ] }, { "item": "splinter", "count": [ 10, 20 ] } ],
"pre_terrain": "t_floor_waxed_y",
"post_terrain": "t_dirt"
@@ -224,7 +224,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "30 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "2x4", "count": [ 5, 10 ] }, { "item": "splinter", "count": [ 10, 20 ] } ],
"pre_terrain": "t_floor_waxed",
"post_terrain": "t_dirt"
@@ -572,7 +572,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": "wall_deconstruction_results",
"pre_terrain": "t_wall_wood",
"post_terrain": "t_floor"
@@ -585,7 +585,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": "wall_deconstruction_results",
"pre_terrain": "t_wall_wood_chipped",
"post_terrain": "t_floor"
@@ -598,7 +598,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "40 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": "wall_deconstruction_results",
"pre_terrain": "t_wall_wood_broken",
"post_terrain": "t_floor"
@@ -611,7 +611,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": "wall_deconstruction_results",
"pre_terrain": "t_embrasure_wood",
"post_terrain": "t_floor"
@@ -624,7 +624,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "60 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": "wall_deconstruction_results",
"pre_terrain": "t_wall_wood_widened",
"post_terrain": "t_floor"
@@ -637,7 +637,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "40 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [
{ "item": "nail", "charges": [ 2, 10 ] },
{ "item": "splinter", "count": [ 0, 2 ] },
@@ -654,7 +654,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_wall_log",
"post_terrain": "t_dirt"
@@ -667,7 +667,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_wall_log_chipped",
"post_terrain": "t_dirt"
@@ -680,7 +680,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "60 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_wall_log_broken",
"post_terrain": "t_dirt"
@@ -693,7 +693,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_embrasure_log",
"post_terrain": "t_dirt"
@@ -706,7 +706,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "60 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_wall_log_widened",
"post_terrain": "t_dirt"
@@ -719,7 +719,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "30 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_wall_log_half",
"post_terrain": "t_dirt"
@@ -732,7 +732,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_palisade",
"post_terrain": "t_dirt"
@@ -745,7 +745,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_palisade_embrasure",
"post_terrain": "t_dirt"
@@ -758,7 +758,7 @@
"category": "DECONSTRUCT",
"required_skills": [ [ "fabrication", 5 ] ],
"time": "90 m",
"using": [ [ "wood_removal_standard", 1 ] ],
"using": [ [ "wall_floor_glass_removal_standard", 1 ] ],
"byproducts": [ { "item": "nail", "charges": [ 5, 10 ] }, { "item": "splinter", "count": [ 20, 40 ] } ],
"pre_terrain": "t_palisade_gate",
"post_terrain": "t_dirt"
-10
View File
@@ -1166,7 +1166,6 @@
"looks_like": "glasses_safety",
"color": "light_gray",
"charges_per_use": 1,
"etransfer_rate": "30 MB",
"use_action": [ "CAMERA" ],
"pocket_data": [
{
@@ -1174,14 +1173,6 @@
"rigid": true,
"flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ],
"default_magazine": "light_battery_cell"
},
{
"pocket_type": "E_FILE_STORAGE",
"rigid": true,
"max_contains_volume": "1 ml",
"max_contains_weight": "1 g",
"weight_multiplier": 0,
"ememory_max": "64 GB"
}
],
"armor": [ { "encumbrance": 5, "coverage": 95, "covers": [ "eyes" ] } ],
@@ -1207,7 +1198,6 @@
"looks_like": "glasses_safety",
"color": "light_gray",
"charges_per_use": 1,
"etransfer_rate": "30 MB",
"use_action": [ "CAMERA", "PORTABLE_GAME", "EBOOKSAVE", "E_FILE_DEVICE" ],
"tick_action": [ "EPIC_MUSIC" ],
"pocket_data": [
-6
View File
@@ -104,12 +104,6 @@
}
},
"place_item": [ { "item": "microwave", "x": 41, "y": 33, "chance": 1 }, { "item": "id_LIXA", "x": 14, "y": 14, "chance": 1 } ],
"place_monster": [
{ "monster": "mon_zombie_soldier_lixa_police", "x": [ 1, 13 ], "y": [ 14, 23 ], "chance": 50 },
{ "monster": "mon_zombie_soldier_lixa_police", "x": [ 35, 45 ], "y": [ 4, 15 ], "chance": 50 },
{ "monster": "mon_zombie_soldier_lixa_police", "x": [ 25, 37 ], "y": [ 25, 42 ], "chance": 50 },
{ "monster": "mon_zombie_soldier_lixa_police", "x": [ 40, 46 ], "y": [ 25, 32 ], "chance": 50 }
],
"place_monsters": [
{ "monster": "GROUP_MIL_STRONG", "x": [ 1, 13 ], "y": [ 14, 23 ], "density": 0.1 },
{ "monster": "GROUP_MIL_STRONG", "x": [ 35, 45 ], "y": [ 4, 15 ], "density": 0.1 },
@@ -40,10 +40,7 @@
],
"items": { "@": { "item": "mon_zombie_scientist_death_drops", "chance": 100 } },
"item": { "@": [ { "item": "rmi2_corpse" }, { "item": "robofac_hardcase" } ] },
"place_loot": [
{ "item": "223_casing", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 100, "repeat": [ 20, 60 ] },
{ "group": "military_squad_guns", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 100, "repeat": [ 5, 10 ] }
],
"place_loot": [ { "item": "223_casing", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 100, "repeat": [ 20, 60 ] } ],
"monster": { "M": { "monster": "mon_zombie_armored" }, "A": { "monster": "mon_zombie_soldier_acid_1" } },
"place_monsters": [ { "monster": "GROUP_MIL_STRONG", "x": [ 1, 22 ], "y": [ 1, 22 ], "density": 1.6 } ]
}
@@ -146,46 +146,5 @@
{ "group": "mon_zombie_soldier_death_drops", "prob": 10 },
{ "group": "mon_zombie_cop_death_drops", "prob": 10 }
]
},
{
"id": "mon_zombie_soldier_lixa_police_death_drops",
"type": "item_group",
"subtype": "collection",
"magazine": 100,
"ammo": 60,
"entries": [
{
"distribution": [
{ "group": "clothing_soldier_set", "prob": 65, "damage": [ 1, 4 ] },
{ "group": "clothing_soldier_winter_set", "prob": 35, "damage": [ 1, 4 ] }
]
},
{
"distribution": [
{ "group": "military_standard_assault_rifles", "prob": 65, "damage": [ 0, 4 ], "dirt": [ 0, 6000 ] },
{
"group": "military_standard_lmgs",
"contents-item": "shoulder_strap",
"prob": 4,
"damage": [ 0, 4 ],
"dirt": [ 0, 6000 ]
},
{
"group": "military_standard_lmgs",
"contents-item": [ "shoulder_strap", "acog_scope" ],
"prob": 6,
"damage": [ 0, 4 ],
"dirt": [ 0, 6000 ]
}
],
"prob": 10
},
{ "group": "infantry_common_gear" },
{ "group": "wallets", "prob": 10 },
{ "group": "pocket_cigar", "prob": 15 },
{ "group": "misc_smoking_legal", "prob": 30 },
{ "item": "dog_tag", "prob": 40 },
{ "item": "id_LIXA_mil", "prob": 75 }
]
}
]
-9
View File
@@ -1,13 +1,4 @@
[
{
"id": "mon_zombie_soldier_lixa_police",
"type": "MONSTER",
"copy-from": "mon_zombie_soldier",
"looks_like": "mon_zombie_soldier",
"name": { "str": "zombie military police" },
"description": "Once a soldier, it is dressed head to toe in combat gear and carries itself rather steadily for a zombie. Over its uniform is a vest reading \"military police\".",
"death_drops": "mon_zombie_soldier_lixa_police_death_drops"
},
{
"id": "LIXA_spit_light",
"type": "ITEM",
@@ -507,8 +507,7 @@
{
"id": "MISSION_ROBOFAC_INTERCOM_3_ADVICE_Location",
"type": "talk_topic",
"//": "Restore previous dialogue if we ever get multi-story rappelling. If so, make sure to leave at least one elevator as the teleporting elevator trap",
"dynamic_line": "I don't believe I'm cleared to-\" You hear brief chatter. \"Apologies; I was mistaken. The manufacturer was, technically speaking, kept secret from the public. As a result, it operated using an office tower as a front, and was located underground. An elevator in the back of the building led to the basement, but it was likely destroyed in the damage and the shaft may well be inaccessible - as a result, you will need to find a way down yourself. There is a maintenance staircase in the compound, which may provide a means of entry should you be able to find an access card on the premises."
"dynamic_line": "I don't believe I'm cleared to-\" You hear brief chatter. \"Apologies; I was mistaken. The manufacturer was, technically speaking, kept secret from the public. As a result, it operated using an office tower as a front, and was located underground. An elevator in the back of the building led to the basement, but it was likely destroyed in the damage - as a result, you will need to find a way down yourself. While there were stairs as well, it's highly likely that they have been destroyed.\"\n\n\"We advise bringing a way to safely enter and exit the lower level; a grappling hook would work well for this purpose. Given the damage, the elevator shaft itself probably remains intact, and would be your likeliest point of entry to the underground portion of the building."
},
{
"id": [
+42 -43
View File
@@ -6695,55 +6695,54 @@
"id": "physics_lab_LIXA",
"locations": [ "wilderness" ],
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "LIXA_surface_1a" },
{ "point": [ 1, 0, 0 ], "overmap": "LIXA_surface_1b" },
{ "point": [ 0, 1, 0 ], "overmap": "LIXA_surface_2a" },
{ "point": [ 1, 1, 0 ], "overmap": "LIXA_surface_2b" },
{ "point": [ 0, 0, 1 ], "overmap": "LIXA_roof_1a" },
{ "point": [ 1, 0, 1 ], "overmap": "LIXA_roof_1b" },
{ "point": [ 0, 1, 1 ], "overmap": "LIXA_roof_2a" },
{ "point": [ 1, 1, 1 ], "overmap": "LIXA_roof_2b" },
{ "point": [ 0, 0, -1 ], "overmap": "LIXA_stairshaft_1a" },
{ "point": [ 1, 0, -1 ], "overmap": "LIXA_stairshaft_1b" },
{ "point": [ 0, 1, -1 ], "overmap": "LIXA_stairshaft_1c" },
{ "point": [ 1, 1, -1 ], "overmap": "LIXA_stairshaft_1d" },
{ "point": [ 0, 0, -2 ], "overmap": "LIXA_stairshaft_2a" },
{ "point": [ 1, 0, -2 ], "overmap": "LIXA_stairshaft_2b" },
{ "point": [ 0, 1, -2 ], "overmap": "LIXA_stairshaft_2c" },
{ "point": [ 1, 1, -2 ], "overmap": "LIXA_stairshaft_2d" },
{ "point": [ 0, 0, -3 ], "overmap": "LIXA_workfloor_1a" },
{ "point": [ 1, 0, -3 ], "overmap": "LIXA_workfloor_1b" },
{ "point": [ 0, 1, -3 ], "overmap": "LIXA_workfloor_2a" },
{ "point": [ 1, 1, -3 ], "overmap": "LIXA_workfloor_2b" },
{ "point": [ 1, 2, -3 ], "overmap": "LIXA_device_2_roof" },
{ "point": [ 1, 3, -3 ], "overmap": "LIXA_device_3_roof" },
{ "point": [ 1, 1, -4 ], "overmap": "LIXA_device_1" },
{ "point": [ 1, 2, -4 ], "overmap": "LIXA_device_2" },
{ "point": [ 1, 3, -4 ], "overmap": "LIXA_device_3" },
{ "point": [ 1, 0, -8 ], "overmap": "LIXA_device_unfolded_noaccess" },
{ "point": [ 1, 1, -8 ], "overmap": "LIXA_device_unfolded_noaccess" },
{ "point": [ 1, 2, -8 ], "overmap": "LIXA_device_unfolded_noaccess" },
{ "point": [ 1, 3, -8 ], "overmap": "LIXA_device_unfolded_A" },
{ "point": [ 1, 4, -8 ], "overmap": "LIXA_device_unfolded_B" },
{ "point": [ 1, 5, -8 ], "overmap": "LIXA_device_unfolded_noaccess" },
{ "point": [ 1, 6, -8 ], "overmap": "LIXA_device_unfolded_noaccess" },
{ "point": [ 1, 7, -8 ], "overmap": "LIXA_device_unfolded_noaccess" },
{ "point": [ 0, 2, 0 ], "overmap": "LIXA_entry_1" },
{ "point": [ 1, 2, 0 ], "overmap": "LIXA_entry_2" },
{ "point": [ 1, 3, 0 ], "overmap": "LIXA_road" },
{ "point": [ 1, 4, 0 ], "overmap": "LIXA_road" },
{ "point": [ 1, 5, 0 ], "overmap": "LIXA_road" },
{ "point": [ 1, 6, 0 ], "overmap": "LIXA_road" },
{ "point": [ 1, 7, 0 ], "overmap": "LIXA_road_guard" },
{ "point": [ 1, 7, 1 ], "overmap": "LIXA_road_guard_roof" }
{ "point": [ 0, 0, 0 ], "overmap": "LIXA_surface_1a_north" },
{ "point": [ 1, 0, 0 ], "overmap": "LIXA_surface_1b_north" },
{ "point": [ 0, 1, 0 ], "overmap": "LIXA_surface_2a_north" },
{ "point": [ 1, 1, 0 ], "overmap": "LIXA_surface_2b_north" },
{ "point": [ 0, 0, 1 ], "overmap": "LIXA_roof_1a_north" },
{ "point": [ 1, 0, 1 ], "overmap": "LIXA_roof_1b_north" },
{ "point": [ 0, 1, 1 ], "overmap": "LIXA_roof_2a_north" },
{ "point": [ 1, 1, 1 ], "overmap": "LIXA_roof_2b_north" },
{ "point": [ 0, 0, -1 ], "overmap": "LIXA_stairshaft_1a_north" },
{ "point": [ 1, 0, -1 ], "overmap": "LIXA_stairshaft_1b_north" },
{ "point": [ 0, 1, -1 ], "overmap": "LIXA_stairshaft_1c_north" },
{ "point": [ 1, 1, -1 ], "overmap": "LIXA_stairshaft_1d_north" },
{ "point": [ 0, 0, -2 ], "overmap": "LIXA_stairshaft_2a_north" },
{ "point": [ 1, 0, -2 ], "overmap": "LIXA_stairshaft_2b_north" },
{ "point": [ 0, 1, -2 ], "overmap": "LIXA_stairshaft_2c_north" },
{ "point": [ 1, 1, -2 ], "overmap": "LIXA_stairshaft_2d_north" },
{ "point": [ 0, 0, -3 ], "overmap": "LIXA_workfloor_1a_north" },
{ "point": [ 1, 0, -3 ], "overmap": "LIXA_workfloor_1b_north" },
{ "point": [ 0, 1, -3 ], "overmap": "LIXA_workfloor_2a_north" },
{ "point": [ 1, 1, -3 ], "overmap": "LIXA_workfloor_2b_north" },
{ "point": [ 1, 2, -3 ], "overmap": "LIXA_device_2_roof_north" },
{ "point": [ 1, 3, -3 ], "overmap": "LIXA_device_3_roof_north" },
{ "point": [ 1, 1, -4 ], "overmap": "LIXA_device_1_north" },
{ "point": [ 1, 2, -4 ], "overmap": "LIXA_device_2_north" },
{ "point": [ 1, 3, -4 ], "overmap": "LIXA_device_3_north" },
{ "point": [ 1, 0, -8 ], "overmap": "LIXA_device_unfolded_noaccess_north" },
{ "point": [ 1, 1, -8 ], "overmap": "LIXA_device_unfolded_noaccess_north" },
{ "point": [ 1, 2, -8 ], "overmap": "LIXA_device_unfolded_noaccess_north" },
{ "point": [ 1, 3, -8 ], "overmap": "LIXA_device_unfolded_A_north" },
{ "point": [ 1, 4, -8 ], "overmap": "LIXA_device_unfolded_B_north" },
{ "point": [ 1, 5, -8 ], "overmap": "LIXA_device_unfolded_noaccess_north" },
{ "point": [ 1, 6, -8 ], "overmap": "LIXA_device_unfolded_noaccess_north" },
{ "point": [ 1, 7, -8 ], "overmap": "LIXA_device_unfolded_noaccess_north" },
{ "point": [ 0, 2, 0 ], "overmap": "LIXA_entry_1_north" },
{ "point": [ 1, 2, 0 ], "overmap": "LIXA_entry_2_north" },
{ "point": [ 1, 3, 0 ], "overmap": "LIXA_road_north" },
{ "point": [ 1, 4, 0 ], "overmap": "LIXA_road_north" },
{ "point": [ 1, 5, 0 ], "overmap": "LIXA_road_north" },
{ "point": [ 1, 6, 0 ], "overmap": "LIXA_road_north" },
{ "point": [ 1, 7, 0 ], "overmap": "LIXA_road_guard_north" },
{ "point": [ 1, 7, 1 ], "overmap": "LIXA_road_guard_roof_north" }
],
"connections": [ { "point": [ 1, 8, 0 ], "terrain": "road", "connection": "local_road", "existing": true, "from": [ 1, 7, 0 ] } ],
"city_distance": [ 3, -1 ],
"city_sizes": [ 4, -1 ],
"occurrences": [ 75, 100 ],
"priority": 1,
"rotate": false,
"flags": [ "GLOBALLY_UNIQUE", "MAN_MADE", "NO_ROTATE", "SAFE_AT_WORLDGEN" ]
"flags": [ "GLOBALLY_UNIQUE", "MAN_MADE", "SAFE_AT_WORLDGEN" ]
},
{
"type": "overmap_special",
@@ -6,8 +6,7 @@
"vision_levels": "large_building",
"sym": "l",
"color": "light_gray",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -16,8 +15,7 @@
"name": "research facility roof",
"sym": "l",
"color": "light_gray",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -26,8 +24,7 @@
"vision_levels": "large_building",
"sym": "l",
"color": "light_gray",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -36,8 +33,7 @@
"name": "research facility access road",
"sym": "l",
"color": "light_gray",
"see_cost": "none",
"flags": [ "NO_ROTATE" ]
"see_cost": "none"
},
{
"type": "overmap_terrain",
@@ -46,8 +42,7 @@
"vision_levels": "large_building",
"sym": "l",
"color": "light_gray",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -65,8 +60,7 @@
"vision_levels": "underground_stone",
"sym": "l",
"color": "light_gray",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -75,8 +69,7 @@
"name": "LIXA research floor",
"sym": "L",
"color": "light_blue",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -85,8 +78,7 @@
"vision_levels": "underground_stone",
"sym": "L",
"color": "light_blue",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
},
{
"type": "overmap_terrain",
@@ -95,7 +87,6 @@
"name": "unfolded space",
"sym": "!",
"color": "white",
"see_cost": "full_high",
"flags": [ "NO_ROTATE" ]
"see_cost": "full_high"
}
]
+1 -13
View File
@@ -355,7 +355,7 @@
{
"id": "wall_floor_glass_removal_standard",
"type": "requirement",
"//": "Tools for removing a wall, floor, or glass mounted in metal",
"//": "Tools for removing a normal wall / floor / glass",
"qualities": [
{ "id": "HAMMER", "level": 2 },
{ "id": "CHISEL", "level": 2 },
@@ -364,18 +364,6 @@
],
"tools": [ [ [ "angle_grinder", 200 ] ] ]
},
{
"id": "wood_removal_standard",
"type": "requirement",
"//": "Tools for removing a wall, floor, or glass mounted in wood",
"qualities": [
{ "id": "HAMMER", "level": 2 },
{ "id": "CHISEL", "level": 2 },
{ "id": "PRY", "level": 1 },
{ "id": "DIG", "level": 3 }
],
"tools": [ [ [ "claw_bar", -1 ], [ "nail_puller_bronze", -1 ] ] ]
},
{
"id": "linoleum_removal_standard",
"type": "requirement",
+1 -8
View File
@@ -501,13 +501,7 @@
{
"type": "effect_on_condition",
"id": "EOC_GIANT_GROWTH_MUTATION",
"condition": {
"and": [
{ "not": { "u_has_trait": "HUGE" } },
{ "not": { "u_has_trait": "HUGE_OK" } },
{ "not": { "u_has_trait": "BIO_GIANT_GROWTH" } }
]
},
"condition": { "and": [ { "not": { "u_has_trait": "HUGE" } }, { "not": { "u_has_trait": "HUGE_OK" } } ] },
"effect": [
{ "u_message": "Your body swells and warps as your size increases!", "type": "good" },
{ "math": [ "u_preshift_size = u_val('size')" ] },
@@ -532,7 +526,6 @@
{
"type": "effect_on_condition",
"id": "EOC_GIANT_GROWTH_MUTATION_REMOVE",
"condition": { "u_has_trait": "BIO_GIANT_GROWTH" },
"effect": [
{ "u_message": "Your body shrinks and warps as your size decreases!", "type": "bad" },
{
@@ -248,26 +248,16 @@
"id": "EOC_TELEPATH_OBSCURITY_REMOVAL_CHARACTER",
"eoc_type": "EVENT",
"required_event": "character_takes_damage",
"condition": "has_beta",
"effect": [
{
"if": { "and": [ { "u_has_effect": "telepathic_ignorance" }, { "npc_has_effect": "telepathic_ignorance_self" } ] },
"then": { "u_lose_effect": "telepathic_ignorance" }
}
]
"condition": { "and": [ { "u_has_effect": "telepathic_ignorance" }, { "npc_has_effect": "telepathic_ignorance_self" } ] },
"effect": [ { "u_lose_effect": "telepathic_ignorance" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_TELEPATH_OBSCURITY_REMOVAL_MONSTER",
"eoc_type": "EVENT",
"required_event": "monster_takes_damage",
"condition": "has_beta",
"effect": [
{
"if": { "and": [ { "u_has_effect": "telepathic_ignorance" }, { "npc_has_effect": "telepathic_ignorance_self" } ] },
"then": { "u_lose_effect": "telepathic_ignorance" }
}
]
"condition": { "and": [ { "u_has_effect": "telepathic_ignorance" }, { "npc_has_effect": "telepathic_ignorance_self" } ] },
"effect": [ { "u_lose_effect": "telepathic_ignorance" } ]
},
{
"type": "effect_on_condition",
@@ -533,7 +533,7 @@
},
{
"type": "mapgen",
"update_mapgen_id": "afs_shuttlepad_salvors_garage_open_and_remove_lynx",
"update_mapgen_id": "afs_shuttlepad_salvors_garage_open",
"object": {
"set": [
{ "point": "terrain", "id": "t_grate", "x": 1, "y": 3 },
@@ -544,15 +544,9 @@
{ "point": "terrain", "id": "t_grate", "x": 1, "y": 8 },
{ "point": "terrain", "id": "t_door_metal_c", "x": 10, "y": 8 },
{ "point": "terrain", "id": "t_door_metal_c", "x": 9, "y": 10 }
],
"remove_vehicles": [ { "vehicles": [ "uica_lynx_ex" ], "x": [ 3, 8 ], "y": [ 4, 7 ] } ]
]
}
},
{
"type": "mapgen",
"update_mapgen_id": "afs_shuttlepad_salvors_garage_place_lynx",
"object": { "place_vehicles": [ { "vehicle": "uica_lynx_ex", "x": 6, "y": 5, "status": 0, "faction": "your_followers" } ] }
},
{
"type": "mapgen",
"om_terrain": "afs_shuttlepad_salvors_old_pad",
@@ -270,10 +270,7 @@
"type": "effect_on_condition",
"effect": [
{ "npc_add_var": "player_has_bought_car", "value": "yes" },
{
"mapgen_update": [ "afs_shuttlepad_salvors_garage_open_and_remove_lynx", "afs_shuttlepad_salvors_garage_place_lynx" ],
"om_terrain": "afs_shuttlepad_salvors_a1_1"
}
{ "mapgen_update": "afs_shuttlepad_salvors_garage_open", "om_terrain": "afs_shuttlepad_salvors_a1_1" }
]
},
{
@@ -98,40 +98,5 @@
{ "proficiency": "prof_toolsmithing" }
],
"components": [ [ [ "2x4", 1 ] ] ]
},
{
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
"result": "metalworking_tongs_bronze",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"difficulty": 2,
"time": "60 m",
"autolearn": true,
"using": [ [ "blacksmithing_standard", 3 ], [ "bronze_tiny", 3 ] ],
"proficiencies": [
{ "proficiency": "prof_metalworking", "required": true },
{ "proficiency": "prof_redsmithing", "required": true },
{ "proficiency": "prof_redsmithing_adv" },
{ "proficiency": "prof_toolsmithing" }
],
"components": [ [ [ "nails", 1, "LIST" ], [ "nuts_bolts", 1 ] ] ]
},
{
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
"result": "metalworking_tongs_bronze",
"id_suffix": "casting",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"difficulty": 3,
"time": "125 m",
"autolearn": true,
"proficiencies": [ { "proficiency": "prof_metalworking", "required": true }, { "proficiency": "prof_toolsmithing" } ],
"using": [ [ "forging_standard", 3 ], [ "bronze_tiny", 3 ], [ "bronzesmithing_tools", 1 ] ],
"tools": [ [ [ "casting_mold_large", -1 ], [ "casting_mold_long", -1 ] ] ],
"components": [ [ [ "nails", 1, "LIST" ], [ "nuts_bolts", 1 ] ] ]
}
]
-14
View File
@@ -51,20 +51,6 @@
"name": "Cancel menu",
"bindings": [ { "input_method": "keyboard_any", "key": "ESC" } ]
},
{
"type": "keybinding",
"id": "SCROLL_ITEM_INFO_UP",
"category": "UILIST",
"name": "Scroll item info up",
"bindings": [ { "input_method": "keyboard_char", "key": "{" }, { "input_method": "keyboard_code", "key": "[", "mod": [ "shift" ] } ]
},
{
"type": "keybinding",
"id": "SCROLL_ITEM_INFO_DOWN",
"category": "UILIST",
"name": "Scroll item info down",
"bindings": [ { "input_method": "keyboard_char", "key": "}" }, { "input_method": "keyboard_code", "key": "]", "mod": [ "shift" ] } ]
},
{
"type": "keybinding",
"id": "SHOW_DESCRIPTION",
@@ -87,53 +87,6 @@
<name>Kevin Granade and Contributors</name>
</developer>
<releases>
<release version="0.I-1" date="2026-09-19">
<description>
<p>
Point release Ito-1 (0.I-1) brings bugfixes and minor improvements to Ito release.
</p>
</description>
<url type="details">https://raw.githubusercontent.com/CleverRaven/Cataclysm-DDA/refs/heads/0.I-branch/data/changelog.txt</url>
</release>
<release version="0.I" date="2026-06-06">
<description>
<p>
The 9th post alpha stable release of Cataclysm: DDA has arrived. It is named after Junji
Ito, known for his ability to transform mundane occurrences into catastrophic events. As
a long inspiration of many horror elements of Dark Days Ahead this namesake is well
deserved. Between 0.H and 0.I there were over 13,000 commits from 486 contributors (242
of which were first-time contributors), affecting 82,000 entities, and adding more than 1
million lines of code and data.
</p>
<p>
The headline features for this cycle: Dormant zombies that have turned quiescent for a
lack of nearby prey, avoid disturbing them and your travels will be easier. Trees have
tops that you can climb into on separate z-levels now. Faults have expanded to items so
that eventually you won’t get generic damage but each level of damage on an item will
have specific ways to mend it similar to how many vehicle parts work now. Overmap specials
now have different visibility levels that controls how far away you can identify what they
are. We have probably now reached saturation on animal themed mutation paths and mutation
gain has been reworked to eliminate the wait between mutating to avoid bad mutations.
Defined outfits and tons of new mapgen including some things hidden out in the ocean.
More eldritch abominations exist and finally procgenned riot damage to represent that some
places got destroyed in and before the Cataclysm. Progress continues on the Imgui
migration as DDA transitions to a standardized UI that allows for easier development.
</p>
<p>
In news for the in repo mods several games worth of content has been added to Aftershock:
Exoplanet, Mind over Matter and Xedra Evolved. Isolation Protocol and Sky Island continue
to receive work that enables them to deliver unique gameplay experiences. This has also
included our focus on making more details of the game meaningfully moddable. EOC
expansion has been pioneered in mods and we expect those benefits to accrue to mainline
over time.
</p>
<p>
We welcome you to join us here in finding the beautiful and the horrific in the Cataclysm
while we ask the question of how you will spend your final days.
</p>
</description>
<url type="details">https://raw.githubusercontent.com/CleverRaven/Cataclysm-DDA/refs/heads/0.I-branch/data/changelog.txt</url>
</release>
<release version="0.H" date="2024-07-22">
<description>
<p>
+1 -1
View File
@@ -22,7 +22,7 @@ Steps from current guide were tested on Windows 10 (64 bit), Visual Studio 2019
2. Install `Git for Windows` (installer can be downloaded from [Git homepage](https://git-scm.com/)).
3. Install and configure `vcpkg`. If you already have `vcpkg` installed, you should update it to at least commit `f6672d8e480ccdecddfad3fd1b838ba369ffe6cd` (the most recent tested good revision) and rerun `.\bootstrap-vcpkg.bat` as described:
3. Install and configure `vcpkg`. If you already have `vcpkg` installed, you should update it to at least commit `3b57fb2e1ff55613db14d2aaf0a30529289c7050` (the most recent tested good revision) and rerun `.\bootstrap-vcpkg.bat` as described:
***WARNING: It is important that, wherever you decide to clone this repo, the path does not include whitespace or special symbols. That is, `C:/dev/vcpkg` is acceptable, but `C:/dev test/vcpkg` and `C:/C++Projects/vcpkg` is not.***
+33
View File
@@ -66,6 +66,39 @@
}
]
},
{
"context": "f_indoor_flagpole_wooden",
"item_variants": [
{
"item": "state_flag",
"sprite": [ { "id": "state_flag", "weight": 1 } ],
"layer": 90,
"offset_x": 18,
"offset_y": -25
},
{
"item": "pride_flag",
"sprite": [ { "id": "pride_flag", "weight": 1 } ],
"layer": 90,
"offset_x": 18,
"offset_y": -25
},
{
"item": "american_flag",
"sprite": [ { "id": "american_flag", "weight": 1 } ],
"layer": 90,
"offset_x": 18,
"offset_y": -25
},
{
"item": "national_flag",
"sprite": [ { "id": "national_flag", "weight": 1 } ],
"layer": 90,
"offset_x": 18,
"offset_y": -25
}
]
},
{
"context": "f_wooden_flagpole",
"item_variants": [
+1 -1
View File
@@ -20,5 +20,5 @@
"version>=": "3.9#4"
}
],
"builtin-baseline": "f6672d8e480ccdecddfad3fd1b838ba369ffe6cd"
"builtin-baseline": "3acb7541e854452d33f71037a8f63a88899e63d3"
}
-8
View File
@@ -928,14 +928,6 @@ void cataimgui::window::mark_resized()
}
}
void cataimgui::window::hide_if_hidden() const
{
if( hide_ui ) {
ImGuiWindow *w = ImGui::GetCurrentWindowRead();
ImGui::SetWindowHiddenAndSkipItemsForCurrentFrame( w );
}
}
void cataimgui::window::draw()
{
button_action.clear();
-2
View File
@@ -141,7 +141,6 @@ class window
protected:
bool force_to_back = false;
bool hide_ui = false;
bool is_open;
std::string id;
int window_flags;
@@ -149,7 +148,6 @@ class window
virtual bounds get_bounds();
virtual void draw_controls() = 0;
void draw_filter( const input_context &ctxt, bool filtering_active );
void hide_if_hidden() const;
};
#ifdef TUI
+1 -1
View File
@@ -208,7 +208,7 @@ void Character::check_and_recover_morale()
apply_persistent_morale();
if( !morale->consistent_with( test_morale ) ) {
morale->sync_permanent( test_morale ); // Recover only permanent morale
*morale = player_morale( test_morale ); // Recover consistency
add_msg_debug( debugmode::DF_CHARACTER, "%s morale was recovered.", disp_name( true ) );
}
}
-1
View File
@@ -393,7 +393,6 @@ class zone_data
faction = _faction;
invert = _invert;
enabled = _enabled;
temporarily_disabled = false;
is_vehicle = false;
is_personal = false;
start = _start;
+3 -8
View File
@@ -1131,9 +1131,6 @@ void editmap::edit_feature()
blink = true;
bool quit = false;
// Hold list till end
shared_ptr_fast<uilist_impl> ui_impl;
do {
const T_id override( emenu.selected );
if( override ) {
@@ -1157,7 +1154,7 @@ void editmap::edit_feature()
info_title_curr = info_title<T_t>();
do_ui_invalidation();
ui_impl = emenu.query( false, get_option<int>( "BLINK_SPEED" ) );
emenu.query( true, get_option<int>( "BLINK_SPEED" ) );
if( emenu.ret == UILIST_CANCEL ) {
quit = true;
} else if( ( emenu.ret >= 0 && static_cast<size_t>( emenu.ret ) < T_t::count() ) ||
@@ -1257,7 +1254,6 @@ void editmap::edit_fld()
restore_on_out_of_scope info_title_prev( info_title_curr );
map &here = get_map();
shared_ptr_fast<uilist_impl> ui_impl;
blink = true;
do {
const field_type_id override( fmenu.selected );
@@ -1284,7 +1280,7 @@ void editmap::edit_fld()
info_title_curr = pgettext( "Map editor: Editing field effects", "Field effects" );
do_ui_invalidation();
ui_impl = fmenu.query( false, get_option<int>( "BLINK_SPEED" ) );
fmenu.query( true, get_option<int>( "BLINK_SPEED" ) );
if( ( fmenu.ret > 0 && static_cast<size_t>( fmenu.ret ) < field_type::count() ) ||
( fmenu.ret == UILIST_ADDITIONAL && ( fmenu.ret_act == "LEFT" || fmenu.ret_act == "RIGHT" ) ) ) {
@@ -1874,7 +1870,6 @@ void editmap::mapgen_preview( const real_coords &tc, uilist &gmenu )
int lastsel = gmenu.selected;
bool showpreview = true;
shared_ptr_fast<uilist_impl> ui_impl;
do {
if( gmenu.selected != lastsel ) {
// TODO: gmenu should be hidden with current filter/selection preserved until closing gpmenu,at which point it should fully close if you chose either apply
@@ -1898,7 +1893,7 @@ void editmap::mapgen_preview( const real_coords &tc, uilist &gmenu )
oter_id( gmenu.selected ).id().str() );
do_ui_invalidation();
ui_impl = gpmenu.query( false, get_option<int>( "BLINK_SPEED" ) * 3 );
gpmenu.query( true, get_option<int>( "BLINK_SPEED" ) * 3 );
if( gpmenu.ret == 0 ) {
cleartmpmap( tmpmap );
+2 -19
View File
@@ -2252,7 +2252,6 @@ int game::inventory_item_menu( item_location locThisItem,
bool first_execution = true;
static int lang_version = detail::get_current_language_version();
catacurses::window w_info;
shared_ptr_fast<uilist_impl> ui_impl;
do {
//lang check here is needed to redraw the menu when using "Toggle language to English" option
if( first_execution || lang_version != detail::get_current_language_version() ) {
@@ -2361,9 +2360,7 @@ int game::inventory_item_menu( item_location locThisItem,
} );
action_menu.additional_actions = {
{ "RIGHT", translation() },
{ "SCROLL_ITEM_INFO_UP", translation() },
{ "SCROLL_ITEM_INFO_DOWN", translation() }
{ "RIGHT", translation() }
};
lang_version = detail::get_current_language_version();
@@ -2371,7 +2368,7 @@ int game::inventory_item_menu( item_location locThisItem,
}
const int prev_selected = action_menu.selected;
ui_impl = action_menu.query( false );
action_menu.query( true );
if( action_menu.ret >= 0 ) {
cMenu = action_menu.ret; /* Remember: hotkey == retval, see addentry above. */
} else if( action_menu.ret == UILIST_UNBOUND && action_menu.ret_act == "RIGHT" ) {
@@ -2384,9 +2381,6 @@ int game::inventory_item_menu( item_location locThisItem,
// could be instructed to ignore these two keys instead of scrolling.
action_menu.selected = prev_selected;
action_menu.fselected = prev_selected;
} else if( action_menu.ret_act == "SCROLL_ITEM_INFO_UP" ||
action_menu.ret_act == "SCROLL_ITEM_INFO_DOWN" ) {
cMenu = action_menu.ret_act == "SCROLL_ITEM_INFO_UP" ? KEY_PPAGE : KEY_NPAGE;
} else {
cMenu = 0;
}
@@ -2396,9 +2390,6 @@ int game::inventory_item_menu( item_location locThisItem,
ui = nullptr;
}
#if defined(TILES)
action_menu.set_hide( true );
#endif
switch( cMenu ) {
case 'a': {
contents_change_handler handler;
@@ -2443,7 +2434,6 @@ int game::inventory_item_menu( item_location locThisItem,
}
break;
case 't': {
ui_impl.reset();
contents_change_handler handler;
handler.unseal_pocket_containing( locThisItem );
avatar_action::plthrow( u, locThisItem );
@@ -2491,24 +2481,20 @@ int game::inventory_item_menu( item_location locThisItem,
break;
case 'v':
if( oThisItem.is_container() ) {
ui_impl.reset();
oThisItem.favorite_settings_menu();
}
break;
case 'V': {
ui_impl.reset();
view_recipe_crafting_menu( oThisItem );
break;
}
case 'i':
if( oThisItem.is_container() ) {
ui_impl.reset();
game_menus::inv::insert_items( locThisItem );
}
break;
case 'o':
if( oThisItem.is_container() && oThisItem.num_item_stacks() > 0 ) {
ui_impl.reset();
game_menus::inv::common( locThisItem );
}
break;
@@ -2550,9 +2536,6 @@ int game::inventory_item_menu( item_location locThisItem,
default:
break;
}
#if defined(TILES)
action_menu.set_hide( false );
#endif
} while( !exit );
}
return cMenu;
+7 -7
View File
@@ -1885,17 +1885,17 @@ static void cast_spell( bool recast_spell = false )
return;
}
std::map<magic_type_id, bool> success_tracker = {};
std::set<std::string> failure_messages = {};
for( const spell_id &sp : spells ) {
spell &temp_spell = player_character.magic->get_spell( sp );
temp_spell.can_cast( player_character, success_tracker );
if( temp_spell.can_cast( player_character, failure_messages ) ) {
break;
}
}
for( auto const& [m_type, any_success] : success_tracker ) {
if( !any_success && m_type->cannot_cast_message.has_value() ) {
add_msg( game_message_params{ m_bad, gmf_bypass_cooldown },
m_type->cannot_cast_message.value() );
}
for( const std::string &failure_message : failure_messages ) {
add_msg( game_message_params{ m_bad, gmf_bypass_cooldown },
failure_message );
}
if( recast_spell && player_character.magic->last_spell.is_null() ) {
+2
View File
@@ -967,7 +967,9 @@ action_id input_context::display_menu( bool permit_execute_action )
// avoiding inception!
ctxt.register_action( "HELP_KEYBINDINGS" );
}
#if defined(WIN32) || defined(TILES)
ctxt.set_timeout( 50 );
#endif
// has the user changed something?
bool changed = false;
+17 -55
View File
@@ -14652,69 +14652,31 @@ int item::charge_linked_batteries( vehicle &linked_veh, int turns_elapsed )
if( turns_elapsed < 1 || ( short_time_passed &&
!calendar::once_every( time_duration::from_turns( link().charge_interval ) ) ) ) {
// To early to get any charge
return link().charge_rate;
}
// If a long time passed, multiply the total by the efficiency rather than cancelling a charge.
int transfer_total = short_time_passed ? 1 :
( turns_elapsed * 1.0f / link().charge_interval ) * link().charge_interval;
if( power_in ) {
int available_charges = linked_veh.battery_power_level( ).first;
int wanted_charges = ammo_capacity( itype_battery->ammo->type ) - ammo_remaining( );
// Nothing to charge or nothing to charge with
if( wanted_charges == 0 || available_charges == 0 ) {
return link().charge_rate;
}
if( short_time_passed ) {
// Single charge - subtract one from source, roll against efficiency to add one to destination
linked_veh.discharge_battery( here, 1, true );
if( rng_float( 0.0, 1.0 ) <= link().efficiency ) {
ammo_set( itype_battery, ammo_remaining( ) + 1 );
}
} else {
// Multiple charges - get minimum from available charges, possible transfer in given time and
// amount of charges destination needs to charge itself to full with given efficiency.
// Subtract that value from the source and after reduction by efficiency add it to the destination.
int possible_transfer = turns_elapsed * 1.0f / link().charge_interval;
int required_charges = wanted_charges / link().efficiency;
int spent_charges = std::min( { possible_transfer, available_charges, required_charges } );
// Avoid rounding error on full charge
int received_charges = spent_charges == required_charges
? wanted_charges
: spent_charges * link().efficiency;
linked_veh.discharge_battery( here, spent_charges, true );
ammo_set( itype_battery, ammo_remaining( ) + received_charges );
const int battery_deficit = linked_veh.discharge_battery( here, transfer_total, true );
// Around 85% efficient by default; a few of the discharges don't actually recharge
if( battery_deficit == 0 && ( !short_time_passed || rng_float( 0.0, 1.0 ) <= link().efficiency ) ) {
ammo_set( itype_battery, ammo_remaining( ) + transfer_total );
}
} else {
const auto [bat_remaining, bat_capacity] = linked_veh.battery_power_level( );
int available_charges = ammo_remaining( );
int wanted_charges = bat_capacity - bat_remaining;
// Nothing to charge or nothing to charge with
if( wanted_charges == 0 || available_charges == 0 ) {
return link().charge_rate;
}
if( short_time_passed ) {
// Single charge - subtract one from source, roll against efficiency to add one to destination
ammo_set( itype_battery, ammo_remaining( ) - 1 );
if( rng_float( 0.0, 1.0 ) <= link().efficiency ) {
linked_veh.charge_battery( here, 1, true );
// Around 85% efficient by default; a few of the discharges don't actually charge
if( !short_time_passed || rng_float( 0.0, 1.0 ) <= link().efficiency ) {
const int battery_surplus = linked_veh.charge_battery( here, transfer_total, true );
if( battery_surplus == 0 ) {
ammo_set( itype_battery, ammo_remaining( ) - transfer_total );
}
} else {
// Multiple charges - get minimum from available charges, possible transfer in given time and
// amount of charges destination needs to charge itself to full with given efficiency.
// Subtract that value from the source and after reduction by efficiency add it to the destination.
int possible_transfer = turns_elapsed * 1.0f / link().charge_interval;
int required_charges = wanted_charges / link().efficiency;
int spent_charges = std::min( { possible_transfer, available_charges, required_charges } );
// Avoid rounding error on full charge
int received_charges = spent_charges == required_charges
? wanted_charges
: spent_charges * link().efficiency;
ammo_set( itype_battery, ammo_remaining( ) - spent_charges );
linked_veh.charge_battery( here, received_charges, true );
const std::pair<int, int> linked_levels = linked_veh.connected_battery_power_level( here );
if( linked_levels.first < linked_levels.second ) {
ammo_set( itype_battery, ammo_remaining( ) - transfer_total );
}
}
}
return link().charge_rate;
+4 -22
View File
@@ -8382,19 +8382,10 @@ static bool heat_items( Character *p, item *it, bool liquid_items, bool solid_it
units::mass not_frozen_weight = 0_gram;
for( const auto &pair : locs ) {
used_volume += pair.first->volume( false, true, pair.second );
units::mass item_weight = 0_gram;
if( pair.first->count_by_charges() ) {
const int charges_in_item = pair.first->charges;
if( charges_in_item > 0 ) {
item_weight = pair.first->weight( false, false ) / charges_in_item * pair.second;
}
} else {
item_weight = pair.first->weight( false, false ) * pair.second;
}
if( pair.first->has_own_flag( flag_FROZEN ) && !pair.first->has_own_flag( flag_EATEN_COLD ) ) {
frozen_weight += item_weight;
frozen_weight += pair.first->weight( false, false ) * pair.second ;
} else {
not_frozen_weight += item_weight;
not_frozen_weight += pair.first->weight( false, false ) * pair.second;
}
}
heating_requirements required = heating_requirements_for_weight( frozen_weight, not_frozen_weight,
@@ -8438,19 +8429,10 @@ static bool heat_items( Character *p, item *it, bool liquid_items, bool solid_it
}
for( const auto &pair : to_heat ) {
used_volume += pair.first->volume( false, true, pair.second );
units::mass item_weight = 0_gram;
if( pair.first->count_by_charges() ) {
const int charges_in_item = pair.first->charges;
if( charges_in_item > 0 ) {
item_weight = pair.first->weight( false, false ) / charges_in_item * pair.second;
}
} else {
item_weight = pair.first->weight( false, false ) * pair.second;
}
if( pair.first->has_own_flag( flag_FROZEN ) && !pair.first->has_own_flag( flag_EATEN_COLD ) ) {
frozen_weight += item_weight;
frozen_weight += pair.first->weight( false, false ) * pair.second ;
} else {
not_frozen_weight += item_weight;
not_frozen_weight += pair.first->weight( false, false ) * pair.second;
}
}
heating_requirements required = heating_requirements_for_weight( frozen_weight, not_frozen_weight,
+8 -14
View File
@@ -1244,22 +1244,16 @@ bool spell::can_cast( const Character &guy ) const
return guy.magic->has_enough_energy( guy, *this );
}
bool spell::can_cast( const Character &guy, std::map<magic_type_id, bool> &success_tracker )
bool spell::can_cast( const Character &guy, std::set<std::string> &failure_messages )
{
if( type->magic_type.has_value() &&
type->magic_type.value()->cannot_cast_message.has_value() ) {
// Insert first occurence of magic_type_id as false since only successful casts will be tracked.
if( success_tracker.count( type->magic_type.value() ) == 0 ) {
success_tracker[type->magic_type.value()] = false;
}
if( can_cast( guy ) ) {
success_tracker[type->magic_type.value()] = true;
return true;
} else {
return false;
}
if( can_cast( guy ) ) {
return true;
} else if( type->magic_type.has_value() &&
type->magic_type.value()->cannot_cast_message.has_value() ) {
failure_messages.insert( type->magic_type.value()->cannot_cast_message.value() );
return false;
} else {
return can_cast( guy );
return false;
}
}
+1 -1
View File
@@ -568,7 +568,7 @@ class spell
bool has_components() const;
// can the Character cast this spell?
bool can_cast( const Character &guy ) const;
bool can_cast( const Character &guy, std::map<magic_type_id, bool> &success_tracker );
bool can_cast( const Character &guy, std::set<std::string> &failure_messages );
// can the Character learn this spell?
bool can_learn( const Character &guy ) const;
// if spell shoots more than one projectile
+2 -3
View File
@@ -347,9 +347,8 @@ void main_menu::print_menu( const catacurses::window &w_open, int iSel, const po
}
iLine++;
center_print( w_open, iLine, c_light_blue,
string_format( _( "Version: 0.I-1 (Ito-1) Stable Release" ),
getVersionString() ) );
center_print( w_open, iLine, c_light_blue, string_format( _( "Version: %s" ),
getVersionString() ) );
int menu_length = 0;
for( size_t i = 0; i < vMenuItems.size(); ++i ) {
-1
View File
@@ -1011,7 +1011,6 @@ void add_msg( const game_message_params &params, std::string msg )
Messages::add_msg( params, std::move( msg ) );
}
// msg argument will not expand name place holders
void add_msg_if_player_sees( const tripoint_bub_ms &target, std::string msg )
{
const map &here = get_map();
+1 -33
View File
@@ -185,9 +185,7 @@ void player_morale::morale_point::add( const int new_bonus, const int new_max_bo
}
int sqrt_of_sum_of_squares;
if( new_duration == 0_turns ) {
sqrt_of_sum_of_squares = new_bonus;
} else if( new_cap || !same_sign ) {
if( new_cap || !same_sign ) {
// If the morale bonus is capped apply the full bonus
// This is because some morale types build up slowly to a cap over time (e.g. morale_wet)
// If the new bonus is opposing apply the full bonus
@@ -863,36 +861,6 @@ bool player_morale::consistent_with( const player_morale &morale ) const
return test_points( *this, morale ) && test_points( morale, *this );
}
void player_morale::sync_permanent( const player_morale &reference )
{
// Remove all permanent points, keep temporaries
const auto new_end = std::remove_if( points.begin(), points.end(),
[]( const morale_point & mp ) {
return mp.is_permanent();
} );
points.erase( new_end, points.end() );
// Copy permanent points from reference
for( const morale_point &mp : reference.points ) {
if( mp.is_permanent() ) {
points.push_back( mp );
}
}
// Sync non-point state that consistent_with() checks
took_prozac = reference.took_prozac;
took_prozac_bad = reference.took_prozac_bad;
perceived_pain = reference.perceived_pain;
radiation = reference.radiation;
// Sync mutation and body part state for correct future updates
body_parts = reference.body_parts;
no_body_part = reference.no_body_part;
mutations = reference.mutations;
invalidate();
}
void player_morale::clear()
{
points.clear();
-3
View File
@@ -48,9 +48,6 @@ class player_morale
/** Returns false whether morale is inconsistent with the argument.
* Only permanent morale is checked */
bool consistent_with( const player_morale &morale ) const;
/** Replaces permanent morale points and non-point state from reference,
* preserving all temporary morale */
void sync_permanent( const player_morale &reference );
/**calculates the percentage contribution for each morale point*/
void calculate_percentage();
+3
View File
@@ -420,6 +420,9 @@ input_event input_manager::get_input_event( const keyboard_mode /*preferred_keyb
previously_pressed_key = 0;
// flush any output
catacurses::doupdate();
// could also just do this each time a window is created to ensure every ncurses window has this property,
// but this function is virtually free anyway
nodelay( stdscr, true );
key = getch();
if( key != ERR ) {
int newch;
+2 -4
View File
@@ -1534,8 +1534,7 @@ bool npc::wield( item &it )
return false;
}
if( get_wielded_item() ) {
// add_msg_if_player_sees does no internal npc name replacement
add_msg_if_player_sees( *this, m_info, replace_with_npc_name( _( "<npcname> wields a %s." ) ),
add_msg_if_player_sees( *this, m_info, _( "<npcname> wields a %s." ),
get_wielded_item()->tname() );
}
@@ -1550,8 +1549,7 @@ bool npc::wield( item_location loc, bool remove_old )
return false;
}
if( get_wielded_item() ) {
// add_msg_if_player_sees does no internal npc name replacement
add_msg_if_player_sees( *this, m_info, replace_with_npc_name( _( "<npcname> wields a %s." ) ),
add_msg_if_player_sees( *this, m_info, _( "<npcname> wields a %s." ),
get_wielded_item()->tname() );
}
-6
View File
@@ -197,12 +197,6 @@ static bool pick_one_up( item_location &loc, int quantity, bool &got_water, bool
//new item (copy)
item newit = it;
// Clear activity_var if it differs from the picker's name
if( it.has_var( "activity_var" ) && it.get_var( "activity_var", "" ) != player_character.name ) {
it.erase_var( "activity_var" );
newit.erase_var( "activity_var" );
}
if( !newit.is_owned_by( player_character, true ) ) {
// Has the player given input on if stealing is ok?
if( player_character.get_value( "THIEF_MODE" ).str() == "THIEF_ASK" ) {
-7
View File
@@ -1056,13 +1056,6 @@ void Character::load( const JsonObject &data )
morale->load( data );
// morale->load() only restores morale points, not mutation active flags.
// Activate mutations so update_masochist_bonus / update_constrained_penalty
// compute correct values when stat changes or item equips fire below.
for( const trait_id &mut : get_functioning_mutations() ) {
morale->on_mutation_gain( mut );
}
_skills->clear();
JsonObject skill_data = data.get_object( "skills" );
skill_data.allow_omitted_members();
+3 -14
View File
@@ -38,7 +38,6 @@
class uilist_impl : cataimgui::window
{
friend class uilist;
uilist &parent;
public:
explicit uilist_impl( uilist &parent ) : cataimgui::window( "UILIST",
@@ -66,7 +65,6 @@ class uilist_impl : cataimgui::window
void uilist_impl::draw_controls()
{
#if defined(TILES)
hide_if_hidden();
using cata::options::mouse;
bool cursor_shown = SDL_ShowCursor( SDL_QUERY ) == SDL_ENABLE;
if( mouse.hidekb && !cursor_shown ) {
@@ -872,8 +870,7 @@ shared_ptr_fast<uilist_impl> uilist::create_or_get_ui()
* Handle input and update display
*
*/
shared_ptr_fast<uilist_impl> uilist::query( bool loop, int timeout,
bool allow_unfiltered_hotkeys )
void uilist::query( bool loop, int timeout, bool allow_unfiltered_hotkeys )
{
#if defined(__ANDROID__)
if( get_option<bool>( "ANDROID_NATIVE_UI" ) && !entries.empty() && !desired_bounds ) {
@@ -936,13 +933,13 @@ shared_ptr_fast<uilist_impl> uilist::query( bool loop, int timeout,
} else {
ret = UILIST_ERROR;
}
return nullptr;
return;
}
#endif
ret_evt = input_event();
if( entries.empty() ) {
ret = UILIST_ERROR;
return nullptr;
return;
}
ret = UILIST_WAIT_INPUT;
@@ -1030,17 +1027,9 @@ shared_ptr_fast<uilist_impl> uilist::query( bool loop, int timeout,
}
}
} while( loop && ret == UILIST_WAIT_INPUT );
return ui;
}
///@}
#if defined(TILES)
void uilist::set_hide( bool val )
{
create_or_get_ui()->hide_ui = val;
}
#endif
/**
* cleanup
*/
+1 -7
View File
@@ -301,9 +301,7 @@ class uilist // NOLINT(cata-xy)
// initialize the window or reposition it after screen size change.
void reposition();
bool scrollby( int scrollby );
// construct a uilist_impl and loop to query input
shared_ptr_fast<uilist_impl> query( bool loop = true, int timeout = 50,
bool allow_unfiltered_hotkeys = false );
void query( bool loop = true, int timeout = 50, bool allow_unfiltered_hotkeys = false );
void filterlist();
// In add_entry/add_entry_desc/add_entry_col, int k only support letters
// (a-z, A-Z) and digits (0-9), MENU_AUTOASSIGN, and 0 or ' ' (disable
@@ -401,10 +399,6 @@ class uilist // NOLINT(cata-xy)
void reset();
#if defined(TILES)
void set_hide( bool val );
#endif
shared_ptr_fast<uilist_impl> create_or_get_ui();
// NOLINTNEXTLINE(google-explicit-constructor)
operator int() const;
-111
View File
@@ -1,5 +1,4 @@
#include <cstddef>
#include <functional>
#include <memory>
#include <string>
#include <vector>
@@ -9,7 +8,6 @@
#include "calendar.h"
#include "cata_catch.h"
#include "character.h"
#include "debug.h"
#include "coordinates.h"
#include "item.h"
#include "item_location.h"
@@ -678,112 +676,3 @@ TEST_CASE( "player_morale_stacking", "[player_morale]" )
}
}
}
// Regression test for GitHub #85895: check_and_recover_morale was replacing
// the entire morale object when it found a permanent-point inconsistency,
// which destroyed all temporary morale (food, music, etc.).
TEST_CASE( "check_and_recover_morale_preserves_temporary_morale", "[player_morale]" )
{
clear_avatar();
avatar &dummy = get_avatar();
player_morale &m = *dummy.morale;
SECTION( "temporary morale survives when permanent point is inconsistent" ) {
// Add temporary morale
m.add( morale_food_good, 20, 40, 20_turns, 10_turns );
REQUIRE( m.has( morale_food_good ) == 20 );
// Inject a stale permanent point that the character should not have.
// The avatar has no constrained mutations, so test_morale will
// compute constrained = 0 and detect an inconsistency.
m.set_permanent( morale_perm_constrained, -5 );
REQUIRE( m.has( morale_perm_constrained ) == -5 );
// The inconsistency triggers a debugmsg; capture it so the test
// framework does not treat it as a failure.
std::string dmsg = capture_debugmsg_during( [&dummy]() {
dummy.check_and_recover_morale();
} );
CHECK_THAT( dmsg, Catch::Contains( "is inconsistent" ) );
// Recovery should fix the permanent point...
CHECK( m.has( morale_perm_constrained ) == 0 );
// ...without destroying the temporary morale
CHECK( m.has( morale_food_good ) == 20 );
}
SECTION( "multiple temporary bonuses survive recovery" ) {
m.add( morale_food_good, 15, 30, 20_turns, 10_turns );
m.add( morale_book, 8, 16, 30_turns, 15_turns );
REQUIRE( m.has( morale_food_good ) == 15 );
REQUIRE( m.has( morale_book ) == 8 );
// Inject inconsistency
m.set_permanent( morale_perm_constrained, -3 );
std::string dmsg = capture_debugmsg_during( [&dummy]() {
dummy.check_and_recover_morale();
} );
CHECK_THAT( dmsg, Catch::Contains( "is inconsistent" ) );
CHECK( m.has( morale_food_good ) == 15 );
CHECK( m.has( morale_book ) == 8 );
CHECK( m.has( morale_perm_constrained ) == 0 );
}
}
// Regression test for the save-load root cause: player_morale's mutation
// tracking is not initialized during load, so update_constrained_penalty()
// and update_masochist_bonus() compute wrong values when triggered.
TEST_CASE( "morale_mutation_state_after_load_like_sequence", "[player_morale]" )
{
clear_avatar();
avatar &dummy = get_avatar();
player_morale &m = *dummy.morale;
SECTION( "constrained penalty without mutation activation" ) {
dummy.toggle_trait( trait_FLOWERS );
REQUIRE( dummy.has_trait( trait_FLOWERS ) );
// First verify correct behavior when properly set up
const item hat( itype_tinfoil_hat, calendar::turn_zero );
m.on_mutation_gain( trait_FLOWERS );
m.on_item_wear( hat );
REQUIRE( m.has( morale_perm_constrained ) == -10 );
// Now simulate what save-load does: clear morale and rebuild
// WITHOUT activating mutations (the bug)
dummy.clear_morale();
// Only replay item wear (as savegame_json.cpp:918 does)
m.on_item_wear( hat );
// Without mutation activation, constrained penalty is wrong
CHECK( m.has( morale_perm_constrained ) == 0 );
// After activating mutations (the fix), penalty is correct
m.on_mutation_gain( trait_FLOWERS );
CHECK( m.has( morale_perm_constrained ) == -10 );
}
SECTION( "temporary morale preserved through recovery after load fix" ) {
dummy.toggle_trait( trait_FLOWERS );
// Wear the hat through the Character so check_and_recover_morale
// will see it when rebuilding test_morale from worn items.
dummy.wear_item( item( itype_tinfoil_hat ) );
// Activate mutations in morale (simulates the fix in savegame_json)
for( const trait_id &mut : dummy.get_functioning_mutations() ) {
m.on_mutation_gain( mut );
}
// Add temporary morale
m.add( morale_food_good, 20, 40, 20_turns, 10_turns );
REQUIRE( m.has( morale_food_good ) == 20 );
REQUIRE( m.has( morale_perm_constrained ) == -10 );
// check_and_recover should find consistency -- no wipe
dummy.check_and_recover_morale();
CHECK( m.has( morale_food_good ) == 20 );
CHECK( m.has( morale_perm_constrained ) == -10 );
}
}
+1 -1
View File
@@ -50,7 +50,7 @@ KnownWords = set()
def init_known_words(DefaultKnownWords, KnownWords):
default_dict = {
unicodedata.normalize('NFC', word) for word in
SpellChecker(case_sensitive=False).word_frequency
SpellChecker(case_sensitive=True).word_frequency
}
custom_dict = set()