technic/technic
Zefram db20250371 Fix laser discharging
Commit a6dae893d6 introduced per-version
charge cost for firing mining lasers, but applies this in addition to
the old fixed cost which it was meant to replace.  Fix by removing the
application of the fixed cost.

The same commit did successfully change the check for a laser having
sufficient charge to fire, so that's based purely on the variable cost.
As a consequence, firing a laser that has just enough charge to cover the
variable cost could cause its charge to go negative.  (For example, by
fully charging a Mk1 laser and then firing it until it empties, resulting
in a charge of -400.)  It turned out that set_RE_wear handled that badly,
producing an over-100% wear value that would wrap to a *low* wear value,
leading to the laser's wear bar looking as if it's fully charged.

To protect against silly wear values, make set_RE_wear clamp the wear
value to avoid wrapping.  Handle specially the case of a fully-discharged
tool, where there was desirable wrapping to zero.
2014-04-22 12:48:55 -04:00
..
locale Add missing translations 2013-11-27 16:18:52 -05:00
machines Fix typo in frame and template motor recipes 2014-04-14 20:54:28 -04:00
sounds Add Mk2 and Mk3 mining lasers 2013-10-30 15:09:31 -04:00
textures Add Mk2 and Mk3 mining lasers 2013-10-30 15:09:31 -04:00
tools Fix laser discharging 2014-04-22 12:48:55 -04:00
README.md Make some headers smaller in the READMEs 2014-02-27 00:32:37 -05:00
config.lua Remove config file creation 2013-12-17 20:01:01 -05:00
crafts.lua fix a few more tube-based recipes 2014-01-03 22:05:35 -05:00
depends.txt Add support for translations via intllib 2013-10-30 13:48:39 -04:00
helpers.lua Localize most variables 2013-12-17 13:56:37 -05:00
init.lua Add support for minetest.swap_node 2013-12-10 20:14:39 -05:00
items.lua Add support for translations via intllib 2013-10-30 13:48:39 -04:00
legacy.lua Add MV and HV generators and make coal dust a fuel 2013-10-27 14:39:44 -04:00
register.lua Fix laser discharging 2014-04-22 12:48:55 -04:00

README.md

Technic

License

Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel)

Technic chests code is licensed under the GNU LGPLv2+.

Texture licenses:

RealBadAngel: (WTFPL)

  • Everything.