Module commit
Module commit.
This commit is contained in:
18
_module/nss/trash_can_close.nss
Normal file
18
_module/nss/trash_can_close.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//OnClosed event of a <span class="highlight">barrel</span> or what is being used as a <span class="highlight">trash</span> can.
|
||||
|
||||
void main()
|
||||
{
|
||||
//Go through all items in the container, destroying them as we find them.
|
||||
object oTrash = GetFirstItemInInventory();
|
||||
while (GetIsObjectValid(oTrash))
|
||||
{
|
||||
DestroyObject(oTrash);
|
||||
|
||||
oTrash = GetNextItemInInventory();
|
||||
//If this next item is valid, meaning that there is another item in the
|
||||
//inventory, then the loop will go again.
|
||||
//Once the inventory has been sifted through, the loop exits and all
|
||||
//items are destroyed.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user