This would make the function:
Code: Select all
(itmSetPowerUsage itm power [duration])
// or perhaps, in case it only makes sense to set power usage on items on objects
(objSetItemPowerUsage spaceObject itm power [duration])
If the duration is specified, then the poweer value given will be in effect for that many "iterations" of power usage, after which it falls back to it's previous value (which in turn could have been set by the same function, but without a duration)
Multiple calls to this function overrides the previous value, so you would have to track up to three values: the item types power usage, and the current base power usage, and an optional temporary usage.
A getter function would return the current real use, not the types base use. If we want the base use we should query the type.
I think this would solve it for most purposes, although it might be a lot of work
