Function Override: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:Api_current_situation_building.png|thumb|right|400px|[[Function Override]]s in relation to [[Function]]s.]]
[[File:Api_current_situation_building.png|thumb|right|400px|[[Function Override]]s in relation to [[Function]]s.]]
Function Override is an item that stores changes made to properties of a [[Function]].  
Function Override is an [[Item]] that stores changes made to properties of a [[Function]].  


When an attribute, function value or other property of a [[Function]] is requested, the Function always checks if a Function Override of that function exists and if it overrides that property. In such cases, the property of the Function Override is returned. This system also allows to reset overridden properties back to the original values of the Function, by simply deleting the property in the Function Override.
When an attribute, function value or other property of a [[Function]] is requested, the Function always checks if a Function Override of that function exists and if it overrides that property. In such cases, the property of the Function Override is returned. This system also allows to reset overridden properties back to the original values of the Function, by simply deleting the property in the Function Override.
Line 13: Line 13:
|seealso=
|seealso=
*[[Function]]
*[[Function]]
*[[Function Values Table]]
*[[Terrain Type Override]]
*[[Terrain Type Override]]
*[[Unit Data Override]]
}}
}}


{{editor current situation nav}}
{{editor current situation nav}}

Latest revision as of 13:34, 28 February 2024

Function Override is an Item that stores changes made to properties of a Function.

When an attribute, function value or other property of a Function is requested, the Function always checks if a Function Override of that function exists and if it overrides that property. In such cases, the property of the Function Override is returned. This system also allows to reset overridden properties back to the original values of the Function, by simply deleting the property in the Function Override.

A Function Override is created once a change has been made to a Function in the editor. This Function Override will have the same ID as the Function.

Function Override of Modern Apartments with a large unit size and an alternative name, as shown in the API