Skip to content

Commit 5e8f859

Browse files
committed
Remove explicit keybindings from docs, plus misc docs cleanup
Closes DFHack/dfhack#988
1 parent ed1b046 commit 5e8f859

5 files changed

Lines changed: 26 additions & 29 deletions

File tree

adv-rumors.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@ adv-rumors
66
==========
77
Improves the "Bring up specific incident or rumor" menu in Adventure mode.
88
9+
- Moves entries into one line
10+
- Adds a "slew" keyword for filtering, making it easy to find your kills and not your companions'
11+
- Trims repetitive words
12+
913
]====]
1014

1115
--========================
1216
-- Author : 1337G4mer on bay12 and reddit
1317
-- Version : 0.2
1418
-- Description : A small utility based on dfhack to improve the rumor UI in adventure mode.
1519
--
16-
-- Usage: Save this code as rumors.lua file in your /hack/scripts/ folder
1720
-- In game when you want to boast about your kill to someone. Start conversation and choose
1821
-- the menu "Bring up specific incident or rumor"
1922
-- type rumors in dfhack window and hit enter. Or do the below keybind and use that directly from DF window.
20-
-- Optional One time setup : run below command at dfhack command prompt once to setup easy keybind for this
21-
-- keybinding add Ctrl-A@dungeonmode/ConversationSpeak rumors
2223
--
2324
-- Prior Configuration: (you can skip this if you want)
2425
-- Set the three boolean values below and play around with the script as to how you like

gui/advfort.lua

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gui/advfort
66
===========
77
This script allows to perform jobs in adventure mode. For more complete help
88
press :kbd:`?` while script is running. It's most comfortable to use this as a
9-
keybinding. (e.g. ``keybinding set Ctrl-T gui/advfort``). Possible arguments:
9+
keybinding (see below for the default binding). Possible arguments:
1010
1111
:-a, --nodfassign: uses different method to assign items.
1212
:-i, --inventory: checks inventory for possible items to use in the job.
@@ -718,7 +718,7 @@ function isSuitableItem(job_item,item)
718718
print(v)
719719
end
720720
--]]
721-
721+
722722
return false,"matinfo"
723723
end
724724
-- some bonus checks:
@@ -914,7 +914,7 @@ function AssignJobItems(args)
914914
-- first find items that you want to use for the job
915915
local job=args.job
916916
local its=EnumItems_with_settings(args)
917-
917+
918918
local item_suitability,item_counts=find_suitable_items(job,its)
919919
--[[while(#job.items>0) do --clear old job items
920920
job.items[#job.items-1]:delete()
@@ -923,7 +923,7 @@ function AssignJobItems(args)
923923

924924
if settings.gui_item_select and #job.job_items>0 then
925925
local item_dialog=require('hack.scripts.gui.advfort_items')
926-
926+
927927
if settings.quick then --TODO not so nice hack. instead of rewriting logic for job item filling i'm using one in gui dialog...
928928
local item_editor=item_dialog.jobitemEditor{
929929
job = job,
@@ -1060,7 +1060,7 @@ function fake_linking(lever,building,slots)
10601060
end
10611061
item2.general_refs:insert("#",{new=df.general_ref_building_triggerst,building_id=lever.id})
10621062
item1.general_refs:insert("#",{new=df.general_ref_building_triggertargetst,building_id=building.id})
1063-
1063+
10641064
lever.linked_mechanisms:insert("#",item2)
10651065
--fixes...
10661066
if building:getType()==df.building_type.Door then
@@ -1143,7 +1143,7 @@ function PlantGatherFix(args)
11431143
local pos=args.pos
11441144
--[[args.job.flags[17]=false --??
11451145
1146-
1146+
11471147
local block=dfhack.maps.getTileBlock(pos)
11481148
local ev=get_design_block_ev(block)
11491149
if ev==nil then
@@ -1218,7 +1218,7 @@ function usetool:update_site()
12181218
self.current_site=site
12191219
local site_label=self.subviews.siteLabel
12201220
if site then
1221-
1221+
12221222
site_label:itemById("site").text=dfhack.TranslateName(site.name)
12231223
else
12241224
if settings.safe then
@@ -1404,7 +1404,7 @@ function usetool:openShopWindowButtoned(building,no_reset)
14041404
--]]
14051405
end
14061406
building:fillSidebarMenu()
1407-
1407+
14081408
local list={}
14091409
for id,choice in pairs(wui.choices_visible) do
14101410
table.insert(list,{text=utils.call_with_string(choice,"getLabel"),button=choice})
@@ -1420,7 +1420,7 @@ function usetool:openShopWindowButtoned(building,no_reset)
14201420
end
14211421
function usetool:openShopWindow(building)
14221422
local adv=df.global.world.units.active[0]
1423-
1423+
14241424
local filter_pile=workshopJobs.getJobs(building:getType(),building:getSubtype(),building:getCustomType())
14251425
if filter_pile then
14261426
local state={unit=adv,from_pos={x=adv.pos.x,y=adv.pos.y, z=adv.pos.z},building=building
@@ -1522,7 +1522,7 @@ function usetool:hiveActions(building)
15221522
--CollectHiveProducts,
15231523
end
15241524
function usetool:operatePump(building)
1525-
1525+
15261526
local adv=df.global.world.units.active[0]
15271527
makeJob{unit=adv,post_actions={AssignBuildingRef},pos=adv.pos,from_pos=adv.pos,job_type=df.job_type.OperatePump,screen=self}
15281528
end
@@ -1537,7 +1537,7 @@ function usetool:farmPlot(building)
15371537
end
15381538
end
15391539
--check if there tile is without plantseeds,add job
1540-
1540+
15411541
local args={unit=adv,pos=adv.pos,from_pos=adv.pos,screen=self}
15421542
if do_harvest then
15431543
args.job_type=df.job_type.HarvestPlants
@@ -1702,7 +1702,7 @@ function usetool:fieldInput(keys)
17021702
break
17031703
end
17041704
end
1705-
1705+
17061706
--First check site
17071707
local ok,msg=self:siteCheck() --TODO: some jobs might be possible without a site?
17081708
if not ok then
@@ -1717,17 +1717,17 @@ function usetool:fieldInput(keys)
17171717
end
17181718
end
17191719
end
1720-
1720+
17211721
if not failed then
17221722
local ok,msg
17231723
if type(cur_mode[2])=="function" then
17241724
ok,msg=cur_mode[2](state)
17251725
else
17261726
makeJob(state)
17271727
--(adv,moddedpos(adv.pos,MOVEMENT_KEYS[code]),cur_mode[2],adv.pos,cur_mode[4])
1728-
1728+
17291729
end
1730-
1730+
17311731
if code=="SELECT" then
17321732
self:sendInputToParent("LEAVESCREEN")
17331733
end
@@ -1741,15 +1741,15 @@ function usetool:fieldInput(keys)
17411741
end
17421742
end
17431743
end
1744-
1744+
17451745
end
17461746

17471747
function usetool:onInput(keys)
17481748

17491749
self:update_site()
17501750

17511751
local adv=df.global.world.units.active[0]
1752-
1752+
17531753
if keys.LEAVESCREEN then
17541754
if df.global.cursor.x~=-30000 then --if not poiting at anything
17551755
self:sendInputToParent("LEAVESCREEN") --leave poiting
@@ -1782,7 +1782,7 @@ function usetool:onInput(keys)
17821782
self:fieldInput(keys)
17831783
end
17841784
end
1785-
1785+
17861786
end
17871787
function usetool:cancel_wait()
17881788
self.long_wait_timer=nil

gui/gm-editor.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gui/gm-editor
77
This editor allows to change and modify almost anything in df. Press :kbd:`?` for
88
in-game help. There are three ways to open this editor:
99
10-
* Callling ``gui/gm-editor`` from a command or keybinding opens the editor
10+
* Calling ``gui/gm-editor`` from a command or keybinding opens the editor
1111
on whatever is selected or viewed (e.g. unit/item description screen)
1212
1313
* using gui/gm-editor <lua command> - executes lua command and opens editor on

gui/manager-quantity.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
gui/manager-quantity
55
====================
66
7-
Sets the quantity of the selected manager job
8-
9-
Sample usage::
10-
11-
keybinding add Alt-Q@jobmanagement gui/manager-quantity
7+
Sets the quantity of the selected manager job (in the j-m or u-m screens).
128
139
]====]
1410

gui/unit-info-viewer.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- unit-info-viewer.lua
2-
-- Displays age, birth, maxage, shearing, milking, grazing, egg laying, body size, and death info about a unit. Recommended keybinding Alt-I
2+
-- Displays age, birth, maxage, shearing, milking, grazing, egg laying, body size, and death info about a unit.
33
-- version 1.04
44
-- original author: Kurik Amudnil
55
-- edited by expwnent
@@ -8,7 +8,7 @@
88
gui/unit-info-viewer
99
====================
1010
Displays age, birth, maxage, shearing, milking, grazing, egg laying, body size,
11-
and death info about a unit. Recommended keybinding :kbd:`Alt`:kbd:`I`.
11+
and death info about a unit.
1212
1313
]====]
1414
local gui = require 'gui'

0 commit comments

Comments
 (0)