Energy costing code, also fixing stargates doing weird animations and
sounds on failed connections (issue #203, issue #209).