Skip to content

Commit d1f0edd

Browse files
committed
Apply initial pre-commit config
1 parent 0fc451d commit d1f0edd

File tree

118 files changed

+481
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+481
-543
lines changed

.github/workflows/buildmaster-rebuild.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
inputs:
66
pull_request:
77
description: Pull request ID
8-
type: number
8+
type: string
99
required: true # remove if we support commit rebuilds later
1010

1111
jobs:

CMake/Modules/FindSphinx.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ find_package_handle_standard_args(Sphinx DEFAULT_MSG
1313
)
1414

1515
mark_as_advanced(SPHINX_EXECUTABLE)
16-

README.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
<body>
1414
Follow this <a href='./docs/index.html'>link to the documentation.</a>
1515
</body>
16-
</html>
16+
</html>

build/build-osx.sh

100644100755
+56-56
Original file line numberDiff line numberDiff line change
@@ -7,88 +7,88 @@ LUA_PATCH=1
77
ME=$PWD/`basename $0`
88

99
usage() {
10-
echo "Usage: $0 [options] {DF_OSX_PATH}"
11-
echo -e "\told\t- use on pre-Snow Leopard OSX installations"
12-
echo -e "\tbrew\t- if GCC 4.5 was installed with homebrew"
13-
echo -e "\tport\t- if GCC 4.5 was insalled with macports"
14-
echo -e "\tclean\t- delete ../build-osx before compiling"
15-
echo "Example:"
16-
echo -e "\t$0 old brew ../../../personal/df_osx"
17-
echo -e "\t$0 port clean /Users/dfplayer/df_osx"
18-
exit $1
10+
echo "Usage: $0 [options] {DF_OSX_PATH}"
11+
echo -e "\told\t- use on pre-Snow Leopard OSX installations"
12+
echo -e "\tbrew\t- if GCC 4.5 was installed with homebrew"
13+
echo -e "\tport\t- if GCC 4.5 was insalled with macports"
14+
echo -e "\tclean\t- delete ../build-osx before compiling"
15+
echo "Example:"
16+
echo -e "\t$0 old brew ../../../personal/df_osx"
17+
echo -e "\t$0 port clean /Users/dfplayer/df_osx"
18+
exit $1
1919
}
2020

2121
options() {
22-
case $1 in
23-
brew)
24-
echo "Using homebrew gcc."
25-
export CC=/usr/local/bin/gcc-4.5
26-
export CXX=/usr/local/bin/g++-4.5
27-
targetted=1
28-
;;
29-
port)
30-
echo "Using macports gcc."
31-
export CC=/opt/local/bin/gcc-mp-4.5
32-
export CXX=/opt/local/bin/g++-mp-4.5
33-
targetted=1
34-
;;
35-
old)
36-
LUA_PATCH=0
37-
;;
38-
clean)
39-
echo "Deleting ../build-osx"
40-
rm -rf ../build-osx
41-
;;
42-
*)
43-
;;
44-
esac
22+
case $1 in
23+
brew)
24+
echo "Using homebrew gcc."
25+
export CC=/usr/local/bin/gcc-4.5
26+
export CXX=/usr/local/bin/g++-4.5
27+
targetted=1
28+
;;
29+
port)
30+
echo "Using macports gcc."
31+
export CC=/opt/local/bin/gcc-mp-4.5
32+
export CXX=/opt/local/bin/g++-mp-4.5
33+
targetted=1
34+
;;
35+
old)
36+
LUA_PATCH=0
37+
;;
38+
clean)
39+
echo "Deleting ../build-osx"
40+
rm -rf ../build-osx
41+
;;
42+
*)
43+
;;
44+
esac
4545
}
4646

4747
# sanity checks
4848
if [[ $# -lt 1 ]]
4949
then
50-
echo "Not enough arguments."
51-
usage 0
50+
echo "Not enough arguments."
51+
usage 0
5252
fi
5353
if [[ $# -gt 4 ]]
5454
then
55-
echo "Too many arguments."
56-
usage 1
55+
echo "Too many arguments."
56+
usage 1
5757
fi
5858

5959
# run through the arguments
6060
for last
6161
do
62-
options $last
62+
options $last
6363
done
6464
# last keeps the last argument
6565

6666
if [[ $targetted -eq 0 ]]
6767
then
68-
echo "You did not specify whether you intalled GCC 4.5 from brew or ports."
69-
echo "If you continue, your default compiler will be used."
70-
read -p "Are you sure you want to continue? [y/N] " -n 1 -r
71-
echo # (optional) move to a new line
72-
if [[ ! $REPLY =~ ^[Yy]$ ]]
73-
then
74-
exit 0
75-
fi
68+
echo "You did not specify whether you intalled GCC 4.5 from brew or ports."
69+
echo "If you continue, your default compiler will be used."
70+
read -p "Are you sure you want to continue? [y/N] " -n 1 -r
71+
echo # (optional) move to a new line
72+
if [[ ! $REPLY =~ ^[Yy]$ ]]
73+
then
74+
exit 0
75+
fi
7676
fi
7777

7878
# check for build folder and start working there
7979
if [[ ! -d ../build-osx ]]
8080
then
81-
mkdir ../build-osx
81+
mkdir ../build-osx
8282
fi
8383
cd ../build-osx
8484

8585
# patch if necessary
8686
if [[ $LUA_PATCH -ne 0 ]]
8787
then
88-
cd ..
89-
echo "$PWD"
90-
sed -e '1,/'"PATCH""CODE"'/d' "$ME" | patch -p0
91-
cd -
88+
cd ..
89+
echo "$PWD"
90+
sed -e '1,/'"PATCH""CODE"'/d' "$ME" | patch -p0
91+
cd -
9292
fi
9393

9494
echo "Generate"
@@ -101,17 +101,17 @@ make install
101101
# unpatch if /libarary/luaTypes.cpp was patched
102102
if [[ $LUA_PATCH -ne 0 ]]
103103
then
104-
cd ..
105-
echo -n "un"
106-
sed -e '1,/'"PATCH""CODE"'/d' "$ME" | patch -p0 -R
107-
cd -
104+
cd ..
105+
echo -n "un"
106+
sed -e '1,/'"PATCH""CODE"'/d' "$ME" | patch -p0 -R
107+
cd -
108108
fi
109109

110110
exit 0
111111

112112
# PATCHCODE - everything below this line is fed into patch
113-
--- library/LuaTypes.cpp 2014-08-20 00:13:17.000000000 -0700
114-
+++ library/LuaTypes.cpp 2014-08-31 23:31:00.000000000 -0700
113+
--- library/LuaTypes.cpp 2014-08-20 00:13:17.000000000 -0700
114+
+++ library/LuaTypes.cpp 2014-08-31 23:31:00.000000000 -0700
115115
@@ -464,7 +464,7 @@
116116
{
117117
case struct_field_info::STATIC_STRING:

build/sublime/dfhack.sublime-project

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
2-
"folders":
3-
[
4-
{
5-
"path": "."
6-
}
7-
],
8-
"build_systems":
9-
[
10-
{
11-
"name": "DFHack make",
12-
"working_dir": "$project_path",
13-
"cmd": ["python", "$project_path/build/sublime/make.py", "$file"],
14-
"variants": [
15-
{
16-
"name": "Build all",
17-
"cmd": ["python", "$project_path/build/sublime/make.py", "-a"]
18-
},
19-
{
20-
"name": "Build+install all",
21-
"cmd": ["python", "$project_path/build/sublime/make.py", "-ai"]
22-
},
23-
{
24-
"name": "Build plugin",
25-
"cmd": ["python", "$project_path/build/sublime/make.py", "-ap", "$file"]
26-
},
27-
{
28-
"name": "Build+install plugin",
29-
"cmd": ["python", "$project_path/build/sublime/make.py", "-aip", "$file"]
30-
}
31-
]
32-
}
33-
]
2+
"folders":
3+
[
4+
{
5+
"path": "."
6+
}
7+
],
8+
"build_systems":
9+
[
10+
{
11+
"name": "DFHack make",
12+
"working_dir": "$project_path",
13+
"cmd": ["python", "$project_path/build/sublime/make.py", "$file"],
14+
"variants": [
15+
{
16+
"name": "Build all",
17+
"cmd": ["python", "$project_path/build/sublime/make.py", "-a"]
18+
},
19+
{
20+
"name": "Build+install all",
21+
"cmd": ["python", "$project_path/build/sublime/make.py", "-ai"]
22+
},
23+
{
24+
"name": "Build plugin",
25+
"cmd": ["python", "$project_path/build/sublime/make.py", "-ap", "$file"]
26+
},
27+
{
28+
"name": "Build+install plugin",
29+
"cmd": ["python", "$project_path/build/sublime/make.py", "-aip", "$file"]
30+
}
31+
]
32+
}
33+
]
3434
}

build/win32/build-debug.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
call "%VS140COMNTOOLS%vsvars32.bat"
22
cd VC2015_32
33
msbuild /m /p:Platform=Win32 /p:Configuration=RelWithDebInfo ALL_BUILD.vcxproj
4-
cd ..
4+
cd ..

build/win32/build-release.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ call "%VS140COMNTOOLS%vsvars32.bat"
22
cd VC2015_32
33
msbuild /m /p:Platform=Win32 /p:Configuration=Release ALL_BUILD.vcxproj
44
cd ..
5-
pause
5+
pause

build/win32/generate-MSVC-all.bat

100755100644
File mode changed.

build/win32/generate-MSVC-gui.bat

100755100644
File mode changed.

build/win32/generate-MSVC-minimal.bat

100755100644
File mode changed.

build/win32/generate-MSVC-release.bat

100755100644
File mode changed.

build/win32/install-debug.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
call "%VS140COMNTOOLS%vsvars32.bat"
22
cd VC2015_32
33
msbuild /m /p:Platform=Win32 /p:Configuration=RelWithDebInfo INSTALL.vcxproj
4-
cd ..
4+
cd ..

build/win32/install-release.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
call "%VS140COMNTOOLS%vsvars32.bat"
22
cd VC2015_32
33
msbuild /m /p:Platform=Win32 /p:Configuration=Release INSTALL.vcxproj
4-
cd ..
4+
cd ..

build/win32/package-debug.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ call "%VS140COMNTOOLS%vsvars32.bat"
33
cd VC2015_32
44
msbuild /m /p:Platform=Win32 /p:Configuration=RelWithDebInfo PACKAGE.vcxproj
55
cd ..
6-
exit %ERRORLEVEL%
6+
exit %ERRORLEVEL%

build/win32/set_df_path.vbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If fso.FileExists("DF_PATH.txt") Then
1111
fso.DeleteFile "DF_PATH.txt", True
1212
End If
1313

14-
If IsValue(objF) Then
14+
If IsValue(objF) Then
1515
If InStr(1, TypeName(objF), "Folder") > 0 Then
1616
Set spoFile = fso.CreateTextFile("DF_PATH.txt", True)
1717
spoFile.WriteLine(objF.Self.Path)
@@ -29,4 +29,4 @@ Function IsValue(obj)
2929
IsValue = True
3030
End If
3131
On Error GoTo 0
32-
End Function
32+
End Function

build/win64/generate-MSVC-all.bat

100755100644
File mode changed.

build/win64/generate-MSVC-gui.bat

100755100644
File mode changed.

build/win64/generate-MSVC-minimal.bat

100755100644
File mode changed.

build/win64/generate-MSVC-release.bat

100755100644
File mode changed.

build/win64/package-debug.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd6
33
cd VC2015
44
msbuild /m /p:Platform=x64 /p:Configuration=RelWithDebInfo PACKAGE.vcxproj
55
cd ..
6-
exit %ERRORLEVEL%
6+
exit %ERRORLEVEL%

build/win64/set_df_path.vbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If fso.FileExists("DF_PATH.txt") Then
1111
fso.DeleteFile "DF_PATH.txt", True
1212
End If
1313

14-
If IsValue(objF) Then
14+
If IsValue(objF) Then
1515
If InStr(1, TypeName(objF), "Folder") > 0 Then
1616
Set spoFile = fso.CreateTextFile("DF_PATH.txt", True)
1717
spoFile.WriteLine(objF.Self.Path)
@@ -29,4 +29,4 @@ Function IsValue(obj)
2929
IsValue = True
3030
End If
3131
On Error GoTo 0
32-
End Function
32+
End Function

conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
# -*- coding: utf-8 -*-
32
"""
43
DFHack documentation build configuration file

data/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ if(BUILD_TESTS)
1414
DESTINATION blueprints/library/test
1515
)
1616
endif()
17-

data/blueprints/library/aquifer_tap.csv

-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ u <- drainage level
5858
,,,,,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r
5959
,,,,,,,,,,,,r
6060
,,,,,,,,,,,,r
61-

data/blueprints/library/dreamfort.csv

+4-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ quickfort undo library/dreamfort.csv -n /perimeter,# Clean up after you find you
6666
quickfort run library/dreamfort.csv -n /surface1,# Run when you find your center tile.
6767
quickfort run library/dreamfort.csv -n /dig_all,"# Run when you find a suitable rock layer for the industry level. It designates digging for industry, services, guildhall, suites, and apartments all in one go. This list does not include the farming level, which we'll dig in the uppermost soil layer a bit later. Note that it is more efficient for your miners if you designate your digging before they dig the central stairs past that level since the stairs are dug at a low priority. This keeps your miners focused on one level at a time. If you need to designate your levels individually due to caverns interrupting the sequence or just because it is your preference, run the level-specific dig blueprints (i.e. /industry1, /services1, /guildhall1, /suites1, and 5 levels of /apartments1) instead of running /dig_all."
6868
""
69-
-- Core fort (should finish at about the third migration wave) --
69+
-- Core fort (should finish at about the third migration wave) --
7070
quickfort run library/dreamfort.csv -n /surface2,# Run after initial trees are cleared.
7171
quickfort run library/dreamfort.csv -n /farming1,# Run when channels are dug and the additional designated trees are cleared.
7272
quickfort run library/dreamfort.csv -n /farming2,# Run when the farming level has been dug out.
@@ -82,11 +82,11 @@ prioritize ConstructBuilding,# Run when you see the bridges ready to be built so
8282
"quickfort run,orders library/dreamfort.csv -n /surface6",# Run when at least the beehives and weapon rack are constructed and you have linked all levers to their respective bridges.
8383
"quickfort run,orders library/dreamfort.csv -n /surface7",# Run after the surface walls are completed and any marked trees are chopped down.
8484
""
85-
-- Plumbing --
85+
-- Plumbing --
8686
"This is a good time to fill your well cisterns, either with a bucket brigade or by routing water from a freshwater stream or an aquifer (see the library/aquifer_tap.csv blueprint for help with this)."
8787
"Also consider bringing magma up to your services level so you can replace the forge and furnaces on your industry level with more powerful magma versions. This is especially important if your embark has insufficient trees to convert into charcoal. Keep in mind that moving magma is a tricky process and can take a long time. Don't forget to continue making progress through the checklist! If you choose to use magma, I suggest getting it in place before importing the military and smelting automation orders since they make heavy use of furnaces and forges."
8888
""
89-
-- Mature fort (third migration wave onward) --
89+
-- Mature fort (third migration wave onward) --
9090
orders import furnace,# Automated production of basic furnace-related items. Don't forget to create a sand collection zone (or remove the sand- and glass-related orders if you have no sand).
9191
"quickfort run,orders library/dreamfort.csv -n /suites2",# Run when the suites level has been dug out.
9292
"quickfort run,orders library/dreamfort.csv -n /surface8","# Run if/when you need longer trap corridors on the surface for larger sieges, anytime after you run /surface7."
@@ -334,7 +334,7 @@ corridor/surface_corridor
334334
message(Once the central stairs are mined out deeply enough, you should start digging the industry level in a non-aquifer rock layer. You'll need the boulders from the digging to make blocks.
335335
If your wagon is within the fort perimeter, deconstruct it to get it out of the way.
336336
Once the marked trees are all chopped down (if any), continue with /surface2.) clear trees and set up pastures"
337-
central_stairs/central_stairs repeat(down 10)
337+
central_stairs/central_stairs repeat(down 10)
338338
clear_small/surface_clear_small
339339
zones/surface_zones
340340
name_zones/surface_name_zones
@@ -2897,4 +2897,3 @@ build2_apartments/apartments_build2
28972897
,,,,n,`,h,,n,`,h,,n,`,h,,n,`,h,,n,`,h,,n,`,h,,n,`,h
28982898
,,,,`,~,`,,`,~,`,,`,~,`,,`,~,`,,`,~,`,,`,~,`,,`,~,`
28992899
,,,,n,`,f,,n,`,f,,n,`,f,,n,`,f,,n,`,f,,n,`,f,,n,`,f
2900-

data/blueprints/library/quickfortress.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,4 +765,4 @@ r+,,,,,,,,r+,,r+,,,,,,,,,r+,,r+,,,,,,,,,#
765765
,,,,,,,,,,,,,,,,,,,,,Tl,Tl,Tl,d,,,,,,#
766766
,,,,,,,,,,,,,,,,,,,,,,Tl,,,,,d,Msm,Msm,#
767767
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#
768-
#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#
768+
#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#

dfhack-config/autonick.txt

-1
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,3 @@ Wilder
150150
Wisdom
151151
Wyatt
152152
Zephyr
153-

docs/Binpatches.rst

-1
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,3 @@ The script interface simply lets you designate one of the squads that
175175
are assigned to the barracks/armory containing the selected stand as
176176
the intended user. In order to aid in the choice, it shows the number
177177
of currently assigned racks for every valid squad.
178-

docs/Contributing.rst

-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,3 @@ If you're not comfortable programming, you can help by:
112112

113113
All those things are crucial, and often under-represented. So if that's
114114
your thing, go get started!
115-

0 commit comments

Comments
 (0)