inconsistency in Creep.carry
-
creep.carry[RESOURCE_ENERGY] returns 0 if empty, creep.carry[RESOURCE_HYDROGEN] returns null if empty.
much inconsistency. very bug generating. wow.
-
This is due to backwards compatibility with older scripts.
A few months ago we only had energy as a resource. Evrything only had a single carry.energy entry.
Now that we got a massive amount of different resources they left the old energy resource in as a default.
-
No need to build separate cases for this because a simple if will handle them both.