16 Commits

Author SHA1 Message Date
Aaron Suen
f0eeddd7ae Add a more poweful anti-fire-grief cheat
Enabling "quell" mode will effectively disable
fire worldwide, similar to how "stasis" works,
making firefighting efforts more efficient.
2023-06-09 21:54:55 -04:00
Aaron Suen
ed74795e3f Fix firestarting probability regression 2022-11-10 19:41:48 -05:00
Aaron Suen
ce245b8d5e Abstract firestick spark/ignite out as a public API 2022-11-08 06:35:15 -05:00
Aaron Suen
a7b84724c8 Improved smoke API, smoking torches
- Smoke API uses expandable options param instead of positional
- Separate burst qty from automatically adjusted rate
- Backward compat with old API for now
- Standardize burst of smoke puffs for crafting
- Torches emit small smoke particles at increasing rate as they
  start to wear out, to warn players holding them to light another
- Torches now emit a puff of smoke upon snuffing
2022-06-08 08:15:31 -04:00
Aaron Suen
f936121be9 Tweak firestarting weights
Make sparks bias "downward" for igniting nearby
materials, making starting a fire on top of thatch
more useful, and making thatch a more useful
tinder material.
2021-12-13 23:42:28 -05:00
Aaron Suen
b2f78c0daa Indexing for craft checks
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
2020-06-27 12:20:35 -04:00
Aaron Suen
42f125c716 Make most recipes indexable
Register a "rootmatch" property for all
recipes that represents a broader, quicker
test for recipe eligibility.  False positives are
allowed but false negatives are not.

Since most recipes are eligible, we can
use this to build an index for fast lookups
of subsets of recipes to run and skip most
of the other ones.
2020-06-27 11:06:43 -04:00
Aaron Suen
35292eb259 Switch to an internal sound API
Avoid mangling official Minetest API
functions that mods may want to
use directly.
2020-04-05 21:22:51 -04:00
Aaron Suen
2ef99d64f9 Add effects to firestarting fail recipe.
Stick breaking noise (to accompany loss of stick) and
a puff of smoke to indicate you're on the right track.
2020-03-17 07:53:30 -04:00
Aaron Suen
6b4f1064a2 Make firestarting sparks a bit denser. 2019-12-01 19:23:24 -05:00
Aaron Suen
d0afb15f1c Add sparks to stick firestarting.
This should provide a visual clue as to WHERE players
should put tinder to get it to catch properly, since this
seems to be a common problem players run into.
2019-12-01 13:10:49 -05:00
Aaron Suen
d0ef7ab3ad Use torches for super-easy firestarting. 2019-10-06 11:26:30 -04:00
Aaron Suen
560b068bd7 Fix crafting, standardize recipe callback params. 2019-08-24 06:31:27 -04:00
Aaron Suen
fbff15e2fe MAJOR fire api/logic rework.
- Expanded fire api, added "check" varieties of things that also
  perform relevant checks for eligibility.  Standardized testing
  for ventilation.
- Snuff embers to coals as fuel.
- Fuel is consumed randomly by flames.  This means that fuel that
  are surrounded by flame burn out quicker, while flames
  surrounded by fuel consume fuel from each node slower.  This
  adds subtlety to furnace design for efficiency.
2019-03-31 20:54:38 -04:00
Aaron Suen
fc53bdd72e Fix recipe check mutability bugs. 2019-02-23 02:05:41 -05:00
Aaron Suen
c5ebe7f35a Fix stick firestarting.
Wasn't working when wielding more than one stick/staff, due to
implied count check added to fix log-stack-splitting issue.
2019-02-21 14:27:06 -05:00