![]() |
Adventure Creator
1.78.0
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | Interact () |
void | Open () |
void | Close () |
void | Add (int _id, int amount) |
Adds an inventory item to the Container's contents. More... | |
void | Add (InvInstance addInstance) |
Adds an inventory item to the Container's contents. More... | |
void | Remove (int itemID, int amount) |
void | Remove (InvInstance invInstance) |
void | Remove (int itemID) |
void | RemoveAll () |
int | GetCount (int invID) |
Gets the number of instances of a particular inventory item stored within the Container. More... | |
void | InsertAt (InvInstance itemInstance, int index, int amountOverride=0) |
Adds an inventory item to the Container's contents, at a particular index. More... | |
string | GetLabel (int languageNumber=0) |
Gets the Container's label text in a given language More... | |
int | GetNumItemReferences (int itemID) |
int | UpdateItemReferences (int oldItemID, int newItemID) |
string | GetTranslatableString (int index) |
Gets the text to be translated, given its index. More... | |
int | GetTranslationID (int index) |
Gets the translation ID of a given text index. More... | |
AC_TextType | GetTranslationType (int index) |
Gets the translation type of a given text index. More... | |
void | UpdateTranslatableString (int index, string updatedText) |
int | GetNumTranslatables () |
Gets the maximum number of possible translatable texts. More... | |
bool | HasExistingTranslation (int index) |
Checks if a given text index has already been assigned a unique translation ID. More... | |
void | SetTranslationID (int index, int _lineID) |
Sets the translation ID of a given text index More... | |
string | GetOwner (int index) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More... | |
bool | OwnerIsPlayer (int index) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More... | |
bool | CanTranslate (int index) |
Checks if a given text index can and should be translated. More... | |
Public Attributes | |
List< ContainerItem > | items = new List<ContainerItem> () |
bool | limitToCategory |
List< int > | categoryIDs = new List<int> () |
int | maxSlots = 0 |
bool | swapIfFull = false |
string | label |
int | labelLineID = -1 |
Protected Member Functions | |
void | Awake () |
void | OnEnable () |
void | Start () |
void | OnDisable () |
void | CreateDefaultInstances () |
Protected Attributes | |
InvCollection | invCollection = new InvCollection () |
Properties | |
int | Count [get] |
int | FilledSlots [get] |
InvCollection | InvCollection [get, set] |
bool | IsFull [get] |
This component that is used to store a local set of inventory items within a scene. The items stored here are separate to those held by the player, who can retrieve or place items in here for safe-keeping.
void AC.Container.Add | ( | int | _id, |
int | amount | ||
) |
void AC.Container.Add | ( | InvInstance | addInstance | ) |
bool AC.Container.CanTranslate | ( | int | index | ) |
Checks if a given text index can and should be translated.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.Container.Close | ( | ) |
Closes the container
int AC.Container.GetCount | ( | int | invID | ) |
string AC.Container.GetLabel | ( | int | languageNumber = 0 | ) |
Gets the Container's label text in a given language
languageNumber | The language index, where 0 = the game's default language |
int AC.Container.GetNumTranslatables | ( | ) |
Gets the maximum number of possible translatable texts.
Implements AC.ITranslatable.
string AC.Container.GetOwner | ( | int | index | ) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.
index | The index of the translatable text |
Implements AC.ITranslatable.
string AC.Container.GetTranslatableString | ( | int | index | ) |
Gets the text to be translated, given its index.
index | The index of the translatable text |
Implements AC.ITranslatable.
int AC.Container.GetTranslationID | ( | int | index | ) |
Gets the translation ID of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
AC_TextType AC.Container.GetTranslationType | ( | int | index | ) |
Gets the translation type of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.Container.HasExistingTranslation | ( | int | index | ) |
Checks if a given text index has already been assigned a unique translation ID.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.Container.InsertAt | ( | InvInstance | itemInstance, |
int | index, | ||
int | amountOverride = 0 |
||
) |
Adds an inventory item to the Container's contents, at a particular index.
void AC.Container.Interact | ( | ) |
An alias of Open
void AC.Container.Open | ( | ) |
bool AC.Container.OwnerIsPlayer | ( | int | index | ) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.Container.RemoveAll | ( | ) |
Removes all inventory items from the Container's contents.
void AC.Container.SetTranslationID | ( | int | index, |
int | lineID | ||
) |
Sets the translation ID of a given text index
index | The index of the translatable text |
lineID | The new translation ID to assign the translatable text |
Implements AC.ITranslatable.
List<int> AC.Container.categoryIDs = new List<int> () |
The category IDs to limit the display of inventory items by, if limitToCategory = True
List<ContainerItem> AC.Container.items = new List<ContainerItem> () |
The Containers default list of items
string AC.Container.label |
The Container's label text
int AC.Container.labelLineID = -1 |
A unique identifier for the label's translation
bool AC.Container.limitToCategory |
If True, only inventory items (InvItem) with a specific category will be displayed
int AC.Container.maxSlots = 0 |
If > 0, the maximum number of item slots the Container can hold
bool AC.Container.swapIfFull = false |
If True, and maxSlots > 0, then attempting to place an item in the Container when full will result in the item being swapped with that in the occupied slot
|
get |
The total number of items
|
get |
The total number of filled slots
|
getset |
The Container's associated InvCollection, where item data is stored
|
get |
Returns True if the number of filled slots is that of the maxSlots, if maxSlots > 0