Skip to content

Commit

Permalink
Merge pull request #11 from CleverRaven/master
Browse files Browse the repository at this point in the history
Catchup
  • Loading branch information
Maleclypse authored Jan 9, 2020
2 parents 13ffb8f + 4322f15 commit 6ed5b41
Show file tree
Hide file tree
Showing 129 changed files with 2,054 additions and 924 deletions.
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ option(TILES "Build graphical tileset version." "OFF")
option(CURSES "Build curses version." "ON")
option(SOUND "Support for in-game sounds & music." "OFF")
option(BACKTRACE "Support for printing stack backtraces on crash" "ON")
option(LIBBACKTRACE "Print backtrace with libbacktrace." "OFF")
option(USE_HOME_DIR "Use user's home directory for save files." "ON")
option(LOCALIZE "Support for language localizations. Also enable UTF support." "ON")
option(LANGUAGES "Compile localization files for specified languages." "")
Expand Down Expand Up @@ -221,12 +222,11 @@ ELSE()
SET(CATA_WARNINGS
"-Werror -Wall -Wextra \
-Wmissing-declarations \
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic")
IF(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CATA_WARNINGS "${CATA_WARNINGS} -Wsuggest-override")
ENDIF(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-Wold-style-cast \
-Woverloaded-virtual \
-Wsuggest-override \
-Wno-unknown-warning-option \
-Wpedantic")
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS}")
Expand Down Expand Up @@ -323,6 +323,9 @@ ENDIF(SOUND)

IF(BACKTRACE)
ADD_DEFINITIONS(-DBACKTRACE)
IF(LIBBACKTRACE)
ADD_DEFINITIONS(-DLIBBACKTRACE)
ENDIF(LIBBACKTRACE)
ENDIF(BACKTRACE)

# Ok. Now create build and install recipes
Expand Down
32 changes: 32 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,35 @@ CATCH unit-test framework (tests/catch/catch.hpp) is licensed under the Boost So
PLF List and PLF Colony (src/list.h, src/colony.h) are licensed under the zLib license (https://www.zlib.net/zlib_license.html).

getpost (tools/json_tools/format/getpost.h) is licensed under the MIT license, see file for text of license.

libbacktrace is licensed under a BSD license (https://github.com/ianlancetaylor/libbacktrace/blob/master/LICENSE). The full license text is as follows:

# Copyright (C) 2012-2016 Free Software Foundation, Inc.

# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:

# (1) Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.

# (2) Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.

# (3) The name of the author may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.

# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
# make LOCALIZE=0
# Disable backtrace support, not available on all platforms
# make BACKTRACE=0
# Use libbacktrace. Only has effect if BACKTRACE=1. (currently only for MinGW builds)
# make LIBBACKTRACE=1
# Compile localization files for specified languages
# make localization LANGUAGES="<lang_id_1>[ lang_id_2][ ...]"
# (for example: make LANGUAGES="zh_CN zh_TW" for Chinese)
Expand Down Expand Up @@ -90,10 +92,9 @@ WARNINGS = \
-Wmissing-declarations \
-Wold-style-cast \
-Woverloaded-virtual \
-Wsuggest-override \
-Wno-unknown-warning-option \
-Wpedantic
ifndef CLANG
WARNINGS += -Wsuggest-override
endif
# Uncomment below to disable warnings
#WARNINGS = -w
DEBUGSYMS = -g
Expand Down Expand Up @@ -171,6 +172,14 @@ ifndef BACKTRACE
BACKTRACE = 1
endif
endif
ifdef BACKTRACE
# Also enable libbacktrace on cross-compilation to Windows
ifndef LIBBACKTRACE
ifneq (,$(findstring mingw32,$(CROSS)))
LIBBACKTRACE = 1
endif
endif
endif

ifeq ($(RUNTESTS), 1)
TESTS = tests
Expand All @@ -185,7 +194,7 @@ W32ODIR = $(BUILD_PREFIX)objwin
W32ODIRTILES = $(W32ODIR)/tiles

ifdef AUTO_BUILD_PREFIX
BUILD_PREFIX = $(if $(RELEASE),release-)$(if $(DEBUG_SYMBOLS),symbol-)$(if $(TILES),tiles-)$(if $(SOUND),sound-)$(if $(LOCALIZE),local-)$(if $(BACKTRACE),back-)$(if $(SANITIZE),sanitize-)$(if $(MAPSIZE),map-$(MAPSIZE)-)$(if $(USE_XDG_DIR),xdg-)$(if $(USE_HOME_DIR),home-)$(if $(DYNAMIC_LINKING),dynamic-)$(if $(MSYS2),msys2-)
BUILD_PREFIX = $(if $(RELEASE),release-)$(if $(DEBUG_SYMBOLS),symbol-)$(if $(TILES),tiles-)$(if $(SOUND),sound-)$(if $(LOCALIZE),local-)$(if $(BACKTRACE),back-$(if $(LIBBACKTRACE),libbacktrace-))$(if $(SANITIZE),sanitize-)$(if $(MAPSIZE),map-$(MAPSIZE)-)$(if $(USE_XDG_DIR),xdg-)$(if $(USE_HOME_DIR),home-)$(if $(DYNAMIC_LINKING),dynamic-)$(if $(MSYS2),msys2-)
export BUILD_PREFIX
endif

Expand Down Expand Up @@ -340,7 +349,7 @@ endif
CXXFLAGS += $(WARNINGS) $(DEBUG) $(DEBUGSYMS) $(PROFILE) $(OTHERS) -MMD -MP
TOOL_CXXFLAGS = -DCATA_IN_TOOL

BINDIST_EXTRAS += README.md data doc
BINDIST_EXTRAS += README.md data doc LICENSE.txt
BINDIST = $(BUILD_PREFIX)cataclysmdda-$(VERSION).tar.gz
W32BINDIST = $(BUILD_PREFIX)cataclysmdda-$(VERSION).zip
BINDIST_CMD = tar --transform=s@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@ -czvf $(BINDIST) $(BINDIST_DIR)
Expand Down Expand Up @@ -666,11 +675,17 @@ ifeq ($(TARGETSYSTEM),WINDOWS)
LDFLAGS += -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion
ifeq ($(BACKTRACE),1)
LDFLAGS += -ldbghelp
ifeq ($(LIBBACKTRACE),1)
LDFLAGS += -lbacktrace
endif
endif
endif

ifeq ($(BACKTRACE),1)
DEFINES += -DBACKTRACE
ifeq ($(LIBBACKTRACE),1)
DEFINES += -DLIBBACKTRACE
endif
endif

ifeq ($(LOCALIZE),1)
Expand Down
1 change: 1 addition & 0 deletions build-scripts/libbacktrace-i686-w64-mingw32-sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
52811183c904305ddfa28d4b2236cc14da5293cd4d038d02b57d53dc18701502 *libbacktrace-i686-w64-mingw32.tar.gz
7 changes: 7 additions & 0 deletions build-scripts/requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ if [ -n "${MXE_TARGET}" ]; then
# Need to overwrite CXX to make the Makefile $CROSS logic work right.
export CXX="$COMPILER"
export CCACHE=1

curl -L -o libbacktrace-i686-w64-mingw32.tar.gz https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-i686-w64-mingw32.tar.gz
if ! shasum -a 256 -c ./build-scripts/libbacktrace-i686-w64-mingw32-sha256; then
echo "Checksum failed for libbacktrace-i686-w64-mingw32.tar.gz"
exit 1
fi
sudo tar -xzf libbacktrace-i686-w64-mingw32.tar.gz --exclude=LICENSE -C ${MXE_DIR}/../${PLATFORM}
fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
Expand Down
11 changes: 11 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,17 @@
"pre_terrain": "t_window_alarm",
"post_terrain": "t_window_bars_alarm"
},
{
"type": "construction",
"description": "Install Bars Onto Window",
"category": "CONSTRUCT",
"required_skills": [ [ "fabrication", 2 ] ],
"time": "30 m",
"qualities": [ [ { "id": "SAW_W", "level": 1 } ], [ { "id": "HAMMER", "level": 2 } ] ],
"components": [ [ [ "nail", 4 ] ], [ [ "sheet", 2 ] ], [ [ "stick", 1 ] ], [ [ "string_36", 1 ] ] ],
"pre_terrain": "t_window_bars",
"post_terrain": "t_window_bars_curtains"
},
{
"type": "construction",
"description": "Build Large Metal Support",
Expand Down
1 change: 1 addition & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
"type": "effect_type",
"id": "assisted",
"name": [ "Assisted" ],
"max_intensity": 1000,
"desc": [ "You're receiving assistance to practice a surgery." ]
},
{
Expand Down
6 changes: 3 additions & 3 deletions data/json/field_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@
{ "name": "pot smoke", "color": "light_gray" },
{ "name": "thick pot smoke", "color": "dark_gray" }
],
"npc_complain": { "chance": 20, "issue": "weed_smell", "duration": "10 minutes", "speech": "<weed_smell>" },
"npc_complain": { "chance": 20, "issue": "weed_smoke", "duration": "10 minutes", "speech": "<weed_smoke>" },
"decay_amount_factor": 5,
"percent_spread": 200,
"outdoor_age_speedup": "6 minutes",
Expand All @@ -775,7 +775,7 @@
{ "name": "crack smoke", "color": "light_gray" },
{ "name": "thick crack smoke", "color": "dark_gray" }
],
"npc_complain": { "chance": 20, "issue": "crack_smell", "duration": "30 minutes", "speech": "<crack_smell>" },
"npc_complain": { "chance": 20, "issue": "crack_smoke", "duration": "30 minutes", "speech": "<crack_smoke>" },
"decay_amount_factor": 5,
"percent_spread": 175,
"outdoor_age_speedup": "8 minutes",
Expand All @@ -795,7 +795,7 @@
{ "name": "meth smoke", "color": "light_gray" },
{ "name": "thick meth smoke", "color": "dark_gray" }
],
"npc_complain": { "chance": 20, "issue": "meth_smell", "duration": "30 minutes", "speech": "<meth_smell>" },
"npc_complain": { "chance": 20, "issue": "meth_smoke", "duration": "30 minutes", "speech": "<meth_smoke>" },
"decay_amount_factor": 5,
"percent_spread": 175,
"outdoor_age_speedup": "7 minutes",
Expand Down
18 changes: 18 additions & 0 deletions data/json/furniture_and_terrain/terrain-floors-outdoors.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,24 @@
"items": [ { "item": "rock", "count": [ 2, 15 ] }, { "item": "rebar", "count": [ 0, 4 ] } ]
}
},
{
"type": "terrain",
"id": "t_concrete_y",
"name": "concrete",
"description": "A newer segment of poured concrete with surface finishes for aesthetics and resistance to freeze-thaw cycles. Covered with a streak of yellow paint.",
"symbol": ".",
"color": "yellow",
"looks_like": "t_wall_y",
"move_cost": 2,
"flags": [ "TRANSPARENT", "FLAT", "ROAD", "MINEABLE" ],
"bash": {
"ter_set": "t_null",
"str_min": 50,
"str_max": 400,
"str_min_supported": 100,
"items": [ { "item": "rock", "count": [ 2, 15 ] }, { "item": "rebar", "count": [ 0, 4 ] } ]
}
},
{
"type": "terrain",
"id": "t_floor_noroof",
Expand Down
59 changes: 59 additions & 0 deletions data/json/furniture_and_terrain/terrain-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,65 @@
"items": [ { "item": "glass_shard", "count": [ 34, 50 ] } ]
}
},
{
"type": "terrain",
"id": "t_window_bars_curtains",
"name": "window with metal bars and curtains",
"description": "A barred window with fancy curtains that have been drawn shut, blocking sunlight and visibility. The curtains can only be opened on the inside. If you examined the curtains more closely, you could peek through the drapes or tear down everything.",
"symbol": "\"",
"looks_like": "t_curtains",
"color": "light_gray",
"move_cost": 0,
"coverage": 95,
"roof": "t_flat_roof",
"flags": [ "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", "CONNECT_TO_WALL", "BLOCK_WIND" ],
"examine_action": "curtains",
"open": "t_window_bars_domestic",
"bash": {
"str_min": 3,
"str_max": 6,
"sound": "glass breaking!",
"sound_fail": "whack!",
"sound_vol": 16,
"sound_fail_vol": 10,
"ter_set": "t_window_bars",
"items": [
{ "item": "glass_shard", "count": [ 34, 50 ] },
{ "item": "sheet", "count": 2 },
{ "item": "stick", "count": 1 },
{ "item": "string_36", "count": 1 }
]
}
},
{
"type": "terrain",
"id": "t_window_bars_domestic",
"name": "window with metal bars and curtains",
"description": "A giant sheet of glass inserted into a window with thick security grilles, making it impossible to crawl through. Typically installed for high-value stores, or at least stores in bad neighborhoods. This one has been retrofitted with curtains.",
"symbol": "#",
"looks_like": "t_window_bars",
"color": "light_gray",
"move_cost": 0,
"roof": "t_flat_roof",
"flags": [ "TRANSPARENT", "NOITEM", "OPENCLOSE_INSIDE", "BARRICADABLE_WINDOW_CURTAINS", "REDUCE_SCENT", "CONNECT_TO_WALL" ],
"examine_action": "curtains",
"close": "t_window_bars_curtains",
"bash": {
"str_min": 3,
"str_max": 6,
"sound": "glass breaking!",
"sound_fail": "whack!",
"sound_vol": 16,
"sound_fail_vol": 10,
"ter_set": "t_window_bars",
"items": [
{ "item": "glass_shard", "count": [ 34, 50 ] },
{ "item": "sheet", "count": 2 },
{ "item": "stick", "count": 1 },
{ "item": "string_36", "count": 1 }
]
}
},
{
"type": "terrain",
"id": "t_window_stained_green",
Expand Down
4 changes: 2 additions & 2 deletions data/json/itemgroups/clothing.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{ "item": "boots_combat" },
{ "item": "helmet_army", "prob": 80 },
{ "item": "gloves_tactical", "prob": 60 },
{ "item": "ballistic_vest", "prob": 90 },
{ "item": "ballistic_vest_esapi", "prob": 90 },
{ "item": "molle_pack", "prob": 85 },
{ "group": "clothing_tactical_leg", "prob": 15 },
{
Expand Down Expand Up @@ -139,7 +139,7 @@
{ "item": "boots_combat" },
{ "collection": [ { "item": "helmet_army" }, { "item": "helmet_liner" } ], "prob": 80 },
{ "collection": [ { "item": "gloves_liner", "prob": 60 }, { "item": "winter_gloves_army" } ], "prob": 80 },
{ "item": "ballistic_vest", "prob": 90 },
{ "item": "ballistic_vest_esapi", "prob": 90 },
{ "item": "molle_pack", "prob": 85 },
{ "group": "clothing_tactical_leg", "prob": 15 },
{
Expand Down
40 changes: 40 additions & 0 deletions data/json/itemgroups/food.json
Original file line number Diff line number Diff line change
Expand Up @@ -851,5 +851,45 @@
[ "eggnog_spiked", 5 ],
[ "drink_martini", 10 ]
]
},
{
"id": "barbecue",
"type": "item_group",
"items": [
[ "beer", 15 ],
[ "meat", 65 ],
[ "glazed_tenderloin", 55 ],
[ "fish", 10 ],
[ "fish_smoked", 5 ],
[ "meat_smoked", 60 ],
[ "sausage", 35 ],
[ "bratwurst_sausage", 30 ],
[ "hotdogs_frozen", 65 ],
[ "hotdogs_cooked", 65 ],
[ "chilidogs", 30 ],
[ "currywurst", 15 ],
[ "lettuce", 45 ],
[ "tomato", 45 ],
[ "onion", 30 ],
[ "chili_pepper", 30 ],
[ "corn", 20 ],
[ "irradiated_lettuce", 20 ],
[ "irradiated_tomato", 20 ],
[ "irradiated_onion", 5 ],
[ "irradiated_corn", 10 ],
[ "bacon", 20 ],
[ "potato_baked", 15 ],
[ "bread", 40 ],
[ "ketchup", 80 ],
[ "mustard", 75 ],
{ "item": "pickle", "prob": 20, "charges": 6, "container-item": "jar_glass_sealed" },
[ "pickle", 20 ],
[ "cheeseburger", 30 ],
[ "hamburger", 70 ],
[ "cheese", 45 ],
[ "ceramic_plate", 30 ],
[ "knife_steak", 45 ],
[ "tongs", 60 ]
]
}
]
6 changes: 3 additions & 3 deletions data/json/itemgroups/item_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
{
"type": "item_group",
"id": "fridge",
"//": "This is a terrible item group and should be phased out. See SUS_fridge for a more modern take on things.",
"//": "This is a terrible item group and should be phased out. See SUS_fridge in SUS - > domestic.json for a more modern take on things.",
"items": [
[ "water_clean", 90 ],
[ "water_mineral", 10 ],
Expand Down Expand Up @@ -3102,7 +3102,7 @@
"type": "item_group",
"items": [
[ "citrine", 50 ],
[ "diamond", 50 ],
[ "diamond", 100 ],
[ "emerald", 50 ],
[ "peridot", 50 ],
[ "amethyst", 50 ],
Expand All @@ -3111,7 +3111,7 @@
[ "blue_topaz", 50 ],
[ "tourmaline", 50 ],
[ "alexandrite", 50 ],
[ "pearl", 50 ],
[ "pearl", 100 ],
[ "opal", 50 ],
[ "ruby", 50 ],
[ "garnet", 50 ]
Expand Down
Loading

0 comments on commit 6ed5b41

Please sign in to comment.