-
Notifications
You must be signed in to change notification settings - Fork 0
AnimalService
AnimalService is a class that you can use to modify animal objects.
-- ArluqTools1.1 example
-- This example turns all animals in the zoo into babies.
include "scenario/scripts/entity.lua"
include "scenario/scripts/token.lua"
include "scenario/scripts/ui.lua"
include "scenario/scripts/misc.lua"
include "scripts/ArluqTools1-1/services/AnimalService.lua"
function Main(args)
local animalList = findType("animal")
-- Loop over each animal
local numAnimal = table.getn(animalList)
for i = 1, numAnimal, 1 do
local animal = resolveTable(animalList[i].value)
-- use AnimalService to set age to Young
AnimalService.setAge(animal, "Young")
end
end
-
getAdoptOption(animal)
- Get whether or not an animal can be put up for adoption- Param: animal animal
- Return: bool
-
setAdoptOption(animal, canBeAdopted)
- Set whether or not an animal can be put up for adoption- Param: animal animal
- Param: canBeAdopted bool
-
getAge(animal)
- Get animal age, returns true if adult, false if young- Param: animal animal
- Return: bool
-
getAgeString(animal)
- Get animal age as sting- Param: animal animal
- Return: string
-
setAge(animal, age)
- Set animal age- Param: animal animal
- Param: age string
-
getBathroom(animal)
- Get animal bathroom stat- Param: animal animal
- Return: float
-
setBathroom(animal, bathroom)
- Set animal bathroom stat- Param: animal animal
- Param: bathroom float
-
setCrated(animal, isCrated)
- Set animal crated status- Param: animal animal
- Param: isCrated bool
-
delete(animal)
- Delete animal- Param: animal animal
-
getEnviroment(animal)
- Get animal enviroment suitability- Param: animal animal
- Return: float
-
getEnviroment(animal, enviroment)
- Set animal enviroment suitability- Param: animal animal
- Param: enviroment float
-
getExercise(animal)
- Get animal exercise stat- Param: animal animal
- Return: float
-
setExercise(animal, exercise)
- Set animal exercise stat- Param: animal animal
- Param: exercise float
-
getGender(animal)
- Get animal gender, returns true if male, false if female- Param: animal animal
- Return: bool
-
getGenderString(animal)
- Get animal gender as sting- Param: animal animal
- Return: string
-
setGender(animal, gender)
- Set animal gender- Param: animal animal
- Param: gender string
-
getHealth(animal)
- Get animal health- Param: animal animal
- Return: float
-
setHealth(animal, health)
- Set animal health- Param: animal animal
- Param: health float
-
getHunger(animal)
- Get animal hunger- Param: animal animal
- Return: float
-
setHunger(animal, hunger)
- Set animal hunger- Param: animal animal
- Param: hunger float
-
getHygiene(animal)
- Get animal hygiene- Param: animal animal
- Return: float
-
setHygiene(animal, hygiene)
- Set animal hygiene- Param: animal animal
- Param: hunger float
-
getPregnant(animal)
- Get if animal is pregnant- Param: animal animal
- Return: bool
-
setPregnant(animal, isPregnant)
- Set animal pregnancy- Param: animal animal
- Param: isPregnant bool
-
getPrivacy(animal)
- Get animal privacy- Param: animal animal
- Return: float
-
setPrivacy(animal, privacy)
- Set animal privacy- Param: animal animal
- Param: privacy float
-
getRampage(animal)
- Get animal rampage status- Param: animal animal
- Return: bool
-
triggerRampage(animal)
- Trigger a rampage- Param: animal animal
-
getReleaseOption(animal)
- Get whether or not an animal can be released to the wild- Param: animal animal
- Return: bool
-
setReleaseOption(animal, canBeReleased)
- Set whether or not an animal can be released to the wild- Param: animal animal
- Param: canBeReleased bool
-
getRest(animal)
- Get animal rest- Param: animal animal
- Return: float
-
setRest(animal, rest)
- Set animal rest- Param: animal animal
- Param: rest float
-
getSocial(animal)
- Get animal social stat- Param: animal animal
- Return: float
-
setSocial(animal, social)
- Set animal social stat- Param: animal animal
- Param: social float
-
getSpecies(animal)
- Get animal species- Param: animal animal
- Return: string
-
setSpecies(animal, species)
- Set animal species- Param: animal animal
- Param: species string
-
getStimulation(animal)
- Get animal stimulation- Param: animal animal
- Return: float
-
setStimulation(animal, stimulation)
- Set animal stimulation- Param: animal animal
- Param: stimulation float
-
getSuper(animal)
- Get animal super status as a boolean- Param: animal animal
- Return: bool
-
getSuperString(animal)
- Get animal super status as sting- Param: animal animal
- Return: string
-
setSuper(animal, isSuper)
- Set animal super status- Param: animal animal
- Param: isSuper bool
-
getThirst(animal)
- Get animal thirst- Param: animal animal
- Return: float
-
setThirst(animal, thirst)
- Set animal thirst- Param: animal animal
- Param: thirst float