Merge branch 'develop' into patch-6

develop
Myk 2023-04-01 22:10:26 -07:00 committed by GitHub
commit 43ce62e27a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 5 deletions

@ -36,6 +36,8 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## New Plugins
## Fixes
- ``launchdf``: launch Dwarf Fortress via the Steam client so Steam Workshop is functional
- `blueprint`: interpret saplings, shrubs, and twigs as floors instead of walls
## Misc Improvements

@ -2,15 +2,28 @@
int WINAPI wWinMain(HINSTANCE hi, HINSTANCE hpi, PWSTR cmd, int ns)
{
STARTUPINFOA si;
STARTUPINFOW si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
if (CreateProcessA("Dwarf Fortress.exe",
NULL,
WCHAR steamPath[1024];
DWORD datasize = 1024;
LONG retCode = RegGetValueW(HKEY_CURRENT_USER, L"SOFTWARE\\Valve\\Steam", L"SteamExe", RRF_RT_REG_SZ, NULL, &steamPath, &datasize);
if (retCode != ERROR_SUCCESS)
{
MessageBoxW(NULL, L"Could not find Steam client executable", NULL, 0);
exit(1);
}
WCHAR commandLine[1024] = L"steam.exe -applaunch 975370";
if (CreateProcessW(steamPath,
commandLine,
NULL,
NULL,
FALSE,
@ -20,7 +33,7 @@ int WINAPI wWinMain(HINSTANCE hi, HINSTANCE hpi, PWSTR cmd, int ns)
&si,
&pi) == 0)
{
MessageBoxA(NULL, "could not launch 'Dwarf Fortress.exe'", NULL, 0);
MessageBoxW(NULL, L"could not launch Dwarf Fortress", NULL, 0);
exit(1);
}

@ -229,6 +229,9 @@ static const char * get_tile_dig(const df::coord &pos, const tile_context &) {
case tiletype_shape::BOULDER:
case tiletype_shape::PEBBLES:
case tiletype_shape::BROOK_TOP:
case tiletype_shape::SAPLING:
case tiletype_shape::SHRUB:
case tiletype_shape::TWIG:
return "d";
case tiletype_shape::STAIR_UP:
return "u";

@ -1 +1 @@
Subproject commit 0b55c5418970917310bfd437499adfac0be80e0e
Subproject commit 298d9c00c7df81fc4ca363366dbaebf7f47be489