Skip to content

Commit

Permalink
Merge branch 'spring-refactor' into test-release
Browse files Browse the repository at this point in the history
  • Loading branch information
joveeater committed Sep 30, 2023
2 parents cd7556b + 76b1b4f commit 13d4d89
Show file tree
Hide file tree
Showing 150 changed files with 4,597 additions and 1,391 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Checks: >
-readability-redundant-access-specifiers,
-readability-use-anyofallof,
WarningsAsErrors: '*'
HeaderFilterRegex: "(src|(test(?!.*catch.*catch.h))|tools).*"
FormatStyle: none
CheckOptions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
with:
fetch-depth: 1

- name: Set up JDK 8 (android)
- name: Set up JDK 11 (android)
uses: actions/setup-java@v3
with:
java-version: "8"
java-version: "11"
distribution: "adopt"

- name: Setup build and dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ jobs:
run: |
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LANGUAGES=all USE_HOME_DIR=1 OSX_MIN=11 PCH=0 dmgdist COMPILER=clang++
mv CataclysmBN-${{ inputs.version }}.dmg cbn-${{ matrix.artifact }}-${{ inputs.version }}.dmg
- name: Set up JDK 8 (android)
- name: Set up JDK 11 (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
uses: actions/setup-java@v3
with:
java-version: "8"
java-version: "11"
distribution: "adopt"
- name: Setup Build and Dependencies (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
- doc/**
- 'scripts/**'
merge_group:
branches:
- upload
types: [checks_requested]
pull_request:
branches:
- upload
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ jobs:
run: |
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.release.outputs.timestamp }}.dmg
- name: Set up JDK 8 (android)
- name: Set up JDK 11 (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
uses: actions/setup-java@v3
with:
java-version: "8"
java-version: "11"
distribution: "adopt"
- name: Setup Build and Dependencies (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
Expand Down
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/app/jni/SDL2_mixer
/app/jni/SDL2_ttf
/app/jni/libintl-lite
/app/jni/libhidapi
/app/jni/lua
/app/jni/mpg-123
/app/build
Expand Down
8 changes: 8 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ if (localProperties.getProperty('override_ndkBuildAppPlatform') != null) {
override_ndkBuildAppPlatform = localProperties.getProperty("override_ndkBuildAppPlatform")
}

def override_ndkVersion = getProperty("override_ndkVersion")
if (localProperties.getProperty('override_ndkVersion') != null) {
override_ndkVersion = localProperties.getProperty('override_ndkVersion')
}

println("Using [ njobs]: $njobs")
println("Using [ localize]: $localize")
println("Using [ deps]: $deps")
Expand All @@ -108,6 +113,7 @@ println("Using [ compileSdkVersion]: $override_compileSdkVersion")
println("Using [ minSdkVersion]: $override_minSdkVersion")
println("Using [ targetSdkVersion]: $override_targetSdkVersion")
println("Using [ndkBuildAppPlatform]: $override_ndkBuildAppPlatform")
println("Using [ ndkVersion]: $override_ndkVersion")
println("Using [ abi_arm_32]: $abi_arm_32")
println("Using [ abi_arm_64]: $abi_arm_64")
println("Using [ abi_x86_32]: $abi_x86_32")
Expand Down Expand Up @@ -164,7 +170,9 @@ unzipDeps.dependsOn makeLocalization
preBuild.dependsOn unzipDeps

android {
namespace "com.cleverraven.cataclysmdda"
compileSdkVersion override_compileSdkVersion
ndkVersion override_ndkVersion

if (override_version.isEmpty()) {
println("Generating version number to $version_header_path")
Expand Down
2 changes: 1 addition & 1 deletion android/app/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
APP_STL := c++_shared
APP_CPPFLAGS += -std=c++17
ifneq ($(OS),Windows_NT)
APP_LDFLAGS += -fuse-ld=gold
APP_LDFLAGS += -fuse-ld=lld
endif

# Do not specify APP_OPTIM here, it is done through ndk-build NDK_DEBUG=0/1 setting instead
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
com.gamemaker.game
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cleverraven.cataclysmdda"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:7.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,7 +15,7 @@ buildscript {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}
Expand Down
8 changes: 6 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ override_compileSdkVersion=29

# This property controls which minSdkVersion should be used
# You can override this from the command line by passing "-Poverride_minSdkVersion=#"
override_minSdkVersion=14
override_minSdkVersion=21

# This property controls which targetSdkVersion should be used
# You can override this from the command line by passing "-Poverride_targetSdkVersion=#"
override_targetSdkVersion=29

# This property controls which ndkBuildAppPlatform should be used
# You can override this from the command line by passing "-Poverride_ndkBuildAppPlatform=#"
override_ndkBuildAppPlatform=android-16
override_ndkBuildAppPlatform=android-21

# This property controls which ndkVersion should be used
# You can override this from the command line by passing "-Poverride_ndkVersion=#"
override_ndkVersion=25.2.9519653
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
13 changes: 13 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -4696,5 +4696,18 @@
"pre_note": "Will only work if constructed in/on a building that has an electric grid with a mounted battery.",
"pre_special": "check_empty",
"post_furniture": "f_floor_lamp_off"
},
{
"type": "construction",
"id": "constr_rewire_street_light",
"group": "rewire_street_light",
"category": "WORKSHOP",
"required_skills": [ [ "electronics", 4 ] ],
"time": "30 m",
"qualities": [ [ { "id": "WRENCH", "level": 1 } ], [ { "id": "SAW_M", "level": 1 } ], [ { "id": "SCREW", "level": 1 } ] ],
"components": [ [ [ "cable", 2 ] ], [ [ "amplifier", 2 ] ] ],
"pre_note": "Will only work if constructed in/on a building that has an electric grid with a mounted battery.",
"pre_furniture": "f_street_light",
"post_furniture": "f_street_light_rewired_off"
}
]
5 changes: 5 additions & 0 deletions data/json/construction_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@
"id": "build_floor_lamp",
"name": "Build floor lamp"
},
{
"type": "construction_group",
"id": "rewire_street_light",
"name": "Rewire Street Light"
},
{
"type": "construction_group",
"id": "build_improvised_shelter",
Expand Down
4 changes: 3 additions & 1 deletion data/json/external_tileset/External_Tileset_DP_Tall.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
{ "id": "corpse_mon_bear_armored", "fg": 3 },
{ "id": "t_tree_cherry_season_spring", "fg": 4 },
{ "id": "t_tree_cherry_harvested_season_spring", "fg": 5 },
{ "id": "t_tree_cherry_season_summer", "fg": 6 }
{ "id": "t_tree_cherry_season_summer", "fg": 6 },
{ "id": [ "f_street_light_rewired_off", "f_street_light_rewired" ], "fg": 7 },
{ "id": "f_street_light_rewired_on", "fg": 8 }
],
"sprite_width": 64,
"sprite_height": 80,
Expand Down
Binary file modified data/json/external_tileset/External_Tileset_DP_Tall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions data/json/furniture_and_terrain/furniture-appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,89 @@
}
]
},
{
"type": "furniture",
"id": "f_street_light_rewired_off",
"copy-from": "f_floor_lamp_base",
"name": "rewired street light (off)",
"description": "A source of light used to illuminate streets and the surrounding area. It's been rewired to draw power from a local grid, but is currently switched off.",
"symbol": "Y",
"color": "light_gray",
"looks_like": "f_street_light",
"move_cost_mod": -1,
"coverage": 40,
"required_str": -1,
"flags": [ "BASHABLE" ],
"examine_action": "transform",
"transforms_into": "f_street_light_rewired_on",
"prompt": "Switch on the street light.",
"message": "You switch on the street light.",
"deconstruct": {
"items": [
{ "item": "pipe", "count": 8 },
{ "item": "sheet_metal", "count": 2 },
{ "item": "amplifier", "count": 6 },
{ "item": "light_bulb", "count": 2 },
{ "item": "cable", "charges": 6 },
{ "item": "plastic_chunk", "count": 4 }
]
},
"bash": {
"str_min": 30,
"str_max": 100,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "pipe", "count": [ 1, 7 ] },
{ "item": "scrap", "count": [ 3, 12 ] },
{ "item": "amplifier", "count": [ 1, 5 ] },
{ "item": "light_bulb", "count": [ 0, 2 ] },
{ "item": "cable", "charges": [ 1, 4 ] },
{ "item": "plastic_chunk", "count": [ 2, 4 ] }
]
}
},
{
"type": "furniture",
"id": "f_street_light_rewired",
"copy-from": "f_street_light_rewired_off",
"name": "rewired street light (no power)",
"description": "A source of light used to illuminate streets and the surrounding area. It's been rewired to draw power from a local grid, but lacks power at the moment.",
"symbol": "Y",
"color": "light_gray",
"looks_like": "f_street_light",
"examine_action": "transform",
"transforms_into": "f_street_light_rewired_off",
"prompt": "Switch off the street light.",
"message": "You switch off the street light.",
"active": [
"charge_watcher",
{ "min_power": 15, "transform": { "id": "f_street_light_rewired_on", "msg": "The street light lights up." } }
]
},
{
"type": "furniture",
"id": "f_street_light_rewired_on",
"copy-from": "f_street_light_rewired_off",
"name": "rewired street light (on)",
"description": "A source of light used to illuminate streets and the surrounding area. It's been rewired to draw power from a local grid, brightening up the night once again.",
"symbol": "Y",
"color": "yellow",
"looks_like": "f_street_light",
"examine_action": "transform",
"transforms_into": "f_street_light_rewired_off",
"prompt": "Switch off the street light.",
"message": "You switch off the street light.",
"light_emitted": 320,
"active": [
"steady_consumer",
{
"power": 1,
"consume_every": "50 s",
"transform": { "id": "f_street_light_rewired", "msg": "The street light flickers and dies." }
}
]
},
{
"type": "furniture",
"abstract": "f_glass_fridge_base",
Expand Down
2 changes: 1 addition & 1 deletion data/json/furniture_and_terrain/furniture-terrains.json
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@
"color": "light_gray",
"move_cost_mod": -1,
"coverage": 40,
"required_str": 32,
"required_str": -1,
"flags": [ "BASHABLE" ],
"deconstruct": {
"items": [
Expand Down
4 changes: 2 additions & 2 deletions data/json/itemgroups/Food/food.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{ "item": "meat_canned", "prob": 20, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "veggy_canned", "prob": 40, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "apple_canned", "prob": 30, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "can_tomato", "prob": 40, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "can_tomato", "prob": 40, "charges": 24, "container-item": "jar_3l_glass_sealed" },
{ "item": "meat_pickled", "prob": 10, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "potted_meat", "prob": 10, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "veggy_pickled", "prob": 20, "charges": 12, "container-item": "jar_3l_glass_sealed" },
Expand Down Expand Up @@ -251,7 +251,7 @@
{ "item": "veggy_canned", "prob": 4, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "apple_canned", "prob": 4, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "offal_canned", "prob": 1, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "can_tomato", "prob": 4, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "can_tomato", "prob": 4, "charges": 24, "container-item": "jar_3l_glass_sealed" },
{ "item": "fish_pickled", "prob": 4, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "meat_pickled", "prob": 4, "charges": 12, "container-item": "jar_3l_glass_sealed" },
{ "item": "potted_meat", "prob": 4, "charges": 12, "container-item": "jar_3l_glass_sealed" },
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/comestibles/other.json
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
"price_postapoc": 100,
"material": "tomato",
"volume": "250 ml",
"stack_size": 2,
"charges": 2,
"vitamins": [ [ "vitA", 3 ], [ "vitC", 26 ], [ "calcium", 9 ], [ "iron", 18 ] ],
"flags": [ "RAW" ]
},
Expand Down
18 changes: 18 additions & 0 deletions data/json/items/tool/woodworking.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,23 @@
"color": "brown",
"qualities": [ [ "AXE", 1 ], [ "SAW_W", 2 ], [ "BUTCHER", -90 ] ],
"flags": [ "NONCONDUCTIVE", "BELT_CLIP" ]
},
{
"id": "stone_chisel",
"type": "TOOL",
"name": { "str": "stone chisel" },
"looks_like": "chisel",
"description": "This is a short stone chisel. It can be used to engrave on stone, wood, or soft metals.",
"weight": "660 g",
"volume": "250 ml",
"price": 1600,
"to_hit": 2,
"bashing": 2,
"cutting": 1,
"material": "stone",
"symbol": ";",
"color": "light_gray",
"qualities": [ [ "CHISEL", 1 ] ],
"flags": [ "BELT_CLIP" ]
}
]
4 changes: 3 additions & 1 deletion data/json/mapgen/Glassblower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"object": {
"fill_ter": "t_floor",
"rows": [
"________ss4 2 ",
"________ss4 2 `",
"________ss4 2 5 4 ",
"_______ss5 52 445 ",
"_______s%%--%rr%--%-%% ",
Expand Down Expand Up @@ -39,6 +39,7 @@
"_": "t_pavement",
"U": "t_pavement",
" ": [ "t_grass", "t_dirt" ],
"`": "t_dirt",
"H": "t_grass",
"1": "t_shrub_hydrangea",
"2": [ "t_tree_walnut", "t_tree_apple" ],
Expand Down Expand Up @@ -76,6 +77,7 @@
"<": "t_stairs_up"
},
"furniture": {
"`": "f_street_light",
"H": "f_bench",
"S": "f_sink",
"T": "f_stool",
Expand Down
4 changes: 3 additions & 1 deletion data/json/mapgen/animalpound.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"object": {
"fill_ter": "t_floor",
"rows": [
"'''''''''''~~ , ",
"'''''''''''~~ , `",
"'''''''''''~~ , ",
"'''''''''''~~ , ",
"''~~~~~~~~~~~~ , ",
Expand Down Expand Up @@ -84,9 +84,11 @@
"Q": "t_linoleum_white",
"'": "t_grass",
"4": "t_gutter_downspout",
"`": "t_pavement",
"~": "t_sidewalk"
},
"furniture": {
"`": "f_street_light",
"#": "f_counter",
"C": "f_counter",
"D": "f_trashcan",
Expand Down
Loading

0 comments on commit 13d4d89

Please sign in to comment.