51 Commits

Author SHA1 Message Date
SmallJoker
6c8ca6c6fa Replace deprecated function calls 2018-07-01 20:44:03 +01:00
paramat
8378369e7e Settings: Use new settings object 2017-05-24 07:18:26 +01:00
ezhh
6504225a08 Fire: Disable fire by default in multiplayer 2017-05-15 17:39:59 +01:00
zaoqi
65c6262436 Use creative.is_enabled_for for creative mode if possible (#1558) 2017-03-29 21:02:26 +02:00
paramat
6bdf85ea13 Flint & steel sounds: Fix bugs caused by nil position
Usage and tool break sounds were played at 'pointed_thing.above' which
can be nil if not pointing at anything or at an entity. This caused
sounds to be played to all players on a server non-positionally.

Fallback to player pos for sounds if 'pointed_thing.above' is nil.

Replace 'pt' variable with 'pointed_thing' in 'register_tool'.
2017-03-10 19:30:18 +00:00
Lars Hofhansl
869c731e3f Fire: Make explosions remove flames
TNT removes flammable nodes from the destruction radius and should
remove flames within it too because they lose their fuel and would
be removed by ABM later anyway.
2017-01-15 04:24:01 +00:00
paramat
4ff7287c29 Fire: Reduce flame light level to 13 2017-01-07 22:01:30 +00:00
paramat
643f495d44 Fire: Rewrite fire sound code
Previous code:
Used looped sounds without attaching them to objects or playing direct
to players.
The looped sounds are not 'stopped' when players leave the area.
These may be causing the bug where sounds are heard at extreme
distances.
Entering a world with already present flames results in silent flames.
Sounds are often played at a large number of points in a 6 node lattice.
A large fire is reported to cause a high load, disabling the sound code
is reported to help this.

New code:
Optional flame sound to not interfere with ambience mods.
Permanent flame now has sound.
For multiple flames, sound is positioned at the centre of all flames, and
has volume determined by flame number.
The original freesound 'large fire' recording was used to create 3 sounds
that play at random for a non-repetitive effect. At low volume it is
suitable for small fires.

Original sound files and sound function (as an empty function) kept
temporarily to reduce disruption.

Reduce gain of flame extinguish sound.
2016-12-07 08:28:08 +00:00
paramat
8a17e4756f Farming/fire: Add tool break sounds
Add tool break sounds to hoes and flint and steel.
Flint and steel: Reduce gain of use sound and only add tool wear
if not in creative mode.
2016-11-26 03:14:56 +00:00
paramat
6cc3f8b0b3 Update 'nodeupdate()' to 'check_for_falling()' API 2016-11-22 05:55:36 +00:00
Fernando Carmona Varo
59e9fcb514 Fire / tnt: Make flint-and-steel use node on_ignite functions
Add on_ignite functions to tnt, gunpowder, coalblock.
2016-11-07 14:10:00 +00:00
paramat
454e40923e Fire: Reduce volume of flint and steel sound 2016-10-25 04:22:17 +01:00
paramat
4dc4f56780 Fire: Add flint and steel sound 2016-10-24 04:55:08 +01:00
paramat
6e9f9797cf Fire: Use 'enable fire' setting instead of 'disable fire' 2016-08-20 04:29:32 +01:00
tenplus1
5dbcafebe7 Add labels to ABMs
Useful for searches and the mod profiler.
2016-08-09 03:56:37 +01:00
Tim
3383f76712 Clean up fire ABM parameters. 2016-07-15 21:58:49 +01:00
Tim
ae43309d4e Stop shadowing upvalues and definitions. 2016-07-15 21:58:49 +01:00
paramat
99bc01243d Fire: Ignite tnt, gunpowder, permanent flame above coalblock
Enable ignition of tnt, gunpowder and permanent
flame above coalblock using flint and steel
Override coalblock to remove flame above when dug
Add depends.txt for default mod
2016-06-04 13:39:00 +01:00
Auke Kok
f27d1094bc Fire: move fire node removal out of ABM.
Because the fire nodes are not removed 100% when there are
no more burnable nodes nearby, they can potentially stay around
for very, very long times, leading to ABM trains every 5 seconds
for no good reason (only 1 in 16 will be removed every interval).

A much better method to remove fire nodes is to remove them by
timer, and give removal a 100% chance if no flammable nodes are
adjacent. This makes fire cleanup a lot faster and more natural,
and will reduce the amount of ABM hits making fire overall more
responsive.

We also remove the 1 in 4 chance and fold the removal of flammable
nodes into the ABM chance.

There's some low hanging fruit cleanups in here as well.
2016-05-28 15:11:31 +01:00
paramat
745d8a6232 Fire: Higher chance of removing flammable nodes
Flammable nodes burn away quicker
2016-04-19 05:33:13 +01:00
Rui
9204690afd Fire: Use get_item_group instead of get_node_group 2016-03-30 23:11:04 +01:00
Jean-Patrick Guerrero
dd7b3b0856 Fire: Allow placing only above flammable blocks 2016-03-25 13:15:04 +00:00
paramat
2e9981cc1a Fire: Speed up fire spread and burn out 2016-03-21 06:17:50 +00:00
Auke Kok
0c364fc7e1 Fire: Optimize spreading ABM.
No need to find_node_near twice with the same params.
2016-03-15 16:22:50 +00:00
Jean-Patrick Guerrero
3d153e8c86 Add flint and flint-and-steel 2016-03-15 16:22:42 +00:00
red-001
2a7d53b64d Add an on_burn callback. 2016-03-11 15:27:57 +00:00
paramat
8236b12237 Consolidate ABMs
Spread ABM intervals evenly across 1 to 16 seconds
16s ensures no nodes are missed when player walks past
Adjust chance values to compensate, for identical action rates
Combine lavacooling ABMs into one, return to chance = 1
Grass growth: add 'neighbors = "air"' to avoid
processing the thousands of underground dirt nodes
Grass death: Reduce action rate to that of grass growth
Fire: Use chance = 1 for flame extinguishing
and flame removal when mod is disabled
2016-02-14 05:22:20 +00:00
paramat
9730bdee42 Default, fire: Disable catch-up in some ABMs
To avoid processing spikes where catch-up is non-essential
Disable in: Lavacooling, grass growing, grass removal
and all fire mod ABMs
2015-11-14 04:49:03 +00:00
paramat
ed011311cf Fire: Add 'permanent flame' node
Update 'disable fire' documentation in conf.example
2015-10-28 03:08:09 +00:00
paramat
1b7c8bf8ed Fire: Move flame extinguishing to separate faster ABM
Add extinguish sounds (from default mod lavacooling)
'disable fire' setting extinguishes fire quickly using a dedicated ABM
'disable fire' also disables all other ABMs
Simplify flammable node removal ABM
Speed up node ignition, it was too slow
Add 'sunlight propagates = true' and 'paramtype = "light" to flame
Balance fire sounds' gain
2015-09-04 23:05:26 +01:00
paramat
d76caa3a5e Fire: Slow down fire spread and reduce lua load
Increase chance value of ABMs
Disable ignition from a distance
Only detect neighbouring extinguishing nodes
Fix code style issues and add comments
2015-08-20 04:09:22 +01:00
Wuzzy
4458358651 Make TNT respect on_blast, implement on_blast for some nodes
Implemented nodes:
- Steel Door: Ignores explosion
- Locked Chest: Ignores explosion
- Fire: Ignores explosion
- TNT: Starts burning
- Burning TNT: Explodes immediately
- Gunpowder: Starts burning
- Burning Gunpowder: Ignores explosion
2015-05-12 16:32:52 +02:00
Rui
9e0c2d30a7 Add max_hear_distance for fire 2015-03-29 21:35:03 +02:00
MT-Modder
57510c566b Slow down fire spread a bit 2015-03-29 21:25:46 +02:00
PilzAdam
b653c6f887 Remove remains of weather 2014-12-06 20:58:03 +01:00
PilzAdam
f41cbb2612 Fix various fire sound bugs 2014-12-03 16:59:36 +01:00
BlockMen
cac17a08f5 Revert "Fix fire blocking sunlight"
This reverts commit dcce6e97959647fd625c1ce219721c0b800f4938.
2014-11-08 23:25:40 +01:00
ShadowNinja
889b77e495 Fix fire blocking sunlight 2014-11-04 16:17:56 -05:00
BlockMen
1dd01c5b34 Use new firelike drawtype 2014-09-21 22:25:00 +02:00
proller
b0f8ab048e Melting and freezing 2013-07-27 23:37:54 +04:00
PilzAdam
d5d51a035b Replace minetest.env: with minetest. 2013-05-25 00:40:03 +02:00
PilzAdam
d35ee89674 Move all common mods back to minetest_game 2013-05-18 16:05:16 +02:00
PilzAdam
0edc85239c Use common mods 2013-03-21 18:44:36 +01:00
Casimir
5ba4222927 Make fire buildable to 2012-12-31 13:24:05 +01:00
Splizard
0ec4eee715 Run nodeupdate() after burning nodes. 2012-12-28 02:30:52 +01:00
PilzAdam
2352fe9f2a Make functions of fire mod global and move register_on_* functions to node definition 2012-11-25 20:11:54 +01:00
PilzAdam
bbbea27986 Make fire hurt the player 2012-11-25 20:11:40 +01:00
PilzAdam
4380e41b5a Add animation for fire 2012-11-25 20:11:29 +01:00
Jat
1b0d7f0633 Update tile_images 2012-09-03 17:30:05 +03:00
Perttu Ahola
a65e211352 Make fire a tiny bit less eager to jump everywhere 2012-07-21 03:08:59 +03:00