Put closet: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>Bale mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:name|put_closet}} | {{ | ||
{{#vardefine:return_type|boolean}} | #vardefine:name|put_closet}}{{ | ||
#vardefine:return_type|boolean}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 25: | Line 25: | ||
}}| | }}| | ||
function_description=Attempts to move {{pspan|qty}} of {{pspan|it}} to your Colossal Closet from your main inventory. Returns true if the move succeeds and false if it does not. | function_description=Attempts to move {{pspan|qty}} of {{pspan|it}} to your Colossal Closet from your main inventory. Returns true if the move succeeds and false if it does not. </p> | ||
<p>The one parameter version without {{pspan|it}} will move meat instead of items.| | |||
code1={{CodeSample| | |||
title=Code Sample| | |||
description=Closets meat so that you only have 5,000 meat on hand.| | |||
code= | |||
<syntaxhighlight> | |||
if(my_meat() > 5000) | |||
put_closet(my_meat() - 5000); | |||
</syntaxhighlight> | |||
}}| | |||
see_also={{SeeAlso|put_display|put_stash|take_closet}}| | see_also={{SeeAlso|put_display|put_stash|take_closet}}| | ||
cli_equiv=The CLI command "closet" with the parameter "put" works similarly. | cli_equiv=The CLI command "closet" with the parameter "put" works similarly. | ||
}} | }} | ||
[[Category:Item Management]] |
Latest revision as of 22:02, 21 May 2010
Function Syntax
boolean put_closet(int qty ,item it )
- qty is the quantity to move
- it is the item to move
Attempts to move qty of it to your Colossal Closet from your main inventory. Returns true if the move succeeds and false if it does not.
The one parameter version without it will move meat instead of items.
Code Sample
Closets meat so that you only have 5,000 meat on hand.
if(my_meat() > 5000)
put_closet(my_meat() - 5000);
CLI Equivalent
The CLI command "closet" with the parameter "put" works similarly.