Commit Graph

29 Commits

Author SHA1 Message Date
Wuzzy
54dc58ef1f
Fix furnace fire sound stopping too late (#2955)
Cleans fire sound IDs after a few seconds
2022-05-29 21:16:23 +02:00
paramat
0c1252bcf5 Balance sounds, remove silent water footstep 2022-01-23 18:07:59 +01:00
sfence
02ec133392
Prevent blocking of fuel inventory by fuel replacement (#2895) 2021-10-23 14:37:51 +02:00
orbea
dd91a1bfe5
Furnace: Start the timer on on_metadata_inventory_take (#2639)
This fixes a cosmetic issue where if a player removes
items from the furnace it will not revert to showing that its
"Empty". The furnace would only show its empty when the the
items were used up by the smelting process.
2020-09-23 21:58:09 +01:00
An0n3m0us
0a96bac46d
Add furnace sounds (#2569)
Two sounds are played; one while the furnace is active (sound used is "fire_fire") and one after an item is cooked (sound used is "default_cool_lava").
2020-08-07 19:40:02 +02:00
An0n3m0us
6e32287a42 Move crafting, cooking and fuel recipes into corresponding files 2020-01-01 01:38:06 +00:00
An0n3m0us
cbb0529ace Set fuel percentage to decrease (#2481) 2019-09-19 00:36:50 +02:00
An0n3m0us
1f7ea89cb6 Add missing infotext to nodes (#2477) 2019-09-14 20:30:26 +02:00
sfan5
e4adb01fbf
Fix and improve translation strings (#2471) 2019-09-12 19:03:10 +02:00
Yves Quemener
bb9279ccb8 Add support for MT 5 game translation (rebasing ) (#2466)
rebased #2368
2019-09-10 19:09:51 +02:00
Paul Ouellette
7269711911 Furnace: Improve fuel item replacement support
The output returned by `get_craft_result` has a replacements table that
contains any replacement items that could not be placed in the input
(due to the input stack having a count > 1). Put these replacements in
the dst list or drop them on the furnace.
2019-08-20 21:15:28 +02:00
Paul Ouellette
e5ebb36cd5 Furnace: Fix "output full" infotext 2019-08-11 16:28:02 +02:00
Paramat
8af8dc49a0
Remove uses of default.gui_bg/bg_img/slots
Keep their definitions, to not break mods, but move them to legacy.lua.
2019-01-03 01:57:13 +00:00
Ekdohibs
bd0c627a20 Furnace: Fix being able to cook items without enough fuel
This was triggered when too much time had elapsed when timer was called.
Also, fix timer resolution giving free fuel time.
2018-01-02 22:41:50 +00:00
Jens Rottmann
d883012491 Trivial: Make furnace info text look nicer
Furnace inactive (Item: Not cookable; Fuel:
Empty)

--> becomes -->

Furnace inactive
(Item: Not cookable; Fuel: Empty)
2017-08-13 00:08:43 -07:00
SmallJoker
e5189760b3 Default: Expose the formspec getter functions (#1783) 2017-07-16 14:31:34 +02:00
F.K.Z
2c666891a8 Furnace formspec: Replace deprecated 'current_name' with 'context' 2017-06-28 11:17:40 +01:00
Auke Kok
e5c5c2637e Furnace: Attempt to fix exploits
The fuel would remain active even if source went empty, giving
free cook time to newly inserted items. This patch is supposed
to stop this.
2016-12-17 20:01:46 +00:00
HybridDog
4a5206e3a7 Furnace: Make furnaces work when unloaded
This is slightly modified after #1279 - the setting for furnace
timer was removed and hardcoded to 1.0s, which is the old furnace
timer interval.
2016-12-07 08:28:53 +00:00
Auke Kok
75caa9167c Fix whitespace errors to silence luacheck.
Currently all minetest_game PR's are failing travis since the
upstream luacheck now also warns about whitespace issues, and
there are a few of those in the code. This fixes all of them
so we can yet again rely on luacheck.
2016-11-19 19:39:51 -08:00
Wuzzy
d92034e3f7 Add fuel slot to furnace listring 2016-10-31 14:17:38 -07:00
Auke Kok
1d6fbe04cd Default/furnace: Indicate dst full
Indicate in the infotext when a furnace has filled up `dst` but still
has fuel. The info text shows the item as 100% with added "(output
full)" text, indicating that while it can cook the item, there is no
place for it in the `dst`. Emptying the `dst` should make the item
cook immediately and furnace resume normal operation.
2016-09-03 01:08:29 +01:00
Tim
4473627de0 Remove unused and clean up missused variable-value assignments.
* Unused variables
* Unused values (assigned to variables, but overwritten before use)
* Defining already defined variables instead of reassigning to them.
2016-07-15 21:58:49 +01:00
Auke Kok
54b87e955d TNT: Add on_blast to all nodes with an inventory
Adds a minor helper function that allows efficient retrieval of
several inventories from a node inventory. We use this helper to
quickly retrieve the items in chests, vessel shelves, book shelves
and furnaces, and return these with the nodes itself to the TNT caller.

The TNT caller then performs the entity physics, and we don't need
to do anything else.

We disable TNT doing anything with bones.

We expose a bug in the code that drops the items - metadata was lost
entirely. This patch corrects that by properly copying the metadata
and creating the drops list inclusive metadata.
2016-04-26 22:33:59 +01:00
Auke Kok
4d7dbfc826 Start timer as well when moving items around.
It's possible to hit this when using an e.g. charcoal mod
where a tree is both a fuel and a source.
2016-03-30 23:10:59 +01:00
Auke Kok
8f095c62a8 Convert furnace ABM to node timer
Node timers are higher precision and a better guarantee
of happening at regular intervals, whereas ABM's may be
postponed, cancelled or missed if a player is too far.

The largest benefit is that once the furnace is done
cooking, no more ABM's are fired - the timer is stopped
instead and no more events are created until items
are put in the furnace.

This patch is larger due to the migration of the timer
function and indentation change as a result of the somewhat
reduced complexity. I've tested with several furnaces and
this works correctly and behavior is not affected, although
people may find that their furnaces now work more
regularly.

If you place several furnaces next to eachother, you will
still find all furnace timers firing exactly at the same
time. This is a bug in core that should not coalesce node
timers at second intervals.
2016-02-13 03:47:38 +00:00
Amaz
7361eb5e05 Add the listring functionality c977fbd928 2015-06-23 19:17:57 +02:00
PilzAdam
854415fd33 Fix typo in furnace.lua 2014-12-13 12:52:47 +01:00
PilzAdam
5a06de184c Rewrite furnace
* Move furnace related code into furnace.lua
* Move duplicated code into functions
* Rewrite ABM:
	* Easier to follow strcuture (no returns in the middle)
	* No unnecessary calls to get_craft_result
	* Split logic and "visual feedback" (a bit)
	* Fewer calls to meta:set and meta:get
	* Better feedback on the current state of the furnace
2014-12-06 21:18:02 +01:00