
November 23rd, 2003, 05:36 AM
|
Major
|
|
Join Date: Sep 2003
Location: Oregon
Posts: 1,139
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: CherryMod Thread
Quote:
Originally posted by Kristoffer O:
When we associated encumbrance and defence with armors instead of units we had already made some hundred units (that was early in Dom I). It was a chore to go through them all. Resources was not remade at the same time and now it feels kind of owerwhelming to think about.
|
From a programming perspective it should be simple... Add a resources field to all equipment, add a method to units to to calculate resource cost based on carried equipment. Compare the computed values with the current resource cost for all units. If you like what you see, refactor to call the resource method rather than the hard coded resource variable, and then remove remove all the now extraneous unit resources. Perhaps keep resources around as a variable on units, so you can it to the resource sum if you want to varry resource cost aside from equipment.
|