VS Team Coding Conventions: Difference between revisions

From Vintage Story Wiki
no edit summary
(Created page with "These are the coding guidelines the VS Team tries to adhere to == [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY] - Don't repeat yourself == Code duplication is...")
 
No edit summary
Line 32: Line 32:
* Set*() - sets data
* Set*() - sets data
* GetOrCreate*() - returns data, or if it doesn't exist, initializes new one
* GetOrCreate*() - returns data, or if it doesn't exist, initializes new one
* Register*() / Unregister*() - Add/Remove data to/from a list to be used widely by other systems
* Register*() / Unregister*() - Add/Remove instanced classes to/from a list to be used widely by other systems
* From*()/To*() - code that converts data from one type to another
* From*()/To*() - code that converts data from one type to another
* Try*() - code that runs control logic or returns data by reference, that might not be successful. Returns a boolean value.
* Try*() - code that runs control logic or returns data by reference, that might not be successful. Returns a boolean value.
Confirmedusers, Bureaucrats, editor, Administrators
1,779

edits