From 51236f90fa79a1ef810bdea4574f86ffda5cbc0a Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Fri, 31 Mar 2023 21:05:19 -0500 Subject: [PATCH 1/3] update steam launcher this version launches dwarf fortress via the steam client the existing one doesn't set up the steam app context which means access to DF's steam workshop is broken. launching through the steam client avoids this issue. --- docs/changelog.txt | 1 + package/windows/launchdf.c | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 3fe5fdbbb..279acdef7 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,6 +36,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## New Plugins ## Fixes +- Steam launcher now launches Dwarf Fortress via the Steam client ## Misc Improvements diff --git a/package/windows/launchdf.c b/package/windows/launchdf.c index 9f4b01fcb..588624511 100644 --- a/package/windows/launchdf.c +++ b/package/windows/launchdf.c @@ -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); } From 92438ed98c39fe18510bbd2c78d12de87fc29aa3 Mon Sep 17 00:00:00 2001 From: DFHack-Urist via GitHub Actions <63161697+DFHack-Urist@users.noreply.github.com> Date: Sat, 1 Apr 2023 02:26:16 +0000 Subject: [PATCH 2/3] Auto-update submodules scripts: master --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index 0b55c5418..298d9c00c 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 0b55c5418970917310bfd437499adfac0be80e0e +Subproject commit 298d9c00c7df81fc4ca363366dbaebf7f47be489 From d13dfd7d496cf45a5a56e5951457efb4ed9a5e70 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 31 Mar 2023 19:29:01 -0700 Subject: [PATCH 3/3] interpret shrubbery as floor instead of wall --- docs/changelog.txt | 3 ++- plugins/blueprint.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 279acdef7..b34e66aaa 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,7 +36,8 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## New Plugins ## Fixes -- Steam launcher now launches Dwarf Fortress via the Steam client +- ``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 diff --git a/plugins/blueprint.cpp b/plugins/blueprint.cpp index b09c4d497..39847935d 100644 --- a/plugins/blueprint.cpp +++ b/plugins/blueprint.cpp @@ -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";