37 Commits

Author SHA1 Message Date
Aaron Suen
55efdfa027 Fire ambiance consolidation
- Fire flame and torch flame use the same ambiance def via
  a new flame_ambiance group.
- Items can now emit ambiance via AISM.
2020-05-26 18:48:03 -04:00
Aaron Suen
920fba34ee Separate node stand/touch/radiant damage types
Don't reuse damage_per_second for damage on punch and radiant
damage.  This allows these to be defined separately, i.e. no longer
assuming that all damage is from "heat" and can radiate.  This
allows for things like thorny plants that hurt if you touch them
or stand in them but not if you stand near them.

Thanks to WintersKnight94 for reporting this.
2020-04-09 06:56:18 -04:00
Aaron Suen
f37a918f0f Scaling and touch-hurt reforms
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
  group (percent of original scaling time)
2020-03-29 07:55:54 -04:00
Aaron Suen
bcbe77644e Buff drowning damage, nerf some node damage. 2020-02-19 19:55:22 -05:00
Aaron Suen
58d2be5410 Make some hot-potato items place on landing. 2019-12-01 12:57:35 -05:00
Aaron Suen
0a29fd34e9 Clean up sound handling, fix floating point timers. 2019-10-01 19:24:39 -04:00
GreenXenith
2d63bdba43 Improve fire texture 2019-09-14 14:42:03 -07:00
Aaron Suen
39dea8a2ae MAJOR: Code quality audit using luacheck.
- Removed lots of unused variables, a few shadowed identifiers.
- Removed a few sections of dead code.
2019-08-31 09:26:53 -04:00
Aaron Suen
fe2c153f9e Clean up all lua code style.
Formatting rules based on Paul Kulchenko's perl-based formatter...
http://notebook.kulchenko.com/programming/lua-beautifier-in-55-lines-of-perl
...using a single tab for indent.

Mostly pure whitespace changes.
2019-08-27 19:14:51 -04:00
Aaron Suen
b30112d702 New, bolder charcoal textures.
Hopefully, tiers should be a little easier to distinguish...
2019-04-09 22:51:31 -04:00
Aaron Suen
d41e208d87 Switched from fire alpha to gentle animation. 2019-04-04 08:26:53 -04:00
Aaron Suen
be6b5ec8a0 Remove "Cube" from node descriptions.
Consistent with everything else in the world, we assume that "cube"
is the default state for things to be in (this is NodeCore after
all) and only use shape descriptors for things like lumps, prills
and other non-cube versions of things that also exist as cubes.
2019-04-02 08:10:17 -04:00
Aaron Suen
676a478427 Fix alpha channel. 2019-04-01 19:54:39 -04:00
Aaron Suen
468bbba9ca Try using alpha for flames.
Fuel quality is important now, so we want to be able to see the
fuel through the fire.  On the other hand, this may cause fire
to be invisible through water...
2019-03-31 22:21:05 -04:00
Aaron Suen
a22cc73a20 Consistentize ash/charcoal lump/cube naming. 2019-03-31 22:11:29 -04:00
Aaron Suen
2d4445c976 Tweak flammability, esp of charcoal/ash mixtures. 2019-03-31 21:38:26 -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
cc1f7c9dd9 Sparser embers, define nodes. 2019-03-31 19:41:03 -04:00
Aaron Suen
9f53c5b43d Fix crash on punching lava.
minetest.[de]serialize apparently does attempt to serialize
functions (e.g. the on_punch) hook now, but all upvalues become
nil in the process.
2019-03-24 22:32:36 -04:00
Aaron Suen
73839954ae Give embers a sound (esp. for when they fall/land) 2019-03-17 10:55:41 -04:00
Aaron Suen
fd5f4219f7 Sounds for some items, ash. 2019-03-14 01:16:44 -04:00
Aaron Suen
7bf237fe26 More debug code. 2019-03-10 03:36:37 -04:00
Aaron Suen
78f1b2971a Work around particle emission issues.
Seems like minetest doesn't behave very well on trying to spawn
more than 1 particlespawner during a single tick.

Work around this so smoke comes out correctly...
2019-03-10 03:32:59 -04:00
Aaron Suen
19bfab1c1f Glass now cools/quenches.
Almost done with this new feature; just need to craft lenses and
prisms from chroma glass...
2019-03-07 22:21:04 -05:00
Aaron Suen
ed7fa1e95c Add molten glass, cook sand into it w/ fire. 2019-03-07 21:50:29 -05:00
Aaron Suen
e90ad9fda4 Added the beginnings of a hint/guide system. 2019-02-08 23:45:41 -05:00
Aaron Suen
527449b299 Fix typo that made fire block sunlight. 2019-01-29 22:42:35 -05:00
Aaron Suen
2d3b468c65 Knock out a bunch of small low-hanging issues.
- Eggcorn cleanup.  They look a little better falling out of the
  tree, and we don't have so many now.
- Crushing damage fixes.  Crushing is nuanced now, and most things
  don't smush you, and many do reduced damage.  A few may do more.
- Item stack convenience.  Items landing on a stack or right-
  clicked onto one attempt to merge into it.
- Ladders now fall (they don't connect to sides).  Use the new
  full-scale frames for ones that don't.
2019-01-29 20:41:29 -05:00
Aaron Suen
37f5c0a0de Laid the groundwork for metal-working.
- Defined nodes, slabs, and prills of lode.
- Heating lode ore releases hot lode prills.
- Lode things in stack can air-cool to anneal or water-quench to
  harden/temper.  Cooling of placed nodes/slabs is planned.
- Hot items cannot be carried; picking them up causes damage and
  causes player to drop them.
2019-01-27 22:34:53 -05:00
Aaron Suen
ee7dda9b4c Dig time. 2019-01-24 22:12:19 -05:00
Aaron Suen
464a0e1d89 Finite fire rework.
- There are now 6 degrees of embers.  Better fuel sources will
  make better embers.
- Embers differ only in lifespan; each class lasts twice as long
  as the previous.  Top-grade fuels may last 15 minutes or
  longer.
- Embers decay stochastically.
- Embers decay 16x as fast when smothered, but still go through
  the same lifecycle.

Also:
- Plain ash now reposes.

There are no infinite fuel sources, nor are any specifically
planned at this time.
2019-01-17 00:01:00 -05:00
Aaron Suen
62f0db49e0 Fire mod is now basically functional.
"Qualitative" fire now works, spreads, etc.

Rub 2 sticks/staves together to start a fire in nearby flammables.
2019-01-06 13:04:07 -05:00
Aaron Suen
7d29907ab2 Some API refactors.
- Clean up utils into multiple files.

- Standardize limited ABM.

- Standardize debug trace handling.  Instead of using chat_send_all
  to debug, and then having to remember to remove before release,
  allow privileged players to receive all server debug messages.
2019-01-06 12:02:37 -05:00
Aaron Suen
c91151ab06 Start of a more flexible centralized crafting system. 2018-12-30 17:36:47 -05:00
Aaron Suen
7835a357da API refacs, and some planning. 2018-11-05 20:03:05 -05:00
Aaron Suen
db302c8807 Smother fire to produce ash. 2018-11-04 22:19:32 -05:00
Aaron Suen
bd526122e8 Start initial stub work on fire. 2018-11-04 22:03:22 -05:00