Work

From Crumbled World Wiki
Revision as of 14:27, 5 July 2025 by Anders (talk | contribs) (Created page with "{{:WorkExampleCode}} ==Functions== {| class="wikitable" !|return !|function !|description |- |string |getName() |Get work name. |- |int |getWeight() |Get work weight. |- | |addDependency(Work dependency) |This work can not be excecuted befor the dependency is done. |- | |removeDependency(Work dependency) |Remove a dependency. |- | |Work:setName(st...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WorkExampleCode

Functions

return function description
string getName() Get work name.
int getWeight() Get work weight.
addDependency(Work dependency) This work can not be excecuted befor the dependency is done.
removeDependency(Work dependency) Remove a dependency.
setName(string name) Set the work name.
setWeight(int weight) Set the work weight. default is 0. the highest weight is 10.