From 10ea9b896b140ecc5ed4e53e7ee1daeaa4efa46e Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 5 Sep 2023 20:46:18 +0200 Subject: Make the track registration less manual again to prevent duplicate code (but keep the template table in the track mod, as it's supposed to be) --- advtrains/trackplacer.lua | 2 +- advtrains/tracks.lua | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'advtrains') diff --git a/advtrains/trackplacer.lua b/advtrains/trackplacer.lua index 9d63199..71eb79c 100644 --- a/advtrains/trackplacer.lua +++ b/advtrains/trackplacer.lua @@ -49,7 +49,7 @@ function tp.register_candidate(tpg, name, ndef, as_single, as_double) for i=0,3 do if as_double then g.double[rotate(c1,i*4).."_"..rotate(c2,i*4)] = {name=name, param2=i} - if not is_symmmetrical then + if not is_symmetrical then g.double[rotate(c2,i*4).."_"..rotate(c1,i*4)] = {name=name, param2=i} -- if the track is unsymmetric (e.g. a curve), we may require the "wrong" orientation to fill a gap. end diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua index dc2d909..46ceaf8 100644 --- a/advtrains/tracks.lua +++ b/advtrains/tracks.lua @@ -213,7 +213,6 @@ function advtrains.register_node_4rot(ori_name, ori_ndef, definition_mangling_fu end -- register node - atdebug("Registering: ",name, ndef) minetest.register_node(":"..name, ndef) -- if this has the track_place_group set, register as a candidate for the track_place_group -- cgit v1.2.3