Is wearing outfit: Difference between revisions
Jump to navigation
Jump to search
imported>Bale r11112 |
imported>Bale see also |
||
Line 33: | Line 33: | ||
}}| | }}| | ||
see_also={{SeeAlso|outfit|outfit_pieces|have_outfit}}| | see_also={{SeeAlso|outfit|outfit_pieces|have_outfit|get_outfits|get_custom_outfits}}| | ||
cli_equiv=The CLI command command "outfit" with the parameter "list" gives information on the in-game outfits you have available (but does not list custom outfits or check for whether the outfit can be equipped).| | cli_equiv=The CLI command command "outfit" with the parameter "list" gives information on the in-game outfits you have available (but does not list custom outfits or check for whether the outfit can be equipped).| | ||
}} | }} | ||
[[Category:Equipment]] | [[Category:Equipment]] |
Latest revision as of 23:03, 20 November 2014
Function Syntax
boolean is_wearing_outfit(string name )
- name is an outfit to check for
This function returns true if you are wearing all parts of the outfit name.
Code Sample
The following function returns the name of the currently equipped outfit.
string current_outfit() {
foreach i,o in get_outfits()
if( is_wearing_outfit(o) )
return o;
foreach i,o in get_custom_outfits()
if( is_wearing_outfit(o) )
return o;
return "";
}
CLI Equivalent
The CLI command command "outfit" with the parameter "list" gives information on the in-game outfits you have available (but does not list custom outfits or check for whether the outfit can be equipped).