diff --git a/.astylerc b/.astylerc
index 8048ff7c6dc07..3d1e7f91f44d8 100644
--- a/.astylerc
+++ b/.astylerc
@@ -48,4 +48,3 @@
# insert space padding around parentheses on the inside only
--pad-paren-in
-
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index c6eb40075e45d..3e92a542017aa 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -11,7 +11,7 @@
/data/mods/blazemod/ @SouP
/data/mods/classic_zombies/ @I-am-Erk
/data/mods/crt_expansion/ @Soupster89
-/data/mods/desertpack/ @davidpwbrown
+/data/mods/desertpack/ @davidpwbrown
/data/mods/generic_guns/ @tenmillimaster
/data/mods/Magiclysm/ @KorGgenT
/data/mods/my_sweet_cataclysm/ @Fris0uman
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index e9ee9eb178160..8627ab5c72bc2 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -138,7 +138,6 @@ For further details about commit message guidelines please visit:
$ git push origin new_feature
# origin was automatically set to point to your fork when you cloned it
-
3. Once you're finished working on your branch, and have committed and pushed all your changes, submit a pull request from your `new_feature` branch to this repository's `master` branch.
* Note: any new commits to the `new_feature` branch on GitHub will automatically be included in the pull request, so make sure to only commit related changes to the same branch.
@@ -231,10 +230,10 @@ You can also set the tracking information at the same time as creating the branc
## Unit tests
-There is a suite of tests built into the source tree at tests/
-You should run the test suite after ANY change to the game source.
+There is a suite of tests built into the source tree at tests/
+You should run the test suite after ANY change to the game source.
An ordinary invocation of ``make`` will build the test executable at tests/cata_test, and it can be invoked like any ordinary executable, or via `make check`.
-With no arguments it will run the entire test suite.
+With no arguments it will run the entire test suite.
With ``--help`` it will print a number of invocation options you can use to adjust its operation.
$ make
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 5981e83196a83..56906c0328a17 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -9,7 +9,6 @@ about: Create a report to help us improve
-
# Steps To Reproduce
-
# Expected behavior
-
# Screenshots
````json
[
diff --git a/doc/MONSTERS.md b/doc/MONSTERS.md
index 5d9ae36c49ef3..73f00bc14de4b 100644
--- a/doc/MONSTERS.md
+++ b/doc/MONSTERS.md
@@ -430,8 +430,6 @@ Whether the effect is permanent, in which case the "duration" will be ignored. T
The chance of the effect getting applied.
-
-
# Modding
Monster types can be overridden or modified in mods. To do so, one has to add an "edit-mode" member, which can contain either:
@@ -463,8 +461,6 @@ Modifying a type overrides the properties with the new values, this example sets
```
Some properties allow adding and removing entries, as documented above, usually via members with the "add:"/"remove:" prefix.
-
-
# Monster special attack types
The listed attack types can be as monster special attacks (see "special_attacks").
diff --git a/doc/NPCs.md b/doc/NPCs.md
index 6248dce2a2aaa..698711cd71311 100644
--- a/doc/NPCs.md
+++ b/doc/NPCs.md
@@ -12,7 +12,6 @@ Two topics are special:
- `TALK_DONE` ends the dialogue immediately.
- `TALK_NONE` goes to the previously talked about topic.
-
### Validating Dialogues
Keeping track of talk topics and making sure that all the topics referenced in responses are
defined, and all defined topics are referenced in a response or an NPC's chat, is very tricky.
@@ -453,7 +452,6 @@ Effect | Description
`u_remove_item_with`, `npc_remove_item_with: item_string` | You or the NPC will delete any instances of item in inventory.
This is an unconditional remove and will not fail if you or the NPC does not have the item.
`u_buy_monster: monster_type_string`, (*optional* `cost: cost_num`, *optional* `count: count_num`, *optional* `name: name_string`, *optional* `pacified: pacified_bool`) | The NPC will give your character `count_num` (default 1) instances of the monster as pets and will subtract `cost_num` from `op_of_u.owed` if specified. If the `op_o_u.owed` is less than `cost_num`, the trade window will open and the player will have to trade to make up the difference; the NPC will not give the player the item unless `cost_num` is satisfied.
If cost isn't present, the NPC gives your character the item at no charge.
If `name_string` is specified the monster(s) will have the specified name. If `pacified_bool` is set to true, the monster will have the pacified effect applied.
-
#### Behavior / AI
Effect | Description
@@ -625,7 +623,6 @@ Condition | Type | Description
`"is_day"` | simple string | `true` if it is currently daytime.
`"is_outside"` | simple string | `true` if the NPC is on a tile without a roof.
-
#### Sample responses with conditions and effects
```json
{
diff --git a/doc/OVERMAP.md b/doc/OVERMAP.md
index 33de8895c36df..60270300a7ff6 100644
--- a/doc/OVERMAP.md
+++ b/doc/OVERMAP.md
@@ -386,7 +386,6 @@ by the frequency assigned to the city building within the `region_settings`. Con
| `id` | Unique id. |
| `subtypes` | List of entries used to determine valid locations, terrain cost, and resulting overmap terrain. |
-
### Example
```json
@@ -430,7 +429,6 @@ by the frequency assigned to the city building within the `region_settings`. Con
| `id` | Unique id. |
| `terrains` | List of `overmap_terrain` that can be considered part of this location. |
-
### Example
```json
diff --git a/doc/REGION_SETTINGS.md b/doc/REGION_SETTINGS.md
index 4781f29931c00..689d77672f38a 100644
--- a/doc/REGION_SETTINGS.md
+++ b/doc/REGION_SETTINGS.md
@@ -28,7 +28,6 @@ Note that for the default region, all attributes and sections are required.
| `default_oter` | Default overmap terrain for this region. |
| `default_groundcover` | List of terrain types and weights applied as default ground cover. |
-
### Example
```json
{
@@ -84,7 +83,6 @@ regional entry to an actual entry.
}
```
-
## Field Coverage
The **field_coverage** section defines the furniture and terrain that make up the flora that
@@ -129,7 +127,7 @@ cover the `field` overmap terrain.
The **overmap_lake_settings** section defines the attributes used in generating lakes on the
overmap. The actual placement of these features is determined globally across all overmaps so that
the edges of the features align, and these parameters are mostly about how those global features
-are interpreted.
+are interpreted.
### Fields
diff --git a/doc/SOUNDPACKS.md b/doc/SOUNDPACKS.md
index 25ce2c972377f..057c2731db373 100644
--- a/doc/SOUNDPACKS.md
+++ b/doc/SOUNDPACKS.md
@@ -200,7 +200,7 @@ Where id describes the id of the sound effect, and a list of variants separated
# speach, it is currently linked with either item or monster id, or is special `NPC` or `NPC_loud`
# TODO: full vocalization of speech.json
-* `speech ` # examples: talking_doll, creepy_doll, Granade,
+* `speech ` # examples: talking_doll, creepy_doll, Granade,
* `speech ` # examples: eyebot, minitank, mi-go, many robots
* `speech NPC_m|NPC_f|NPC_m_loud|NPC_f_loud` # special for NPCs
* `speech robot` # special for robotic voice from a machine etc.
@@ -239,7 +239,6 @@ Where id describes the id of the sound effect, and a list of variants separated
# 6 forward gears, gear 0 = neutral, and gear -1 = reverse
* `vehicle gear_shift`
-
* `vehicle engine_backfire|engine_bangs_start|fault_immobiliser_beep|engine_single_click_fail|engine_multi_click_fail|engine_stutter_fail|engine_clanking_fail`
* `vehicle horn_loud|horn_medium|horn_low|rear_beeper|chimes|car_alarm`
* `vehicle reaper|scoop|scoop_thump`
diff --git a/doc/TER_FURN_TRANSFORM.md b/doc/TER_FURN_TRANSFORM.md
index 043a68df950d2..09b4b6e4620b3 100644
--- a/doc/TER_FURN_TRANSFORM.md
+++ b/doc/TER_FURN_TRANSFORM.md
@@ -19,7 +19,7 @@ A ter_furn_transform is a type of json object that allows you to specify a trans
]
```
-The example above turns "sand" into "dirt". It does so by comparing the direct terrain ids. In addition, we can add a fail message to the transform.
+The example above turns "sand" into "dirt". It does so by comparing the direct terrain ids. In addition, we can add a fail message to the transform.
If, however, we wanted to turn sand into "dirt or grass" we can do:
```json
@@ -33,7 +33,7 @@ If, however, we wanted to turn sand into "dirt or grass" we can do:
]
```
-message_good is optional and defaults to true.
+message_good is optional and defaults to true.
This example chooses either dirt or grass at a 1:1 ratio. But, if you want a 4:1 ratio:
```json
diff --git a/doc/TESTING.md b/doc/TESTING.md
index 7607a875ab902..86afc6164f8eb 100644
--- a/doc/TESTING.md
+++ b/doc/TESTING.md
@@ -8,7 +8,6 @@ Run `tests/cata_test --help` to see the available command-line options, and/or
consult the [Catch2 tutorial](https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md)
for a more thorough introduction.
-
## Guidelines
When creating tests, ensure that all objects used (directly or indirectly) are
@@ -22,7 +21,6 @@ the properties of the objects that the test needs. This protects the test from
shifting json definitions by making it apparent what about the object changed
to cause the test to break.
-
## Writing test cases
You can choose several ways to organize and express your tests, but the basic
@@ -140,7 +138,6 @@ This `CHECK` macro takes a boolean expression, failing the test if the
expression is false. Likewise, you can use `CHECK_FALSE`, which will fail if
the expression is true.
-
## Requiring or Checking
While the `CHECK` and `CHECK_FALSE` macros make assertions about the truth or
diff --git a/doc/TRANSLATING.md b/doc/TRANSLATING.md
index 2d066db72dcfe..fdd074256d5a4 100644
--- a/doc/TRANSLATING.md
+++ b/doc/TRANSLATING.md
@@ -381,7 +381,6 @@ If your system locale is different from the one you want to test, the easiest wa
So for example if your local language is New Zealand English (en_NZ), and you want to test the Russian (ru) translation, the steps would be `lang/compile_mo.sh ru`, `mv lang/mo/ru lang/mo/en_NZ`, `./cataclysm`.
-
[1]: https://www.transifex.com/cataclysm-dda-translators/cataclysm-dda/
[2]: https://discourse.cataclysmdda.org/c/game-talk/translations-team-discussion
[3]: https://docs.transifex.com/
diff --git a/doc/unicode_chars_palette.txt b/doc/unicode_chars_palette.txt
index d25cdfb0b4433..8eb26b2de067f 100644
--- a/doc/unicode_chars_palette.txt
+++ b/doc/unicode_chars_palette.txt
@@ -13,7 +13,6 @@
⓵⓶⓷⓸⓹⓺⓻⓼⓽⓾⓿
```
-
## 2500—257F Box Drawing
```
@@ -30,7 +29,6 @@
▐░▒▓▔▕▖▗▘▙▚▛▜▝▞▟
```
-
## 25A0—25FF Geometric Shapes
```
@@ -43,14 +41,12 @@
◰◱◲◳◴◵◶◷◸◹◺◻◼◽◾◿
```
-
## 2600—26FF Miscellaneous Symbols
```
☀☁☂☃☄★☆☇☈☉☊☋☌☍☎☏☐☑☒☓☔☕☖☗☘☙☚☛☜☝☞☟☠☡☢☣☤☥☦☧☨☩☪☫☬☭☮☯☰☱☲☳☴☵☶☷☸☹☺☻☼☽☾☿♀♁♂♃♄♅♆♇♈♉♊♋♌♍♎♏♐♑♒♓♔♕♖♗♘♙♚♛♜♝♞♟♠♡♢♣♤♥♦♧♨♩♪♫♬♭♮♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄⚅⚆⚇⚈⚉⚊⚋⚌⚍⚎⚏⚐⚑⚒⚓⚔⚕⚖⚗⚘⚙⚚⚛⚜⚝⚞⚟⚠⚡⚢⚣⚤⚥⚦⚧⚨⚩⚪⚫⚬⚭⚮⚯⚰⚱⚲⚳⚴⚵⚶⚷⚸⚹⚺⚻⚼⚽⚾⚿⛀⛁⛂⛃⛄⛅⛆⛇⛈⛉⛊⛋⛌⛍⛎⛏⛐⛑⛒⛓⛔⛕⛖⛗⛘⛙⛚⛛⛜⛝⛞⛟⛠⛡⛢⛣⛤⛥⛦⛧⛨⛩⛪⛫⛬⛭⛮⛯⛰⛱⛲⛳⛴⛵⛶⛷⛸⛹⛺⛻⛼⛽⛾⛿
```
-
## 2700—27BF Dingbats
```
@@ -69,21 +65,18 @@
➳➴➵➶➷➸➹➺➻➼➽➾➿
```
-
## 27C0—27EF Miscellaneous Mathematical Symbols-A
```
⟀⟁⟂⟃⟄⟅⟆⟇⟈⟉⟊⟋⟌⟍⟎⟏⟐⟑⟒⟓⟔⟕⟖⟗⟘⟙⟚⟛⟜⟝⟞⟟⟠⟡⟢⟣⟤⟥⟦⟧⟨⟩⟪⟫⟬⟭⟮⟯
```
-
## 27F0—27FF Supplemental Arrows-A
```
⟰⟱⟲⟳⟴⟵⟶⟷⟸⟹⟺⟻⟼⟽⟾⟿
```
-
## 2800—28FF Braille Patterns
```
@@ -96,7 +89,6 @@
⣼⣽⣾⣿
```
-
## 2900—297F Supplemental Arrows-B
```
@@ -111,14 +103,12 @@
⥰⥱⥲⥳⥴⥵⥶⥷⥸⥹⥺⥻⥼⥽⥾⥿
```
-
## 2980—29FF Miscellaneous Mathematical Symbols-B
```
⦀⦁⦂⦃⦄⦅⦆⦇⦈⦉⦊⦋⦌⦍⦎⦏⦐⦑⦒⦓⦔⦕⦖⦗⦘⦙⦚⦛⦜⦝⦞⦟⦠⦡⦢⦣⦤⦥⦦⦧⦨⦩⦪⦫⦬⦭⦮⦯⦰⦱⦲⦳⦴⦵⦶⦷⦸⦹⦺⦻⦼⦽⦾⦿⧀⧁⧂⧃⧄⧅⧆⧇⧈⧉⧊⧋⧌⧍⧎⧏⧐⧑⧒⧓⧔⧕⧖⧗⧘⧙⧚⧛⧜⧝⧞⧟⧠⧡⧢⧣⧤⧥⧦⧧⧨⧩⧪⧫⧬⧭⧮⧯⧰⧱⧲⧳⧴⧵⧶⧷⧸⧹⧺⧻⧼⧽⧾⧿
```
-
## 2A00—2AFF Supplemental Mathematical Operators
```
@@ -136,8 +126,7 @@
⫮⫯⫰⫱⫲⫳⫴⫵⫶⫷⫸⫹⫺⫻⫼⫽⫾⫿
```
-
-## 2B00—2BFF Miscellaneous Symbols and Arrows
+## 2B00—2BFF Miscellaneous Symbols and Arrows
```
⬀⬁⬂⬃⬄⬅⬆⬇⬈⬉⬊⬋⬌⬍
diff --git a/doxygen_doc/doxygen_conf.txt b/doxygen_doc/doxygen_conf.txt
index e08a825be1217..1377e3841d16b 100644
--- a/doxygen_doc/doxygen_conf.txt
+++ b/doxygen_doc/doxygen_conf.txt
@@ -199,19 +199,19 @@ TAB_SIZE = 4
ALIASES =
-ALIASES += "EFFECT_STR=\xrefitem Effects_Stat_Strength \"\" \"\" Strength"
-ALIASES += "EFFECT_DEX=\xrefitem Effects_Stat_Dexterity \"\" \"\" Dexterity"
-ALIASES += "EFFECT_INT=\xrefitem Effects_Stat_Intelligence \"\" \"\" Intelligence"
+ALIASES += "EFFECT_STR=\xrefitem Effects_Stat_Strength \"\" \"\" Strength"
+ALIASES += "EFFECT_DEX=\xrefitem Effects_Stat_Dexterity \"\" \"\" Dexterity"
+ALIASES += "EFFECT_INT=\xrefitem Effects_Stat_Intelligence \"\" \"\" Intelligence"
ALIASES += "EFFECT_PER=\xrefitem Effects_Stat_Perception \"\" \"\" Perception"
-ALIASES += "EFFECT_STR_MAX=\xrefitem Effects_Stat_Strength \"\" \"\" Maximum Strength"
-ALIASES += "EFFECT_DEX_MAX=\xrefitem Effects_Stat_Dexterity \"\" \"\" Maximum Dexterity"
-ALIASES += "EFFECT_INT_MAX=\xrefitem Effects_Stat_Intelligence \"\" \"\" Maximum Intelligence"
+ALIASES += "EFFECT_STR_MAX=\xrefitem Effects_Stat_Strength \"\" \"\" Maximum Strength"
+ALIASES += "EFFECT_DEX_MAX=\xrefitem Effects_Stat_Dexterity \"\" \"\" Maximum Dexterity"
+ALIASES += "EFFECT_INT_MAX=\xrefitem Effects_Stat_Intelligence \"\" \"\" Maximum Intelligence"
ALIASES += "EFFECT_PER_MAX=\xrefitem Effects_Stat_Perception \"\" \"\" Maximum Perception"
-ALIASES += "EFFECT_STR_NPC=\xrefitem Effects_Stat_Strength \"\" \"\" NPC Strength"
-ALIASES += "EFFECT_DEX_NPC=\xrefitem Effects_Stat_Dexterity \"\" \"\" NPC Dexterity"
-ALIASES += "EFFECT_INT_NPC=\xrefitem Effects_Stat_Intelligence \"\" \"\" NPC Intelligence"
+ALIASES += "EFFECT_STR_NPC=\xrefitem Effects_Stat_Strength \"\" \"\" NPC Strength"
+ALIASES += "EFFECT_DEX_NPC=\xrefitem Effects_Stat_Dexterity \"\" \"\" NPC Dexterity"
+ALIASES += "EFFECT_INT_NPC=\xrefitem Effects_Stat_Intelligence \"\" \"\" NPC Intelligence"
ALIASES += "EFFECT_PER_NPC=\xrefitem Effects_Stat_Perception \"\" \"\" NPC Perception"
ALIASES += "EFFECT_BARTER=\xrefitem Effects_Skill_Barter \"\" \"\" Barter"
diff --git a/gfx/tile_config_template.json b/gfx/tile_config_template.json
index 28f3a318a804e..37d1c07234538 100644
--- a/gfx/tile_config_template.json
+++ b/gfx/tile_config_template.json
@@ -1434,8 +1434,6 @@
"multitile":false
},
-
-
{
"id": "tr_bubblewrap",
"fg":-1,
@@ -1703,7 +1701,6 @@
"multitile":false
},
-
{
"id": "fd_blood",
"fg":-1,
@@ -1880,8 +1877,6 @@
"multitile":false
},
-
-
{
"id": "mon_squirrel",
"fg":-1,
@@ -2765,8 +2760,6 @@
"multitile":false
},
-
-
{
"id": "f_hay",
"fg":-1,
@@ -3125,10 +3118,6 @@
"multitile":false
},
-
-
-
-
{
"id": "vp_seat",
"fg":-1,
diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt
index 65b5dad1c23f9..e5715e31ff20d 100644
--- a/lang/CMakeLists.txt
+++ b/lang/CMakeLists.txt
@@ -84,7 +84,7 @@ foreach (LANG ${LANGUAGES})
add_custom_command (
TARGET translations_compile
PRE_BUILD
- COMMAND
+ COMMAND
${GETTEXT_MSGFMT_EXECUTABLE} -f ${CMAKE_SOURCE_DIR}/lang/po/${LANG}.po
-o ${CMAKE_SOURCE_DIR}/lang/mo/${LANG}/LC_MESSAGES/cataclysm-dda.mo
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
diff --git a/lang/extract_json_strings.py b/lang/extract_json_strings.py
index d621a1554bbc0..805601e34a771 100755
--- a/lang/extract_json_strings.py
+++ b/lang/extract_json_strings.py
@@ -363,7 +363,6 @@ def extract_effect_type(item):
writestr(outfile, msg, context="memorial_female",
comment="Female memorial remove log for effect(s) '{}'.".format(', '.join(name)))
-
def extract_gun(item):
outfile = get_outfile("gun")
if "name" in item:
@@ -390,7 +389,6 @@ def extract_gun(item):
item_reload_noise = item.get("reload_noise")
writestr(outfile, item_reload_noise)
-
def extract_gunmod(item):
outfile = get_outfile("gunmod")
if "name" in item:
@@ -413,7 +411,6 @@ def extract_gunmod(item):
for target in item["mod_targets"]:
writestr(outfile, target, context="gun_type_type")
-
def extract_professions(item):
outfile = get_outfile("professions")
nm = item["name"]
@@ -503,7 +500,6 @@ def extract_monster_attack(item):
if "no_dmg_msg_npc" in item:
writestr(outfile, item.get("no_dmg_msg_npc"))
-
def extract_recipes(item):
outfile = get_outfile("recipe")
if "book_learn" in item:
@@ -515,7 +511,6 @@ def extract_recipes(item):
if "blueprint_name" in item:
writestr(outfile, item["blueprint_name"])
-
def extract_recipe_group(item):
outfile = get_outfile("recipe_group")
if "recipes" in item:
@@ -705,7 +700,6 @@ def extract_mutation_category(item):
writestr(outfile, found, context="memorial_female",
comment="Mutation class: {} Female memorial messsage".format(item_name))
-
def extract_vehspawn(item):
outfile = get_outfile("vehicle_spawn")
@@ -750,7 +744,7 @@ def extract_field_type(item):
for fd in item.get("intensity_levels"):
if "name" in fd:
writestr(outfile,fd.get("name"))
-
+
def extract_ter_furn_transform_messages(item):
outfile = get_outfile("ter_furn_transform_messages")
writestr(outfile,item.get("fail_message"))
diff --git a/lang/notes/README_all_translators.md b/lang/notes/README_all_translators.md
index 9f6676e81effb..e8944026ca7d7 100644
--- a/lang/notes/README_all_translators.md
+++ b/lang/notes/README_all_translators.md
@@ -32,7 +32,6 @@ Another exmple is:
This is similar to the last example, except it is a more common phrase. It is used in the files action.cpp, defense.cpp (twice) and npcmove.cpp. The translation will replace every usage.
-
## Translation file header
The header at the top of the ".po" file is the only part that differs from the comment/msgid/msgstr format.
@@ -68,7 +67,6 @@ If you are starting a new translation, or you are in charge of the existing tran
The only important part that cannot be easily filled out manually is the `Plural-Forms` section. It determines how different numbers of things are handled in your language. More on that later.
-
## Format strings and newlines
Some strings will have special terms such as `%s`, `%2$d` and `\n`.
@@ -107,7 +105,6 @@ For example:
would be displayed in-game as `kcurt eht fo lortnoc sesol liagibA`, assuming `Abigail` was driving a `truck`.
-
## Special tags in strings
Some strings in the translation may have special tags in front of or inside them. These tags should be left as-is, and only the rest of the string translated.
@@ -123,7 +120,6 @@ For example:
Names also have a comment above them, indicating what the name is used for in-game. In this case, `Abigail` is a possible first name for a female NPC.
-
## Plural forms
Many languages use different terms for things depending on how many of them there are. These are supported using plural forms, defined by the `Plural-Form` line in the ".po" file header.
diff --git a/lang/notes/de.txt b/lang/notes/de.txt
index d06822770eaa3..db49215d5e62a 100644
--- a/lang/notes/de.txt
+++ b/lang/notes/de.txt
@@ -99,8 +99,6 @@ Beachte: All diese Ansätze sind nur Notlösungen!
Eine echte Lösung des Problems kann es eigentlich nur geben, wenn die Art, wie C:DDA diese Strings aufbaut, grundsätzlich ändert. :-(
-
-
Problemwort: »bionics«
----------------------
C:DDA verwendet »bionic« als Wort für eine Art Implantat, nicht für ein Konzept wie in Wikipedia beschrieben (s.u.).
@@ -114,7 +112,6 @@ So übersetzen wir es:
* »bionic« → »bionics«
-
Aus der englischsprachigen Wikipedia:
Bionics (also known as biomimicry, biomimetics, bio-inspiration, biognosis, and close to bionical creativity engineering) is the application of biological methods and systems found in nature to the study and design of engineering systems and modern technology
diff --git a/src/colony.h b/src/colony.h
index f335258958c0d..a73d472d3cbc2 100644
--- a/src/colony.h
+++ b/src/colony.h
@@ -3036,7 +3036,7 @@ class colony : private element_allocator_type
// Process initial group:
if( iterator1.group_pointer->free_list_head == std::numeric_limits::max() ) {
- // If no prior erasures have occured in this group we can do simple addition
+ // If no prior erasures have occurred in this group we can do simple addition
distance += static_cast( iterator1.group_pointer->last_endpoint -
iterator1.element_pointer );
} else if( iterator1.element_pointer == iterator1.group_pointer->elements ) {
diff --git a/src/npcmove.cpp b/src/npcmove.cpp
index e69cf42ae171b..98610b0d3c483 100644
--- a/src/npcmove.cpp
+++ b/src/npcmove.cpp
@@ -4067,7 +4067,7 @@ void npc::set_omt_destination()
std::string dest_type;
for( const auto &fulfill : needs ) {
- // look for the closest occurence of any of that locations terrain types
+ // look for the closest occurrence of any of that locations terrain types
std::vector loc_list = get_location_for( fulfill )->get_all_terrains();
std::shuffle( loc_list.begin(), loc_list.end(), rng_get_engine() );
omt_find_params find_params;
diff --git a/src/popup.h b/src/popup.h
index 6a28cba765f60..0ec29b06fef80 100644
--- a/src/popup.h
+++ b/src/popup.h
@@ -50,7 +50,7 @@ class query_popup
* true and "QUIT" action occurs, or "ANY_INPUT" if `allow_anykey` is
* set to true and an unknown action occurs. In `query_once`, action
* can also be other actions such as "LEFT" or "RIGHT" which are used
- * for moving the cursor. If an error occured, such as when the popup
+ * for moving the cursor. If an error occurred, such as when the popup
* is not properly set up, `action` will be "ERROR".
*
* `evt` is the actual `input_event` that triggers the action. Note that
diff --git a/src/stats_tracker.h b/src/stats_tracker.h
index 49123b05e4c85..8b36623ffe25a 100644
--- a/src/stats_tracker.h
+++ b/src/stats_tracker.h
@@ -21,13 +21,13 @@ enum class monotonically : int;
class score;
class stats_tracker;
-// The stats_tracker is intended to keep a summary of events that have occured.
+// The stats_tracker is intended to keep a summary of events that have occurred.
// For each event_type it stores an event_multiset.
// Within the event_tracker, counts are kept. The events are partitioned
// according to their data (an event::data_type object, which is a map of keys
// to values).
// The stats_tracker can be queried in various ways to get summary statistics
-// about events that have occured.
+// about events that have occurred.
class event_multiset
{
diff --git a/src/suffer.cpp b/src/suffer.cpp
index 2f12b5250f4e6..0a47e6c20f740 100644
--- a/src/suffer.cpp
+++ b/src/suffer.cpp
@@ -1794,7 +1794,7 @@ void Character::apply_wetness_morale( int temperature )
} else if( effective_drench < part_good ) {
// Positive or 0
// Won't go higher than part_good / 2
- // Wet slime/scale doesn't feel as good when covered by wet rags/fur/kevlar
+ // Wet slime/scale doesn't feel as good when covered by wet rags/fur/Kevlar
bp_morale = std::min( effective_drench, part_good - effective_drench );
} else if( effective_drench > part_good + part_neutral ) {
// This one will be negative
diff --git a/tests/catch/catch.hpp b/tests/catch/catch.hpp
index e62d863ce0e01..81843a5418698 100644
--- a/tests/catch/catch.hpp
+++ b/tests/catch/catch.hpp
@@ -13,7 +13,6 @@
#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED
// start catch.hpp
-
#define CATCH_VERSION_MAJOR 2
#define CATCH_VERSION_MINOR 12
#define CATCH_VERSION_PATCH 0
@@ -694,7 +693,6 @@ constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) n
// end catch_stringref.h
// start catch_preprocessor.hpp
-
#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__
#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__)))
#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__)))
@@ -922,7 +920,6 @@ constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) n
// end catch_preprocessor.hpp
// start catch_meta.hpp
-
#include
namespace Catch {
@@ -3832,7 +3829,6 @@ namespace Catch {
// start catch_interfaces_generatortracker.h
-
#include
namespace Catch {
@@ -5407,7 +5403,6 @@ namespace Catch {
// Statistics estimates
-
namespace Catch {
namespace Benchmark {
template
@@ -6021,7 +6016,6 @@ namespace Catch {
// end catch_console_colour.h
// start catch_reporter_registrars.hpp
-
namespace Catch {
template
@@ -6422,12 +6416,10 @@ namespace Catch {
// User-facing chronometer
-
// start catch_clock.hpp
// Clocks
-
#include
#include
@@ -6459,7 +6451,6 @@ namespace Catch {
// Hinting the optimizer
-
#if defined(_MSC_VER)
# include // atomic_thread_fence
#endif
@@ -6519,7 +6510,6 @@ namespace Catch {
// Invoke with a special case for void
-
#include
#include
@@ -6631,7 +6621,6 @@ namespace Catch {
// Environment information
-
namespace Catch {
namespace Benchmark {
template
@@ -6658,12 +6647,10 @@ namespace Catch {
// Execution plan
-
// start catch_benchmark_function.hpp
// Dumb std::function implementation for consistent call overhead
-
#include
#include
#include
@@ -6756,7 +6743,6 @@ namespace Catch {
// repeat algorithm
-
#include
#include
@@ -6785,17 +6771,14 @@ namespace Catch {
// Run a function for a minimum amount of time
-
// start catch_measure.hpp
// Measure
-
// start catch_timing.hpp
// Timing
-
#include
#include
@@ -6918,12 +6901,10 @@ namespace Catch {
// Environment measurement
-
// start catch_stats.hpp
// Statistical analysis tools
-
#include
#include
#include
@@ -7164,12 +7145,10 @@ namespace Catch {
// Run and analyse one benchmark
-
// start catch_sample_analysis.hpp
// Benchmark results
-
#include
#include
#include
@@ -7952,7 +7931,6 @@ namespace Catch {
// start catch_windows_h_proxy.h
-
#if defined(CATCH_PLATFORM_WINDOWS)
#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)
@@ -8413,7 +8391,6 @@ namespace Catch {
// Clara v1.1.5
-
#ifndef CATCH_CLARA_CONFIG_CONSOLE_WIDTH
#define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 80
#endif
@@ -8442,7 +8419,6 @@ namespace Catch {
//
// This project is hosted at https://github.com/philsquared/textflowcpp
-
#include
#include
#include
@@ -17678,7 +17654,6 @@ using Catch::Detail::Approx;
// start catch_reenable_warnings.h
-
#ifdef __clang__
# ifdef __ICC // icpc defines the __clang__ macro
# pragma warning(pop)
diff --git a/tools/copy_from.py b/tools/copy_from.py
index b8dc3157a07c0..0aef8020edde0 100755
--- a/tools/copy_from.py
+++ b/tools/copy_from.py
@@ -23,7 +23,6 @@ def get_data(argsDict, resource_name):
exit("Failed: {} was empty".format(resource_filename))
return resource
-
args = argparse.ArgumentParser(description="Make items use copy-from.")
args.add_argument("item_source", action="store",
help="specify json file to rewrite using copy-from.")
diff --git a/tools/dialogue_validator.py b/tools/dialogue_validator.py
index 263e26db9f9f9..4340c866a1d9e 100755
--- a/tools/dialogue_validator.py
+++ b/tools/dialogue_validator.py
@@ -9,7 +9,6 @@
"TALK_DENY_GUARD", "TALK_FRIEND_UNCOMFORTABLE", "TALK_USE_ITEM", "TALK_GIVE_ITEM"
]
-
args = argparse.ArgumentParser(description="Confirm that every talk topic in every response in a "
"dialogue JSON is defined, and that every defined talk "
"topic is referenced in at least one response.\n"
@@ -36,9 +35,8 @@ def get_dialogue_from_json():
if path.endswith(".json"):
with open(path) as dialogue_file:
dialogue += json.load(dialogue_file)
-
- return dialogue
+ return dialogue
def add_topic_by_chat(topics, topic_id, topic_branches=None, this_ids=None):
topics.setdefault(topic_id, {})
@@ -48,7 +46,6 @@ def add_topic_by_chat(topics, topic_id, topic_branches=None, this_ids=None):
this_ids.append(topic_id)
topics[topic_id]["in_response"] = True
-
def add_topic_by_id(topics, topic_id, topic_branches=None, this_ids=None):
if topic_id in OBSOLETE_TOPICS:
return
@@ -59,7 +56,6 @@ def add_topic_by_id(topics, topic_id, topic_branches=None, this_ids=None):
topics.setdefault(topic_id, {})
topics[topic_id]["valid"] = True
-
def add_topic_by_response(topics, response, topic_branches=None, this_ids=None):
topic_id = response.get("topic")
if not topic_id:
@@ -78,7 +74,6 @@ def add_topic_by_response(topics, response, topic_branches=None, this_ids=None):
else:
topic_branches[parent_id]["responses"].append(topic_id)
-
def parse_response(topics, response, topic_branches=None, this_ids=None):
if response.get("topic"):
add_topic_by_response(topics, response, topic_branches, this_ids)
@@ -88,7 +83,6 @@ def parse_response(topics, response, topic_branches=None, this_ids=None):
failure_r = response.get("failure", {})
add_topic_by_response(topics, failure_r, topic_branches, this_ids)
-
def validate(dialogue):
topics = {}
topic_branches = {
diff --git a/tools/generate_changelog.py b/tools/generate_changelog.py
index 3820749ef850f..f8ec0be99cfe7 100755
--- a/tools/generate_changelog.py
+++ b/tools/generate_changelog.py
@@ -18,13 +18,10 @@
import xml.etree.ElementTree
from datetime import time as dtime, date, datetime, timedelta
-
log = logging.getLogger('generate_changelog')
-
class MissingCommitException(Exception): pass
-
class JenkinsBuild:
"""Representation of a Jenkins Build"""
@@ -45,7 +42,6 @@ def was_successful(self):
def __str__(self):
return f'{self.__class__.__name__}[{self.number} - {self.last_hash} - {self.build_dttm} - {self.build_result}]'
-
class Commit(object):
"""Representation of a generic GitHub Commit"""
@@ -73,7 +69,6 @@ def is_merge(self):
def __str__(self):
return f'{self.__class__.__name__}[{self.hash} - {self.commit_dttm} - {self.message} BY {self.author}]'
-
class PullRequest(object):
"""Representation of a generic GitHub Pull Request"""
@@ -114,7 +109,6 @@ def updated_before(self, update_dttm):
def __str__(self):
return f'{self.__class__.__name__}[{self.id} - {self.merge_dttm} - {self.title} BY {self.author}]'
-
class SummaryType:
"""Different valid Summary Types. Intended to be used as a enum/constant class, no instantiation needed."""
@@ -130,7 +124,6 @@ class SummaryType:
BUILD = 'BUILD'
I18N = 'I18N'
-
class CDDAPullRequest(PullRequest):
"""A Pull Request with logic specific to CDDA Repository and their "Summary" descriptions"""
@@ -198,7 +191,6 @@ def __str__(self):
return (f'{self.__class__.__name__}'
f'[{self.id} - {self.merge_dttm} - {self.title} BY {self.author}]')
-
class JenkinsBuildFactory:
"""Abstraction for instantiation of new Commit objects"""
@@ -212,7 +204,6 @@ class CommitFactory:
def create(self, hash_id, message, commit_date, author, parents):
return Commit(hash_id, message, commit_date, author, parents)
-
class CDDAPullRequestFactory:
"""Abstraction for instantiation of new CDDAPullRequests objects"""
@@ -222,7 +213,6 @@ def __init__(self, store_body=False):
def create(self, pr_id, title, author, state, body, merge_hash, merge_dttm, update_dttm):
return CDDAPullRequest(pr_id, title, author, state, body, merge_hash, merge_dttm, update_dttm, self.store_body)
-
class CommitRepository:
"""Groups Commits for storage and common operations"""
@@ -304,7 +294,6 @@ def get_commit_range_by_date(self, latest_dttm, oldest_dttm):
def purge_references(self):
self.ref_by_commit_hash.clear()
-
class CDDAPullRequestRepository:
"""Groups Pull Requests for storage and common operations"""
@@ -346,7 +335,6 @@ def get_merged_pr_list_by_date(self, latest_dttm, oldest_dttm):
def purge_references(self):
self.ref_by_merge_hash.clear()
-
class JenkinsBuildRepository:
"""Groups JenkinsBuilds for storage and common operations"""
@@ -390,7 +378,6 @@ def get_all_builds(self, filter_by=None, sort_by=None):
def purge_references(self):
self.ref_by_build_number.clear()
-
class JenkinsApi:
JENKINS_BUILD_LIST_API = r'http://gorgon.narc.ro:8080/job/Cataclysm-Matrix/api/xml'
@@ -449,7 +436,6 @@ def _create_build_from_api_data(self, build_data):
return self.build_factory.create(jb_number, jb_last_hash, jb_branch, jb_build_dttm, jb_is_building,
jb_build_result, jb_block_ms, jb_wait_ms, jb_build_ms)
-
class CommitApi:
def __init__(self, commit_factory, api_token):
@@ -517,7 +503,6 @@ def _create_commit_from_api_data(self, commit_data):
return self.commit_factory.create(commit_sha, commit_message, commit_dttm, commit_author, commit_parents)
-
class PullRequestApi:
GITHUB_API_SEARCH = r'https://api.github.com/search/issues'
@@ -621,7 +606,6 @@ def _create_pr_from_api_data(self, pr_data):
return self.pr_factory.create(pr_number, pr_title, pr_author, pr_state, pr_body,
pr_merge_hash, pr_merge_dttm, pr_update_dttm)
-
class MultiThreadedGitHubApi:
def process_api_requests(self, request_generator, callback, max_threads=15):
@@ -656,7 +640,6 @@ def _process_api_requests_on_threads(request_generator, callback):
api_request = request_generator.generate()
log.debug(f'No more requests left, killing Thread.')
-
class GitHubApiRequestBuilder(object):
def __init__(self, api_token, timezone='Etc/UTC'):
@@ -681,7 +664,6 @@ def create_request(self, url, params=None):
return api_request
-
class CommitApiGenerator(GitHubApiRequestBuilder):
"""Generates multiple HTTP requests to get Commits, used from Threads to get data until a condition is met."""
@@ -735,7 +717,6 @@ def create_request(self, since_dttm=None, until_dttm=None, sha='master', page=1)
return super().create_request(self.GITHUB_API_LIST_COMMITS, params)
-
class PullRequestApiGenerator(GitHubApiRequestBuilder):
"""Generates multiple HTTP requests to get Pull Requests, used from Threads to get data until a condition is met."""
@@ -787,7 +768,6 @@ def create_request(self, state='all', page=1):
}
return super().create_request(self.GITHUB_API_LIST_PR, params)
-
def exit_on_exception(func):
"""Decorator to terminate the main script and all threads if a thread generates an Exception"""
def exit_on_exception_closure(*args, **kwargs):
@@ -798,7 +778,6 @@ def exit_on_exception_closure(*args, **kwargs):
os._exit(-10)
return exit_on_exception_closure
-
def do_github_request(api_request, retry_on_limit=3):
"""Do an HTTP request to GitHub and retries in case of hitting API limits"""
for retry in range(1, retry_on_limit + 2):
@@ -823,7 +802,6 @@ def do_github_request(api_request, retry_on_limit=3):
raise
raise Exception(f'Retry limit reached')
-
def read_personal_token(filename):
"""Return Personal Token from specified file, None if no file is provided or file doesn't exist.
@@ -843,7 +821,6 @@ def read_personal_token(filename):
return None
-
@contextlib.contextmanager
def smart_open(filename=None, *args, **kwargs):
if filename and (filename == '-' or filename == sys.stdout):
@@ -857,7 +834,6 @@ def smart_open(filename=None, *args, **kwargs):
if fh is not sys.stdout:
fh.close()
-
def validate_file_for_writing(filepath):
if (filepath is not None and
filepath != sys.stdout and
@@ -865,7 +841,6 @@ def validate_file_for_writing(filepath):
or not filepath.parent.is_dir())):
return False
-
def main_entry(argv):
parser = argparse.ArgumentParser(description='''Generates Changelog from now until the specified data.\ngenerate_changelog.py -D changelog_2019_03 -t ../repo_token -f -e 2019-04-01 2019-03-01''', formatter_class=argparse.RawDescriptionHelpFormatter)
@@ -947,7 +922,6 @@ def main_entry(argv):
main_output(arguments.by_date, arguments.by_build, arguments.target_date, arguments.end_date,
personal_token, arguments.include_summary_none, arguments.flatten_output)
-
def get_github_api_data(pr_repo, commit_repo, target_dttm, end_dttm, personal_token):
def load_github_repos():
@@ -964,7 +938,6 @@ def load_github_repos():
return github_thread
-
def get_jenkins_api_data(build_repo):
def load_jenkins_repo():
@@ -978,7 +951,6 @@ def load_jenkins_repo():
return jenkins_thread
-
def main_output(by_date, by_build, target_dttm, end_dttm, personal_token, include_summary_none, flatten):
threads = []
@@ -1002,7 +974,6 @@ def main_output(by_date, by_build, target_dttm, end_dttm, personal_token, includ
with smart_open(by_build, 'w', encoding='utf8') as output_file:
build_output_by_build(build_repo, pr_repo, commit_repo, output_file, include_summary_none)
-
def build_output_by_date(pr_repo, commit_repo, target_dttm, end_dttm, output_file,
include_summary_none, flatten):
### group commits with no PR by date
@@ -1072,7 +1043,6 @@ def build_output_by_date(pr_repo, commit_repo, target_dttm, end_dttm, output_fil
print(file=output_file)
-
def build_output_by_build(build_repo, pr_repo, commit_repo, output_file, include_summary_none):
### "ABORTED" builds have no "hash" and fucks up the logic here... but just to be sure, ignore builds without hash
### and changes will be atributed to next build availiable that does have a hash
@@ -1153,6 +1123,5 @@ def build_output_by_build(build_repo, pr_repo, commit_repo, output_file, include
print(file=output_file)
-
if __name__ == '__main__':
main_entry(sys.argv)
diff --git a/tools/gfx_tools/compose.py b/tools/gfx_tools/compose.py
index 243bcaed15f36..cab7be5e04f1a 100755
--- a/tools/gfx_tools/compose.py
+++ b/tools/gfx_tools/compose.py
@@ -53,14 +53,12 @@ def write_to_json(pathname, data):
cmd = [json_formatter, pathname]
subprocess.call(cmd)
-
def find_or_make_dir(pathname):
try:
os.stat(pathname)
except OSError:
os.mkdir(pathname)
-
class PngRefs(object):
def __init__(self, tileset_dirname):
# dict of pngnames to png numbers; used to control uniqueness
@@ -176,7 +174,6 @@ def verify(self):
print("image filename '{}' index '{}'".format(pngname, pngnum) +
" was not used in any tile_config.json entries")
-
class TilesheetData(object):
def __init__(self, subdir_index, refs):
ts_all = refs.tileset_info[subdir_index]
@@ -223,7 +220,7 @@ def merge_row(self, refs):
refs.pngnum += spacer
in_list = []
-
+
for png_pathname in self.row_pngs:
if png_pathname == "null_image":
in_list.append(self.null_image)
@@ -343,7 +340,7 @@ def finalize_merges(self, merge_pngs):
#print("pngnum to pngname {}".format(json.dumps(refs.pngnum_to_pngname, sort_keys=True, indent=2)))
tiles_new = []
-
+
for ts_data in all_ts_data:
if ts_data.fallback:
fallback_name = ts_data.ts_name
diff --git a/tools/gfx_tools/decompose.py b/tools/gfx_tools/decompose.py
index 770ca0678b539..1fcb5e30037d9 100755
--- a/tools/gfx_tools/decompose.py
+++ b/tools/gfx_tools/decompose.py
@@ -31,14 +31,12 @@ def write_to_json(pathname, data, prettify=False):
cmd = [json_formatter, pathname]
subprocess.call(cmd)
-
def find_or_make_dir(pathname):
try:
os.stat(pathname)
except OSError:
os.mkdir(pathname)
-
class TileSheetData(object):
def __init__(self, tilesheet_data, refs):
self.ts_filename = tilesheet_data.get("file", "")
@@ -276,7 +274,6 @@ def write_images(self, refs):
for pngnum in range(self.ts_data.pngnum_min, self.ts_data.pngnum_max + 1):
out_data.extract_image(pngnum, refs)
-
class PngRefs(object):
def __init__(self):
# dict of png absolute numbers to png names
@@ -328,7 +325,7 @@ def get_all_data(self, tileset_dirname, delete_pathname):
self.delete_pngnums.append(i)
with open(tileset_confname) as conf_file:
- return(json.load(conf_file))
+ return(json.load(conf_file))
def add_pngnum_to_tsfilepath(self, pngnum):
if not isinstance(pngnum, int):
@@ -391,7 +388,6 @@ def report_missing(self):
if not self.extracted_pngnums.get(pngnum):
print("missing index {}, {}".format(pngnum, self.pngnum_to_pngname[pngnum]))
-
args = argparse.ArgumentParser(description="Split a tileset's tile_config.json into a directory per tile containing the tile data and png.")
args.add_argument("tileset_dir", action="store",
help="local name of the tileset directory")
diff --git a/tools/gfx_tools/png_update.py b/tools/gfx_tools/png_update.py
index 0d01317271f1b..9a6a7b53e3956 100755
--- a/tools/gfx_tools/png_update.py
+++ b/tools/gfx_tools/png_update.py
@@ -21,7 +21,6 @@ def write_to_json(pathname, data):
cmd = [json_formatter, pathname]
subprocess.call(cmd)
-
def convert_index(old_index, old_name, new_name):
changed = False
new_indexes = []
@@ -60,7 +59,6 @@ def convert_index(old_index, old_name, new_name):
return new_indexes[0], changed
return new_indexes, changed
-
def convert_tile_entry(tile_entry, old_name, new_name):
if not isinstance(tile_entry, dict):
return tile_entry, False
@@ -84,8 +82,7 @@ def convert_tile_entry(tile_entry, old_name, new_name):
changed |= add_changed
if new_tile_entrys:
tile_entry["additional_tiles"] = new_tile_entrys
- return tile_entry, changed
-
+ return tile_entry, changed
def convert_tile_entry_file(file_path, old_name, new_name):
changed = False
@@ -150,5 +147,4 @@ def convert_tile_entry_file(file_path, old_name, new_name):
elif filename == old_name_json:
new_path = subdir_fpath + "/" + new_name_json
os.rename(old_path, new_path)
-
diff --git a/tools/json_tools/adjust_values.py b/tools/json_tools/adjust_values.py
index e3b956a3fde13..3c6a39d46a148 100755
--- a/tools/json_tools/adjust_values.py
+++ b/tools/json_tools/adjust_values.py
@@ -10,7 +10,6 @@
args.add_argument("factor", type=int, action="store", help="specify factor")
args_dict = vars(args.parse_args())
-
def gen_new(path):
with open(path, "r") as json_file:
json_data = json.load(json_file)
@@ -20,7 +19,6 @@ def gen_new(path):
jo[args_dict["key"]] = f"{val} m"
return json_data
-
for root, directories, filenames in os.walk(args_dict["dir"]):
for filename in filenames:
path = os.path.join(root, filename)
diff --git a/tools/json_tools/jq/armor_stats.jq b/tools/json_tools/jq/armor_stats.jq
index f78b0ae7804d0..200989063d12c 100644
--- a/tools/json_tools/jq/armor_stats.jq
+++ b/tools/json_tools/jq/armor_stats.jq
@@ -33,7 +33,7 @@ map(
*
# add up the bash resists for the materials
( .material | map($br[.]) | add )
- /
+ /
# divide by the number of non-null materials
( .material | map(select(.!="null")) | length )
) |
diff --git a/tools/json_tools/keys.py b/tools/json_tools/keys.py
index eb2e6660f9496..889d4238520a6 100755
--- a/tools/json_tools/keys.py
+++ b/tools/json_tools/keys.py
@@ -30,8 +30,6 @@
action=WhereAction, nargs='*', type=str,
help="where exclusions of the form 'where_key=where_val', no quotes.")
-
-
if __name__ == "__main__":
args = parser.parse_args()
diff --git a/tools/json_tools/lister.py b/tools/json_tools/lister.py
index 487d35da41b62..05645112cc4e2 100755
--- a/tools/json_tools/lister.py
+++ b/tools/json_tools/lister.py
@@ -11,7 +11,6 @@
import sys
from util import ui_values_to_columns
-
parser = argparse.ArgumentParser(description="""Make a distinct list of keys from JSON input.
Main purpose to take output from other scripts, which will be JSON dictionaries or lists
of JSON dictionaries and get a distinct set of keys from all the items.
@@ -28,8 +27,6 @@
action="store_true",
help="if set, makes output human readable. default is to return output in JSON.")
-
-
if __name__ == "__main__":
args = parser.parse_args()
diff --git a/tools/json_tools/pluck.py b/tools/json_tools/pluck.py
index 50c69b6238a93..42144d44cc6ab 100755
--- a/tools/json_tools/pluck.py
+++ b/tools/json_tools/pluck.py
@@ -26,8 +26,6 @@
action=WhereAction, nargs='+', type=str,
help="where exclusions of the form 'where_key=where_val', no quotes.")
-
-
if __name__ == "__main__":
args = parser.parse_args()
diff --git a/tools/json_tools/splitter.py b/tools/json_tools/splitter.py
index 2ec07bfed271e..65bb6d56659b0 100755
--- a/tools/json_tools/splitter.py
+++ b/tools/json_tools/splitter.py
@@ -25,8 +25,6 @@
action=WhereAction, nargs='+', type=str,
help="where exclusions of the form 'where_key=where_val', no quotes.")
-
-
if __name__ == "__main__":
args = parser.parse_args()
diff --git a/tools/json_tools/util.py b/tools/json_tools/util.py
index 18116f0f4c21c..2beef9b0fc5f6 100755
--- a/tools/json_tools/util.py
+++ b/tools/json_tools/util.py
@@ -11,13 +11,10 @@
import os
from StringIO import StringIO
-
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
JSON_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, "..", "..", "data", "json"))
JSON_FNMATCH = "*.json"
-
-
def import_data(json_dir=JSON_DIR, json_fmatch=JSON_FNMATCH):
"""Use a UNIX like file match expression to weed out the JSON files.
@@ -43,8 +40,6 @@ def import_data(json_dir=JSON_DIR, json_fmatch=JSON_FNMATCH):
data += candidates
return (data, errors)
-
-
def match_primitive_values(item_value, where_value):
"""Perform any odd logic on item matching.
"""
@@ -61,8 +56,6 @@ def match_primitive_values(item_value, where_value):
else:
return False
-
-
def matches_where(item, where_key, where_value):
"""True if:
where_key exists AND
@@ -98,8 +91,6 @@ def matches_where(item, where_key, where_value):
else:
return match_primitive_values(item_value, where_value)
-
-
def matches_all_wheres(item, where_fn_list):
"""Takes a list of where functions and attempts to match against them.
@@ -118,8 +109,6 @@ def matches_all_wheres(item, where_fn_list):
# Must be a match.
return True
-
-
class WhereAction(argparse.Action):
"""An argparse action callback.
@@ -153,10 +142,8 @@ def __call__(self, parser, namespace, values, option_string=None):
except Exception:
raise ValueError("Where options are strict. Must be in the form of 'where_key=where_value'")
-
-
def key_counter(data, where_fn_list):
- """Count occurences of keys found in data {list of dicts}
+ """Count occurrences of keys found in data {list of dicts}
that also match each where_fn_list {list of fns}.
Returns a tuple of data.
@@ -171,8 +158,6 @@ def key_counter(data, where_fn_list):
stats.update(item.keys())
return stats, blobs_matched
-
-
def value_counter(data, search_key, where_fn_list):
"""Takes a search_key {str}, and for values found in data {list of dicts}
that also match each where_fn_list {list of fns} with those keys,
@@ -197,8 +182,6 @@ def value_counter(data, search_key, where_fn_list):
stats[v] += 1
return stats, blobs_matched
-
-
def ui_values_to_columns(values, screen_width=80):
"""Take a list of strings and output in fixed width columns.
"""
@@ -212,8 +195,6 @@ def ui_values_to_columns(values, screen_width=80):
print("")
print("")
-
-
def ui_counts_to_columns(counts):
"""Take a Counter instance and display in single fixed width key:value
column.
@@ -225,8 +206,6 @@ def ui_counts_to_columns(counts):
for k_v in key_vals:
print(output_template % k_v)
-
-
class CDDAJSONWriter(object):
"""Essentially a one-off class used to write CDDA formatted JSON output.
diff --git a/tools/json_tools/values.py b/tools/json_tools/values.py
index ee43993933b9c..469629b3a9373 100755
--- a/tools/json_tools/values.py
+++ b/tools/json_tools/values.py
@@ -34,7 +34,6 @@
action=WhereAction, nargs='*', type=str,
help="where exclusions of the form 'where_key=where_val', no quotes.")
-
if __name__ == "__main__":
args = parser.parse_args()
search_key = args.key
diff --git a/tools/merge_maps.py b/tools/merge_maps.py
index 5880db198eefa..c8a1c7fb8e9b5 100755
--- a/tools/merge_maps.py
+++ b/tools/merge_maps.py
@@ -6,7 +6,6 @@
import math
from operator import itemgetter
-
STRIDE_X = 3
STRIDE_Y = 2
MIN_X = 10000
@@ -23,11 +22,9 @@
{"dir": "_north", "x": 0, "y": 0}
]
-
def x_y_bucket(x, y):
return "{}__{}".format(math.floor((x - MIN_X) / STRIDE_X), math.floor((y - MIN_Y) / STRIDE_Y))
-
def x_y_sub(x, y, is_north):
if is_north:
return "{}__{}".format((x - MIN_X) % STRIDE_X, (y - MIN_Y) % STRIDE_Y)
@@ -35,12 +32,9 @@ def x_y_sub(x, y, is_north):
return "{}__{}".format((x - MIN_X - 1) % STRIDE_X,
(y - MIN_Y - 1) % STRIDE_Y)
-
-
def x_y_simple(x, y):
return "{}__{}".format(x, y)
-
def get_data(argsDict, resource_name):
resource = []
resource_sources = argsDict.get(resource_name, [])
@@ -57,7 +51,6 @@ def get_data(argsDict, resource_name):
print("Invalid filename {}".format(resource_filename))
return resource
-
def adjacent_to_set(x, y, coord_set):
for coords in coord_set:
if y == coords["y"] and abs(x - coords["x"]) == 1:
@@ -65,7 +58,6 @@ def adjacent_to_set(x, y, coord_set):
if x == coords["x"] and abs(y - coords["y"]) == 1:
return True
-
def validate_keyed(key_term, old_obj, entry):
new_keyset = entry["object"].get(term, {})
old_keyset = old_obj.get(key_term, {})
@@ -78,7 +70,6 @@ def validate_keyed(key_term, old_obj, entry):
new_keyset = old_keyset
return new_keyset
-
# make sure that all keyed entries have the same key values and the maps have the same weight
# and fill_ter. Don't try to resolve them.
def validate_old_map(old_map, entry):
@@ -106,7 +97,7 @@ def validate_old_map(old_map, entry):
keysets[key_term] = new_keyset
elif new_keyset != {}:
return False
-
+
if not entry["weight"]:
entry["weight"] = old_map.get("weight", 0)
if not entry["object"].get("fill_ter"):
@@ -118,7 +109,6 @@ def validate_old_map(old_map, entry):
return True
-
# adjust the X, Y co-ords of a place_ entry to match the new map
def adjust_place(term, old_obj, offset_x, offset_y):
def adjust_coord(x_or_y, new_entry, old_entry, offset):
@@ -144,7 +134,6 @@ def adjust_coord(x_or_y, new_entry, old_entry, offset):
results.append(new_entry)
return results
-
args = argparse.ArgumentParser(description="Merge individual OMT maps into blocks of maps.")
args.add_argument("mapgen_sources", action="store", nargs="+",
help="specify jsons file to convert to blocks.")
@@ -260,7 +249,7 @@ def adjust_coord(x_or_y, new_entry, old_entry, offset):
# check that this map's keyed terms match the other keyed terms in this chunk
if validate_old_map(old_map, chunk_data["entry"]):
chunk_data["maps"].append({"x": x, "y": y})
- validated = True
+ validated = True
if not validated:
new_entry = copy.deepcopy(basic_entry)
chunks.append({ "maps": [{"x": x, "y": y}], "entry": new_entry })
@@ -278,7 +267,7 @@ def adjust_coord(x_or_y, new_entry, old_entry, offset):
min_x = maps[0]["x"]
maps.sort(key=itemgetter("y"))
max_y = maps[-1]["y"]
- min_y = maps[0]["y"]
+ min_y = maps[0]["y"]
# if this is a line, square, or rectangle, it's continguous
if len(maps) == ((max_x - min_x + 1) * (max_y - min_y + 1)):
final_chunks.append(chunk_data)
@@ -303,7 +292,7 @@ def adjust_coord(x_or_y, new_entry, old_entry, offset):
if not maps:
continue
first_x = maps[0]["x"]
- first_y = maps[0]["y"]
+ first_y = maps[0]["y"]
for coords in maps:
x = coords["x"]
y = coords["y"]
diff --git a/tools/palettize.py b/tools/palettize.py
index 18a34dd132918..cb89e4020becf 100755
--- a/tools/palettize.py
+++ b/tools/palettize.py
@@ -10,7 +10,6 @@ def hash_key(key):
else:
return key
-
def parse_furnter(om_objs, palette, conflicts):
for map_key, map_val in om_objs.items():
if isinstance(map_val, list) and len(map_val) == 1:
@@ -27,7 +26,6 @@ def parse_furnter(om_objs, palette, conflicts):
conflicts[map_key][map_hash]["count"] += 1
conflicts[map_key][pal_hash]["count"] += 1
-
def decide_conflicts(palette, conflicts):
for con_key, conflict in conflicts.items():
most_val = ""
@@ -38,7 +36,6 @@ def decide_conflicts(palette, conflicts):
most_val = data["val"]
palette[con_key] = most_val
-
def resolve_conflicts(om_objs, palette, conflicts):
temp_objs = copy.deepcopy(om_objs)
for map_key in om_objs:
@@ -50,7 +47,6 @@ def resolve_conflicts(om_objs, palette, conflicts):
del temp_objs[map_key]
return temp_objs
-
args = argparse.ArgumentParser(description="Read all the terrain and furniture definitions from a "
"mapgen .json file and move them into a palette file. "
"Symbols with multiple definitions put the most common "
@@ -138,4 +134,3 @@ def resolve_conflicts(om_objs, palette, conflicts):
#print("furniture palette {}".format(json.dumps(furn_pal, indent=2)))
#print("terrain palette {}".format(json.dumps(ter_pal, indent=2)))
-
diff --git a/tools/vehicleDef.py b/tools/vehicleDef.py
index 6978c34be671a..f169633e044bb 100755
--- a/tools/vehicleDef.py
+++ b/tools/vehicleDef.py
@@ -15,13 +15,11 @@
"vehicle", nargs="?", help="specify name of vehicle", default=None)
argsDict = vars(args.parse_args())
-
def writeVehicleTemplates(templates):
with open("vehicles.json", "w") as vehicleDefJson:
json.dump(templates, vehicleDefJson, indent=4)
print("Vehicle defs written.")
-
def getVehicleTemplates():
vehicles = []
for root, directories, filenames in os.walk(argsDict["save"]):
@@ -38,7 +36,6 @@ def getVehicleTemplates():
return allTemplates
-
def getVehicleInstances(mapPath):
vehicles = []
with open(mapPath) as mapFile:
@@ -55,7 +52,6 @@ def getVehicleInstances(mapPath):
return vehicles
-
def buildVehicleDef(vehicle):
partsDef = []
itemsDef = []
@@ -97,7 +93,6 @@ def buildVehicleDef(vehicle):
return vehicleDef
-
def sortFrames(frames):
sortedFrames = []
sortedFrames.append(frames.pop())
@@ -116,9 +111,7 @@ def sortFrames(frames):
return sortedFrames
-
def adjacent(frame1, frame2):
return hypot(frame1["x"] - frame2["x"], frame1["y"] - frame2["y"]) == 1
-
writeVehicleTemplates(getVehicleTemplates())
diff --git a/tools/windows_limit_memory.py b/tools/windows_limit_memory.py
index 1f89c413352e8..f8bb793322c3b 100755
--- a/tools/windows_limit_memory.py
+++ b/tools/windows_limit_memory.py
@@ -93,11 +93,9 @@
# Windows Structures
#
-
class SECURITY_ATTRIBUTES(ctypes.Structure):
_fields_ = [("nLength", DWORD), ("lpSecurityDescriptor", LPVOID), ("bInheritHandle", BOOL)]
-
class STARTUPINFO(ctypes.Structure):
_fields_ = [
("cb", DWORD),
@@ -120,11 +118,9 @@ class STARTUPINFO(ctypes.Structure):
("hStdError", HANDLE),
]
-
class PROCESS_INFORMATION(ctypes.Structure):
_fields_ = [("hProcess", HANDLE), ("hThread", HANDLE), ("dwProcessId", DWORD), ("dwThreadId", DWORD)]
-
class IO_COUNTERS(ctypes.Structure):
_fields_ = [
('ReadOperationCount', ctypes.c_ulonglong),
@@ -135,7 +131,6 @@ class IO_COUNTERS(ctypes.Structure):
('OtherTransferCount', ctypes.c_ulonglong),
]
-
class JOBOBJECT_BASIC_LIMIT_INFORMATION(ctypes.Structure):
_fields_ = [
('PerProcessUserTimeLimit', ctypes.c_int64),
@@ -149,7 +144,6 @@ class JOBOBJECT_BASIC_LIMIT_INFORMATION(ctypes.Structure):
('SchedulingClass', ctypes.c_uint32),
]
-
class JOBOBJECT_EXTENDED_LIMIT_INFORMATION(ctypes.Structure):
_fields_ = [
('BasicLimitInformation', JOBOBJECT_BASIC_LIMIT_INFORMATION),
@@ -160,21 +154,17 @@ class JOBOBJECT_EXTENDED_LIMIT_INFORMATION(ctypes.Structure):
('PeakJobMemoryUsed', ctypes.c_ulonglong),
]
-
class JOBOBJECT_ASSOCIATE_COMPLETION_PORT(ctypes.Structure):
_fields_ = [('CompletionKey', LPVOID), ('CompletionPort', HANDLE)]
-
class OVERLAPPED(ctypes.Structure):
_fields_ = [("Internal", ULONG_PTR), ("InternalHigh", ULONG_PTR), ("Pointer", LPVOID), ("hEvent", HANDLE)]
-
LPSECURITY_ATTRIBUTES = ctypes.POINTER(SECURITY_ATTRIBUTES)
LPSTARTUPINFO = ctypes.POINTER(STARTUPINFO)
LPPROCESS_INFORMATION = ctypes.POINTER(PROCESS_INFORMATION)
LPOVERLAPPED = ctypes.POINTER(OVERLAPPED)
-
class Kernel32Wrapper:
"""A class used to encapsulate kernel32 library functions.
"""
@@ -294,7 +284,6 @@ def create_buffer(obj: Any, max_buffer_len: Optional[int] = None) -> str:
return ctypes.create_unicode_buffer(str_obj, max_len)
-
class ProcessLimiter:
"""A class used to limit a process memory using Windows Jobs.
"""
@@ -632,7 +621,6 @@ def wait_for_job(self) -> bool:
logger.info("Job wait finished")
return return_val
-
def main(args: argparse.Namespace) -> int:
# runs only on Windows
if platform.system().lower() != "windows":
@@ -675,7 +663,6 @@ def main(args: argparse.Namespace) -> int:
print("Script done.")
return 0
-
if __name__ == "__main__":
arg_parser = argparse.ArgumentParser(description="C:DDA Memory Limit test script.")
diff --git a/utilities/building-utility/deconstruct.py b/utilities/building-utility/deconstruct.py
index 874f1dabdd6ad..92b206c0c217c 100755
--- a/utilities/building-utility/deconstruct.py
+++ b/utilities/building-utility/deconstruct.py
@@ -19,7 +19,6 @@
_TEMPLATE_FUNC_OBJ_REPLACE = "object_replace"
_TEMPLATE_FUNC_STR_FORMAT = "string_format"
-
def division_split(div, single_list):
'''Divides a list into a list of lists each containing div amount of
elements. The last list will contain less than the div amount if the
@@ -33,7 +32,6 @@ def division_split(div, single_list):
return ret_list
-
def internal_append(list_of_lists, appends):
'''Returns the list created when each element of appends is put into its
corresponding list in list_of_lists (Corresponding by index). Stops when
@@ -42,7 +40,6 @@ def internal_append(list_of_lists, appends):
return [l + [a] for l, a in zip(list_of_lists, appends)]
-
def get_map_cells(infile, cell_size):
'''Converts an ascii map file into a list of cells of size cell_size.
Raises an Assertion Error if any cell is not the correct size.
@@ -51,7 +48,7 @@ def get_map_cells(infile, cell_size):
cells_per_line = None
line_no = None
- # all_cells holds completed cells. cell_list holds incompleted cells.
+ # all_cells holds completed cells. cell_list holds uncompleted cells.
all_cells = []
cell_list = [[]]
@@ -61,7 +58,7 @@ def get_map_cells(infile, cell_size):
assert len(line) % cell_size == 0, \
"Map {infile} does not have colums equal to a multiple of the " \
- "map cell size. Error occured on line {line_no}.".format(
+ "map cell size. Error occurred on line {line_no}.".format(
infile=infile.name,
line_no=line_no)
@@ -72,7 +69,7 @@ def get_map_cells(infile, cell_size):
else:
assert cells_per_line == len(line) // cell_size, \
"Map {infile} starts new cells before finishing cells " \
- "{cell_begin} to {cell_end}. Error occured on line " \
+ "{cell_begin} to {cell_end}. Error occurred on line " \
"{line_no}.".format(
infile=infile.name,
cell_begin=len(all_cells) + 1,
@@ -100,7 +97,6 @@ def get_map_cells(infile, cell_size):
return all_cells
-
def recursive_dict_update(info_dict, list_path, data):
'''Recurses through the info_dict using the sequence in list_path until
reaching the end, where data replaces whatever is currently in that part
@@ -115,7 +111,6 @@ def recursive_dict_update(info_dict, list_path, data):
list_path[1:], data)
return info_dict
-
def is_list_of_lists(param):
'''Returns true if x is a list of lists. False otherwise. Assumes lists
are homomorphic.
@@ -125,7 +120,6 @@ def is_list_of_lists(param):
len(param) > 0 and
isinstance(param[0], list))
-
def template_function_exec(full_dict, settings, data):
'''Modifies a dictionary based on the setting functions passed in,
inserting data in specified ways.
@@ -158,7 +152,6 @@ def template_function_exec(full_dict, settings, data):
else:
recursive_dict_update(full_dict, paths, string % data)
-
def complete_json_file(template_file, all_cells, remove_template=True):
'''Combines json template with cell list and writes out results.
@@ -192,7 +185,6 @@ def complete_json_file(template_file, all_cells, remove_template=True):
json.dump(json_output_list, outfile, indent=4, separators=(",", ": "),
sort_keys=True)
-
def cli_interface():
'''Sets up command-line parser, including user documentation and help.'''
@@ -243,7 +235,6 @@ def cli_interface():
return parser
-
def main(parser):
'''Combines ascii map file with json template(s).
diff --git a/utilities/make_iso.py b/utilities/make_iso.py
index 66795a1c7c77c..655a838648779 100755
--- a/utilities/make_iso.py
+++ b/utilities/make_iso.py
@@ -41,7 +41,6 @@ def iso_ize(tile_num, new_tile_num=-1, initial_rotation=0, override=False):
return True
return False
-
# convert one old tile definition to one new tile definition
# recursive for additional-tiles
def tile_convert(otile, main_id, new_tile_number):
@@ -149,7 +148,6 @@ def tile_convert(otile, main_id, new_tile_number):
print "returning tile, next tile number now " + str(ntile['ntn'])
return ntile
-
#TODO: bail out if old tileset directory doesn't exist
old_tileset_name = args.tileset