Skip to content

Commit

Permalink
Merge pull request #8 from CleverRaven/master
Browse files Browse the repository at this point in the history
Update #8
  • Loading branch information
Xenomorph-III authored Nov 21, 2019
2 parents 3f6337e + 32e0c35 commit fb33d48
Show file tree
Hide file tree
Showing 713 changed files with 109,049 additions and 49,241 deletions.
2 changes: 2 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ If you are also looking for suggestions then mark it with [CR] — "comments req

This can help speed up our review process by allowing us to only review the things that are ready for it, and will prevent anything that isn't completely ready from being merged in.

It is not required to solve or reference an open issue to file a PR, however, if you do so, you need to explain the problem your PR is solving in full detail.

### All PRs should have a "Summary" line
Summary is a one-line description of your change that will be extracted and added to the project changelog at https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/changelog.txt

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ android {
}

defaultConfig {
minSdkVersion 21
minSdkVersion 16
targetSdkVersion 28
versionCode Integer.valueOf(System.env.UPSTREAM_BUILD_NUMBER ?: 1)
versionName new File("$version_header_path").text.split('\"')[1]
Expand Down Expand Up @@ -157,7 +157,7 @@ android {

externalNativeBuild {
ndkBuild {
arguments "APP_PLATFORM=android-21", "-j$njobs"
arguments "APP_PLATFORM=android-16", "-j$njobs"
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
Binary file modified android/app/deps.zip
Binary file not shown.
23 changes: 9 additions & 14 deletions android/app/src/main/java/org/libsdl/app/SDLActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,9 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {

if (source == InputDevice.SOURCE_UNKNOWN) {
InputDevice device = InputDevice.getDevice(deviceId);
source = device.getSources();
if (device != null) {
source = device.getSources();
}
}

if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
Expand Down Expand Up @@ -2119,32 +2121,25 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {
//
@Override
public boolean onKeyPreIme (int keyCode, KeyEvent event) {
// HACK: Make sure the SDL activity receives native events for back button, even if DummyEdit is in focus
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (event.getAction()==KeyEvent.ACTION_DOWN)
SDLActivity.onNativeKeyDown(keyCode);
else if (event.getAction()==KeyEvent.ACTION_UP)
SDLActivity.onNativeKeyUp(keyCode);
}
// As seen on StackOverflow: http://stackoverflow.com/questions/7634346/keyboard-hide-event
// FIXME: Discussion at http://bugzilla.libsdl.org/show_bug.cgi?id=1639
// FIXME: This is not a 100% effective solution to the problem of detecting if the keyboard is showing or not
// FIXME: A more effective solution would be to assume our Layout to be RelativeLayout or LinearLayout
// FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
// FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
//if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
// if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
// SDLActivity.onNativeKeyboardFocusLost();
// }
//}
if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
SDLActivity.onNativeKeyboardFocusLost();
}
}
return super.onKeyPreIme(keyCode, event);
}

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
ic = new SDLInputConnection(this, true);

outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL;
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
| EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;

Expand Down
5 changes: 3 additions & 2 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

# Build script intended for use in Travis CI

set -ex
set -ex pipefail

num_jobs=3

function run_tests
{
$WINE "$@" -d yes --rng-seed time $EXTRA_TEST_OPTS
# The grep supresses lines that begin with "0.0## s:", which are timing lines for tests with a very short duration.
$WINE "$@" -d yes --use-colour yes --rng-seed time $EXTRA_TEST_OPTS | grep -Ev "^0\.0[0-9]{2} s:"
}

date +%s > build-start-time
Expand Down
6 changes: 3 additions & 3 deletions data/core/tips.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
{
"type": "snippet",
"category": "tip",
"text": [ "Rotten food typically attracts bugs, and bugs got a lot bigger recently..." ]
"text": [ "Rotten food typically attracts bugs, and bugs got a lot bigger recently" ]
},
{
"type": "snippet",
Expand Down Expand Up @@ -222,7 +222,7 @@
{
"type": "snippet",
"category": "tip",
"text": [ "Routine kills. Stay alert! Don't let your guard down." ]
"text": [ "Routine kills. Stay alert! Don't let your guard down." ]
},
{
"type": "snippet",
Expand Down Expand Up @@ -312,7 +312,7 @@
{
"type": "snippet",
"category": "tip",
"text": [ "A survivor saved is a friend earned. Most of the time..." ]
"text": [ "A survivor saved is a friend earned. Most of the time" ]
},
{
"type": "snippet",
Expand Down
54 changes: 34 additions & 20 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"id": "bio_armor_arms",
"type": "bionic",
"name": "Alloy Plating - Arms",
"description": "The flesh on your arms has been surgically replaced by alloy plating. Provides passive protection and can be used in conjunction with bionic martial arts.",
"description": "The flesh on your arms has been surgically replaced by alloy plating. Provides passive protection and can be used in conjunction with bionic martial arts.",
"occupied_bodyparts": [ [ "ARM_L", 4 ], [ "ARM_R", 4 ] ],
"flags": [ "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF" ]
},
Expand All @@ -59,14 +59,14 @@
"type": "bionic",
"name": "Alloy Plating - Head",
"description": "The flesh on your head has been surgically replaced by alloy plating, protecting both your head and jaw regions.",
"occupied_bodyparts": [ [ "HEAD", 5 ] ],
"occupied_bodyparts": [ [ "HEAD", 5 ], [ "MOUTH", 1 ] ],
"flags": [ "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF" ]
},
{
"id": "bio_armor_legs",
"type": "bionic",
"name": "Alloy Plating - Legs",
"description": "The flesh on your legs has been surgically replaced by alloy plating. Provides passive protection and can be used in conjunction with bionic martial arts.",
"description": "The flesh on your legs has been surgically replaced by alloy plating. Provides passive protection and can be used in conjunction with bionic martial arts.",
"occupied_bodyparts": [ [ "LEG_L", 6 ], [ "LEG_R", 6 ] ],
"flags": [ "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF" ]
},
Expand All @@ -84,6 +84,10 @@
"name": "Battery System",
"description": "You have a battery draining attachment, and thus can make use of the energy contained in normal, everyday batteries. Use 'E' to drain charge from a battery. Can be toggled on and off at will.",
"occupied_bodyparts": [ [ "TORSO", 25 ] ],
"fuel_options": [ "battery" ],
"fuel_efficiency": 1,
"fuel_capacity": 2000,
"time": 1,
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ]
},
{
Expand Down Expand Up @@ -321,17 +325,24 @@
"id": "bio_ethanol",
"type": "bionic",
"name": "Ethanol Burner",
"description": "You burn alcohol as fuel in an extremely efficient reaction. However, you will still suffer the inebriating effects of the substance.",
"description": "You burn alcohol as fuel in an extremely efficient reaction.",
"occupied_bodyparts": [ [ "TORSO", 26 ] ],
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF" ]
"fuel_options": [ "chem_ethanol", "chem_methanol", "denat_alcohol" ],
"fuel_capacity": 500,
"fuel_efficiency": 0.5,
"exothermic_power_gen": true,
"time": 1,
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF", "BIONIC_TOGGLED" ]
},
{
"id": "bio_evap",
"type": "bionic",
"name": "Aero-Evaporator",
"description": "This unit draws moisture from the surrounding air, which then is poured from a fingertip in the form of water. It may fail in very dry environments.",
"occupied_bodyparts": [ [ "TORSO", 5 ], [ "HAND_R", 1 ] ],
"act_cost": "720 kJ"
"description": "This unit draws moisture from the surrounding air, which slowly trickles directly into your blood stream. It may fail in very dry environments.",
"occupied_bodyparts": [ [ "TORSO", 5 ] ],
"react_cost": "60 J",
"time": 1,
"flags": [ "BIONIC_TOGGLED" ]
},
{
"id": "bio_eye_enhancer",
Expand Down Expand Up @@ -561,11 +572,11 @@
{
"id": "bio_lighter",
"type": "bionic",
"name": "Mini-Flamethrower",
"name": "Finger Lighter",
"description": "The index fingers of both hands have powerful fire starters which extend from the tip.",
"occupied_bodyparts": [ [ "HAND_L", 1 ], [ "HAND_R", 1 ] ],
"fake_item": "fake_firestarter",
"act_cost": 75
"act_cost": "3 kJ"
},
{
"id": "bio_lockpick",
Expand All @@ -579,7 +590,7 @@
"id": "bio_magnet",
"type": "bionic",
"name": "Electromagnetic Unit",
"description": "Surgically embedded in your right hand is a powerful electromagnet, allowing you to indiscriminately pull all nearby magnetic objects towards you. Unlucky bystanders might be injured or killed by flying objects.",
"description": "Surgically embedded in your right hand is a powerful electromagnet, allowing you to use your own strength to pull all nearby magnetic objects towards you. Unlucky bystanders might be injured or killed by flying objects.",
"occupied_bodyparts": [ [ "HAND_R", 3 ] ],
"act_cost": "10 kJ"
},
Expand Down Expand Up @@ -608,6 +619,9 @@
"name": "Metabolic Interchange",
"description": "Your digestive system and power supply are interconnected; bionic energy is replenished by burning calories. Can be toggled on and off at will.",
"occupied_bodyparts": [ [ "TORSO", 25 ] ],
"fuel_options": [ "metabolism" ],
"fuel_efficiency": 0.25,
"time": 1,
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ]
},
{
Expand Down Expand Up @@ -663,7 +677,7 @@
"id": "bio_nostril",
"type": "bionic",
"name": "Bionic Nostril",
"description": "You're really not sure how the CBM ended up in your nose, but no matter how it got there this badly misplaced bionic makes it difficult to breathe. Increases mouth encumbrance by one.",
"description": "You're really not sure how the CBM ended up in your nose, but no matter how it got there this badly misplaced bionic makes it difficult to breathe. Increases mouth encumbrance by ten.",
"occupied_bodyparts": [ [ "HEAD", 2 ], [ "MOUTH", 1 ] ],
"encumbrance": [ [ "MOUTH", 10 ] ],
"flags": [ "BIONIC_FAULTY" ]
Expand Down Expand Up @@ -691,7 +705,7 @@
"id": "bio_pokedeye",
"type": "bionic",
"name": "Bionic Visual Impairment",
"description": "Due to a badly misplaced dielectric stylette, you are now suffering from mild optic neuropathy. Increases eye encumbrance by one.",
"description": "Due to a badly misplaced dielectric stylette, you are now suffering from mild optic neuropathy. Increases eye encumbrance by ten.",
"occupied_bodyparts": [ [ "EYES", 1 ] ],
"encumbrance": [ [ "EYES", 10 ] ],
"flags": [ "BIONIC_FAULTY" ]
Expand Down Expand Up @@ -720,16 +734,16 @@
"id": "bio_power_storage",
"type": "bionic",
"name": "Power Storage",
"capacity": 100,
"description": "A Compact Bionics Module that increases your power capacity by 100 units. Having at least one of these is a prerequisite to using powered bionics. You will also need a power supply, found in various CBMs.",
"capacity": "100 kJ",
"description": "A Compact Bionics Module that increases your power capacity by 100 kJ. Having at least one of these is a prerequisite to using powered bionics. You will also need a power supply, found in various CBMs.",
"flags": [ "BIONIC_NPC_USABLE" ]
},
{
"id": "bio_power_storage_mkII",
"type": "bionic",
"name": "Power Storage Mk. II",
"capacity": 250,
"description": "A Compact Bionics Module that increases your power capacity by 250 units.",
"capacity": "250 kJ",
"description": "A Compact Bionics Module that increases your power capacity by 250 kJ.",
"flags": [ "BIONIC_NPC_USABLE" ]
},
{
Expand Down Expand Up @@ -968,7 +982,7 @@
"id": "bio_thumbs",
"type": "bionic",
"name": "Self-Locking Thumbs",
"description": "Self-locking thumbs hold tight (even when you really don't want them to) and don't let go (even when you'd rather they did). Increases hand encumbrance by two, while failing to improve your ability to hold objects whatsoever.",
"description": "Self-locking thumbs hold tight (even when you really don't want them to) and don't let go (even when you'd rather they did). Increases hand encumbrance by ten, while failing to improve your ability to hold objects whatsoever.",
"occupied_bodyparts": [ [ "HAND_L", 1 ], [ "HAND_R", 1 ] ],
"encumbrance": [ [ "HAND_L", 10 ], [ "HAND_R", 10 ] ],
"flags": [ "BIONIC_FAULTY" ]
Expand Down Expand Up @@ -1084,7 +1098,7 @@
"id": "bio_fuel_cell_gasoline",
"type": "bionic",
"name": "Gasoline Fuel Cell CBM",
"description": "A small gasoline fuel cell fixed to your scapula. Despite its limited energy output compared to other fuel cells, this device still produces a significant amount of heat dissipated through a heat exhaust protruding from your back. A diffuse network of bio-plastic bladders has been meshed with your circulatory system and serves as a fuel tank.",
"description": "A small gasoline fuel cell fixed to your scapula. Despite its limited energy output compared to other fuel cells, this device still produces a significant amount of heat dissipated through a heat exhaust protruding from your back. A diffuse network of bio-plastic bladders has been meshed with your circulatory system and serves as a fuel tank.",
"occupied_bodyparts": [ [ "TORSO", 8 ] ],
"encumbrance": [ [ "TORSO", 5 ] ],
"fuel_options": [ "gasoline" ],
Expand Down Expand Up @@ -1122,7 +1136,7 @@
"id": "bio_taste_blocker",
"type": "bionic",
"name": "Taste Modifier",
"description": "A set of highly sensitive sensors is installed in your mouth, and a small yet sophisticated analyzer is installed in the cavity of your skull. The active bionic will nullify the taste of all comestibles with negative enjoyment value at the cost of draining bionic power.",
"description": "A set of highly sensitive sensors is installed in your mouth, and a small yet sophisticated analyzer is installed in the cavity of your skull. The active bionic will nullify the taste of all comestibles with negative enjoyment value at the cost of draining bionic power.",
"occupied_bodyparts": [ [ "HEAD", 1 ], [ "MOUTH", 1 ] ],
"flags": [ "BIONIC_TOGGLED" ]
},
Expand Down
Loading

0 comments on commit fb33d48

Please sign in to comment.