Jump to content
Toggle menu
  • 915 articles
  • 3.8K files
  • 30.2K users
  • 279.2K edits
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ResourceProperty class: Difference between revisions

From Catglobe Wiki
Created page with "{{CGscriptClass_Template|Name=<nowiki>ResourceProperty</nowiki>|Description=<nowiki>Represents a resource property constant with its current value.</nowiki>|InheritsFrom=Array|Methods={{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} {{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>this[] { get; }</nowiki>|Parameters= {{CGscriptParameters_Template|Type=int|Name=<now..."
 
No edit summary
Line 1: Line 1:
{{CGscriptClass_Template|Name=<nowiki>ResourceProperty</nowiki>|Description=<nowiki>Represents a resource property constant with its current value.</nowiki>|InheritsFrom=Array|Methods={{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
{{CGscriptClass_Template
|Name=<nowiki>ResourceProperty</nowiki>
|Description=<nowiki>Represents a resource property constant with its current value.</nowiki>
|InheritsFrom=Array|Methods=
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>this[] { get; }</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>this[] { get; }</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>}}
Line 5: Line 9:
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>this[] { get; }</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>this[] { get; }</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}}
|Description=<nowiki>Backward-compatible indexer</nowiki>}}|Properties={{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
|Description=<nowiki>Backward-compatible indexer</nowiki>}}
|Properties=
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Max</nowiki>|HasGetter=1|Description=<nowiki>Largest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Max</nowiki>|HasGetter=1|Description=<nowiki>Largest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Min</nowiki>|HasGetter=1|Description=<nowiki>Smallest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Min</nowiki>|HasGetter=1|Description=<nowiki>Smallest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}}
Line 14: Line 20:
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Type</nowiki>|HasGetter=1|Description=<nowiki>Constant-option type (see RESOURCE_PROPERTY_TYPE constants)</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>Type</nowiki>|HasGetter=1|Description=<nowiki>Constant-option type (see RESOURCE_PROPERTY_TYPE constants)</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=object|Name=<nowiki>Value</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Current value of the constant</nowiki>}}|StaticMethods={{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>ResourceProperty_getResourceProperties</nowiki>|Parameters=
{{CGscriptProperties_Template|ReturnType=object|Name=<nowiki>Value</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Current value of the constant</nowiki>}}
|StaticMethods=
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>ResourceProperty_getResourcesProperties</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>resource unique id</nowiki>|Description=<nowiki>Resource unique id</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>resource unique id</nowiki>|Description=<nowiki>Resource unique id</nowiki>}}
|Description=<nowiki>Returns the property constants of a resource as an array</nowiki>}}
|Description=<nowiki>Returns the resource properties of multiple resources.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>ResourceProperty_getResourcesProperties</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>ResourceProperty_getResourcesProperties</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=array|Name=<nowiki>resourceIds</nowiki>|Description=<nowiki>Array of resource unique ids</nowiki>}}
{{CGscriptParameters_Template|Type=array|Name=<nowiki>resource unique ids</nowiki>|Description=<nowiki>Array of resource unique ids</nowiki>}}
|Description=<nowiki>Returns property constants for multiple resources as a dictionary keyed by resource unique id</nowiki>}}
|Description=<nowiki>Returns the resource properties of multiple resources.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>ResourceProperty_saveResourceProperties</nowiki>|Parameters=
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>ResourceProperty_saveResourceProperties</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=int|Name=<nowiki>resource unique id</nowiki>|Description=<nowiki>Resource unique id</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>propertyArray</nowiki>|Description=<nowiki>Array of resource property objects</nowiki>}}
{{CGscriptParameters_Template|Type=int|Name=<nowiki>resource unique id</nowiki>|Description=<nowiki>Resource unique id</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>propertyArray</nowiki>|Description=<nowiki>Array of resource property objects</nowiki>}}
|Description=<nowiki>Saves resource properties from an array of property objects</nowiki>}}}}
|Description=<nowiki>Saves resource properties for the specified resource.</nowiki>}}
}}

Revision as of 04:01, 24 July 2026

ResourceProperty


Represents a resource property constant with its current value.

Parent class

Inherits from Array

Methods

  • string ToString() - The string representation of the object.
  • object this[] { get; }(int index "Index") - Backward-compatible indexer
  • Empty this[] { get; }(int index "Index", object value "Value to set") - Backward-compatible indexer

Properties

  • number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
  • number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
  • number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
  • string Name { get; } - Display label of the constant option
  • string ObjectTypeName { get; } - The name of the type of object.
  • int OptionId { get; } - Primary key of the constant option
  • number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
  • int Type { get; } - Constant-option type (see RESOURCE_PROPERTY_TYPE constants)
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • object Value { get; set; } - Current value of the constant

Static Methods

  • array ResourceProperty_getResourcesProperties(int resource unique id "Resource unique id") - Returns the resource properties of multiple resources.
  • Dictionary ResourceProperty_getResourcesProperties(array resource unique ids "Array of resource unique ids") - Returns the resource properties of multiple resources.
  • Empty ResourceProperty_saveResourceProperties(int resource unique id "Resource unique id", array propertyArray "Array of resource property objects") - Saves resource properties for the specified resource.