Changeset 3214
- Timestamp:
- 01/16/10 00:17:14 (8 weeks ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 modified
-
config/shards/oblivion.xml (added)
-
lua/lib.compass.lua (modified) (1 diff)
-
lua/lib.desktop.lua (modified) (1 diff)
-
lua/lib.macrolist.lua (modified) (1 diff)
-
lua/lib.registry.slow.lua (modified) (1 diff)
-
lua/lib.shardlist.lua (modified) (1 diff)
-
lua/main.lua (modified) (5 diffs)
-
lua/widgets/widget.mappiece.lua (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lua/lib.compass.lua
r2960 r3214 362 362 if (not md5) then print("WARNING, md5 checks for tmp/compass* files not possible (maps)") md5 = "md5dummy" end 363 363 364 gMapImagePath_Small = datapath.."tmp/compass_"..md5.."_small_s.png"364 gMapImagePath_Small = gTempPath.."compass_"..md5.."_small_s.png" 365 365 366 366 local mapfile_exists = file_exists(gMapImagePath_Small) -
trunk/lua/lib.desktop.lua
r2993 r3214 4 4 ]]-- 5 5 6 gDesktopDir = gMainWorkingDir.."data/desktop/"7 6 gDesktop = {} 8 7 gDesktopPositions = {} -
trunk/lua/lib.macrolist.lua
r3207 r3214 469 469 function MacroCmd_ActivateNextRenderer () if (gInGameStarted) then ActivateNextRenderer() end end 470 470 function MacroCmd_CamChangeZoom (zoomadd) if (gInGameStarted) then gCurrentRenderer:CamChangeZoom(zoomadd) end end 471 function MacroCmd_Screenshot () Client_TakeScreenshot(g MainWorkingDir.."screenshots/") end471 function MacroCmd_Screenshot () Client_TakeScreenshot(gScreenshotDir) end 472 472 function MacroCmd_GridScreenshot () 473 473 if (not gInGameStarted) then return end 474 474 ToggleCompass() 475 Client_TakeGridScreenshot(g MainWorkingDir.."screenshots/")475 Client_TakeGridScreenshot(gScreenshotDir) 476 476 ToggleCompass() 477 477 end -
trunk/lua/lib.registry.slow.lua
r2910 r3214 7 7 function gRegistrySlow:Set (key,val) self.data[key] = val self:Save() end 8 8 function gRegistrySlow:Get (key) return self.data[key] end 9 function gRegistrySlow:GetFilePath () return g MainWorkingDir.."config/registry.xml" end9 function gRegistrySlow:GetFilePath () return gConfigPath.."registry.xml" end 10 10 function gRegistrySlow:Load () self.data = SimpleXMLLoad(self:GetFilePath()) or {} end 11 11 function gRegistrySlow:Save () SimpleXMLSave(self:GetFilePath(),self.data) end -
trunk/lua/lib.shardlist.lua
r2963 r3214 2 2 -- paths 3 3 4 function GetConfigDirPath () return g MainWorkingDir.."config/"end4 function GetConfigDirPath () return gConfigPath end 5 5 function GetShardListDirPath () return GetConfigDirPath().."shards/" end 6 6 function GetShardMemoryFilePath () return GetConfigDirPath().."shardmemory.xml" end -
trunk/lua/main.lua
r3190 r3214 2 2 --### CONSTANTS ### 3 3 --############################### 4 4 5 5 6 gMainWorkingDir = GetMainWorkingDir and GetMainWorkingDir() or "" … … 10 11 gMainPluginDir = gMainWorkingDir.."plugins/" 11 12 gConfigPath = gMainWorkingDir.."config/" 13 gDesktopDir = gMainWorkingDir.."data/desktop/" 14 gScreenshotDir = gMainWorkingDir.."screenshots/" 12 15 gMacroFile = "mymacros.lua" 13 16 gMacroPathFile = gConfigPath..gMacroFile … … 26 29 27 30 --############################### 31 --### USE USER HOME DIR ### 32 --############################### 33 34 function InitHomeDirInfos () 35 -- todo : shardlist : display shards from original dir also ? 36 if ((not WIN32) and file_exists(gMainWorkingDir.."USE_HOME_DIR")) then 37 local home = GetHomePath() 38 if (not home) then return end 39 40 gHomeIrisPath = home.."/.iris/" 41 gTempPath = gHomeIrisPath.."tmp/" 42 gScreenshotDir = gHomeIrisPath.."screenshots/" 43 gConfigPath = gHomeIrisPath.."config/" 44 gConfigPathFile = gConfigPath..gConfigFile 45 gMacroPathFile = gConfigPath..gMacroFile 46 47 if (not file_exists(gHomeIrisPath)) then 48 print("initializing "..gHomeIrisPath) 49 mkdir(gHomeIrisPath) 50 mkdir(gTempPath) 51 mkdir(gScreenshotDir) 52 mkdir(gConfigPath) 53 MyCopyDir(gMainWorkingDir.."config/",gConfigPath) 54 end 55 end 56 end 57 58 --############################### 28 59 --### OTHER LUA FILES ### 29 60 --############################### … … 37 68 dofile(libpath .. "lib.keybinds.lua") 38 69 dofile(libpath .. "lib.net.lua") 70 71 InitHomeDirInfos() 39 72 40 73 -- renderer second … … 235 268 OgreAddResLoc(mydatapath.."." ,"FileSystem","General") 236 269 OgreAddResLoc(mydatapath.."base" ,"FileSystem","General") 237 OgreAddResLoc( mydatapath.."tmp" ,"FileSystem","General")270 OgreAddResLoc(string.gsub(gTempPath,"/$","") ,"FileSystem","General") -- remove trailing slash ? 238 271 OgreAddResLoc(mydatapath.."base/ui" ,"FileSystem","General") 239 272 OgreAddResLoc(mydatapath.."base/font" ,"FileSystem","General") -
trunk/lua/widgets/widget.mappiece.lua
r2790 r3214 23 23 24 24 k = k..".png" 25 local b = datapath.."tmp/"25 local b = gTempPath 26 26 27 27 if file_exists(b..k) then
