1 /* Small Trees */ 2 // Trees stay small (50% growth) but still yield a lot of wood. 3 4 #appendto Library_Tree 5 6 // Initially placed trees are smaller Initialize(...)7func Initialize(...) 8 { 9 SetCon(GetCon() / 2); 10 return _inherited(...); 11 } 12 13 // Stop growth at 50% FxIntGrowthTimer(object obj,effect,...)14func FxIntGrowthTimer(object obj, effect, ...) 15 { 16 if (obj->OnFire() || obj->GetCon() >= 50) return FX_Execute_Kill; 17 return inherited(obj, effect, ...); 18 } 19 20 // Yield 1-2 extra wood Split2Components(...)21func Split2Components(...) 22 { 23 CreateContents(Wood); 24 if (GetCon() > 25) CreateContents(Wood); 25 return inherited(...); 26 } 27 GetComponent(comp_id)28func GetComponent(comp_id) 29 { 30 var result = inherited(comp_id, ...); 31 if (GetType(this) == C4V_Def) return result; 32 if (comp_id == Wood) result += 1 + (GetCon() > 25); 33 return result; 34 } 35