Skip to content

Commit

Permalink
Merge pull request #20 from CleverRaven/master
Browse files Browse the repository at this point in the history
c
  • Loading branch information
faefux authored Sep 26, 2021
2 parents e40ab80 + af27432 commit d252bd5
Show file tree
Hide file tree
Showing 180 changed files with 128,276 additions and 82,430 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CBA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
fetch-depth: 1
- name: install dependencies
run: sudo apt-get install libncursesw5-dev
run: sudo apt-get install libncursesw5-dev gettext
- name: Prepare Build Analyzer
run: |
cd
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ tags
# Compiled binary translations
/lang/mo/

# Stampfile for binary translations
/lang/mo_built.stamp

# Directory for translatable strings
/lang/json/*
!/lang/json/README
Expand Down
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ endif

ifeq ($(LOCALIZE),1)
DEFINES += -DLOCALIZE
LOCALIZE_TEST_DEPS = localization $(TEST_MO)
endif

ifeq ($(TARGETSYSTEM),LINUX)
Expand Down Expand Up @@ -938,8 +939,21 @@ src/version.h: version

src/version.cpp: src/version.h

localization:
TEST_MO := data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo

$(TEST_MO): data/mods/TEST_DATA/lang/po/ru.po
mkdir -p $(dir $@)
msgfmt -f -o $@ $<

MO_DEPS := \
$(wildcard lang/*.sh lang/*.py src/*.cpp src/*.h) \
$(shell find data/{raw,json,mods,core,help} -type f -name '*.json')

lang/mo_built.stamp: $(MO_DEPS)
lang/compile_mo.sh $(LANGUAGES)
touch $@

localization: lang/mo_built.stamp

$(CHKJSON_BIN): $(CHKJSON_SOURCES)
$(CXX) $(CXXFLAGS) $(TOOL_CXXFLAGS) -Isrc/chkjson -Isrc $(CHKJSON_SOURCES) -o $(CHKJSON_BIN)
Expand All @@ -954,11 +968,12 @@ clean: clean-tests clean-object_creator clean-pch
rm -rf *$(BINDIST_DIR) *cataclysmdda-*.tar.gz *cataclysmdda-*.zip
rm -f $(SRC_DIR)/version.h
rm -f $(CHKJSON_BIN)
rm -f $(TEST_MO)

distclean:
rm -rf *$(BINDIST_DIR)
rm -rf save
rm -rf lang/mo
rm -rf lang/mo lang/mo_built.stamp
rm -f data/options.txt
rm -f data/keymap.txt
rm -f data/auto_pickup.txt
Expand Down Expand Up @@ -1168,7 +1183,7 @@ else
@echo Cannot run an astyle check, your system either does not have astyle, or it is too old.
endif

JSON_SOURCES := $(shell find data -name "*.json")
JSON_SOURCES := $(shell find data -name '* *' -prune -o -name "*.json" -print)
JSON_CHECK_STAMPS = $(sort $(patsubst %,$(ODIR)/%,$(JSON_SOURCES:.json=.jstyle-check-stamp)))
style-json : $(JSON_CHECK_STAMPS) $(JSON_FORMATTER_BIN)
$(JSON_CHECK_STAMPS) : $(ODIR)/%.jstyle-check-stamp : %.json $(JSON_FORMATTER_BIN)
Expand All @@ -1188,10 +1203,10 @@ $(JSON_FORMATTER_BIN): $(JSON_FORMATTER_SOURCES)
python-check:
flake8

tests: version $(BUILD_PREFIX)cataclysm.a
tests: version $(BUILD_PREFIX)cataclysm.a $(LOCALIZE_TEST_DEPS)
$(MAKE) -C tests

check: version $(BUILD_PREFIX)cataclysm.a
check: version $(BUILD_PREFIX)cataclysm.a $(LOCALIZE_TEST_DEPS)
$(MAKE) -C tests check

clean-tests:
Expand Down
10 changes: 0 additions & 10 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ then
# Regular build
make -j$num_jobs
cd ..
# Compile test translations
./lang/compile_mo.sh
mkdir -p ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES
msgfmt -f -o ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo ./data/mods/TEST_DATA/lang/po/ru.po
# Run regular tests
[ -f "${bin_path}cata_test" ] && parallel --verbose --linebuffer "run_test $(printf %q "${bin_path}")'/cata_test' {} '('{}')=> ' --user-dir=test_user_dir_{#}" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
[ -f "${bin_path}cata_test-tiles" ] && parallel --verbose --linebuffer "run_test $(printf %q "${bin_path}")'/cata_test-tiles' {} '('{}')=> ' --user-dir=test_user_dir_{#}" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
Expand All @@ -207,12 +203,6 @@ then
else
make -j "$num_jobs" RELEASE=1 CCACHE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0

if [[ "$LOCALIZE" != "0" ]]; then
./lang/compile_mo.sh
mkdir -p ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES
msgfmt -f -o ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo ./data/mods/TEST_DATA/lang/po/ru.po
fi

export ASAN_OPTIONS=detect_odr_violation=1
export UBSAN_OPTIONS=print_stacktrace=1
parallel -j "$num_test_jobs" --verbose --linebuffer "run_test './tests/cata_test' {} '('{}')=> ' --user-dir=test_user_dir_{#}" ::: "crafting_skill_gain" "[slow] ~crafting_skill_gain" "~[slow] ~[.]"
Expand Down
42 changes: 42 additions & 0 deletions data/json/achievements.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,20 @@
}
]
},
{
"id": "achievement_mutation_threshold_rabbit",
"type": "achievement",
"name": "Finally beat the tortoise",
"requirements": [
{
"event_statistic": "avatar_last_crosses_mutation_threshold",
"is": "==",
"target": [ "mutation_category_id", "RABBIT" ],
"description": "crossed rabbit mutation threshold",
"visible": "when_achievement_completed"
}
]
},
{
"id": "achievement_mutation_threshold_insect",
"type": "achievement",
Expand Down Expand Up @@ -539,6 +553,34 @@
}
]
},
{
"id": "achievement_mutation_threshold_gastropod",
"type": "achievement",
"name": "Carrying your home on your back",
"requirements": [
{
"event_statistic": "avatar_last_crosses_mutation_threshold",
"is": "==",
"target": [ "mutation_category_id", "GASTROPOD" ],
"description": "crossed gastropod mutation threshold",
"visible": "when_achievement_completed"
}
]
},
{
"id": "achievement_mutation_threshold_batrachian",
"type": "achievement",
"name": "Leaping forward in life",
"requirements": [
{
"event_statistic": "avatar_last_crosses_mutation_threshold",
"is": "==",
"target": [ "mutation_category_id", "BATRACHIAN" ],
"description": "crossed batrachian mutation threshold",
"visible": "when_achievement_completed"
}
]
},
{
"id": "achievement_mutation_threshold_alpha",
"type": "achievement",
Expand Down
2 changes: 1 addition & 1 deletion data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
"id": "bio_batteries",
"type": "bionic",
"name": { "str": "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.",
"description": "You have a battery draining attachment, and thus can make use of the energy contained in normal, everyday batteries. Use bionic menu to drain charge from a battery. Can be toggled on and off at will.",
"occupied_bodyparts": [ [ "torso", 20 ] ],
"fuel_options": [ "battery" ],
"fuel_efficiency": 1,
Expand Down
102 changes: 102 additions & 0 deletions data/json/dreams.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,36 @@
"category": "MEDICAL",
"strength": 1
},
{
"type": "dream",
"messages": [ "You have a strange dream about rabbits.", "Your dreams give you a strange furry feeling." ],
"category": "RABBIT",
"strength": 1
},
{
"type": "dream",
"messages": [ "You have a strange dream about birds.", "Your dreams give you a strange feathered feeling." ],
"category": "BIRD",
"strength": 1
},
{
"type": "dream",
"messages": [
"You have a strange dream about snails and slugs in your garden.",
"Your dreams leave you feeling like something is stuck to you."
],
"category": "GASTROPOD",
"strength": 1
},
{
"type": "dream",
"messages": [
"You have a strange dream about frogs in a pond near your childhood home.",
"Your dreams contain a croaking concerto."
],
"category": "BATRACHIAN",
"strength": 1
},
{
"type": "dream",
"messages": [ "You have a strange dream about fish.", "Your dreams give you a strange wet, scaly feeling." ],
Expand Down Expand Up @@ -162,6 +186,33 @@
"category": "MEDICAL",
"strength": 2
},
{
"type": "dream",
"messages": [
"You have a disturbing dream about running from dogs.",
"While dreaming, you see a distinctively rabbit-like reflection of yourself."
],
"category": "RABBIT",
"strength": 2
},
{
"type": "dream",
"messages": [
"You have a strange dream of carrying a house on your back.",
"While dreaming, you see yourself weighted down under massive backpack/tent upon your back, as you pass by a mirrored surface."
],
"category": "GASTROPOD",
"strength": 2
},
{
"type": "dream",
"messages": [
"You have a disturbing dream of eating insects.",
"While dreaming, you see yourself in a pond, your face has widened and is covered in mucus."
],
"category": "BATRACHIAN",
"strength": 2
},
{
"type": "dream",
"messages": [
Expand Down Expand Up @@ -326,6 +377,15 @@
"category": "LIZARD",
"strength": 3
},
{
"type": "dream",
"messages": [
"You have a strange dream about being the Easter Bunny.",
"You have a comforting and warm dream of living as a rabbit."
],
"category": "RABBIT",
"strength": 3
},
{
"type": "dream",
"messages": [
Expand Down Expand Up @@ -353,6 +413,24 @@
"category": "FISH",
"strength": 3
},
{
"type": "dream",
"messages": [
"You dream of leaping from the water to catch your prey.",
"You wake up with your legs pumping as you hop along in your sleep."
],
"category": "BATRACHIAN",
"strength": 3
},
{
"type": "dream",
"messages": [
"You dream of crawling along the world when you realize you can see three hundred and sixty degrees around yourself.",
"You dream of curling up inside a shell to sleep."
],
"category": "GASTROPOD",
"strength": 3
},
{
"type": "dream",
"messages": [
Expand Down Expand Up @@ -530,6 +608,12 @@
"category": "BIRD",
"strength": 4
},
{
"type": "dream",
"messages": [ "Will your burrow be warm enough for the family in winter?", "You dream of outrunning the apocalypse." ],
"category": "RABBIT",
"strength": 4
},
{
"type": "dream",
"messages": [
Expand Down Expand Up @@ -671,6 +755,24 @@
"category": "ELFA",
"strength": 4
},
{
"type": "dream",
"messages": [
"There is so much that you never imagined, the slime, the legs, and eyestalks but the shell was worth it.",
"You'll always be home, once you take this last step."
],
"category": "GASTROPOD",
"strength": 4
},
{
"type": "dream",
"messages": [
"You'd never considered that frogs were generalist predators before this point in your life…",
"On land and in the water, you control all that you can reach, and your tongue has quite the reach."
],
"category": "BATRACHIAN",
"strength": 4
},
{
"type": "dream",
"messages": [ "Your body flows slightly faster than you expected… oh, just a dream.", "FIGHT. FEED. FORWARD." ],
Expand Down
Loading

0 comments on commit d252bd5

Please sign in to comment.