switch trail mod to footprints mod

This commit is contained in:
FaceDeer 2020-02-19 21:07:15 -07:00
parent 947cb72f5a
commit 7ddf1ff7cb
23 changed files with 62 additions and 336 deletions

View File

@ -4,7 +4,5 @@
### underworld.lua ###
A glowing pit=
Ancient ruin=
Mysterious seal=

View File

@ -187,7 +187,7 @@ minetest.register_craft({
---------
-- Trample support
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
if minetest.get_modpath("footprints") then
minetest.register_node("df_farming:wheat_trampled", {
description = S("Flattened Cave Wheat"),
tiles = {"dfcaverns_cave_wheat_flattened.png"},
@ -207,19 +207,19 @@ if minetest.get_modpath("trail") and trail and trail.register_trample_node then
sounds = default.node_sound_leaves_defaults(),
})
trail.register_trample_node("df_farming:cave_wheat_5", {
footprints.register_trample_node("df_farming:cave_wheat_5", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
trail.register_trample_node("df_farming:cave_wheat_6", {
footprints.register_trample_node("df_farming:cave_wheat_6", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
trail.register_trample_node("df_farming:cave_wheat_7", {
footprints.register_trample_node("df_farming:cave_wheat_7", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})
trail.register_trample_node("df_farming:cave_wheat_8", {
footprints.register_trample_node("df_farming:cave_wheat_8", {
trampled_node_name = "df_farming:wheat_trampled",
randomize_trampled_param2 = true,
})

View File

@ -4,89 +4,51 @@
### cave_wheat.lua ###
Cave Straw=Grano di caverna
Cave Wheat=Grano di caverna
Cave Wheat Flour=Farina di grano di caverna
Cave Wheat Seed=Seme di grano di caverna
Dwarven Bread=Pane nanico
Flattened Cave Wheat=Grano di caverna
### cooking.lua ###
Cave Wheat Flour Biscuit=Farina di grano di caverna
Cave Wheat Flour Bun=Farina di grano di caverna
Cave Wheat Flour Pancake=Farina di grano di caverna
Cave Wheat Seed Loaf=Seme di grano di caverna
Cave Wheat Seed Puffs=Seme di grano di caverna
Cave Wheat Seed Risotto=Seme di grano di caverna
Dimple Cup Spore Flatbread=Spora di coppa increspata
Dimple Cup Spore Roll=Spora di coppa increspata
Dimple Cup Spore Scone=Spora di coppa increspata
Dwarven Syrup Delight=Secchio di sciroppo nanico
Dwarven Syrup Jellies=Sciroppo nanico
Dwarven Syrup Taffy=Sciroppo nanico
Pig Tail Spore Casserole=Spora di coda di maiale
Pig Tail Spore Sandwich=Spora di coda di maiale
Pig Tail Spore Tofu=Spora di coda di maiale
Plump Helmet Mince=Elmo rotondo
Plump Helmet Roast=Elmo rotondo
Plump Helmet Spawn Jambalaya=Prole di elmo rotondo
Plump Helmet Spawn Soup=Prole di elmo rotondo
Plump Helmet Sprout Stew=Prole di elmo rotondo
Plump Helmet Stalk Sausage=Prole di elmo rotondo
Quarry Bush Leaf Croissant=Foglia di cespuglio di cava
Quarry Bush Leaf Spicy Bun=Foglia di cespuglio di cava
Rock Nut Bread=Noce di roccia
Rock Nut Cake=Noce di roccia
Rock Nut Cookie=Noce di roccia
Stuffed Quarry Bush Leaf=Foglia di cespuglio di cava
Sweet Pod Spore Brule=Spora di baccello dolce
Sweet Pod Spore Dumplings=Spore di baccello dolce
Sweet Pod Spore Single Crust Pie=Spore di baccello dolce
Sweet Pod Sugar Cookie=Zucchero di baccello dolce
Sweet Pod Sugar Gingerbread=Zucchero di baccello dolce
Sweet Pod Sugar Roll=Zucchero di baccello dolce
### dimple_cup.lua ###
Dimple Cup=Coppa increspata
Dimple Cup Spores=Spore di coppa increspata
### doc.lua ###
@ -106,7 +68,6 @@ Bread baked from cave wheat flour is tough and durable. A useful ration for long
Cave wheat is literally a breed of grain-producing grass that somehow lost its ability to photosynthesize and adapted to a more fungal style of life.=
Cave wheat seed ground into a powder suitable for cooking.=
Crushing them in a bucket squeezes out a flavorful syrup.=
Dead fungus quickly decays into an unrecognizable mess. It can be used as weak fuel or terrible decor.=
@ -130,7 +91,6 @@ Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are edi
Quarry bush leaves can be used as an ingredient in foodstuffs.=
Sweet pod sugar has a pink tint to it.=
Sweet pod syrup is thick and flavorful.=
Sweet pods grow in rich soil, and once they reach maturity they draw that supply of nutrients up to concentrate it in their fruiting bodies. They turn bright red when ripe and can be processed in a variety of ways to extract the sugars they contain.=
@ -157,48 +117,36 @@ When milled, sweet pods produce a granular sugary substance.=
While they can be eaten fresh, they can be monotonous fare and are perhaps better appreciated as part of a more complex prepared dish.=
### pig_tail.lua ###
Flattened Pig Tail=Coda di maiale
Pig Tail=Coda di maiale
Pig Tail Spore=Spora di coda di maiale
Pig tail thread=Filo di coda di maiale
### plants.lua ###
Cavern Fungi=Funghi di caverna
Dead Fungus=Fungo morto
### plump_helmet.lua ###
Plump Helmet=Elmo rotondo
Plump Helmet Spawn=Prole di elmo rotondo
### quarry_bush.lua ###
Quarry Bush=Cespuglio di cava
Quarry Bush Leaves=Foglie di cespuglio di cava
Rock Nuts=Noci di roccia
### sweet_pod.lua ###
Dwarven Syrup Bucket=Secchio di sciroppo nanico
Dwarven Syrup Source=Fonte di sciroppo nanico
Flowing Dwarven Syrup=Sciroppo nanico che scorre
Sweet Pod=Baccello dolce
Sweet Pod Spores=Spore di baccello dolce
Sweet Pod Sugar=Zucchero di baccello dolce
Sweet Pods=Baccelli dolci

View File

@ -4,89 +4,51 @@
### cave_wheat.lua ###
Cave Straw=
Cave Wheat=
Cave Wheat Flour=
Cave Wheat Seed=
Dwarven Bread=
Flattened Cave Wheat=
### cooking.lua ###
Cave Wheat Flour Biscuit=
Cave Wheat Flour Bun=
Cave Wheat Flour Pancake=
Cave Wheat Seed Loaf=
Cave Wheat Seed Puffs=
Cave Wheat Seed Risotto=
Dimple Cup Spore Flatbread=
Dimple Cup Spore Roll=
Dimple Cup Spore Scone=
Dwarven Syrup Delight=
Dwarven Syrup Jellies=
Dwarven Syrup Taffy=
Pig Tail Spore Casserole=
Pig Tail Spore Sandwich=
Pig Tail Spore Tofu=
Plump Helmet Mince=
Plump Helmet Roast=
Plump Helmet Spawn Jambalaya=
Plump Helmet Spawn Soup=
Plump Helmet Sprout Stew=
Plump Helmet Stalk Sausage=
Quarry Bush Leaf Croissant=
Quarry Bush Leaf Spicy Bun=
Rock Nut Bread=
Rock Nut Cake=
Rock Nut Cookie=
Stuffed Quarry Bush Leaf=
Sweet Pod Spore Brule=
Sweet Pod Spore Dumplings=
Sweet Pod Spore Single Crust Pie=
Sweet Pod Sugar Cookie=
Sweet Pod Sugar Gingerbread=
Sweet Pod Sugar Roll=
### dimple_cup.lua ###
Dimple Cup=
Dimple Cup Spores=
### doc.lua ###
@ -106,7 +68,6 @@ Bread baked from cave wheat flour is tough and durable. A useful ration for long
Cave wheat is literally a breed of grain-producing grass that somehow lost its ability to photosynthesize and adapted to a more fungal style of life.=
Cave wheat seed ground into a powder suitable for cooking.=
Crushing them in a bucket squeezes out a flavorful syrup.=
Dead fungus quickly decays into an unrecognizable mess. It can be used as weak fuel or terrible decor.=
@ -130,7 +91,6 @@ Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are edi
Quarry bush leaves can be used as an ingredient in foodstuffs.=
Sweet pod sugar has a pink tint to it.=
Sweet pod syrup is thick and flavorful.=
Sweet pods grow in rich soil, and once they reach maturity they draw that supply of nutrients up to concentrate it in their fruiting bodies. They turn bright red when ripe and can be processed in a variety of ways to extract the sugars they contain.=
@ -157,48 +117,36 @@ When milled, sweet pods produce a granular sugary substance.=
While they can be eaten fresh, they can be monotonous fare and are perhaps better appreciated as part of a more complex prepared dish.=
### pig_tail.lua ###
Flattened Pig Tail=
Pig Tail=
Pig Tail Spore=
Pig tail thread=
### plants.lua ###
Cavern Fungi=
Dead Fungus=
### plump_helmet.lua ###
Plump Helmet=
Plump Helmet Spawn=
### quarry_bush.lua ###
Quarry Bush=
Quarry Bush Leaves=
Rock Nuts=
### sweet_pod.lua ###
Dwarven Syrup Bucket=
Dwarven Syrup Source=
Flowing Dwarven Syrup=
Sweet Pod=
Sweet Pod Spores=
Sweet Pod Sugar=
Sweet Pods=

View File

@ -1,4 +1,4 @@
name = df_farming
description = Adds farmable underground plants that die in sunlight. Also includes various cooking reactions.
depends = default
optional_depends = farming, cottages, bucket, dynamic_liquid, wool, doc, crafting, trail
optional_depends = farming, cottages, bucket, dynamic_liquid, wool, doc, crafting, footprints

View File

@ -120,7 +120,7 @@ minetest.register_craft({
burntime = 1,
})
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
if minetest.get_modpath("footprints") then
minetest.register_node("df_farming:pig_tail_trampled", {
description = S("Flattened Pig Tail"),
tiles = {"dfcaverns_pig_tail_flattened.png"},
@ -140,19 +140,19 @@ if minetest.get_modpath("trail") and trail and trail.register_trample_node then
sounds = default.node_sound_leaves_defaults(),
})
trail.register_trample_node("df_farming:pig_tail_5", {
footprints.register_trample_node("df_farming:pig_tail_5", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
trail.register_trample_node("df_farming:pig_tail_6", {
footprints.register_trample_node("df_farming:pig_tail_6", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
trail.register_trample_node("df_farming:pig_tail_7", {
footprints.register_trample_node("df_farming:pig_tail_7", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})
trail.register_trample_node("df_farming:pig_tail_8", {
footprints.register_trample_node("df_farming:pig_tail_8", {
trampled_node_name = "df_farming:pig_tail_trampled",
randomize_trampled_param2 = true,
})

View File

@ -43,13 +43,13 @@ minetest.register_abm{
end,
}
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
local HARDPACK_PROBABILITY = minetest.settings:get("trail_hardpack_probability") or 0.5 -- Chance walked dirt/grass is worn and compacted to trail:trail.
local HARDPACK_COUNT = minetest.settings:get("trail_hardpack_count") or 5 -- Number of times the above chance needs to be passed for soil to compact.
if minetest.get_modpath("footprints") then
local HARDPACK_PROBABILITY = tonumber(minetest.settings:get("footprints_hardpack_probability")) or 0.9 -- Chance walked dirt/grass is worn and compacted to footprints:trail.
local HARDPACK_COUNT = tonumber(minetest.settings:get("footprints_hardpack_count")) or 10 -- Number of times the above chance needs to be passed for soil to compact.
trail.register_trample_node("df_mapitems:dirt_with_cave_moss", {
footprints.register_trample_node("df_mapitems:dirt_with_cave_moss", {
trampled_node_def_override = {description = S("Dirt with Cave Moss and Footprint"),},
hard_pack_node_name = "trail:trail",
hard_pack_node_name = "footprints:trail",
footprint_opacity = 128,
hard_pack_probability = HARDPACK_PROBABILITY,
hard_pack_count = HARDPACK_COUNT,

View File

@ -4,7 +4,6 @@
### castle_coral.lua ###
Castle Coral=
Castle Coral Skeleton=
### cave_coral.lua ###
@ -18,21 +17,17 @@ Cave Pearls=
### crystals_mese.lua ###
Flawless Mese Block=
Flawless Mese Crystal=
### crystals_ruby.lua ###
Big Red Crystal=
Giant Red Crystal=
Red Crystal Vein=
### crystals_salt.lua ###
Luminous Salt Crystal=
Salty Cobble=
### doc.lua ###
@ -101,16 +96,13 @@ These nodules are actually calcified bacterial colonies.=
Traces of Mese must have been dissolved by the water as this crystal has an inherent glow to it. Not enough Mese to be useful as a reagent, unfortunately.=
### flowstone.lua ###
Dry Dripstone=Trockener Tropfstein
Dry Flowstone=Trockener Fließstein
Icicle=
Wet Dripstone=Nasser Tropfstein
Wet Flowstone=Nasser Fließstein
### glow_worms.lua ###
@ -120,11 +112,8 @@ Glow Worms=
### ground_cover.lua ###
Cobblestone with Floor Fungus=
Dirt with Cave Moss=
Dirt with Cave Moss and Footprint=
Ice with Hoar Moss=
### snareweed.lua ###

View File

@ -4,7 +4,6 @@
### castle_coral.lua ###
Castle Coral=
Castle Coral Skeleton=
### cave_coral.lua ###
@ -18,21 +17,17 @@ Cave Pearls=
### crystals_mese.lua ###
Flawless Mese Block=
Flawless Mese Crystal=
### crystals_ruby.lua ###
Big Red Crystal=
Giant Red Crystal=
Red Crystal Vein=
### crystals_salt.lua ###
Luminous Salt Crystal=
Salty Cobble=
### doc.lua ###
@ -101,16 +96,13 @@ These nodules are actually calcified bacterial colonies.=
Traces of Mese must have been dissolved by the water as this crystal has an inherent glow to it. Not enough Mese to be useful as a reagent, unfortunately.=
### flowstone.lua ###
Dry Dripstone=
Dry Flowstone=
Icicle=
Wet Dripstone=
Wet Flowstone=
### glow_worms.lua ###
@ -120,11 +112,8 @@ Glow Worms=Vermi luminosi
### ground_cover.lua ###
Cobblestone with Floor Fungus=Ciottoli con funghi del terreno
Dirt with Cave Moss=Terra con muschio di caverna
Dirt with Cave Moss and Footprint=Terra con muschio di caverna
Ice with Hoar Moss=
### snareweed.lua ###

View File

@ -4,7 +4,6 @@
### castle_coral.lua ###
Castle Coral=
Castle Coral Skeleton=
### cave_coral.lua ###
@ -18,21 +17,17 @@ Cave Pearls=
### crystals_mese.lua ###
Flawless Mese Block=
Flawless Mese Crystal=
### crystals_ruby.lua ###
Big Red Crystal=
Giant Red Crystal=
Red Crystal Vein=
### crystals_salt.lua ###
Luminous Salt Crystal=
Salty Cobble=
### doc.lua ###
@ -101,16 +96,13 @@ These nodules are actually calcified bacterial colonies.=
Traces of Mese must have been dissolved by the water as this crystal has an inherent glow to it. Not enough Mese to be useful as a reagent, unfortunately.=
### flowstone.lua ###
Dry Dripstone=
Dry Flowstone=
Icicle=
Wet Dripstone=
Wet Flowstone=
### glow_worms.lua ###
@ -120,11 +112,8 @@ Glow Worms=
### ground_cover.lua ###
Cobblestone with Floor Fungus=
Dirt with Cave Moss=
Dirt with Cave Moss and Footprint=
Ice with Hoar Moss=
### snareweed.lua ###

View File

@ -1,4 +1,4 @@
name = df_mapitems
description = Various node types used by the dfcaverns mapgen mod. Includes cave coral, flowstone, glowing crystals, glow worms, moss and fungi ground cover, and snare weed.
depends = default, subterrane
optional_depends = df_farming, farming, doc, radiant_damage, trail
optional_depends = df_farming, farming, doc, radiant_damage, footprints

View File

@ -129,14 +129,14 @@ minetest.register_abm{
end,
}
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
local HARDPACK_PROBABILITY = minetest.settings:get("trail_hardpack_probability") or 0.5 -- Chance walked dirt/grass is worn and compacted to trail:trail.
local HARDPACK_COUNT = minetest.settings:get("trail_hardpack_count") or 5 -- Number of times the above chance needs to be passed for soil to compact.
if minetest.get_modpath("footprints") then
local HARDPACK_PROBABILITY = minetest.settings:get("footprints_hardpack_probability") or 0.9 -- Chance walked dirt/grass is worn and compacted to footprints:trail.
local HARDPACK_COUNT = minetest.settings:get("footprints_hardpack_count") or 10 -- Number of times the above chance needs to be passed for soil to compact.
trail.register_trample_node("df_primordial_items:dirt_with_mycelium", {
footprints.register_trample_node("df_primordial_items:dirt_with_mycelium", {
trampled_node_def_override = {description = S("Dirt with Primordial Mycelium and Footprint"),},
footprint_opacity = 196,
hard_pack_node_name = "trail:trail",
hard_pack_node_name = "footprints:trail",
hard_pack_probability = HARDPACK_PROBABILITY,
hard_pack_count = HARDPACK_COUNT,
})

View File

@ -302,18 +302,18 @@ minetest.register_node("df_primordial_items:packed_roots", {
})
if minetest.get_modpath("trail") and trail and trail.register_trample_node then
local HARDPACK_PROBABILITY = minetest.settings:get("trail_hardpack_probability") or 0.5 -- Chance walked dirt/grass is worn and compacted to trail:trail.
local HARDPACK_COUNT = minetest.settings:get("trail_hardpack_count") or 5 -- Number of times the above chance needs to be passed for soil to compact.
if minetest.get_modpath("footprints") then
local HARDPACK_PROBABILITY = tonumber(minetest.settings:get("footprints_hardpack_probability")) or 0.9 -- Chance walked dirt/grass is worn and compacted to footprints:trail.
local HARDPACK_COUNT = tonumber(minetest.settings:get("footprints_hardpack_count")) or 10 -- Number of times the above chance needs to be passed for soil to compact.
trail.register_trample_node("df_primordial_items:dirt_with_jungle_grass", {
footprints.register_trample_node("df_primordial_items:dirt_with_jungle_grass", {
trampled_node_def_override = {description = S("Dirt With Primordial Jungle Grass and Footprint"),},
footprint_opacity = 128,
hard_pack_node_name = "trail:trail",
hard_pack_node_name = "footprints:trail",
hard_pack_probability = HARDPACK_PROBABILITY,
hard_pack_count = HARDPACK_COUNT,
})
trail.register_trample_node("df_primordial_items:plant_matter", {
footprints.register_trample_node("df_primordial_items:plant_matter", {
trampled_node_def_override = {description = S("Primordial Plant Matter with Footprint"),},
footprint_opacity = 128,
hard_pack_node_name = "df_primordial_items:packed_roots",

View File

@ -4,7 +4,6 @@
### ceiling_fungus.lua ###
Primordial Fungal Lantern=
Primordial Fungal Lantern Stalk=
### ceiling_fungus.lua ###
@ -68,108 +67,70 @@ When left uncultivated mycelial soil will sprout all manner of strange wild fung
When left uncultivated primordial jungle soil will sprout all manner of strange wild plants.=
### fungal_nodes.lua ###
Dirt with Primordial Mycelium=
Dirt with Primordial Mycelium and Footprint=
Primordial Fungal Grass=
Primordial Fungal Pod=
### giant_fern.lua ###
Fern Wood=
Giant Fern Leaves=
Giant Fern Sapling=
Giant Fern Stem=
### giant_mycelium.lua ###
Giant Hypha=
Giant Hypha Apical Meristem=
Giant Mycelial Fibers=
Mycelial thread=
Rooted Giant Hypha=
### jungle_mushroom.lua ###
Dark Jungle Mushroom Cap=
Diced Mushroom=
Pale Jungle Mushroom Cap=
Primordial Jungle Mushroom Sapling=
Primordial Jungle Mushroom Trunk=
### jungle_nodes.lua ###
Dirt With Primordial Jungle Grass=
Dirt With Primordial Jungle Grass and Footprint=
Large Primordial Jungle Mushroom=
Packed Primordial Jungle Roots=
Primordial Fern=
Primordial Flower=
Primordial Jungle Grass=
Primordial Jungle Ivy=
Primordial Jungle Mushroom=
Primordial Jungle Pod=
Primordial Jungle Root=
Primordial Jungle Roots=
Primordial Jungle Thorns=
Primordial Plant Matter=
Primordial Plant Matter with Footprint=
### jungle_tree.lua ###
Mossy Primordial Jungle Tree=
Phosphorescent Primordial Jungle Tree=
Phosphorescent Primordial Jungle Tree Leaves=
Primordial Jungle Tree=
Primordial Jungle Tree Leaves=
Primordial Jungle Tree Sapling=
### primordial_mushroom.lua ###
Glowing Primordial Mushroom Gills=
Primordial Cap Wood=
Primordial Mushroom Cap=
Primordial Mushroom Gills=
Primordial Mushroom Spawn=
Primordial Mushroom Trunk=
Primordial Mushroom Trunk Wood=

View File

@ -1,4 +1,4 @@
name = df_primordial_items
description = A collection of flora found in the "primordial" cavern layer of DF Caverns
depends = default, mapgen_helper, subterrane, df_underworld_items, df_trees
optional_depends = trail, df_farming
optional_depends = footprints, df_farming

View File

@ -4,25 +4,17 @@
### black_cap.lua ###
Black Cap=Cappello nero
Black Cap Gills=Lamelle di cappello nero
Black Cap Planks=Assi di cappello nero
Black Cap Spawn=Prole di cappello nero
Black Cap Stem=Gambo di cappello nero
### blood_thorn.lua ###
Blood Thorn Planks=Assi di spina del sangue
Blood Thorn Spike=Spuntone di spina del sangue
Blood Thorn Stem=Gambo di spina del sangue
Dead Blood Thorn Spike=Spuntone di spina del sangue morta
Dead Blood Thorn Stem=Gambo di spina del sangue morta
### doc.lua ###
@ -46,11 +38,8 @@ Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes
Living blood thorn spikes remain harmful to creatures that touch them. If killed by bright light, they cause only passive damage to creatures that fall on them (as one would expect from an enormous spike).=
Living extract from the cap of a cyan Spindlestem.=
Living extract from the cap of a green Spindlestem.=
Living extract from the cap of a red Spindlestem.=
Living extract from the cap of a yellow Spindlestem.=
Massive but squat, mature goblin cap mushrooms are the size of small cottages.=
@ -101,108 +90,74 @@ Tunnel tubes are hollow, curved fungal growths that support a fruiting body.=
When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.=
### fungiwood.lua ###
Fungiwood Planks=Assi di fungo di legno
Fungiwood Shelf=Mensola di fungo di legno
Fungiwood Spawn=Prole di fungo di legno
Fungiwood Stem=Gambo di fungo di legno
### goblin_cap.lua ###
Goblin Cap=Cappello di folletto
Goblin Cap Gills=Lamelle di cappello di folletto
Goblin Cap Planks=Assi di cappello di folletto
Goblin Cap Spawn=Prole di cappello di folletto
Goblin Cap Stem=Gambo di cappello di folletto
Goblin Cap Stem Planks=Assi di gambo di cappello di folletto
### init.lua ###
@1 Slab=
@1 Stair=
### nether_cap.lua ###
Nether Cap=Cappello del Nether
Nether Cap Gills=Lamelle di cappello del Nether
Nether Cap Planks=Assi di cappello del Nether
Nether Cap Spawn=Prole di cappello del Nether
Nether Cap Stem=Gambo di cappello del Nether
### spindlestem.lua ###
@1 Spindlestem Cap=
@1 Spindlestem Extract=
Cyan=
Golden=
Green=
Red=
Spindlestem=
Spindlestem Spawn=Prole di albero delle spore
White=
### spore_tree.lua ###
Spore Tree Fruiting Body=Corpo fruttifero dell'albero delle spore
Spore Tree Hyphae=Ife di albero delle spore
Spore Tree Ladder=Ife di albero delle spore
Spore Tree Planks=Assi di albero delle spore
Spore Tree Spawn=Prole di albero delle spore
Spore Tree Stem=Gambo di albero delle spore
### torchspine.lua ###
Torchspine=
Torchspine Ember=
Torchspine Tip=
### tower_cap.lua ###
Tower Cap=Cappello a torre
Tower Cap Gills=Lamelle di cappello a torre
Tower Cap Planks=Assi di cappello a torre
Tower Cap Spawn=Prole di cappello a torre
Tower Cap Stem=Gambo di cappello a torre
### tunnel_tube.lua ###
Tunnel Tube=Tubo di galleria
Tunnel Tube Fruiting Body=Corpo fruttifero del tubo di galleria
Tunnel Tube Plies=Strati di tubo di galleria
Tunnel Tube Spawn=Prole di tubo di galleria

View File

@ -4,25 +4,17 @@
### black_cap.lua ###
Black Cap=
Black Cap Gills=
Black Cap Planks=
Black Cap Spawn=
Black Cap Stem=
### blood_thorn.lua ###
Blood Thorn Planks=
Blood Thorn Spike=
Blood Thorn Stem=
Dead Blood Thorn Spike=
Dead Blood Thorn Stem=
### doc.lua ###
@ -46,11 +38,8 @@ Green Spindlestems are a sign of nearby copper deposits. Their glowing symbiotes
Living blood thorn spikes remain harmful to creatures that touch them. If killed by bright light, they cause only passive damage to creatures that fall on them (as one would expect from an enormous spike).=
Living extract from the cap of a cyan Spindlestem.=
Living extract from the cap of a green Spindlestem.=
Living extract from the cap of a red Spindlestem.=
Living extract from the cap of a yellow Spindlestem.=
Massive but squat, mature goblin cap mushrooms are the size of small cottages.=
@ -101,108 +90,74 @@ Tunnel tubes are hollow, curved fungal growths that support a fruiting body.=
When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.=
### fungiwood.lua ###
Fungiwood Planks=
Fungiwood Shelf=
Fungiwood Spawn=
Fungiwood Stem=
### goblin_cap.lua ###
Goblin Cap=
Goblin Cap Gills=
Goblin Cap Planks=
Goblin Cap Spawn=
Goblin Cap Stem=
Goblin Cap Stem Planks=
### init.lua ###
@1 Slab=
@1 Stair=
### nether_cap.lua ###
Nether Cap=
Nether Cap Gills=
Nether Cap Planks=
Nether Cap Spawn=
Nether Cap Stem=
### spindlestem.lua ###
@1 Spindlestem Cap=
@1 Spindlestem Extract=
Cyan=
Golden=
Green=
Red=
Spindlestem=
Spindlestem Spawn=
White=
### spore_tree.lua ###
Spore Tree Fruiting Body=
Spore Tree Hyphae=
Spore Tree Ladder=
Spore Tree Planks=
Spore Tree Spawn=
Spore Tree Stem=
### torchspine.lua ###
Torchspine=
Torchspine Ember=
Torchspine Tip=
### tower_cap.lua ###
Tower Cap=
Tower Cap Gills=
Tower Cap Planks=
Tower Cap Spawn=
Tower Cap Stem=
### tunnel_tube.lua ###
Tunnel Tube=
Tunnel Tube Fruiting Body=
Tunnel Tube Plies=
Tunnel Tube Spawn=

View File

@ -27,6 +27,7 @@ These stones are highly volatile and should not be disturbed.=
This block of Slade, carved by an unknown hand, is engraved with mysterious symbols. Most of the engraving's meaning is lost to the mists of time but one frament in the oldest known language can be translated: "This place is not a place of honor."=
### glow_stone.lua ###
Lightseam=
@ -38,35 +39,21 @@ Glowing Pit Plasma=
### puzzle_seal.lua ###
Active Slade Breacher=
Breach in the Slade=
Inscribed Slade Block=
Slade Block Slab=
Slade Block Stair=
Slade Capstone=
Slade Puzzle Seal=
Turn=
### slade.lua ###
Slade=
Slade Block=
Slade Brick=
Slade Sand=
Slade Seal=
Slade Slab=
Slade Stair=
Slade Wall=

31
i18n.py
View File

@ -25,7 +25,10 @@ options = {"recursive": ['--recursive', '-r'],
"verbose": ['--verbose', '-v']
}
# Strings longer than this will have extra space added between
# them in the translation files to make it easier to distinguish their
# beginnings and endings at a glance
doublespace_threshold = 60
def set_params_folders(tab: list):
'''Initialize params["folders"] from CLI arguments.'''
@ -52,12 +55,12 @@ def print_help(name):
print(f'''SYNOPSIS
{name} [OPTIONS] [PATHS...]
DESCRIPTION
{' ,'.join(options["help"])}
{', '.join(options["help"])}
prints this help message
{' ,'.join(options["recursive"])}
{', '.join(options["recursive"])}
run on all subfolders of paths given
{' ,'.join(options["mods"])}
run on installed locally installed modules
{', '.join(options["mods"])}
run on locally installed modules
{', '.join(options["verbose"])}
add output information
''')
@ -128,7 +131,7 @@ def get_modname(folder):
#If there are already .tr files in /locale, returns a list of their names
def get_existing_tr_files(folder):
out = []
for root, dirs, files in os.walk(os.path.join(folder + '/locale/')):
for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
for name in files:
if pattern_tr_filename.search(name):
out.append(name)
@ -215,18 +218,23 @@ def strings_to_text(dkeyStrings, dOld, mod_name):
lSourceKeys = list(dGroupedBySource.keys())
lSourceKeys.sort()
for source in lSourceKeys:
lOut.append("")
localizedStrings = dGroupedBySource[source]
localizedStrings.sort()
lOut.append("")
lOut.append(source)
lOut.append("")
for localizedString in localizedStrings:
lOut.append("")
val = dOld.get(localizedString, {})
translation = val.get("translation", "")
comment = val.get("comment")
if len(localizedString) > doublespace_threshold and not lOut[-1] == "":
lOut.append("")
if comment != None:
lOut.append(comment)
lOut.append(f"{localizedString}={translation}")
if len(localizedString) > doublespace_threshold:
lOut.append("")
unusedExist = False
for key in dOld:
@ -239,11 +247,14 @@ def strings_to_text(dkeyStrings, dOld, mod_name):
if translation != None and (translation != "" or comment):
if not unusedExist:
unusedExist = True
lOut.append("\n\n##### not used anymore #####")
lOut.append("")
lOut.append("\n\n##### not used anymore #####\n")
if len(key) > doublespace_threshold and not lOut[-1] == "":
lOut.append("")
if comment != None:
lOut.append(comment)
lOut.append(f"{key}={translation}")
if len(key) > doublespace_threshold:
lOut.append("")
return "\n".join(lOut) + '\n'
# Writes a template.txt file

View File

@ -4,11 +4,8 @@
### init.lua ###
A bottle containing a captured ice sprite.=
Hidden Ice Sprite=
Ice Sprite=
Ice Sprite in a Bottle=
Ice sprites are mysterious glowing insect-like creatures that appear to be made partly of crystallized water.=

View File

@ -10,13 +10,13 @@ Gas is highly hazardous. Heavier than air, it pools in deep caverns and asphyxia
Gaseous hydrocarbons formed from the detritus of long dead plants and animals processed by heat and pressure deep within the earth.=
Mine Gas=
Mining out such a deposit seals the crack.=
Some coal deposits have cracks that seep a steady flow of mine gas.=
When exposed to air and an ignition source it can produce a deadly explosion.=
### wisp.lua ###
Gas Wisp=
@ -24,3 +24,4 @@ Gas Wisp=
Gas Wisps have no known use, and fortunately they are not hostile or very dangerous.=
Mysterious blue flames may occasionally be found flickering on the edges of oil lakes, burning without oxygen and seeming to maintain their size as they drift about through the unbreathable atmosphere.=

View File

@ -4,11 +4,9 @@
### init.lua ###
Buckets of oil can be used as fuel.=
Flowing Oil=
Liquid hydrocarbons formed from the detritus of long dead plants and animals processed by heat and pressure deep within the earth.=
Oil=
Oil Bucket=

@ -1 +1 @@
Subproject commit ded00262aa1ab6414e185b768fc581830f742eee
Subproject commit 561b121bc04ac364a1a8e80f57f0805a5dafb1e5