From 5b54909886bdd58087506d4d35c43edc073b3a14 Mon Sep 17 00:00:00 2001 From: Peridexis Errant Date: Tue, 6 Jan 2015 22:48:24 +1100 Subject: [PATCH] Move hotkey-notes to scripts, delete needs_porting! The notes script is unfinished, but that's the last thing to do - since everything else is obsolete, ported, or the subject of a github issue to make a replacement. --- needs_porting/_notes.txt | 9 ------- {needs_porting => scripts}/hotkey-notes.lua | 30 ++++----------------- 2 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 needs_porting/_notes.txt rename {needs_porting => scripts}/hotkey-notes.lua (54%) diff --git a/needs_porting/_notes.txt b/needs_porting/_notes.txt deleted file mode 100644 index cdd364d12..000000000 --- a/needs_porting/_notes.txt +++ /dev/null @@ -1,9 +0,0 @@ -TODO: - copypaste.cpp - high value target - a proof of concept plugin to allow copy-pasting in DF; does both terrain and buildings/constructions - creaturemanager.cpp - modify skills and labors of creatures, kill creatures, etc; impressive but I suspect most functions implemented elsewhere - -In progress: - hotkey-notes.lua - prints list of hotkeys with name and jump position diff --git a/needs_porting/hotkey-notes.lua b/scripts/hotkey-notes.lua similarity index 54% rename from needs_porting/hotkey-notes.lua rename to scripts/hotkey-notes.lua index a84506512..30654911e 100644 --- a/needs_porting/hotkey-notes.lua +++ b/scripts/hotkey-notes.lua @@ -1,5 +1,9 @@ -- prints info on assigned hotkeys to the console +-- A work in progress, hoping for some help! +-- A different approach might be needed depending on internal structures, +-- but this gets the idea across. + local hotkeys = {'F1 ', 'F2 ', 'F3 ', 'F4 ', 'F5 ', 'F6 ', 'F7 ', 'F8 ', 'F9 ', 'F10', 'F11', 'F12'} @@ -13,28 +17,4 @@ for i=1, #hotkeys do hk.z = df.global.window_z print(hk.id..' '..hk.name..' X= '..hk.x..', Y= '..hk.y..', Z= '..hk.z) -end - ---[[ -# the (very) old Python version... -from context import Context, ContextManager - -cm = ContextManager("Memory.xml") -df = cm.get_single_context() - -df.attach() - -gui = df.gui - -print "Hotkeys" - -hotkeys = gui.read_hotkeys() - -for key in hotkeys: - print "x: %d\ny: %d\tz: %d\ttext: %s" % (key.x, key.y, key.z, key.name) - -df.detach() - -print "Done. Press any key to continue" -raw_input() -]]-- +end \ No newline at end of file