code:
About:
	This is a toolset to manage a production server of tgstation13 (or its forks). It includes an update script that is able to update the server without having to stop or shutdown the server (the update will take effect next round) and a script to start the server and restart it if it crashes (optional, requires registry tweaks to disable the Windows crash dialog system wide)

	This will force a live tracking of the configured git repo, so no local modifications are allowed. (this is to avoid issues with merge conflicts and because I'm too lazy to make the script detect them)

Install:
	Move this folder to where you want your server to run from (you may also rename this folder if you wish)
	Right click on config.bat and click edit.
	Configure the port, selected map file, and the like, You may configure the location of git, but if you installed using git for windows, we will auto detect it if its not in path.
	You may also need to change the location of the gitrepo url, and if you renamed your dme/"dream maker environment" file, you will need to change the project name configuration setting to be the name of your dme minus the extension (eg: if you renamed tgstation.dme to ntstation.dme, project name should be set to ntstation

	After that, just run install.bat and hope for no error.

	It will clone the git repo, setup some folders, and add cross reference links everywhere.

	Optional:
		If you plan to use the start-server script to watch the server and restart it if it crashes, you should run the "disable crash dialog.reg" registry script to disable the "program.exe has stopped working" dialog. This will get disabled system wide so if you rely on this dialog, you shouldn't run the script.
		Even without this, byond stopping the world from two many critical errors (like infinite loops and recursions) will still be detected.

Usage:
	The install script will make a few folders:
		gamecode
			This will house two copies of the game code, one for updating and one for live. When updating, it will automatically swap them.

		gamedata
			This contains the data, config, and cfg folders from the code. They are stored here and a symbolic link is created in the code folders pointing to here.
			This also makes backing them up easy.
			(you may copy and paste your existing data/config/cfg folders here after the install script has ran.)

		bot
			This is a copy of the bot folder. you should run the bot from here. a link to coredata.py and nudge.py is created in the code folders so that the game can use the announcement feature.
			The start server script and update script will send messages out thru the bot, but if its not running or python is not installed, they will gracefully continue what they are doing.

		gamefolder
			This is a symbolic link pointing to current "live" folder.
			When the server is updated, we just point this to the updating folder so that the update takes place next round.

		bin
			This contains random helper batch files.
			Running these on their own is a bad idea.

	To update the server, just run update server.bat. (it will git pull, compile, all that jazz)
		It will ask you if you want to apply the update live. 99.9% of the time, this will not cause issues. The only issues it can cause relate to changes to media files(images(but not icons)/css/html/sound not stored in the RSC. but only new clients will see those issues, and at worst, its a minor graphical glitch.
		You may remove the pause in the update script at line 90 if you like.

	To run the server, just run start server.bat
		It will automatically redirect the runtimes to data/logs/runtimes/runtime-YYYY-MM-DD.log.
			(Note: It will not automatically roll them over, but every time it crashes or stops it will have a new log file.)
		When it starts dreamdaemon, it instructs byond to close down dreamdaemon if the world stops for any reason, this includes hitting the stop button, dreamdaemon shutting the world down because of too many runtimes/infinite loops.
		If dreamdaemon ever stops while the start server script is running, the script will restart it automatically.
			(Note: The script can not detect hangs or lockups)


code:
@echo off
@title NT IRC BOT
echo Welcome to the start bot script, This will start the bot and make sure it stays running. This assumes python in the path. To continue, press any key or wait 60 seconds.
timeout 60
cd bot
:START
call ..\bin\getcurdate.bat
if not exist ..\gamedata\data\logs\bot mkdir ..\gamedata\data\logs\bot\
cls
echo NT IRC Bot
echo Bot Running. Watching for Bot exits.
start /WAIT python NanoTrasenBot.py >>..\gamedata\data\logs\bot\bot-%CUR_DATE%.txt
cls
echo NT IRC Bot
echo Bot exit detected. Restarting in 15 minutes.
REM this is so long because we want to avoid the bot spamming the server and getting klined/glined/or akilled
timeout 900

goto :START

path: tools/tgstation-server/Start Bot.bat

license: mit


code:
@echo off
@title SERVER WATCHDOG
call config.bat
call bin\findbyond.bat

echo Welcome to the start server watch dog script, This will start the server and make sure it stays running. To continue, press any key or wait 60 seconds.
timeout 60

if not exist gamedata\data\logs\runtimes mkdir gamedata\data\logs\runtimes\
@python bot\nudge.py "WATCHDOG" "Watch Dog online. Starting server" >nul 2>nul

:START
call bin\getcurdate.bat
cls
echo Watch Dog.
echo Server Running. Watching for server exits.
start /WAIT /ABOVENORMAL "" dreamdaemon.exe gamefolder\%PROJECTNAME%.dmb -port %PORT% -trusted -close -log "data\logs\runtimes\runtime-%CUR_DATE%.log"
cls
echo Watch Dog.
echo Server exit detected. Restarting in 60 seconds.
@python bot\nudge.py "WATCHDOG" "Server exit detected. Restarting server in 60 seconds." >nul 2>nul
timeout 60

goto :START

path: tools/tgstation-server/Start Server.bat


code:
@echo off
@title Server Updater
set HOME = %USERPROFILE%
call config.bat
call bin\getcurdate.bat
echo This will handle downloading git, compiling the server, and applying the update.
echo ready?
timeout 120
if exist updating.lk (
	echo ERROR! A current update script has been detected running. if you know this is a mistake:
	pause
	echo Please be double sure that an update script is not currently running, if you think one might be, close this window. otherwise:
	pause
)
if exist rotating.lk (
	echo ERROR! A current map rotation operation has been detected running. IT IS STRONGLY RECOMMENDED YOU DO NOT UPDATE RIGHT NOW. if you know this is a mistake, and that the game server is not currently rotating the map:
	pause
	echo IT IS STRONGLY RECOMMENDED YOU DO NOT UPDATE RIGHT NOW. If a map rotation script runs at the same time as an update script the server will generally break in ways not trivial to recover from. Are you REALLY sure? Please close this window if you are not, otherwise:
	pause
)
@del /F /Q rotating.lk >nul 2>nul
echo lock>updating.lk

rem if the first arg to nudge.py is not a channel, it is treated as the "source"
if not defined UPDATE_LOG_CHANNEL set UPDATE_LOG_CHANNEL="UPDATER"

python bot\nudge.py %UPDATE_LOG_CHANNEL% "Update job started" >nul 2>nul

call bin\updategit.bat
if %GIT_EXIT% neq 0 (
	echo git pull failed. Aborting update
	python bot\nudge.py %UPDATE_LOG_CHANNEL% "Git pull failed. Aborting update"
	@del updating.lk >nul 2>nul
	pause
	exit /b 1
)
if defined PUSHCHANGELOGTOGIT (
	echo compiling change log
	python tools\ss13_genchangelog.py html/changelog.html html/changelogs
	if %ERRORLEVEL% == 0 (
		echo pushing compiled changelog to server
		git add -u html/changelog.html
		git add -u html/changelogs
		git commit -m "Automatic changelog compile"
		if %ERRORLEVEL% == 0 (
			git push
		)
		REM an error here generally means there was nothing to commit.
	)
)

call bin\findab.bat

call bin\copyfromgit.bat

if not defined PUSHCHANGELOGTOGIT (
	echo compiling change log
	cd gamecode\%AB%
	call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
	cd ..\..
)

echo building script.
call bin\build.bat
if %DM_EXIT% neq 0 (
	echo DM compile failed. Aborting.
	python bot\nudge.py %UPDATE_LOG_CHANNEL% "DM compile failed Aborting update." >nul 2>nul
	@del /F /Q updating.lk >nul 2>nul
	pause
	exit /b 1
)

if not defined NOWAITUPDATES (
	echo OK, compiled and ready. So at the hit of a button, we can apply the update live. Technically speaking, it's best to wait until near round end, but unless a html/css/js file in the code had been deleted, edited, or moved recently, no ill effects of applying the update will happen, and the worst is that new clients have display oddities relating to in game windows. Existing connections should have no issue.
	echo Ready?
	pause
)
@del updating.lk >nul 2>nul
rmdir /q gamefolder
mklink /d gamefolder gamecode\%AB% >nul
python bot\nudge.py %UPDATE_LOG_CHANNEL% "Update job finished. Update will take place next round." >nul 2>nul
echo Done. The update will automatically take place at round restart.
timeout 300


code:
@echo off
call config.bat
call bin/findbyond.bat
set DME_FOLDER=gamefolder\
if defined AB set DME_FOLDER=gamecode\%AB%\

set DME_LOCATION=%DME_FOLDER%%PROJECTNAME%.dme
set MDME_LOCATION=%DME_FOLDER%%PROJECTNAME%.mdme

@del %MDME_LOCATION% >nul 2>nul
if defined MAPROTATE set MAPFILE=%MAPROTATE%
if not defined MAPFILE goto BUILD

echo #define MAP_OVERRIDE >>%MDME_LOCATION%
echo #include "_maps\%MAPFILE%.dm" >>%MDME_LOCATION%

:BUILD
echo #define SERVERTOOLS 1 >>%MDME_LOCATION%
type %DME_LOCATION% >>%MDME_LOCATION%

dm %MDME_LOCATION%
set DM_EXIT=%ERRORLEVEL%
@del %DME_FOLDER%%PROJECTNAME%.dmb >nul 2>nul
@del %DME_FOLDER%%PROJECTNAME%.rsc >nul 2>nul
@move %DME_FOLDER%%PROJECTNAME%.mdme.dmb %DME_FOLDER%%PROJECTNAME%.dmb  >nul 2>nul
@move %DME_FOLDER%%PROJECTNAME%.mdme.rsc %DME_FOLDER%%PROJECTNAME%.rsc >nul 2>nul


code:
echo Removing old files
rem delete the symlinks manually to ensure their targets don't get recursively deleted
rmdir /q gamecode\%AB%\data >nul 2>nul
rmdir /q gamecode\%AB%\config >nul 2>nul
rmdir /q gamecode\%AB%\cfg >nul 2>nul
del /q gamecode\%AB%\nudge.py >nul 2>nul
del /q gamecode\%AB%\CORE_DATA.py >nul 2>nul

del /S /F /Q gamecode\%AB% >nul 2>nul

echo Copying files
xcopy gitrepo gamecode\%AB% /Y /X /K /R /H /I /C /V /E /Q /EXCLUDE:copyexclude.txt >nul
mkdir gamecode\%AB%\.git\logs
copy gitrepo\.git\logs\HEAD gamecode\%AB%\.git\logs\HEAD /D /V /Y >nul

mklink gamecode\%AB%\nudge.py ..\..\bot\nudge.py >nul
mklink gamecode\%AB%\CORE_DATA.py ..\..\bot\CORE_DATA.py >nul
rmdir /q gamecode\%AB%\data >nul 2>nul
rmdir /s /q gamecode\%AB%\data >nul 2>nul
mklink /d gamecode\%AB%\data ..\..\gamedata\data >nul
mklink /d gamecode\%AB%\config ..\..\gamedata\config >nul
mklink /d gamecode\%AB%\cfg ..\..\gamedata\cfg >nul


code:
@del gamecode\a\updater.temp >nul 2>nul
@del gamecode\b\updater.temp >nul 2>nul

echo test >gamefolder\updater.temp

if exist gamefolder\%PROJECTNAME%.rsc.lk (
	rem we attempt to delete the lock file to see if the server is currently running.
	del /q gamefolder\%PROJECTNAME%.rsc.lk >nul 2>nul
	if exist gamefolder\%PROJECTNAME%.rsc.lk set RUNNING=1
)

if exist gamecode\a\updater.temp (
	if defined RUNNING (
		echo Current folder detected to be the "A" folder. Game is currently running. Updating to the "B" folder.
		set AB=b
	) else (
		echo Current folder detected to be the "A" folder. Game is not currently running, Updating to the "A" folder.
		set AB=a
	)
) else if exist gamecode\b\updater.temp (
	if defined RUNNING (
		echo Current folder detected to be the "B" folder. Game is currently running, Updating to the "A" folder.
		set AB=a
	) else (
		echo Current folder detected to be the "B" folder. Game is not currently running, Updating to the "B" folder.
		set AB=b
	)
)
@del gamefolder\updater.temp >nul 2>nul


code:
@echo off

@dm.exe -h >nul 2>nul
IF %ERRORLEVEL% NEQ 9009 (
	goto :eof
)

set PATH=%PATH%;%BYOND_LOCATION_PATH%
@dm.exe -h >nul 2>nul
IF %ERRORLEVEL% NEQ 9009 (
	goto :eof
)

@"c:\Program Files (x86)\BYOND\bin\dm.exe" -h >nul 2>nul
IF %ERRORLEVEL% NEQ 9009 (
	set "PATH=%PATH%;c:\Program Files (x86)\BYOND\bin\"
	goto :eof
)
@"c:\Program Files\BYOND\bin\dm.exe" -h >nul 2>nul
IF %ERRORLEVEL% NEQ 9009 (
	set "PATH=%PATH%;c:\Program Files\BYOND\bin\"
	goto :eof
)

echo byond not found. Aborting. If byond is installed, set the GIT_LOCATION variable inside config.bat
timeout 60
exit 11


code:
@echo off
REM check if git is already in path
git --version >nul 2>nul && goto :eof

REM now lets try our override.
set PATH=%PATH%;%GIT_LOCATION_PATH%
@git --version >nul 2>nul && goto :eof

REM credit to sschuberth@http://stackoverflow.com/questions/8507368/finding-the-path-where-git-is-installed-on-a-windows-system
REM Read the Git for Windows installation path from the Registry.

:REG_QUERY
for /f "skip=2 delims=: tokens=1*" %%a in ('reg query "HKLM\SOFTWARE%WOW%\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1" /v InstallLocation 2^> nul') do (
    for /f "tokens=3" %%z in ("%%a") do (
        set GIT=%%z:%%b
    )
)
if "%GIT%"=="" (
    if "%WOW%"=="" (
        rem Attempt to find it on the 32bit register section
        set WOW=\Wow6432Node
        goto REG_QUERY
    )
)

set PATH=%GIT%bin;%PATH%

@git --version >nul 2>nul && goto :eof

echo Git not found. Aborting. If git is installed, set the GIT_LOCATION variable inside config.bat
timeout 60
exit 10


code:
@echo off
FOR /f %%a in ('WMIC OS GET LocalDateTime ^| find "."') DO set DTS=%%a
set CUR_DATE=%DTS:~0,4%-%DTS:~4,2%-%DTS:~6,2%


code:
@echo off
for /f "delims=" %%x in ('cscript /nologo unixtime.vbs') do set UNIXTIME=%%x


code:
@echo off
@title Map Rotator

if not exist setnewmap.bat exit 11
call setnewmap.bat
cd ..

if exist updating.lk exit 21
if exist rotating.lk exit 22

if not exist config.bat exit 12
call config.bat
echo lock>rotating.lk
cls
echo Rotating map to %MAPROTATE%

call bin\findab.bat

cls
echo Rotating map to %MAPROTATE%

call bin\copyfromgit.bat

cls
echo Rotating map to %MAPROTATE%

call bin\build.bat
@del /F /Q rotating.lk >nul 2>nul
if %DM_EXIT% neq 0 exit 31

rmdir /q gamefolder
mklink /d gamefolder gamecode\%AB%


code:
call bin\findgit.bat
echo Updating repo
cd gitrepo
git branch backup-%CUR_DATE% >nul 2>nul
git fetch
set GIT_EXIT=%ERRORLEVEL%
if %GIT_EXIT% neq 0 goto END
git checkout %REPO_BRANCH%
set GIT_EXIT=%ERRORLEVEL%
if %GIT_EXIT% neq 0 goto END
git reset origin/%REPO_BRANCH% --hard
set GIT_EXIT=%ERRORLEVEL%
if %GIT_EXIT% neq 0 goto END
git pull --force
set GIT_EXIT=%ERRORLEVEL%

:END
cd ..


code:
@echo off
REM Server Tools configuration file. Lines starting with REM are comments and ignored.
REM on/off config options are considered "on" if they have anything (even 0) and "off" if they are blank or commented out.

REM This must be set to the name of your dme without the .dme part. (should be fine leaving this alone unless you renamed the code)
set PROJECTNAME=tgstation

REM location of the repo.
set REPO_URL=https://github.com/tgstation/-tg-station.git
REM set REPO_URL=git@github.com:tgstation/-tg-station.git

REM What branch of the repo to use.
set REPO_BRANCH=master

REM what map file to use. This should be the name of the dm, not dmm (and without the .dm part) (defaults to what ever is ticked in the dme)
set MAPFILE=tgstation2
REM set MAPFILE=metastation
REM set MAPFILE=ministation

REM port to use (only used to start the server in the start-server script)
set PORT=1337

REM This is the channel to log updates to. Leave blank to log to the normal channel (this is done via the tgstation bot, optional)
set UPDATE_LOG_CHANNEL=#coderbus

REM overrides the prompt to live apply the updates in update server.bat if set to anything other than a null string.
REM It is generally safe to live apply the updates, they don't take effect until the next round. the only concern is that some media files may get loaded by new clients before the next round. These files aren't edited 99% of the time, so its not a real concern, but I kept the prompt the default for compatibility sake.
set NOWAITUPDATES=

REM Attempt to push the compiled changelog to the configured git server? (set to anything)
REM This requires you configure git with authentication for the upstream server. (the ssh key should be stored in c:\users\USERNAME_HERE\.ssh\ as the filename id_rsa (if that still doesn't work, try c:\program files\git\.ssh\id_rsa))
set PUSHCHANGELOGTOGIT=

REM location of git. The script will attempt to auto detect this, but if it fails, you can set it manually.
REM This will be added to the end of path as is (only for the batch file, not the whole system)
REM github for windows users see http://www.chambaud.com/2013/07/08/adding-git-to-path-when-using-github-for-windows/ (an example is provided below)
set GIT_LOCATION_PATH=
REM set GIT_LOCATION_PATH=C:\Users\<user>\AppData\Local\GitHub\PortableGit_<GUID>\bin;C:\Users\<USER>\AppData\Local\GitHub\PortableGit_<GUID>\cmd

REM path to the byond bin folder. (if blank, we look in path, program files/byond/bin, and program files (x86)/byond/bin) (same rules as git path above)
set BYOND_LOCATION_PATH=


code:
//This is a list of files to exclude from copying. See xcopy's documentation for /exclude for more info.
//

gitrepo\config\
gitrepo\data\
gitrepo\bot\
gitrepo\cfg\
gitrepo\.git\


code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting]
"DontShowUI"=dword:00000001


code:
@echo off
@title Server Tools Installer.
set HOME = %USERPROFILE%
call config.bat

echo This will download the game code from git and install the all the files and folders and symbolic links needed to use the server tools in to the current directory.

echo This requires git be installed.

echo Once this is done, you can safely delete this file if you wish.

echo Ready?
pause

call bin/findgit.bat

echo Downloading repo....
git clone %REPO_URL% gitrepo
IF %ERRORLEVEL% NEQ 0 (
	echo git clone failed. aborting.
	pause
	goto ABORT
)
cd gitrepo
git checkout %REPO_BRANCH%
cd ..

echo Repo downloaded.
echo Setting up folders...
mkdir gamecode\a
mkdir gamecode\b
mkdir gamecode\override
mkdir gamedata
mkdir bot

echo Copying things around....
echo (1/3)
xcopy gitrepo\data gamedata\data /Y /X /K /R /H /I /C /V /E /Q >nul
xcopy gitrepo\config gamedata\config /Y /X /K /R /H /I /C /V /E /Q >nul
xcopy gitrepo\cfg gamedata\cfg /Y /X /K /R /H /I /C /V /E /Q >nul
xcopy gitrepo\bot bot /Y /X /K /R /H /I /C /V /E /Q >nul
echo (2/3)
xcopy gitrepo gamecode\a /Y /X /K /R /H /I /C /V /E /Q /EXCLUDE:copyexclude.txt >nul
mkdir gamecode\a\.git\logs\
copy gitrepo\.git\logs\HEAD gamecode\a\.git\logs\HEAD /D /V /Y >nul
echo (3/3)
xcopy gitrepo gamecode\b /Y /X /K /R /H /I /C /V /E /Q /EXCLUDE:copyexclude.txt >nul
mkdir gamecode\b\.git\logs >nul
copy gitrepo\.git\logs\HEAD gamecode\b\.git\logs\HEAD /D /V /Y >nul
echo done.

echo Setting up symbolic links.
mklink gamecode\a\nudge.py ..\..\bot\nudge.py
mklink gamecode\a\CORE_DATA.py ..\..\bot\CORE_DATA.py
mklink /d gamecode\a\data ..\..\gamedata\data
mklink /d gamecode\a\config ..\..\gamedata\config
mklink /d gamecode\a\cfg ..\..\gamedata\cfg

mklink gamecode\b\nudge.py ..\..\bot\nudge.py
mklink gamecode\b\CORE_DATA.py ..\..\bot\CORE_DATA.py
mklink /d gamecode\b\data ..\..\gamedata\data
mklink /d gamecode\b\config ..\..\gamedata\config
mklink /d gamecode\b\cfg ..\..\gamedata\cfg

mklink /d gamefolder gamecode\a

echo Compiling for the first time.

echo Compiling change log.
cd gamecode\a
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
cd ..\..
echo Compiling game.
call bin\build.bat
if %DM_EXIT% neq 0 echo DM compile failed.

echo Done. You may start the server using the start server program or change the game config in gamedata\config
pause

:ABORT


code:
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs     diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln       merge=binary
#*.csproj    merge=binary
#*.vbproj    merge=binary
#*.vcxproj   merge=binary
#*.vcproj    merge=binary
#*.dbproj    merge=binary
#*.fsproj    merge=binary
#*.lsproj    merge=binary
#*.wixproj   merge=binary
#*.modelproj merge=binary
#*.sqlproj   merge=binary
#*.wwaproj   merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg   binary
#*.png   binary
#*.gif   binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc   diff=astextplain
#*.DOC   diff=astextplain
#*.docx  diff=astextplain
#*.DOCX  diff=astextplain
#*.dot   diff=astextplain
#*.DOT   diff=astextplain
#*.pdf   diff=astextplain
#*.PDF   diff=astextplain
#*.rtf   diff=astextplain
#*.RTF   diff=astextplain

path: .gitattributes

license: unknown


code:
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- Backup*.rdl

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush personal settings
.cr/personal

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Local History for Visual Studio
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
/Source/Patches/PawnAnimationPatches/HarmonyPatch_Pawn_DrawTracker.cs
/Source/Patches/PawnAnimationPatches/HarmonyPatch_PawnRotation.cs
/Source/Patches/PawnAnimationPatches/HarmonyPatch_PawnRenderer.cs
/Source/Patches/OtherModPatches/HarmonyPatch_ShowHairWithHats.cs
/Source/Patches/OtherModPatches/HarmonyPatch_FacialAnimation.cs
/Source/Patches/OtherModPatches/HarmonyPatch_DontShaveYourHead.cs
/Source/Patches/OtherModPatches/HarmonyPatch_CSL.cs
/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs
/Source/Patches/ThingAnimationPatches/HarmonyPatch_ThingDrawAt.cs
/Defs/AnimationDefs/Animations_SexToys.xml

path: .gitignore