Remove temporary description string, add assert to force description field to be present in rail definitions and fix descriptions for on variants of rail

This commit is contained in:
teknomunk 2024-12-30 18:21:39 -06:00 committed by the-real-herowl
parent 1656262156
commit b5754d63a2
4 changed files with 4 additions and 1 deletions

View file

@ -122,7 +122,6 @@ local BASE_DEF = {
dig_by_water=0,destroy_by_lava_flow=0,
transport=1
},
description = S("New Rail"), -- Temporary name to make debugging easier
_tt_help = S("Track for minecarts"),
_doc_items_usagehelp = railuse,
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction."),
@ -186,6 +185,7 @@ table_merge(SLOPED_RAIL_DEF,{
function mod.register_rail(itemstring, ndef)
assert(ndef.tiles)
assert(ndef.description)
-- Extract out the craft recipe
local craft = ndef.craft

View file

@ -51,6 +51,7 @@ mod.register_curves_rail("mcl_minecarts:activator_rail_v2_on", {
"mcl_minecarts_rail_activator_t_junction_powered.png",
"mcl_minecarts_rail_activator_crossing_powered.png"
},{
description = S("Activator Rail"),
_doc_items_create_entry = false,
groups = {
not_in_creative_inventory = 1,

View file

@ -48,6 +48,7 @@ mod.register_curves_rail("mcl_minecarts:detector_rail_v2_on",{
"mcl_minecarts_rail_detector_t_junction_powered.png",
"mcl_minecarts_rail_detector_crossing_powered.png"
},{
description = S("Detector Rail"),
groups = {
not_in_creative_inventory = 1,
},

View file

@ -46,6 +46,7 @@ mod.register_curves_rail("mcl_minecarts:golden_rail_v2_on",{
"mcl_minecarts_rail_golden_t_junction_powered.png",
"mcl_minecarts_rail_golden_crossing_powered.png",
},{
description = S("Powered Rail"),
_doc_items_create_entry = false,
_rail_acceleration = function(pos, staticdata)
if staticdata.velocity ~= 0 then