File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "ArchiveName" : " zzz-ArluqTools" ,
33 "RepoName" : " ZtModArchive/ArluqTools" ,
44 "Author" : " Apodemus" ,
5- "Version" : " v2.2 " ,
5+ "Version" : " v2.3 " ,
66 "Type" : " package" ,
77 "License" : " MIT License" ,
88 "Description" : " This is a lua library that is an abstraction layer around ZT2's libraries." ,
Original file line number Diff line number Diff line change @@ -167,6 +167,29 @@ function AnimalService.delete (animal)
167167 deleteEntity (animal )
168168end
169169
170+ ---- DISEASE ----
171+
172+ --- Get if animal has a disease
173+ --- @param animal animal
174+ --- @return bool
175+ function AnimalService .isDiseased (animal )
176+ return animal :BFG_GET_ATTR_BOOLEAN (" b_Disease" )
177+ end
178+
179+
180+ --- Give animal a disease
181+ --- @param animal animal
182+ --- @param diseaseName string
183+ function AnimalService .giveDisease (animal , diseaseName )
184+ local diseaseManager = queryObject (" ZTDiseaseMgr" )
185+ local animalName = getName (animal )
186+ local diseaseSeed = {
187+ key = diseaseName ,
188+ val = animalName
189+ }
190+ diseaseManager :ZT_FORCE_DISEASE (diseaseSeed )
191+ end
192+
170193---- ENVIROMENT ----
171194
172195--- Get animal enviroment suitability
You can’t perform that action at this time.
0 commit comments