From 52ae408d4ad7df4b39e6642ea6c9b57fb03cbfef Mon Sep 17 00:00:00 2001 From: olive Date: Tue, 22 Oct 2024 02:32:32 +0100 Subject: [PATCH] CRLF to LF --- LICENSE.txt | 56 ++++++++++++++++++------------------ init.lua | 82 ++++++++++++++++++++++++++--------------------------- mod.conf | 6 ++-- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d239649..047b849 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,28 +1,28 @@ - -License for Code ----------------- - -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -License for Textures ---------------------------------------- - -All textures are licensed under CC-BY-SA 4.0 + +License for Code +---------------- + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +License for Textures +--------------------------------------- + +All textures are licensed under CC-BY-SA 4.0 diff --git a/init.lua b/init.lua index b46ffce..44c7353 100644 --- a/init.lua +++ b/init.lua @@ -1,41 +1,41 @@ -local function get_moth_formspec() - return "size[10,10]".. - "field[1,1;8,1;target;Recipent: ;name]".. - "textarea[1,3;8,5;message;Message: ;Help me!]".. - "button_exit[1,8;5,1;send;Fly Away...]" -end -minetest.register_node("moth:moth", { - description = "Moth", - inventory_image = "moth_img.png", - wield_image = "moth_img.png", - paramtype = "light", - sunlight_propagates = true, - drawtype = "plantlike", - walkable = false, - tiles = {{ - name = "moth.png", - animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1} - }}, - groups = {oddly_breakable_by_hand=3}, - on_use = function(itemstack, player, pointed_thing) - minetest.show_formspec(player:get_player_name(), "moth_send", get_moth_formspec()) - end -}) -minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname == "moth_send" then - if fields.send then - local inv = player:get_inventory() - inv:remove_item("main", "moth:moth") - local rec = minetest.get_player_by_name(fields.target) - if rec then - local pos = rec:get_pos() - pos.y = pos.y + 1 - minetest.set_node(pos, {name = "moth:moth"}) - minetest.show_formspec(rec:get_player_name(), "moth_show", "size[10,10]".."label[0.5,0.5;A moth whispers to you...]".."label[0.5,1;(From "..minetest.formspec_escape(player:get_player_name())..")".."]".."textarea[0.5,2.5;7.5,7;;" ..minetest.formspec_escape(fields.message) .. ";]") - end - end - end -end) -if minetest.get_modpath("flowers") then - minetest.override_item("flowers:dandelion_white", {on_use = function(itemstack, player, pointed_thing) minetest.set_node(player:get_pos(), {name = "moth:moth"}) end}) -end \ No newline at end of file +local function get_moth_formspec() + return "size[10,10]".. + "field[1,1;8,1;target;Recipent: ;name]".. + "textarea[1,3;8,5;message;Message: ;Help me!]".. + "button_exit[1,8;5,1;send;Fly Away...]" +end +minetest.register_node("moth:moth", { + description = "Moth", + inventory_image = "moth_img.png", + wield_image = "moth_img.png", + paramtype = "light", + sunlight_propagates = true, + drawtype = "plantlike", + walkable = false, + tiles = {{ + name = "moth.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1} + }}, + groups = {oddly_breakable_by_hand=3}, + on_use = function(itemstack, player, pointed_thing) + minetest.show_formspec(player:get_player_name(), "moth_send", get_moth_formspec()) + end +}) +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname == "moth_send" then + if fields.send then + local inv = player:get_inventory() + inv:remove_item("main", "moth:moth") + local rec = minetest.get_player_by_name(fields.target) + if rec then + local pos = rec:get_pos() + pos.y = pos.y + 1 + minetest.set_node(pos, {name = "moth:moth"}) + minetest.show_formspec(rec:get_player_name(), "moth_show", "size[10,10]".."label[0.5,0.5;A moth whispers to you...]".."label[0.5,1;(From "..minetest.formspec_escape(player:get_player_name())..")".."]".."textarea[0.5,2.5;7.5,7;;" ..minetest.formspec_escape(fields.message) .. ";]") + end + end + end +end) +if minetest.get_modpath("flowers") then + minetest.override_item("flowers:dandelion_white", {on_use = function(itemstack, player, pointed_thing) minetest.set_node(player:get_pos(), {name = "moth:moth"}) end}) +end diff --git a/mod.conf b/mod.conf index b20649b..8d4b975 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,3 @@ -name = moth -description = Adds moths which can send messages (from Lord of the Rings) -optional_depends = flowers \ No newline at end of file +name = moth +description = Adds moths which can send messages (from Lord of the Rings) +optional_depends = flowers