Skip to content

Commit 4cc28c1

Browse files
committed
yes
1 parent b722eb4 commit 4cc28c1

10 files changed

Lines changed: 648 additions & 54 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# exclude file types
2+
*.zip
3+
*.z2f

castor.json

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,7 @@
22
"ArchiveName": "ArluqTools",
33
"Z2f": true,
44
"IncludeFolders": [
5-
"ai",
6-
"awards",
7-
"biomes",
8-
"config",
9-
"effects",
10-
"entities",
11-
"lang",
12-
"locations",
13-
"maps",
14-
"materials",
15-
"photochall",
16-
"puzzles",
17-
"scenario",
18-
"scripts",
19-
"shared",
20-
"tourdata",
21-
"ui",
22-
"world",
23-
"xpinfo"
5+
"scripts"
246
],
25-
"ExcludeFolders": [
26-
"scripts/ArluqTools"
27-
]
7+
"ExcludeFolders": []
288
}
File renamed without changes.

scripts/ArluqTools/ArluqTools2/services/AnimalService.lua renamed to scripts/modules/ArluqTools/ArluqTools1/services/AnimalService.lua

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
--- @todo
2-
-- suppressing rampage
3-
-- get/set variations
4-
-- get/set skin variations
5-
-- get/set deletable
6-
71
-- Include Zoo Tycoon 2 libraries
82
include "scenario/scripts/entity.lua"
93
include "scenario/scripts/misc.lua"
104
include "scenario/scripts/token.lua"
115
include "scenario/scripts/ui.lua"
126

13-
--- Service for modifiying animals
7+
--- Service for modifiying animals.
148
AnimalService = {}
159

1610
---- ADOPTION ----
@@ -208,22 +202,6 @@ function AnimalService.setHygiene (animal, hygiene)
208202
setNeed(animal, "hygiene", hygiene)
209203
end
210204

211-
---- NAME ----
212-
213-
--- Get animal name
214-
--- @param animal animal
215-
--- @return string
216-
function AnimalService.getName (animal)
217-
return animal:BFG_GET_ATTR_STRING("s_name")
218-
end
219-
220-
--- Set animal name
221-
--- @param animal animal
222-
--- @param name string
223-
function AnimalService.setName (animal, name)
224-
animal:BFG_SET_ATTR_STRING("s_name", name)
225-
end
226-
227205
---- PREGNANCY ----
228206

229207
--- Get if animal is pregnant
@@ -335,15 +313,8 @@ end
335313

336314
--- Get animal species
337315
--- @param animal animal
338-
--- @return species
339-
function AnimalService.getSpecies (animal)
340-
return getSpeciesFromType(animal:BFG_GET_BINDER_TYPE())
341-
end
342-
343-
--- Get animal species as string
344-
--- @param animal animal
345316
--- @return string
346-
function AnimalService.getSpeciesString (animal)
317+
function AnimalService.getSpecies (animal)
347318
return animal:BFG_GET_ATTR_STRING("s_Species")
348319
end
349320

scripts/ArluqTools/ArluqTools2/extensions/RadicalRemake/RRService.lua renamed to scripts/modules/ArluqTools/ArluqTools2/extensions/RadicalRemake/RRService.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ include "scenario/scripts/token.lua"
55
include "scenario/scripts/ui.lua"
66

77
--- Service for Radical Remake.
8-
RRService = {}
8+
RRService = {}
9+
10+
RRService.AnimalGetAge() {
11+
12+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--- Function for try-catching
2+
--- @param func function
3+
function try(func)
4+
-- Try
5+
local status, exception = pcall(func)
6+
-- Catch
7+
if not status then
8+
-- Show exception in the message panel in-game
9+
local increment = 50
10+
for i = 0, string.len(exception), increment
11+
do
12+
displayZooMessageTextWithZoom(string.sub(exception, i, i+increment-1), 1, 30)
13+
end
14+
end
15+
end
16+
17+
--- Function for try-catching with a custom callback
18+
--- @param func function
19+
--- @param callback function
20+
function tryCatch(func, callback)
21+
-- Try
22+
local status, exception = pcall(func)
23+
-- Catch
24+
if not status then
25+
-- Call callback function
26+
callback(exception)
27+
end
28+
end

0 commit comments

Comments
 (0)