From c24de38b219f072625e9b1463c28a21ed4243d6b Mon Sep 17 00:00:00 2001 From: Jeremy Smitherman Date: Mon, 24 Dec 2018 16:08:51 -0600 Subject: [PATCH] Added dependeny on config file in install --- hoggit.lua | 11 ++++++----- hoggit_config.lua.example | 8 ++++++++ lib/logging.lua | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 hoggit_config.lua.example diff --git a/hoggit.lua b/hoggit.lua index f247e8a..23e1a67 100644 --- a/hoggit.lua +++ b/hoggit.lua @@ -1,5 +1,6 @@ -HOGGIT = {} -dofile(lfs.writedir()..[[Scripts\HOGGIT\lib\error_handling.lua]]) -dofile(lfs.writedir()..[[Scripts\HOGGIT\lib\logging.lua]]) -dofile(lfs.writedir()..[[Scripts\HOGGIT\lib\utils.lua]]) -dofile(lfs.writedir()..[[Scripts\HOGGIT\lib\spawner.lua]]) \ No newline at end of file +trigger.action.outText(HOGGIT.script_base, 25) +trigger.action.outText(HOGGIT.log_base, 25) +dofile(HOGGIT.script_base..[[\HOGGIT\lib\error_handling.lua]]) +dofile(HOGGIT.script_base..[[\HOGGIT\lib\logging.lua]]) +dofile(HOGGIT.script_base..[[\HOGGIT\lib\utils.lua]]) +dofile(HOGGIT.script_base..[[\HOGGIT\lib\spawner.lua]]) diff --git a/hoggit_config.lua.example b/hoggit_config.lua.example new file mode 100644 index 0000000..4da0c25 --- /dev/null +++ b/hoggit_config.lua.example @@ -0,0 +1,8 @@ +-- Copy this file to your GAME INSTALL'S Scripts folder (probably in C:\Program Files\Eagle Dynamics\DCS World\Scripts) +-- NOT your Saved Games Scripts folder. +-- Hoggit Framework Config. + +-- Replace these values with the Scripts and Logs folders in your SAVED GAMES' Scripts +-- folder (NOT your base install folder), with NO trailing slash. +script_base = [[D:\Personal Folders\Saved Games\DCS.openbeta\Scripts]] +log_base = [[D:\Personal Folders\Saved Games\DCS.openbeta\Logs]] \ No newline at end of file diff --git a/lib/logging.lua b/lib/logging.lua index 69e59cf..beec8f1 100644 --- a/lib/logging.lua +++ b/lib/logging.lua @@ -1,4 +1,4 @@ -logFile = io.open(lfs.writedir()..[[Logs\HOGGIT.log]], "w") +logFile = io.open(HOGGIT.log_base..[[\HOGGIT.log]], "w") function log(str) if str == nil then str = 'nil' end