From 67078ba3b18697a3eb0a0d3d5e30a9bf8f13d032 Mon Sep 17 00:00:00 2001 From: PrairieWind Date: Sat, 17 Jun 2023 10:01:45 -0600 Subject: [PATCH] Fix most of the feedback issues in cherry blossoms --- mods/ENTITIES/mcl_boats/locale/template.txt | 2 ++ mods/ITEMS/REDSTONE/mesecons_button/init.lua | 10 +++++++- .../mesecons_button/locale/template.txt | 1 + .../REDSTONE/mesecons_pressureplates/init.lua | 9 ++++--- mods/ITEMS/mcl_cherry_blossom/growth.lua | 17 +++++-------- .../mcl_cherry_blossom/locale/template.txt | 24 ++++++++++++++++++ mods/ITEMS/mcl_cherry_blossom/nodes.lua | 17 +++++-------- mods/ITEMS/mcl_doors/api_doors.lua | 4 +-- ...> mcl_cherry_blossom_door_bottom_side.png} | Bin ...g => mcl_cherry_blossom_door_top_side.png} | Bin 10 files changed, 57 insertions(+), 27 deletions(-) create mode 100644 mods/ITEMS/mcl_cherry_blossom/locale/template.txt rename textures/{mcl_cherry_blossom_door_side_bottom.png => mcl_cherry_blossom_door_bottom_side.png} (100%) rename textures/{mcl_cherry_blossom_door_side_top.png => mcl_cherry_blossom_door_top_side.png} (100%) diff --git a/mods/ENTITIES/mcl_boats/locale/template.txt b/mods/ENTITIES/mcl_boats/locale/template.txt index 16c8b681e..c3919e8b9 100644 --- a/mods/ENTITIES/mcl_boats/locale/template.txt +++ b/mods/ENTITIES/mcl_boats/locale/template.txt @@ -12,6 +12,7 @@ Water vehicle= Sneak to dismount= Obsidian Boat= Mangrove Boat= +Cherry Boat= Oak Chest Boat= Spruce Chest Boat= Birch Chest Boat= @@ -19,3 +20,4 @@ Jungle Chest Boat= Acacia Chest Boat= Dark Oak Chest Boat= Mangrove Chest Boat= +Cherry Chest Boat= \ No newline at end of file diff --git a/mods/ITEMS/REDSTONE/mesecons_button/init.lua b/mods/ITEMS/REDSTONE/mesecons_button/init.lua index d6281b5c8..275cac2e2 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_button/init.lua @@ -104,6 +104,14 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou end button_sounds["mesecons_button:button_"..basename.."_off"] = button_sound + if not longdesc then + if groups_off.material_wood ~= 0 then + longdesc = S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.") + else + longdesc = S("A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.", button_timer) + end + end + if push_by_arrow then groups_off.button_push_by_arrow = 1 groups_on.button_push_by_arrow = 1 @@ -252,7 +260,7 @@ for w=1, #woods do {material_wood=1,handy=1,axey=1}, 1.5, true, - S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows."), + nil, "mesecons_button_push_wood") minetest.register_craft({ diff --git a/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt index 4fb2bc19d..d42a03741 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt +++ b/mods/ITEMS/REDSTONE/mesecons_button/locale/template.txt @@ -17,3 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to Provides redstone power when pushed= Push duration: @1s= Pushable by arrow= +A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.= diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua index 41cc8211a..a4043fb5f 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua @@ -153,7 +153,11 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te groups_on.not_in_creative_inventory = 1 groups_on.pressure_plate = 2 if not longdesc then - longdesc = S("A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.") + if groups_off.material_wood ~= 0 then + longdesc = S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.") + else + longdesc = S("A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.") + end end local tt = S("Provides redstone power when pushed") if not activated_by then @@ -238,8 +242,7 @@ for w=1, #woods do {{woods[w][2], woods[w][2]}}, mcl_sounds.node_sound_wood_defaults(), {axey=1, material_wood=1}, - nil, - S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + nil) minetest.register_craft({ type = "fuel", diff --git a/mods/ITEMS/mcl_cherry_blossom/growth.lua b/mods/ITEMS/mcl_cherry_blossom/growth.lua index def5745ee..28cedea28 100644 --- a/mods/ITEMS/mcl_cherry_blossom/growth.lua +++ b/mods/ITEMS/mcl_cherry_blossom/growth.lua @@ -8,11 +8,11 @@ function mcl_cherry_blossom.generate_cherry_tree(pos) if mcl_core.check_growth_width(pos,7,8) then minetest.set_node(pos, {name = "air"}) if r == 1 then - minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, path, "random", nil, false) + minetest.place_schematic(vector.offset(pos, -2, 0, -2), path, "random", nil, false) elseif r == 2 then - minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, path, nil, nil, false) + minetest.place_schematic(vector.offset(pos, -2, 0, -2), path, nil, nil, false) elseif r == 3 then - minetest.place_schematic({x = pos.x-3, y = pos.y, z = pos.z-3}, path, nil, nil, false) + minetest.place_schematic(vector.offset(pos, -3, 0, -3), path, nil, nil, false) end end end @@ -28,10 +28,12 @@ minetest.register_abm({ }) local cherry_particle = { - velocity = vector.new(0,0,0), + velocity = vector.zero(), + acceleration = vector.new(0,-1,0), size = math.random(1.3,2.5), texture = "mcl_cherry_blossom_particle.png", collision_removal = false, + collisiondetection = false, } @@ -43,14 +45,9 @@ minetest.register_abm({ action = function(pos, node) minetest.after(math.random(0.1,1.5),function() local pt = table.copy(cherry_particle) - pt.acceleration = vector.new(0,0,0) - pt.collisiondetection = false pt.pos = vector.offset(pos,math.random(-0.5,0.5),-0.51,math.random(-0.5,0.5)) + pt.expirationtime = math.random(1.2,4.5) minetest.add_particle(pt) - pt.acceleration = vector.new(0,-1,0) - pt.collisiondetection = true - pt.expirationtime = math.random(1.2,4.5) - minetest.add_particle(pt) end) end }) diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/template.txt b/mods/ITEMS/mcl_cherry_blossom/locale/template.txt new file mode 100644 index 000000000..caa72ec97 --- /dev/null +++ b/mods/ITEMS/mcl_cherry_blossom/locale/template.txt @@ -0,0 +1,24 @@ +# textdomain: mcl_cherry_blossom +Cherry Log= +The trunk of an cherry blossom tree.= +Stripped Cherry Log= +The stripped trunk of an cherry blossom tree.= +Cherry Bark= +This is a decorative block surrounded by the bark of a tree trunk.= +Stripped Cherry Wood= +The stripped wood of an cherry blossom tree.= +Cherry Wood Planks= +Cherry Leaves= +Cherry blossom leaves are grown from cherry blossom trees.= +Cherry Sapling= +Cherry blossom sapling can be planted to grow cherry trees.= +Cherry Door= +Cherry Trapdoor= +Cherry Stairs= +Cherry Slab= +Double Cherry Slab= +Cherry Sign= +Cherry Fence= +Cherry Gate= +Cherry Pressure Plate= +Cherry Button= diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 4b49eae28..5cb01c70f 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -146,7 +146,7 @@ minetest.register_node("mcl_cherry_blossom:cherryleaves" .. "_orphan", o_def) minetest.register_node("mcl_cherry_blossom:cherrysapling", { description = S("Cherry Sapling"), _tt_help = tt_help, - _doc_items_longdesc = S("Cherry blossom sapling can be planted to grow cherry trees"), + _doc_items_longdesc = S("Cherry blossom sapling can be planted to grow cherry trees."), _doc_items_hidden = false, drawtype = "plantlike", waving = 1, @@ -189,21 +189,17 @@ minetest.register_node("mcl_cherry_blossom:cherrysapling", { -- Door and Trapdoor mcl_doors:register_door("mcl_cherry_blossom:cherrydoor", { description = S("Cherry Door"), - _doc_items_longdesc = S("Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal."), - _doc_items_usagehelp = S("To open or close a wooden door, rightclick it or supply its lower half with a redstone signal."), inventory_image = "mcl_cherry_blossom_door_inv.png", groups = {handy=1,axey=1, material_wood=1, flammable=-1}, _mcl_hardness = 3, _mcl_blast_resistance = 3, - tiles_bottom = {"mcl_cherry_blossom_door_bottom.png", "mcl_cherry_blossom_door_side_bottom.png"}, - tiles_top = {"mcl_cherry_blossom_door_top.png", "mcl_cherry_blossom_door_side_top.png"}, + tiles_bottom = "mcl_cherry_blossom_door_bottom.png", + tiles_top = "mcl_cherry_blossom_door_top.png", sounds = mcl_sounds.node_sound_wood_defaults(), }) mcl_doors:register_trapdoor("mcl_cherry_blossom:cherrytrapdoor", { description = S("Cherry Trapdoor"), - _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), - _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), tile_front = "mcl_cherry_blossom_trapdoor.png", tile_side = "mcl_cherry_blossom_trapdoor_side.png", wield_image = "mcl_cherry_blossom_trapdoor.png", @@ -230,7 +226,7 @@ mcl_stairs.register_slab("cherrywood", "mcl_cherry_blossom:cherrywood", -- Signs mcl_signs.register_sign_custom("mcl_cherry_blossom", "cherrywood", "mcl_cherry_blossom_sign.png", nil, - "mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", "Cherry Sign") + "mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("Cherry Sign")) -- Fences & Gates mcl_fences.register_fence_and_fence_gate("cherry_fence", S("Cherry Fence"), S("Cherry Gate"), @@ -248,8 +244,7 @@ mesecon.register_pressure_plate( {{"mcl_cherry_blossom:cherrywood", "mcl_cherry_blossom:cherrywood"}}, mcl_sounds.node_sound_wood_defaults(), {axey=1, material_wood=1}, - nil, - S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + nil) mesecon.register_button( "cherrywood", @@ -260,5 +255,5 @@ mesecon.register_button( {material_wood=1,handy=1,axey=1}, 1.5, true, - S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows."), + nil, "mesecons_button_push_wood") diff --git a/mods/ITEMS/mcl_doors/api_doors.lua b/mods/ITEMS/mcl_doors/api_doors.lua index ac9708b4f..e392bc710 100644 --- a/mods/ITEMS/mcl_doors/api_doors.lua +++ b/mods/ITEMS/mcl_doors/api_doors.lua @@ -66,9 +66,9 @@ function mcl_doors:register_door(name, def) longdesc = def._doc_items_longdesc if not longdesc then if def.only_redstone_can_open then - longdesc = S("This door is a 2-block high barrier which can be opened or closed by hand or by redstone power.") - else longdesc = S("This door is a 2-block high barrier which can only be opened by redstone power, not by hand.") + else + longdesc = S("This door is a 2-block high barrier which can be opened or closed by hand or by redstone power.") end end usagehelp = def._doc_items_usagehelp diff --git a/textures/mcl_cherry_blossom_door_side_bottom.png b/textures/mcl_cherry_blossom_door_bottom_side.png similarity index 100% rename from textures/mcl_cherry_blossom_door_side_bottom.png rename to textures/mcl_cherry_blossom_door_bottom_side.png diff --git a/textures/mcl_cherry_blossom_door_side_top.png b/textures/mcl_cherry_blossom_door_top_side.png similarity index 100% rename from textures/mcl_cherry_blossom_door_side_top.png rename to textures/mcl_cherry_blossom_door_top_side.png