Skip to content

Commit

Permalink
Merge pull request #28 from ZtModArchive/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Zt-freak authored Oct 8, 2021
2 parents ede558e + bdc7d0a commit b4ea2dc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion castor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"ArchiveName": "zzz-ArluqTools",
"RepoName": "ZtModArchive/ArluqTools",
"Author": "Apodemus",
"Version": "v2.5",
"Version": "v2.6",
"Type": "package",
"License": "MIT License",
"Description": "This is a lua library that is an abstraction layer around ZT2's libraries.",
Expand Down
2 changes: 2 additions & 0 deletions scripts/arluq.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include "modules/ZtModArchive/ArluqTools/scripts/services/AnimalService.lua"
include "modules/ZtModArchive/ArluqTools/scripts/services/CollectionService.lua"
include "modules/ZtModArchive/ArluqTools/scripts/services/FenceService.lua"
include "modules/ZtModArchive/ArluqTools/scripts/services/GuestService.lua"
include "modules/ZtModArchive/ArluqTools/scripts/services/StaffService.lua"
include "modules/ZtModArchive/ArluqTools/scripts/services/TimeService.lua"
include "modules/ZtModArchive/ArluqTools/scripts/services/ZooService.lua"

Expand All @@ -19,5 +20,6 @@ aq.collection = CollectionService
aq.animal = AnimalService
aq.fence = FenceService
aq.guest = GuestService
aq.staff = StaffService
aq.time = TimeService
aq.zoo = ZooService
4 changes: 4 additions & 0 deletions scripts/lua/logging.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@ log = {}
--- @param message string
function log.debug (message)
print(os.date("[%Y-%m-%d %H:%M:%S] ") .. "[DEBUG] " .. message)
io.flush()
end

--- Log error to output
--- @param message string
function log.error (message)
print(os.date("[%Y-%m-%d %H:%M:%S] ") .. "[ERROR] " .. message)
io.flush()
end

--- Log info to output
--- @param message string
function log.info (message)
print(os.date("[%Y-%m-%d %H:%M:%S] ") .. "[INFO] " .. message)
io.flush()
end

--- Log warning to output
--- @param message string
function log.warn (message)
print(os.date("[%Y-%m-%d %H:%M:%S] ") .. "[WARN] " .. message)
io.flush()
end
4 changes: 3 additions & 1 deletion scripts/lua/try.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include "scripts/lua/logging.lua"
include "modules/ZtModArchive/ArluqTools/scripts/lua/logging.lua"

--- Function for try-catching
--- @param func function
Expand All @@ -15,6 +15,8 @@ function try(func)
end
-- Show exception in log output
log.error(exception)
else
log.info(status)
end
end

Expand Down
9 changes: 9 additions & 0 deletions scripts/services/StaffService.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Include Zoo Tycoon 2 libraries
include "scenario/scripts/entity.lua"
include "scenario/scripts/misc.lua"
include "scenario/scripts/token.lua"
include "scenario/scripts/ui.lua"
include "scripts/canreproduce.lua"

--- Service for modifiying animals
StaffService = {}
2 changes: 1 addition & 1 deletion scripts/services/ZooService.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ end

--- Get zoo name
--- @return string
function ZooService.getZooName ()
function ZooService.getZooName ()
return getZooName ()
end

0 comments on commit b4ea2dc

Please sign in to comment.