From b33867625888fd990d1cbb20d1acec02d144f2b4 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Mon, 28 Nov 2022 15:46:55 -0500 Subject: [PATCH] Update licensing --- .cdb.json | 2 +- LICENSE.txt | 65 ++++++------------------------------------- README.md | 2 +- api.lua | 18 ++++++++++++ arrow.lua | 18 ++++++++++++ init.lua | 19 +++++++++++-- items.lua | 18 ++++++++++++ mod.conf | 2 +- nodes.lua | 18 ++++++++++++ particle_effects.lua | 18 ++++++++++++ scripts/deploy.js | 18 ++++++++++++ scripts/lls-check.js | 18 ++++++++++++ types/entity.type.lua | 1 + types/node.type.lua | 1 + 14 files changed, 157 insertions(+), 61 deletions(-) diff --git a/.cdb.json b/.cdb.json index 1c34ee0..74d5ca1 100644 --- a/.cdb.json +++ b/.cdb.json @@ -2,7 +2,7 @@ "type": "MOD", "title": "X Bows", "name": "x_bows", - "short_description": "Adds bow and arrows to Minetest.", + "short_description": "Adds bow and arrows with API.", "dev_state": "MAINTENANCE_ONLY", "tags": [ "pvp", diff --git a/LICENSE.txt b/LICENSE.txt index f166cc5..bce588e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,8 +1,7 @@ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 2022 SaKeL Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -55,7 +54,7 @@ modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a @@ -111,7 +110,7 @@ modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -158,7 +157,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -216,7 +215,7 @@ instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -267,7 +266,7 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -329,7 +328,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -370,7 +369,7 @@ subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -422,7 +421,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -454,49 +453,3 @@ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! \ No newline at end of file diff --git a/README.md b/README.md index 76c4d88..8bffdde 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Bow and Arrows [x_bows] -Adds bow and arrows to Minetest. The goal of this Mod is to make most complete single bow with arrow what will work with MTG damage system, time from last punch as simple as possible. Eventually due to the damage tiers in MTG additional arrows were added. +Adds bow and arrows with API. The goal of this Mod is to make most complete single bow with arrow what will work with MTG damage system, time from last punch as simple as possible. Eventually due to the damage tiers in MTG additional arrows were added. ![screenshot](screenshot.1.png) diff --git a/api.lua b/api.lua index 53c7c9f..58ee320 100644 --- a/api.lua +++ b/api.lua @@ -1,3 +1,21 @@ +--[[ + X Bows. Adds bow and arrows with API. + Copyright (C) 2022 SaKeL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to juraj.vajda@gmail.com +--]] + local S = minetest.get_translator(minetest.get_current_modname()) sfinv = sfinv --[[@as Sfinv]] diff --git a/arrow.lua b/arrow.lua index 9c556ef..e2b4000 100644 --- a/arrow.lua +++ b/arrow.lua @@ -1,3 +1,21 @@ +--[[ + X Bows. Adds bow and arrows with API. + Copyright (C) 2022 SaKeL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to juraj.vajda@gmail.com +--]] + XBows:register_entity('arrow_entity', { initial_properties = { visual = 'mesh', diff --git a/init.lua b/init.lua index dd150aa..e68f8d1 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,20 @@ --- X Bows --- by SaKeL +--[[ + X Bows. Adds bow and arrows with API. + Copyright (C) 2022 SaKeL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to juraj.vajda@gmail.com +--]] minetest = minetest.global_exists('minetest') and minetest --[[@as Minetest]] ItemStack = minetest.global_exists('ItemStack') and ItemStack --[[@as ItemStack]] diff --git a/items.lua b/items.lua index 1216f8b..13685de 100644 --- a/items.lua +++ b/items.lua @@ -1,3 +1,21 @@ +--[[ + X Bows. Adds bow and arrows with API. + Copyright (C) 2022 SaKeL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to juraj.vajda@gmail.com +--]] + local S = minetest.get_translator(minetest.get_current_modname()) XBows:register_bow('bow_wood', { diff --git a/mod.conf b/mod.conf index 2963336..4befe04 100644 --- a/mod.conf +++ b/mod.conf @@ -1,5 +1,5 @@ name = x_bows -description = Adds bow and arrows to Minetest. +description = Adds bow and arrows with API. depends = optional_depends = default, farming, 3d_armor, mesecons, playerphysics, player_monoids, wool, i3, unified_inventory, simple_skins, u_skins, wardrobe, sfinv, skinsdb, player_api supported_games = minetest_game diff --git a/nodes.lua b/nodes.lua index 7d13d18..29a4859 100644 --- a/nodes.lua +++ b/nodes.lua @@ -1,3 +1,21 @@ +--[[ + X Bows. Adds bow and arrows with API. + Copyright (C) 2022 SaKeL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to juraj.vajda@gmail.com +--]] + local S = minetest.get_translator(minetest.get_current_modname()) minetest.register_node('x_bows:target', { diff --git a/particle_effects.lua b/particle_effects.lua index e32b2d8..a0621f7 100644 --- a/particle_effects.lua +++ b/particle_effects.lua @@ -1,3 +1,21 @@ +--[[ + X Bows. Adds bow and arrows with API. + Copyright (C) 2022 SaKeL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to juraj.vajda@gmail.com +--]] + XBows:register_particle_effect('arrow', { amount = 1, time = 0.1, diff --git a/scripts/deploy.js b/scripts/deploy.js index 1581d27..2faa964 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -1,3 +1,21 @@ +/** + * Deploy code to CDB + * Copyright (C) 2022 SaKeL + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to juraj.vajda@gmail.com + */ + import fetch from 'node-fetch' import yargs from 'yargs/yargs' import {hideBin} from 'yargs/helpers' diff --git a/scripts/lls-check.js b/scripts/lls-check.js index 2d4fa7d..d4a74d3 100644 --- a/scripts/lls-check.js +++ b/scripts/lls-check.js @@ -1,3 +1,21 @@ +/** + * Run LUA diagnostics in continuous integration + * Copyright (C) 2022 SaKeL + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to juraj.vajda@gmail.com + */ + import * as path from 'node:path' import * as fs from 'node:fs' import {exec} from 'node:child_process' diff --git a/types/entity.type.lua b/types/entity.type.lua index bb2c9c3..37e8092 100644 --- a/types/entity.type.lua +++ b/types/entity.type.lua @@ -14,3 +14,4 @@ ---@field on_detach_child fun(self: table, child: ObjectRef): nil Function receive a "luaentity" table as `self`. `child`: an `ObjectRef` of the child that detaches ---@field on_detach fun(self: table, parent: ObjectRef|nil): nil Function receive a "luaentity" table as `self`. `parent`: an `ObjectRef` (can be `nil`) from where it got detached. This happens before the parent object is removed from the world. ---@field get_staticdata fun(self: table) Function receive a "luaentity" table as `self`. Should return a string that will be passed to `on_activate` when the object is instantiated the next time. +---@field drops table Custom for mob drops diff --git a/types/node.type.lua b/types/node.type.lua index b635dee..d2db139 100644 --- a/types/node.type.lua +++ b/types/node.type.lua @@ -20,6 +20,7 @@ ---@field walkable boolean If true, objects collide with node. ---@field after_dig_node fun(pos: Vector, oldnode: NodeDef, oldmetadata: table, digger: ObjectRef): nil oldmetadata is in table format. Called after destructing node when node was dug using minetest.node_dig / minetest.dig_node., default: nil ---@field paramtype2 string +---@field palette string Image ---Textures of node; +Y, -Y, +X, -X, +Z, -Z. List can be shortened to needed length. ---@class NodeTilesDef