Skip to content

Commit

Permalink
Merge pull request #19 from CleverRaven/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Maleclypse committed Apr 28, 2020
2 parents 8d986f1 + 5926e6e commit ce276d2
Show file tree
Hide file tree
Showing 348 changed files with 52,664 additions and 32,858 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Note that despite github calling these "owners", a better term would be "alerts"
#Everything in the cataclysm repository remains under a creative commons license, nobody owns the mods.
#In fact, the code "owners" designation is meant to encourage third party
#individuals to contribute to the mod, with the maintainers notified for reviews.
#individuals to contribute to the mod, with the curators notified for reviews.

/data/mods/Aftershock/ @Malecypse @John-Candlebury
/data/mods/DinoMod/ @ephemeralstoryteller @damien @LyleSY
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/astyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: astyle

on:
pull_request

jobs:
style-json:
name: astyle check

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10

- name: install dependencies
run: sudo apt-get install astyle

- name: astyle check
run: make astyle-check

- name: Display Corrections
if: failure()
run: |
make astyle
git diff
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Cataclysm.dmg
/tests/map_iterator_test
/tests/shadowcasting_test
/tests/data/jsionized_overmap.sav
/test_user_dir

# temporary files generated by tools/reduce_tests.sh
/list_of_tests
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ jobs:
sources: [*apt_sources]

- env: COMPILER=g++-8 CXXFLAGS="-Wno-implicit-fallthrough" TILES=1 SOUND=1 SANITIZE=address EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency"
name: "GCC 8 Make build with Tiles, Sound, astyle and address sanitization"
name: "GCC 8 Make build with Tiles, Sound and address sanitization"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev", "astyle"]
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
sources: *apt_sources

- env: CLANG=clang++-8 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items ~[starve] ~grenade_lethality"
Expand Down
42 changes: 21 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TILES_TARGET_NAME = $(TARGET_NAME)-tiles

TARGET = $(BUILD_PREFIX)$(TARGET_NAME)
TILESTARGET = $(BUILD_PREFIX)$(TILES_TARGET_NAME)
ifdef TILES
ifeq ($(TILES), 1)
APPTARGET = $(TILESTARGET)
else
APPTARGET = $(TARGET)
Expand Down Expand Up @@ -191,7 +191,7 @@ ifndef BACKTRACE
BACKTRACE = 1
endif
endif
ifdef BACKTRACE
ifeq ($(BACKTRACE), 1)
# Also enable libbacktrace on cross-compilation to Windows
ifndef LIBBACKTRACE
ifneq (,$(findstring mingw32,$(CROSS)))
Expand Down Expand Up @@ -240,7 +240,7 @@ ifdef CLANG
OTHERS += -stdlib=libc++
LDFLAGS += -stdlib=libc++
endif
ifdef CCACHE
ifeq ($(CCACHE), 1)
CXX = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD)
LD = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD)
else
Expand All @@ -258,7 +258,7 @@ else
OS_COMPILER := $(CXX)
# Appears that the default value of $LD is unsuitable on most systems
OS_LINKER := $(CXX)
ifdef CCACHE
ifeq ($(CCACHE), 1)
CXX = ccache $(CROSS)$(OS_COMPILER)
LD = ccache $(CROSS)$(OS_LINKER)
else
Expand All @@ -282,7 +282,7 @@ ifneq ($(SANITIZE),)
endif

# enable optimizations. slow to build
ifdef RELEASE
ifeq ($(RELEASE), 1)
ifeq ($(NATIVE), osx)
ifdef OSXCROSS
OPTLEVEL = -O0
Expand All @@ -305,7 +305,7 @@ ifdef RELEASE
endif
endif

ifdef LTO
ifeq ($(LTO), 1)
ifdef CLANG
# LLVM's LTO will complain if the optimization level isn't between O0 and
# O3 (inclusive)
Expand All @@ -314,7 +314,7 @@ ifdef RELEASE
endif
CXXFLAGS += $(OPTLEVEL)

ifdef LTO
ifeq ($(LTO), 1)
ifeq ($(NATIVE), osx)
ifdef CLANG
LTOFLAGS += -flto=full
Expand Down Expand Up @@ -351,7 +351,7 @@ ifdef RELEASE
endif

ifndef RELEASE
ifdef NOOPT
ifeq ($(NOOPT), 1)
# While gcc claims to include all information required for
# debugging at -Og, at least with gcc 8.3, control flow
# doesn't move line-by-line at -Og. Provide a command-line
Expand Down Expand Up @@ -567,11 +567,11 @@ ifeq ($(SOUND), 1)
CXXFLAGS += -DSDL_SOUND
endif

ifdef SDL
ifeq ($(SDL), 1)
TILES = 1
endif

ifdef TILES
ifeq ($(TILES), 1)
SDL = 1
BINDIST_EXTRAS += gfx
ifeq ($(NATIVE),osx)
Expand Down Expand Up @@ -605,7 +605,7 @@ ifdef TILES
CXXFLAGS += $(shell $(PKG_CONFIG) SDL2_image --cflags)
CXXFLAGS += $(shell $(PKG_CONFIG) SDL2_ttf --cflags)

ifdef STATIC
ifeq ($(STATIC), 1)
LDFLAGS += $(shell $(PKG_CONFIG) sdl2 --static --libs)
else
LDFLAGS += $(shell $(PKG_CONFIG) sdl2 --libs)
Expand Down Expand Up @@ -807,7 +807,7 @@ ifeq ($(USE_XDG_DIR),1)
DEFINES += -DUSE_XDG_DIR
endif

ifdef LTO
ifeq ($(LTO), 1)
# Depending on the compiler version, LTO usually requires all the
# optimization flags to be specified on the link line, and requires them to
# match the original invocations.
Expand Down Expand Up @@ -836,7 +836,7 @@ all: version $(CHECKS) $(TARGET) $(L10N) $(TESTS) validate-pr

$(TARGET): $(OBJS)
+$(LD) $(W32FLAGS) -o $(TARGET) $(OBJS) $(LDFLAGS)
ifdef RELEASE
ifeq ($(RELEASE), 1)
ifndef DEBUG_SYMBOLS
ifneq ($(BACKTRACE),1)
$(STRIP) $(TARGET)
Expand Down Expand Up @@ -914,10 +914,10 @@ install: version $(TARGET)
cp -R --no-preserve=ownership data/credits $(DATA_PREFIX)
cp -R --no-preserve=ownership data/title $(DATA_PREFIX)
cp -R --no-preserve=ownership data/help $(DATA_PREFIX)
ifdef TILES
ifeq ($(TILES), 1)
cp -R --no-preserve=ownership gfx $(DATA_PREFIX)
endif
ifdef SOUND
ifeq ($(SOUND), 1)
cp -R --no-preserve=ownership data/sound $(DATA_PREFIX)
endif
install --mode=644 data/changelog.txt data/cataicon.ico data/fontdata.json \
Expand Down Expand Up @@ -946,10 +946,10 @@ install: version $(TARGET)
cp -R --no-preserve=ownership data/credits $(DATA_PREFIX)
cp -R --no-preserve=ownership data/title $(DATA_PREFIX)
cp -R --no-preserve=ownership data/help $(DATA_PREFIX)
ifdef TILES
ifeq ($(TILES), 1)
cp -R --no-preserve=ownership gfx $(DATA_PREFIX)
endif
ifdef SOUND
ifeq ($(SOUND), 1)
cp -R --no-preserve=ownership data/sound $(DATA_PREFIX)
endif
install --mode=644 data/changelog.txt data/cataicon.ico data/fontdata.json \
Expand Down Expand Up @@ -1012,16 +1012,16 @@ ifeq ($(LOCALIZE), 1)
LIBINTL=$$($(CROSS)otool -L $(APPTARGET) | grep libintl | sed -n 's/\(.*\.dylib\).*/\1/p') && if [ -f $$LIBINTL ]; then cp $$LIBINTL $(APPRESOURCESDIR)/; fi; \
if [ ! -z "$$OSXCROSS" ]; then LIBINTL=$$(basename $$LIBINTL) && if [ ! -z "$$LIBINTL" ]; then cp $(LIBSDIR)/gettext/lib/$$LIBINTL $(APPRESOURCESDIR)/; fi; fi
endif
ifdef TILES
ifdef SOUND
ifeq ($(TILES), 1)
ifeq ($(SOUND), 1)
cp -R data/sound $(APPDATADIR)
endif # ifdef SOUND
cp -R gfx $(APPRESOURCESDIR)/
ifdef FRAMEWORK
cp -R $(FRAMEWORKSDIR)/SDL2.framework $(APPRESOURCESDIR)/
cp -R $(FRAMEWORKSDIR)/SDL2_image.framework $(APPRESOURCESDIR)/
cp -R $(FRAMEWORKSDIR)/SDL2_ttf.framework $(APPRESOURCESDIR)/
ifdef SOUND
ifeq ($(SOUND), 1)
cp -R $(FRAMEWORKSDIR)/SDL2_mixer.framework $(APPRESOURCESDIR)/
cd $(APPRESOURCESDIR)/ && ln -s SDL2_mixer.framework/Frameworks/Vorbis.framework Vorbis.framework
cd $(APPRESOURCESDIR)/ && ln -s SDL2_mixer.framework/Frameworks/Ogg.framework Ogg.framework
Expand All @@ -1031,7 +1031,7 @@ else # libsdl build
cp $(SDLLIBSDIR)/libSDL2.dylib $(APPRESOURCESDIR)/
cp $(SDLLIBSDIR)/libSDL2_image.dylib $(APPRESOURCESDIR)/
cp $(SDLLIBSDIR)/libSDL2_ttf.dylib $(APPRESOURCESDIR)/
ifdef SOUND
ifeq ($(SOUND), 1)
cp $(SDLLIBSDIR)/libSDL2_mixer.dylib $(APPRESOURCESDIR)/
endif # ifdef SOUND
endif # ifdef FRAMEWORK
Expand Down
53 changes: 51 additions & 2 deletions data/json/achievements.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,63 @@
{
"id": "achievement_kill_zombie",
"type": "achievement",
"description": "One down, billions to go\u2026",
"name": "One down, billions to go\u2026",
"requirements": [ { "event_statistic": "num_avatar_zombie_kills", "is": ">=", "target": 1 } ]
},
{
"id": "achievement_kill_in_first_minute",
"type": "achievement",
"description": "Rude awakening",
"name": "Rude awakening",
"time_constraint": { "since": "game_start", "is": "<=", "target": "1 minute" },
"requirements": [ { "event_statistic": "num_avatar_kills", "is": ">=", "target": 1 } ]
},
{
"id": "achievement_survive_one_day",
"type": "achievement",
"name": "The first day of the rest of their unlives",
"time_constraint": { "since": "game_start", "is": ">=", "target": "1 day" },
"requirements": [ { "event_statistic": "num_avatar_wake_ups", "is": "anything" } ]
},
{
"id": "achievement_marathon",
"type": "achievement",
"name": "Pheidippides was a hack",
"description": "Run a marathon…plus a little bit more.",
"requirements": [ { "event_statistic": "num_moves_ran", "is": ">=", "target": 42196 } ]
},
{
"id": "achievement_walk_1000_miles",
"type": "achievement",
"name": "Please don't fall down at my door",
"description": "Walk 500 miles, then walk 500 more.",
"requirements": [ { "event_statistic": "num_moves_walked", "is": ">=", "target": 1609340 } ]
},
{
"id": "achievement_traverse_sharp_terrain",
"type": "achievement",
"name": "Every rose has its thorn",
"requirements": [ { "event_statistic": "num_moves_sharp_terrain", "is": ">=", "target": 100 } ]
},
{
"id": "achievement_swim_merit_badge",
"type": "achievement",
"name": "Swimming merit badge",
"requirements": [
{ "event_statistic": "num_moves_swam", "is": ">=", "target": 10000 },
{ "event_statistic": "num_moves_swam_underwater", "is": ">=", "target": 1000 },
{ "event_statistic": "min_move_underwater_z", "is": "<=", "target": -5 }
]
},
{
"id": "achievement_reach_max_z_level",
"type": "achievement",
"name": "Ain't no mountain high enough",
"requirements": [ { "event_statistic": "max_move_z", "is": ">=", "target": 10 } ]
},
{
"id": "achievement_reach_min_z_level",
"type": "achievement",
"name": "Ain't no valley low enough",
"requirements": [ { "event_statistic": "min_move_z", "is": "<=", "target": -10 } ]
}
]
7 changes: 6 additions & 1 deletion data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -1109,10 +1109,15 @@
"desc": [ "You have been vaccinated for the flu recently." ],
"blocks_effects": [ "flu" ]
},
{
"type": "effect_type",
"id": "took_antiasthmatic",
"name": [ "Took antiasthmatic drugs" ],
"desc": [ "You have taken an antiasthmatic drug recently." ]
},
{
"type": "effect_type",
"id": "cureall",
"//": "This is the royal jelly effect, it should cure pretty much everything.",
"removes_effects": [
"fungus",
"dermatik",
Expand Down
12 changes: 10 additions & 2 deletions data/json/furniture_and_terrain/furniture-flora.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@
"harvest_by_season": [
{
"seasons": [ "spring", "summer", "autumn" ],
"entries": [ { "drop": "withered", "base_num": [ 1, 2 ] }, { "drop": "seed_flower", "base_num": [ 1, 2 ] } ]
"entries": [
{ "drop": "withered", "base_num": [ 1, 2 ] },
{ "drop": "seed_flower", "base_num": [ 1, 2 ] },
{ "drop": "spurge", "base_num": [ 1, 4 ] }
]
}
],
"bash": { "str_min": 2, "str_max": 6, "sound": "crunch.", "sound_fail": "whish." }
Expand Down Expand Up @@ -174,7 +178,11 @@
"harvest_by_season": [
{
"seasons": [ "spring", "summer", "autumn" ],
"entries": [ { "drop": "withered", "base_num": [ 1, 2 ] }, { "drop": "seed_flower", "base_num": [ 1, 2 ] } ]
"entries": [
{ "drop": "withered", "base_num": [ 1, 2 ] },
{ "drop": "seed_flower", "base_num": [ 1, 2 ] },
{ "drop": "lotus", "base_num": [ 1, 2 ] }
]
}
],
"//": "Add flower and bud spawns once useful.",
Expand Down
15 changes: 5 additions & 10 deletions data/json/item_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@
"id": "ALCOHOL_WEAK",
"name": { "str": "Drink" }
},
{
"type": "item_action",
"id": "ANTIASTHMATIC",
"name": { "str": "Take" }
},
{
"type": "item_action",
"id": "ANTIBIOTIC",
Expand Down Expand Up @@ -834,11 +839,6 @@
"id": "RM13ARMOR_ON",
"name": { "str": "Turn off" }
},
{
"type": "item_action",
"id": "ROYAL_JELLY",
"name": { "str": "Consume" }
},
{
"type": "item_action",
"id": "SEED",
Expand Down Expand Up @@ -1104,11 +1104,6 @@
"id": "STRONG_ANTIBIOTIC",
"name": { "str": "Take" }
},
{
"type": "item_action",
"id": "PANACEA",
"name": { "str": "Take" }
},
{
"type": "item_action",
"id": "weigh_self",
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/Clothing_Gear/clothing.json
Original file line number Diff line number Diff line change
Expand Up @@ -2361,6 +2361,7 @@
[ "ashot", 4 ],
[ "pickaxe", 1 ],
[ "makeshift_machete", 4 ],
[ "machete_gimmick", 3 ],
[ "flamethrower_crude", 6 ],
[ "fungicide", 10 ],
[ "insecticide", 10 ],
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/Clothing_Gear/gear_civilian.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
[ "pockknife", 50 ],
[ "knife_folding", 30 ],
[ "knife_swissarmy", 10 ],
[ "machete_gimmick", 5 ],
[ "teleumbrella", 20 ],
[ "umbrella", 20 ],
[ "aspirin", 100 ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"subtype": "collection",
"items": [
{ "item": "molotov", "count": 50 },
{ "item": "pipebomb", "count": 50 },
{ "item": "improvised_pipebomb", "count": 50 },
{ "item": "fuse", "count": 20 },
{ "item": "FMCNote", "count": 3 },
{ "item": "nail", "count": 5 },
Expand Down
Loading

0 comments on commit ce276d2

Please sign in to comment.