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
No edit summary
No edit summary
 
Line 41: Line 41:
for(i for 0; a.Count){
for(i for 0; a.Count){
     ResourceProperty r = a[i];
     ResourceProperty r = a[i];
     if(r.Name == "PanelType") {
     if(r.Type == RESOURCE_PROPERTY_TYPE_NUMBER && r.Name == "PanelType") {
         r.Value=2;
         r.Value=1;
         p.Add(r);  
         p.Add(r);  
     }
     }

Latest revision as of 04:43, 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.

Examples

number qnaire;
array a = ResourceProperty_getResourcesProperties(qnaire);
array p;
for(i for 0; a.Count){
    ResourceProperty r = a[i];
    if(r.Type == RESOURCE_PROPERTY_TYPE_NUMBER && r.Name == "PanelType") {
        r.Value=1;
        p.Add(r); 
    }
}
ResourceProperty_saveResourceProperties(qnaire, p);