From 68fbd4a78deee46fdc7d8ea5ab580f023fb804d2 Mon Sep 17 00:00:00 2001 From: Warmist Date: Fri, 19 Aug 2011 19:12:25 +0300 Subject: [PATCH] fixed few formating things, and annoying 'g' error. (work-around somehow the '..' operator does not work with numbers) --- plugins/Dfusion/dfusion.cpp | 1 - plugins/Dfusion/luafiles/common.lua | 2 +- plugins/Dfusion/luafiles/init.lua | 4 ++-- plugins/Dfusion/luafiles/offsets.lua | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/Dfusion/dfusion.cpp b/plugins/Dfusion/dfusion.cpp index 2495f1a25..965ee3475 100644 --- a/plugins/Dfusion/dfusion.cpp +++ b/plugins/Dfusion/dfusion.cpp @@ -167,6 +167,5 @@ DFhackCExport command_result dfusion (Core * c, vector & parameters) delete thread_dfusion; thread_dfusion=0; } - return CR_OK; } diff --git a/plugins/Dfusion/luafiles/common.lua b/plugins/Dfusion/luafiles/common.lua index 912862d56..a7ce563ff 100644 --- a/plugins/Dfusion/luafiles/common.lua +++ b/plugins/Dfusion/luafiles/common.lua @@ -204,7 +204,7 @@ end function it_menu:display() print("Select choice (q exits):") for p,c in pairs(self.items) do - print(p..")."..c[2]) + print(string.format("%3d).%s",p,c[2])) end local ans repeat diff --git a/plugins/Dfusion/luafiles/init.lua b/plugins/Dfusion/luafiles/init.lua index d8307eaab..45d328c5c 100644 --- a/plugins/Dfusion/luafiles/init.lua +++ b/plugins/Dfusion/luafiles/init.lua @@ -17,9 +17,9 @@ end function mainmenu(t1) Console.clear() while true do - print("No. Name Desc") + print("No. Name Desc") for k,v in pairs(t1) do - print(string.format("%d %s %s",k,v[1],v[2])) + print(string.format("%3d %15s %s",k,v[1],v[2])) end local q=Console.lineedit("Select plugin to run (q to quit):") if q=='q' then return end diff --git a/plugins/Dfusion/luafiles/offsets.lua b/plugins/Dfusion/luafiles/offsets.lua index e15f5b7e9..8349f73e3 100644 --- a/plugins/Dfusion/luafiles/offsets.lua +++ b/plugins/Dfusion/luafiles/offsets.lua @@ -1,8 +1,8 @@ function f_dwarves() - //mov DWORD PTR [ESP+14],7 - //jmp +0x08 + --mov DWORD PTR [ESP+14],7 + --jmp +0x08 pos_=offsets.findall(0,0x24,0x14,0x07,0,0,0) --search pattern for _,v in pairs(pos_) do print(string.format("Possible hit:%x",v))