Commit graph

26 commits

Author SHA1 Message Date
Nils Dagsson Moskopp
41550da87b Fix redstone comparator flooding crash
Redstone comparators have two modes, comparison mode & subtraction mode.
Before this patch, the functions to turn comparators on or off attempted
to swap nodes with comparators in the same mode, but failed to determine
the correct replacement node, if the existing node was not a comparator.

When a comparator in an on state (e.g. powered by a filled cauldron) was
flooded, the flooding dropped the comparator and replaced the comparator
node that was to be swapped out with air, which lead to a server crash.

This patch changes the functions that turn comparators on or off so they
only swap existing nodes with comparators in the same mode if the name
of the replacement node can be determined – i.e. if it is not nil.
2022-02-24 15:52:01 +01:00
marcin-serwin
cbe8583cef Merge branch 'master' into polish-translation 2021-06-02 10:14:25 +00:00
Marcin Serwin
6715aecd63 Add polish translation of mcl_comparators 2021-06-02 12:13:16 +02:00
AFCMS
cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS
52b1473657 [mcl_comparators] fix warnings 2021-05-23 11:53:05 +02:00
Elias Åström
dc41c594aa Move depends.txt into mod.conf for mcl_comparators
Fixes a crash in mcl_comparators caused by attempting to index global
'mesecon' (a nil value).
2021-03-18 13:45:29 +01:00
AFCMS
3635b848d5 add API for mcl_wip 2021-03-07 00:42:34 +01:00
Elias Fleckenstein
aeb7078c05 Update use_texture_alpha to the minetest 5.4 conventions 2021-02-18 14:00:17 +01:00
kay27
ba51686e6c Russian translation 2020-07-20 00:11:13 +00:00
Rocher Laurent
4957bd1118 Translate In French 2020-05-03 22:39:07 +02:00
wuniversales
15481cb24d Add Spanish translation 2020-02-04 21:43:50 +01:00
Wuzzy
47f7b21190 Add missing translation for some redstone nodes 2019-12-09 22:02:35 +01:00
Wuzzy
967905264d Make many help texts translatable and fix bugs 2019-03-25 12:05:57 +01:00
Wuzzy
d45d53e455 German translation: Redstone 2019-03-16 02:00:48 +01:00
Wuzzy
5aeb4aea74 Add translation templates for most mods
Using the findtext.lua script
2019-03-13 23:40:59 +01:00
Wuzzy
3cfdb85926 New translation system, part 11: Redstone 2019-03-08 01:07:41 +01:00
Wuzzy
312b17a958 Check protection for most nodes 2019-02-08 21:59:01 +01:00
Wuzzy
4703ca9ae6 Tweak inventory image of internal comparator items 2018-10-24 18:22:48 +02:00
Wuzzy
a62b5de79e Cake+cauldron+endportalfr. put signal 4 comparator 2018-05-13 00:33:26 +02:00
Wuzzy
b04e555635 Update help text of comparators 2018-01-17 22:30:27 +01:00
Wuzzy
81d5d8b942 Update comparator help 2018-01-13 05:00:47 +01:00
Wuzzy
f612d1b584 Rework core rules of most redstone components 2018-01-13 03:37:41 +01:00
Wuzzy
320567e1f2 Add basic screwdriver support 2017-12-05 14:09:39 +01:00
Wuzzy
2f0450a0c3 Fix crash and outdated Mesecons API code in mcl_comparators 2017-09-18 23:34:08 +02:00
Wuzzy
59a04d5ffe Remove 3 redundant comparator help entries 2017-08-28 02:05:31 +02:00
Wuzzy
1d42f568de Rename mcl_comparator to mcl_comparators 2017-08-28 01:58:07 +02:00