diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 67bd4938486b..33d23419815f 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -129,6 +129,20 @@ jobs: artifact: osx-tiles-x64 ext: dmg content: application/x-apple-diskimage + - name: osx-curses-arm + os: macos-14 + mxe: none + tiles: 0 + artifact: osx-curses-arm + ext: dmg + content: application/x-apple-diskimage + - name: osx-tiles-arm + os: macos-14 + mxe: none + tiles: 1 + artifact: osx-tiles-arm + ext: dmg + content: application/x-apple-diskimage - name: Android x64 os: ubuntu-22.04 mxe: none @@ -224,6 +238,8 @@ jobs: if: runner.os == 'macOS' run: | HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel + python3 -m venv ./venv + source ./venv/bin/activate pip3 install mac_alias==2.2.0 dmgbuild==1.6.1 biplist - name: Build CBN (linux) @@ -249,6 +265,7 @@ jobs: - name: Build CBN (osx) if: runner.os == 'macOS' run: | + source ./venv/bin/activate make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} LUA=1 RELEASE=1 LANGUAGES=all USE_HOME_DIR=1 OSX_MIN=11 PCH=0 dmgdist COMPILER=clang++ mv CataclysmBN-${{ env.VERSION }}.dmg cbn-${{ matrix.artifact }}-${{ env.VERSION }}.dmg - name: Set up JDK 11 (android) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1bb04d1cfc8..c571c5b77c48 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -152,6 +152,20 @@ jobs: artifact: osx-tiles-x64 ext: dmg content: application/x-apple-diskimage + - name: osx-curses-arm + os: macos-14 + mxe: none + tiles: 0 + artifact: osx-curses-arm + ext: dmg + content: application/x-apple-diskimage + - name: osx-tiles-arm + os: macos-14 + mxe: none + tiles: 1 + artifact: osx-tiles-arm + ext: dmg + content: application/x-apple-diskimage - name: Android x64 os: ubuntu-22.04 mxe: none @@ -250,6 +264,8 @@ jobs: if: runner.os == 'macOS' run: | HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel + python3 -m venv ./venv + source ./venv/bin/activate pip3 install mac_alias==2.2.0 dmgbuild==1.6.1 biplist - name: Build CBN (linux) @@ -278,6 +294,7 @@ jobs: - name: Build CBN (osx) if: runner.os == 'macOS' run: | + source ./venv/bin/activate make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} LUA=1 RELEASE=1 LANGUAGES=all USE_HOME_DIR=1 OSX_MIN=11 PCH=0 dmgdist COMPILER=clang++ mv CataclysmBN-unstable.dmg cbn-${{ matrix.artifact }}-${{ needs.metadata.outputs.tag_name }}.dmg diff --git a/data/json/harvest.json b/data/json/harvest.json index bf25178343fa..144311f9d451 100644 --- a/data/json/harvest.json +++ b/data/json/harvest.json @@ -541,7 +541,7 @@ { "drop": "meat_tainted", "type": "flesh", "mass_ratio": 0.33 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.015 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.15 } + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.15 } ] }, { @@ -554,7 +554,7 @@ { "drop": "mutant_bug_hydrogen_sacs", "type": "flesh", "mass_ratio": 0.2 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.015 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.015 } + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.015 } ] }, { @@ -577,7 +577,7 @@ { "drop": "sinew", "type": "bone", "mass_ratio": 0.01 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.015 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.15 } + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.15 } ] }, { @@ -588,7 +588,7 @@ { "drop": "mutant_meat", "type": "flesh", "mass_ratio": 0.33 }, { "drop": "mutant_fat", "type": "flesh", "mass_ratio": 0.04 }, { "drop": "sinew", "type": "bone", "mass_ratio": 0.01 }, - { "drop": "acidchitin_piece", "type": "bone", "mass_ratio": 0.15 } + { "drop": "acidchitin_piece", "type": "skin", "mass_ratio": 0.15 } ] }, { @@ -602,7 +602,7 @@ { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.015 }, { "drop": "bee_sting", "base_num": [ 0, 1 ], "type": "bone" }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.15 } + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.15 } ] }, { @@ -616,7 +616,7 @@ { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.01 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.03 }, { "drop": "wasp_sting", "base_num": [ 0, 1 ], "type": "bone" }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.15 } + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.15 } ] }, { @@ -630,7 +630,7 @@ { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.01 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.03 }, { "drop": "wasp_sting", "base_num": [ 0, 1 ], "type": "bone" }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.15 }, + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.15 }, { "drop": "egg_wasp", "type": "offal", "base_num": [ 10, 30 ], "scale_num": [ 5, 5 ] } ] }, @@ -644,7 +644,7 @@ { "drop": "sinew", "type": "bone", "mass_ratio": 0.005 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0045 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.025 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.015 }, + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.015 }, { "drop": "egg_dragonfly", "type": "offal", "base_num": [ 5, 35 ], "scale_num": [ 0.3, 0.5 ] } ] }, @@ -659,7 +659,7 @@ { "drop": "mutant_bug_hydrogen_sacs", "type": "flesh", "mass_ratio": 0.2 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.015 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.015 }, + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.015 }, { "drop": "egg_firefly", "type": "offal", "base_num": [ 0, 3 ] } ] }, @@ -674,7 +674,7 @@ { "drop": "sinew", "type": "bone", "mass_ratio": 0.05 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.01 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.012 } + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.012 } ] }, { @@ -687,7 +687,7 @@ { "drop": "sinew", "type": "bone", "mass_ratio": 0.05 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.01 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.012 }, + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.012 }, { "drop": "egg_centipede", "type": "offal", "base_num": [ 3, 10 ], "scale_num": [ 0.5, 1 ], "max": 30 } ] }, @@ -702,7 +702,7 @@ { "drop": "sinew", "type": "bone", "mass_ratio": 0.05 }, { "drop": "mutant_bug_lungs", "type": "flesh", "mass_ratio": 0.0035 }, { "drop": "mutant_bug_organs", "type": "offal", "mass_ratio": 0.01 }, - { "drop": "chitin_piece", "type": "bone", "mass_ratio": 0.3 }, + { "drop": "chitin_piece", "type": "skin", "mass_ratio": 0.3 }, { "drop": "egg_centipede", "type": "offal", "base_num": [ 0, 3 ], "scale_num": [ 0.5, 1 ], "max": 10 } ] }, diff --git a/data/json/items/armor/storage.json b/data/json/items/armor/storage.json index 9d1463cbd653..3fef127619d5 100644 --- a/data/json/items/armor/storage.json +++ b/data/json/items/armor/storage.json @@ -654,7 +654,7 @@ "storage": "4 L", "warmth": 8, "material_thickness": 2, - "properties": [ [ "monster_size_capacity", "SMALL" ] ], + "properties": [ [ "creature_size_capacity", "SMALL" ] ], "use_action": "CAPTURE_MONSTER_ACT", "valid_mods": [ "resized_large" ], "flags": [ "BELTED", "WATERPROOF" ] diff --git a/data/json/items/gun/shot.json b/data/json/items/gun/shot.json index d66bcafc6629..9a8a8b860626 100644 --- a/data/json/items/gun/shot.json +++ b/data/json/items/gun/shot.json @@ -210,7 +210,6 @@ "ascii_picture": "mossberg590", "volume": "2548 ml", "looks_like": "mossberg_500", - "default_mods": [ "sights_mount", "underbarrel_mount" ], "price": "700 USD", "barrel_length": "0 ml", "clip_size": 9 diff --git a/data/json/items/tool/knives.json b/data/json/items/tool/knives.json index 80c0ba965745..af2f9e5433d7 100644 --- a/data/json/items/tool/knives.json +++ b/data/json/items/tool/knives.json @@ -81,8 +81,16 @@ "type": "GENERIC", "category": "tools", "weapon_category": [ "KNIVES" ], - "name": { "str": "stone knife", "str_pl": "stone knives" }, - "description": "This is a sharpened stone set into a hollowed handle. Not nearly as usable as a proper knife, but it's better than nothing.", + "name": { "str": "primitive knife", "str_pl": "primitive knives" }, + "conditional_names": [ + { "type": "COMPONENT_ID", "condition": "rock", "name": { "str": "stone knife", "str_pl": "stone knives" } }, + { + "type": "COMPONENT_ID", + "condition": "ceramic", + "name": { "str": "ceramic knife", "str_pl": "ceramic knives" } + } + ], + "description": "This is a sharpened stone or shard of ceramic set into a hollowed handle. Not nearly as usable as a proper knife, but it's better than nothing.", "weight": "453 g", "volume": "250 ml", "price": "0 cent", diff --git a/data/json/items/tool/landscaping.json b/data/json/items/tool/landscaping.json index a8b9046f1f53..092e2e309fa3 100644 --- a/data/json/items/tool/landscaping.json +++ b/data/json/items/tool/landscaping.json @@ -62,8 +62,12 @@ "type": "GENERIC", "category": "tools", "weapon_category": [ "CLUBS" ], - "name": { "str": "stone shovel" }, - "description": "This is a flattened stone affixed to a stick. It works passably well as a shovel but really can't compare to a real shovel.", + "name": { "str": "primitive shovel" }, + "conditional_names": [ + { "type": "COMPONENT_ID", "condition": "rock", "name": "stone shovel" }, + { "type": "COMPONENT_ID", "condition": "ceramic", "name": "ceramic shovel" } + ], + "description": "This is a flattened stone or ceramic shard affixed to a stick. It works passably well as a shovel but really can't compare to a real shovel.", "weight": "1581 g", "volume": "4 L", "price": "0 cent", diff --git a/data/json/items/tool/pets.json b/data/json/items/tool/pets.json index 16eeb23155bc..dae965ba7ace 100644 --- a/data/json/items/tool/pets.json +++ b/data/json/items/tool/pets.json @@ -14,7 +14,7 @@ "material": [ "steel" ], "symbol": "#", "color": "light_gray", - "properties": [ [ "monster_size_capacity", "TINY" ] ], + "properties": [ [ "creature_size_capacity", "TINY" ] ], "use_action": "CAPTURE_MONSTER_ACT", "flags": [ "TRADER_AVOID" ] }, @@ -104,7 +104,7 @@ "material": [ "steel", "plastic" ], "symbol": "#", "color": "light_gray", - "properties": [ [ "monster_size_capacity", "SMALL" ] ], + "properties": [ [ "creature_size_capacity", "SMALL" ] ], "use_action": "CAPTURE_MONSTER_ACT", "flags": [ "TRADER_AVOID" ] }, diff --git a/data/json/items/tool/woodworking.json b/data/json/items/tool/woodworking.json index a83e6c0a9a3b..94e490dd84c0 100644 --- a/data/json/items/tool/woodworking.json +++ b/data/json/items/tool/woodworking.json @@ -209,8 +209,12 @@ "type": "GENERIC", "category": "tools", "weapon_category": [ "1H_HOOKED" ], - "name": { "str": "stone adze" }, - "description": "This is a stone adze, somewhat useful for smoothing wood objects.", + "name": { "str": "primitive adze" }, + "conditional_names": [ + { "type": "COMPONENT_ID", "condition": "rock", "name": "stone adze" }, + { "type": "COMPONENT_ID", "condition": "ceramic", "name": "ceramic adze" } + ], + "description": "This is a stone or ceramic adze, somewhat useful for smoothing wood objects.", "weight": "1300 g", "volume": "1 L", "price": "10 USD", @@ -229,7 +233,11 @@ "type": "GENERIC", "category": "tools", "weapon_category": [ "2H_AXES" ], - "name": { "str": "stone axe" }, + "name": { "str": "primtitive axe" }, + "conditional_names": [ + { "type": "COMPONENT_ID", "condition": "rock", "name": "stone axe" }, + { "type": "COMPONENT_ID", "condition": "ceramic", "name": "ceramic axe" } + ], "description": "This is a stone with a narrow edge affixed to a stick. It can chop wood, but requires much more effort than a modern axe.", "weight": "3154 g", "volume": "3500 ml", @@ -286,7 +294,12 @@ "weapon_category": [ "1H_AXES" ], "symbol": ";", "color": "light_gray", - "name": { "str": "stone tomahawk" }, + "name": { "str": "primitive tomahawk" }, + "conditional_names": [ + { "type": "COMPONENT_ID", "condition": "rock", "name": "stone tomahawk" }, + { "type": "COMPONENT_ID", "condition": "ceramic", "name": "ceramic tomahawk" }, + { "type": "COMPONENT_ID", "condition": "bone", "name": "bone tomahawk" } + ], "description": "A lightweight one-handed combat hatchet typically made of stone or bone, originally used by the Algonquian people. It makes for a half decent tool and weapon.", "price_postapoc": 100, "material": [ "wood", "stone" ], diff --git a/data/json/items/vehicle/cargo.json b/data/json/items/vehicle/cargo.json index 2f2f316c5daa..03ca4c2649ca 100644 --- a/data/json/items/vehicle/cargo.json +++ b/data/json/items/vehicle/cargo.json @@ -111,7 +111,7 @@ "symbol": "]", "color": "light_gray", "looks_like": "cargo_rack", - "properties": [ [ "monster_size_capacity", "HUGE" ] ], + "properties": [ [ "creature_size_capacity", "HUGE" ] ], "use_action": "CAPTURE_MONSTER_VEH", "flags": [ "TRADER_AVOID" ] }, diff --git a/data/json/mapgen/arcade.json b/data/json/mapgen/arcade.json index ac1eb7509710..5ad82d0931de 100644 --- a/data/json/mapgen/arcade.json +++ b/data/json/mapgen/arcade.json @@ -1,15 +1,8 @@ [ - { - "name": "GROUP_ARCADE", - "type": "monstergroup", - "default": "mon_null", - "monsters": [ { "monster": "mon_zombie_child", "freq": 600, "cost_multiplier": 1, "pack_size": [ 2, 5 ] } ] - }, { "type": "mapgen", "method": "json", "om_terrain": [ "s_arcade" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -21,10 +14,10 @@ ".ssssssssssssssssssssss.", ".ssssssssssssssssssssss.", ".ssssssssssssssssssssss.", - ".ssssssssssssssssssllss.", - ".|---++-OOO-++----|---|.", + ".sssssssssssssssssslLss.", + ".||||++|OOO|++|||||||||.", ".|F |S %|.", - ".|F |-+-|.", + ".|F ||+||.", ".|F FF FF |.", ".|F FF F FF ## |.", ".|F FF F FF # T|.", @@ -32,24 +25,20 @@ ".|F # T|.", ".|F x x x # T|.", ".|FFFFFx x xFFFF #B T|.", - ".|--------------------|.", + ".||||||||||||||||||||||.", ".....................4..", "........................", "........................", "........................" ], "terrain": { - " ": "t_floor", "+": "t_door_c", - "-": "t_wall_r", - ".": [ [ "t_dirt", 5 ], [ "t_grass", 16 ], [ "t_grass_long", 5 ], [ "t_underbrush", 10 ] ], + ".": "t_region_groundcover_urban", "O": "t_window", - "S": "t_floor", - "B": "t_floor", - "%": "t_floor", "_": "t_pavement", - "'": "t_dirt", + "'": "t_region_groundcover_urban", "l": "t_sidewalk", + "L": "t_sidewalk", "s": "t_sidewalk", "4": "t_gutter_downspout", "|": "t_wall_r" @@ -61,15 +50,11 @@ "S": "f_sink", "B": "f_stool", "T": "f_locker", - "l": "f_vending_c", "x": "f_pinball_machine" }, + "vendingmachines": { "l": { "item_group": "vending_drink" }, "L": { "item_group": "vending_food" } }, "toilets": { "%": { } }, - "place_items": [ - { "item": "vending_drink", "x": 19, "y": 8, "chance": 75 }, - { "item": "vending_food", "x": 20, "y": 8, "chance": 75 }, - { "item": "arcade_prizes", "x": 21, "y": [ 14, 18 ], "chance": 95 } - ], + "place_items": [ { "item": "arcade_prizes", "x": 21, "y": [ 14, 18 ], "chance": 95 } ], "place_monsters": [ { "monster": "GROUP_ARCADE", "x": [ 3, 17 ], "y": [ 13, 15 ] } ] } }, @@ -77,44 +62,35 @@ "type": "mapgen", "method": "json", "om_terrain": "s_arcade_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ - "........................", - "........................", - "........................", - "........................", - "........................", - "........................", - "........................", - "........................", - "........................", - ".| 3.", - ".| : A 3.", - ".| 3.", - ".| 3.", - ".| 3.", - ".| & 3.", - ".| 3.", - ".| 3.", - ".| X 3.", - ".| 3.", - ".|222222222222222222253.", - "........................", - "........................", - "........................", - "........................" + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " -....................- ", + " -..:.N...............- ", + " -....................- ", + " -....................- ", + " -....................- ", + " -............&.......- ", + " -....................- ", + " -....................- ", + " -...............X....- ", + " -....................- ", + " --------------------5- ", + " ", + " ", + " ", + " " ], - "terrain": { - " ": "t_flat_roof", - ".": "t_open_air", - "|": "t_gutter_west", - "3": "t_gutter_east", - "2": "t_gutter_south", - "5": "t_gutter_drop" - }, - "furniture": { ":": "f_cellphone_booster", "X": "f_small_satelitte_dish", "&": "f_roof_turbine_vent", "A": "f_TV_antenna" }, + "palettes": [ "roof_palette" ], "place_items": [ { "item": "roof_trash", "x": [ 3, 20 ], "y": [ 11, 18 ], "chance": 50, "repeat": [ 1, 3 ] }, { "item": "child_items", "x": [ 3, 20 ], "y": [ 11, 18 ], "chance": 50, "repeat": [ 1, 3 ] } diff --git a/data/json/mapgen/speedway.json b/data/json/mapgen/speedway.json index ce17e01f81ed..e64d3d6be034 100644 --- a/data/json/mapgen/speedway.json +++ b/data/json/mapgen/speedway.json @@ -404,7 +404,7 @@ " f -- I-------------------I -- I-------------------I -- I-------------------I -- I-------------------I --.......BNNB.................. ||||||| f", " f -- -- -- -- --........BB.....|cccc|.&&&&&&...AA.DDD. f", " f -- -- -- -- -- ............F|e'''+.&#&&#&......DDD. f", - " f -------------------------------------------------------------------------------------------------------------- ............V|eOOa|.&#&&#&.......... f", + " f -------------------------------------------------------------------------------------------------------------- ............V|eOOa̱|.&#&&#&.......... f", " f -------------------------------------------------------------------------------------------------------------- ............||||||.&#&&#&.........A f", " f ---- . . ...4.....&#&&#&. f" ], diff --git a/data/json/mapgen_palettes/speedway.json b/data/json/mapgen_palettes/speedway.json index 00ac78d2d2a3..66b14bf465de 100644 --- a/data/json/mapgen_palettes/speedway.json +++ b/data/json/mapgen_palettes/speedway.json @@ -49,6 +49,7 @@ "d": "f_desk", "i": "f_filing_cabinet", "a": "f_trashcan", + "a̱": "f_trashcan", "A": "f_trashcan", "D": "f_dumpster", "S": "f_sink", @@ -68,6 +69,7 @@ "d": { "item": "SUS_office_desk", "chance": 33 }, "i": { "item": "SUS_office_filing_cabinet", "chance": 25 }, "a": { "item": "trash", "chance": 66, "repeat": [ 1, 3 ] }, + "a̱": { "item": "trash", "chance": 66, "repeat": [ 1, 3 ] }, "A": { "item": "trash", "chance": 66, "repeat": [ 1, 3 ] }, "D": { "item": "trash", "chance": 80, "repeat": [ 4, 8 ] } }, diff --git a/data/json/monstergroups/zombies.json b/data/json/monstergroups/zombies.json index 326d1fc1f4e4..cb50d29b0282 100644 --- a/data/json/monstergroups/zombies.json +++ b/data/json/monstergroups/zombies.json @@ -758,5 +758,11 @@ { "monster": "mon_zombie_technician", "freq": 250, "cost_multiplier": 3 }, { "monster": "mon_zombie_electric", "freq": 150, "cost_multiplier": 5 } ] + }, + { + "name": "GROUP_ARCADE", + "type": "monstergroup", + "default": "mon_null", + "monsters": [ { "monster": "mon_zombie_child", "freq": 600, "cost_multiplier": 1, "pack_size": [ 2, 5 ] } ] } ] diff --git a/data/mods/Aftershock/items/vehicle_items.json b/data/mods/Aftershock/items/vehicle_items.json index d4e563d71adc..7a66dcc1474d 100644 --- a/data/mods/Aftershock/items/vehicle_items.json +++ b/data/mods/Aftershock/items/vehicle_items.json @@ -12,7 +12,7 @@ "symbol": "]", "color": "light_gray", "looks_like": "cargo_rack", - "properties": [ [ "monster_size_capacity", "LARGE" ] ], + "properties": [ [ "creature_size_capacity", "LARGE" ] ], "use_action": "CAPTURE_MONSTER_VEH", "flags": [ "TRADER_AVOID" ] } diff --git a/src/game.cpp b/src/game.cpp index 44afc044e2a4..69ac19427261 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -10519,7 +10519,8 @@ std::optional game::find_or_make_stairs( map &mp, const int z_after, b if( going_down_1 && mp.has_flag( TFLAG_GOES_UP, u.pos() + tripoint_below ) ) { stairs.emplace( u.pos() + tripoint_below ); } - if( going_up_1 && mp.has_flag( TFLAG_GOES_DOWN, u.pos() + tripoint_above ) ) { + if( going_up_1 && mp.has_flag( TFLAG_GOES_DOWN, u.pos() + tripoint_above ) && + !mp.has_flag( TFLAG_DEEP_WATER, u.pos() + tripoint_below ) ) { stairs.emplace( u.pos() + tripoint_above ); } // We did not find stairs directly above or below, so search the map for them @@ -10527,8 +10528,9 @@ std::optional game::find_or_make_stairs( map &mp, const int z_after, b for( const tripoint &dest : m.points_in_rectangle( omtile_align_start, omtile_align_end ) ) { if( rl_dist( u.pos(), dest ) <= best && ( ( going_down_1 && mp.has_flag( TFLAG_GOES_UP, dest ) ) || - ( going_up_1 && ( mp.has_flag( TFLAG_GOES_DOWN, dest ) || - mp.ter( dest ) == t_manhole_cover ) ) || + ( ( going_up_1 && ( mp.has_flag( TFLAG_GOES_DOWN, dest ) && + !mp.has_flag( TFLAG_DEEP_WATER, dest ) ) ) || + mp.ter( dest ) == t_manhole_cover ) || ( ( movez == 2 || movez == -2 ) && mp.ter( dest ) == t_elevator ) ) ) { stairs.emplace( dest ); best = rl_dist( u.pos(), dest ); @@ -10582,7 +10584,12 @@ std::optional game::find_or_make_stairs( map &mp, const int z_after, b } if( movez > 0 ) { - if( !mp.has_flag( "GOES_DOWN", *stairs ) ) { + if( mp.has_flag( "DEEP_WATER", *stairs ) ) { + if( !query_yn( + _( "There is a huge blob of water! You may be unable to return back down these stairs. Continue up?" ) ) ) { + return std::nullopt; + } + } else if( !mp.has_flag( "GOES_DOWN", *stairs ) ) { if( !query_yn( _( "You may be unable to return back down these stairs. Continue up?" ) ) ) { return std::nullopt; } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index b5c52d6f5a91..6d33aad563a5 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -620,11 +620,15 @@ void vehicle::init_state( int init_veh_fuel, int init_veh_status ) } for( const vpart_reference &vp : get_parts_including_carried( "FRIDGE" ) ) { - vp.part().enabled = true; + if( one_in( 2 ) ) { + vp.part().enabled = true; + } } for( const vpart_reference &vp : get_parts_including_carried( "FREEZER" ) ) { - vp.part().enabled = true; + if( one_in( 2 ) ) { + vp.part().enabled = true; + } } for( const vpart_reference &vp : get_parts_including_carried( "WATER_PURIFIER" ) ) { @@ -637,8 +641,8 @@ void vehicle::init_state( int init_veh_fuel, int init_veh_status ) const size_t p = vp.part_index(); vehicle_part &pt = vp.part(); - if( vp.has_feature( VPFLAG_REACTOR ) ) { - // De-hardcoded reactors. Should always start active + if( vp.has_feature( VPFLAG_REACTOR ) && one_in( 4 ) ) { + // De-hardcoded reactors, may or may not start active pt.enabled = true; } @@ -733,6 +737,11 @@ void vehicle::init_state( int init_veh_fuel, int init_veh_status ) set_hp( pt, 0 ); } + // An added 5% chance to bust each windshield + if( vp.has_feature( "WINDSHIELD" ) && one_in( 20 ) ) { + set_hp( pt, 0 ); + } + /* Bloodsplatter the front-end parts. Assume anything with x > 0 is * the "front" of the vehicle (since the driver's seat is at (0, 0). * We'll be generous with the blood, since some may disappear before @@ -761,6 +770,11 @@ void vehicle::init_state( int init_veh_fuel, int init_veh_status ) blood_inside_pos.emplace( vp.mount() ); } } + + // Potentially bust a single tire if not already wrecking them + if( !destroyTires && !wheelcache.empty() && one_in( 20 ) ) { + set_hp( parts[random_entry( wheelcache )], 0 ); + } } //sets the vehicle to locked, if there is no key and an alarm part exists if( vp.has_feature( "SECURITY" ) && has_no_key && pt.is_available() ) { @@ -772,11 +786,12 @@ void vehicle::init_state( int init_veh_fuel, int init_veh_status ) } } } - // destroy tires until the vehicle is not drivable + // destroy a random number of tires, vehicles with more wheels are more likely to survive if( destroyTires && !wheelcache.empty() ) { int tries = 0; - while( valid_wheel_config() && tries < 100 ) { - // wheel config is still valid, destroy the tire. + int maxtries = wheelcache.size(); + while( valid_wheel_config() && tries < maxtries ) { + // keep going until either we've ruined all wheels or made one attempt for every wheel set_hp( parts[random_entry( wheelcache )], 0 ); tries++; } diff --git a/tests/vehicle_power_test.cpp b/tests/vehicle_power_test.cpp index dab7fdd026f4..4a2918d8c231 100644 --- a/tests/vehicle_power_test.cpp +++ b/tests/vehicle_power_test.cpp @@ -37,6 +37,7 @@ TEST_CASE( "vehicle power with reactor and solar panels", "[vehicle][power]" ) REQUIRE( !veh_ptr->reactors.empty() ); vehicle_part &reactor = veh_ptr->part( veh_ptr->reactors.front() ); + reactor.enabled = true; GIVEN( "the reactor is empty" ) { reactor.ammo_unset(); diff --git a/tools/copy_mac_libs.py b/tools/copy_mac_libs.py index e10871f3f4fc..3db7ff131d8d 100644 --- a/tools/copy_mac_libs.py +++ b/tools/copy_mac_libs.py @@ -49,6 +49,8 @@ def copy_and_rewrite(file): if not os.path.isfile(file): # raise Exception("{} is not a file.".format(executable)) return [] + if os.path.exists(executable_dir + "/" + os.path.basename(file)): + return [] otool_ret = subprocess.run(["otool", "-L", file], capture_output=True) if otool_ret.returncode != 0: raise Exception("An error occured in calling otool -L:\n {}"