Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into imtui
Browse files Browse the repository at this point in the history
  • Loading branch information
20k committed Jan 11, 2023
2 parents 2149e7e + 1725a51 commit 63476a3
Show file tree
Hide file tree
Showing 80 changed files with 2,538 additions and 7,575 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ if(NOT EXISTS ${dfhack_SOURCE_DIR}/library/xml/codegen.pl
endif()

# set up versioning.
set(DF_VERSION "50.04")
set(DF_VERSION "50.05")
set(DFHACK_RELEASE "alpha0")
set(DFHACK_PRERELEASE TRUE)

Expand Down
2 changes: 2 additions & 0 deletions LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ tinyxml_ Zlib \(c\) 2000-2006, Lee Thomason
UTF-8-decoder_ MIT \(c\) 2008-2010, Bjoern Hoehrmann
xlsxio_ MIT \(c\) 2016-2020, Brecht Sanders
alt-getopt_ MIT \(c\) 2009 Aleksey Cheusov
googletest_ BSD 3-Clause \(c\) 2008, Google Inc.
=============== ============= =================================================

.. _DFHack: https://github.com/DFHack/dfhack
Expand All @@ -56,6 +57,7 @@ alt-getopt_ MIT \(c\) 2009 Aleksey Cheusov
.. _UTF-8-decoder: http://bjoern.hoehrmann.de/utf-8/decoder/dfa
.. _xlsxio: https://github.com/brechtsanders/xlsxio
.. _alt-getopt: https://github.com/LuaDist/alt-getopt
.. _googletest: https://github.com/google/googletest

.. _CC-BY-SA: http://creativecommons.org/licenses/by/3.0/deed.en_US

Expand Down
18 changes: 14 additions & 4 deletions build/win32/set_df_path.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,29 @@ Option Explicit

Const BIF_returnonlyfsdirs = &H0001

Dim wsh, objDlg, objF, fso, spoFile
Set objDlg = WScript.CreateObject("Shell.Application")
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
Dim wsh, objDlg, objF, fso, spoFile, args

Set fso = CreateObject("Scripting.FileSystemObject")

set args = Wscript.Arguments
if args.count > 0 Then
Set ObjF = fso.GetFolder(args.Item(0))
else
Set objDlg = WScript.CreateObject("Shell.Application")
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
if IsValue(objF) Then
set ObjF = objF.self
end if
end if

If fso.FileExists("DF_PATH.txt") Then
fso.DeleteFile "DF_PATH.txt", True
End If

If IsValue(objF) Then
If InStr(1, TypeName(objF), "Folder") > 0 Then
Set spoFile = fso.CreateTextFile("DF_PATH.txt", True)
spoFile.WriteLine(objF.Self.Path)
spoFile.WriteLine(objF.Path)
End If
End If

Expand Down
18 changes: 14 additions & 4 deletions build/win64/set_df_path.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,29 @@ Option Explicit

Const BIF_returnonlyfsdirs = &H0001

Dim wsh, objDlg, objF, fso, spoFile
Set objDlg = WScript.CreateObject("Shell.Application")
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
Dim wsh, objDlg, objF, fso, spoFile, args

Set fso = CreateObject("Scripting.FileSystemObject")

set args = Wscript.Arguments
if args.count > 0 Then
Set ObjF = fso.GetFolder(args.Item(0))
else
Set objDlg = WScript.CreateObject("Shell.Application")
Set objF = objDlg.BrowseForFolder (&H0,"Select your DF folder", BIF_returnonlyfsdirs)
if IsValue(objF) Then
set ObjF = objF.self
end if
end if

If fso.FileExists("DF_PATH.txt") Then
fso.DeleteFile "DF_PATH.txt", True
End If

If IsValue(objF) Then
If InStr(1, TypeName(objF), "Folder") > 0 Then
Set spoFile = fso.CreateTextFile("DF_PATH.txt", True)
spoFile.WriteLine(objF.Self.Path)
spoFile.WriteLine(objF.Path)
End If
End If

Expand Down
Binary file added data/art/green-pin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/art/red-pin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions data/dfhack-config/init/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Example DFHack init scripts

This folder contains ready-to-use examples of DFHack init scripts.
You can use them by copying them to the dfhack-config/init folder.
You can use them unmodified, or you can customize them to better
suit your preferences.

For information on each of the files in this library, see the
[DFHack Example Configuration File Guide](https://docs.dfhack.org/en/stable/docs/guides/examples-guide.html).
9 changes: 3 additions & 6 deletions data/dfhack-config/init/examples/onMapLoad_dreamfort.init
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#on-new-fortress buildingplan set boulders false; buildingplan set logs false

# Disable cooking of useful item types when you start a new fortress.
on-new-fortress ban-cooking tallow; ban-cooking honey; ban-cooking oil; ban-cooking seeds; ban-cooking brew; ban-cooking fruit; ban-cooking mill; ban-cooking thread; ban-cooking milk; ban-cooking booze
on-new-fortress ban-cooking all

# Show a warning dialog when units are starving
repeat -name warn-starving -time 10 -timeUnits days -command [ warn-starving ]
Expand All @@ -25,9 +25,6 @@ repeat -name autoMilkCreature -time 14 -timeUnits days -command [ workorder "{\"
# Fulfill high-volume orders before slower once-daily orders
repeat -name orders-sort -time 1 -timeUnits days -command [ orders sort ]

# Don't let caravans bring barrels of blood and other useless liquids
fix/blood-del

# Manages crop assignment for farm plots
enable autofarm
autofarm default 30
Expand All @@ -40,8 +37,8 @@ enable automelt
enable tailor

# auto-assigns nesting birds to nestbox zones and protects fertile eggs from
# being cooked/eaten
enable zone autonestbox nestboxes
# being gathered and eaten
enable autonestbox nestboxes

# manages seed stocks
enable seedwatch
Expand Down
2 changes: 1 addition & 1 deletion data/init/dfhack.keybindings.init
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ keybinding add Ctrl-Shift-K gui/cp437-table
#keybinding add Ctrl-Alt-S@dwarfmode/Default quicksave

# toggle the display of water level as 1-7 tiles
keybinding add Ctrl-W@dwarfmode|dungeonmode twaterlvl
#keybinding add Ctrl-W@dwarfmode|dungeonmode twaterlvl

# designate the whole vein for digging
#keybinding add Ctrl-V@dwarfmode digv
Expand Down
2 changes: 1 addition & 1 deletion docs/Core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DFHack commands can be implemented in any of three ways:
same version of DFHack. They are less flexible than scripts,
but used for complex or ongoing tasks because they run faster.

:scripts: are Ruby or Lua scripts stored in ``hack/scripts/`` or other
:scripts: are Lua scripts stored in ``hack/scripts/`` or other
directories in the `script-paths`. Because they don't need to
be compiled, scripts are more flexible about versions, and
they are easier to distribute. Most third-party DFHack addons
Expand Down
9 changes: 8 additions & 1 deletion docs/about/Removed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,17 @@ longer necessary.

resume
======

Allowed you to resume suspended jobs and displayed an overlay indicating
suspended building construction jobs. Replaced by `unsuspend` script.

.. _ruby:
.. _rb:

ruby
====
Support for the Ruby language in DFHack scripts was removed due to the issues
the Ruby library causes when used as an embedded language.

.. _warn-stuck-trees:

warn-stuck-trees
Expand Down
9 changes: 9 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,26 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:

## API
- ``Gui::getDwarfmodeDims``: now only returns map viewport dimensions; menu dimensions are obsolete
- ``Gui::getDFViewscreen``: returns the topmost underlying DF viewscreen

## Lua
- Removed ``os.execute()`` and ``io.popen()`` built-in functions
- ``gui.View``: ``visible`` and ``active`` can now be functions that return a boolean
- ``widgets.Panel``: new attributes to control window dragging and resizing with mouse or keyboard
- ``widgets.Window``: Panel subclass with attributes preset for top-level windows
- ``widgets.CycleHotkeyLabel``: now supports rendering option labels in the color of your choice
- ``widgets.CycleHotkeyLabel``: new functions ``setOption()`` and ``getOptionPen()``
- ``widgets.ToggleHotkeyLabel``: now renders the ``On`` option in green text
- `overlay`: ``OverlayWidget`` now inherits from ``Panel`` instead of ``Widget`` to get all the frame and mouse integration goodies
- ``dfhack.gui.getDFViewscreen()``: returns the topmost underlying DF viewscreen
- ``gui.ZScreen``: Screen subclass that implements window raising, multi-viewscreen input handling, and viewscreen event pass-through so the underlying map can be interacted with and dragged around while DFHack screens are visible
- ``gui.View``: new function ``view:getMouseFramePos()`` for detecting whether the mouse is within (or over) the exterior frame of a view

## Internals

## Removed
- ``fix-job-postings`` from the `workflow` plugin is now obsolete since affected savegames can no longer be loaded
- Ruby is no longer a supported DFHack scripting language

# 0.47.05-r8

Expand Down

0 comments on commit 63476a3

Please sign in to comment.