diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..7504c0e --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,94 @@ +# Licensing and credits for Pride Flags Mod + +Source Code License +---------------------------------------------------------- + +GNU Lesser General Public License v3 (LGPL-3.0) + +Copyright (c) 2022, Leslie E. Krause and Wuzzy + +This program 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 3 of the License, or (at your option) any later version. + +This program 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. + +http://www.gnu.org/licenses/lgpl-3.0.html + + +Multimedia License (textures, sounds, and models) +---------------------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) + + /models/pride_flags_mast_lower.obj + by sorcerykid + + /models/pride_flags_mast_upper.obj + by sorcerykid + + /models/pride_flags_wavingflag.b3d + by sorcerykid + + /textures/pride_flags_baremetal.png + by sorcerykid + + /sounds/pride_flags_flagwave1.ogg + by Chelly01 + obtained from https://freesound.org/people/Chelly01/sounds/541088/ + modified by sorcerykid + + /sounds/pride_flags_flagwave2.ogg + by Chelly01 + obtained from https://freesound.org/people/Chelly01/sounds/541088/ + modified by sorcerykid + + /sounds/pride_flags_flagwave3.ogg + by Chelly01 + obtained from https://freesound.org/people/Chelly01/sounds/541088/ + modified by sorcerykid + + Pride flags: + All pride flags have a name like "/textures/prideflag_.png", + where is the pride flag name. For example, the rainbow flag + is "/textures/prideflag_rainbow.png". These are the current pride flags: + + asexual, bisexual, rainbow, gendercreative, genderfluid, genderqueer, + lesbian, nonbinary, pansexual, polysexual, transgender: + by sorcerykid + + aromantic, grayromantic, demiromantic, graysexual, demisexual, omnisexual, + homoromantic, biromantic, panromantic, polyromantic, omniromantic, + vincian, agender, demigender, androgyne, multigender, + intersex, polyamorous, queer, maverique, neutrois, multigender, polygender: + by Wuzzy + + progress + by Edgy1 + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/README.txt b/README.txt index 82b9ca9..252126a 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -Pride Flags Mod v2.0 +Pride Flags Mod v2.1.0 By Leslie E. Krause and Wuzzy Pride Flags adds a variety of animated flags to celebrate Pride in Minetest. @@ -29,8 +29,10 @@ List of flags -------------------- These flags are available: -* Orientations (sexual, romantic or other) +* Broader community: * Gay/LGBTQ+ (rainbow flag) + * Progress Pride +* Orientations (sexual, romantic or other) * Lesbian * Vincian * Sexual orientations @@ -93,92 +95,11 @@ Installation 1) Unzip the archive into the mods directory of your game. 2) Rename the pride_flags-master directory to "pride_flags". -Source Code License +License/Credits ---------------------------------------------------------- -GNU Lesser General Public License v3 (LGPL-3.0) +This mod is free software. +The source code is licensed under the LGPLv3. +The media is licensed under CC BY-SA 3.0. -Copyright (c) 2022, Leslie E. Krause and Wuzzy - -This program 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 3 of the License, or (at your option) any later version. - -This program 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. - -http://www.gnu.org/licenses/lgpl-2.1.html - - -Multimedia License (textures, sounds, and models) ----------------------------------------------------------- - -Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) - - /models/pride_flags_mast_lower.obj - by sorcerykid - - /models/pride_flags_mast_upper.obj - by sorcerykid - - /models/pride_flags_wavingflag.b3d - by sorcerykid - - /textures/pride_flags_baremetal.png - by sorcerykid - - /sounds/pride_flags_flagwave1.ogg - by Chelly01 - obtained from https://freesound.org/people/Chelly01/sounds/541088/ - modified by sorcerykid - - /sounds/pride_flags_flagwave2.ogg - by Chelly01 - obtained from https://freesound.org/people/Chelly01/sounds/541088/ - modified by sorcerykid - - /sounds/pride_flags_flagwave3.ogg - by Chelly01 - obtained from https://freesound.org/people/Chelly01/sounds/541088/ - modified by sorcerykid - - Pride flags: - All pride flags have a name like "/textures/prideflag_.png", - where is the pride flag name. For example, the rainbow flag - is "/textures/prideflag_rainbow.png". These are the current pride flags: - - asexual, bisexual, rainbow, gendercreative, genderfluid, genderqueer, - lesbian, nonbinary, pansexual, polysexual, transgender: - by sorcerykid - - aromantic, grayromantic, demiromantic, graysexual, demisexual, omnisexual, - homoromantic, biromantic, panromantic, polyromantic, omniromantic, - vincian, agender, demigender, androgyne, multigender, - intersex, polyamorous, queer, maverique, neutrois, multigender, polygender: - by Wuzzy - -You are free to: -Share — copy and redistribute the material in any medium or format. -Adapt — remix, transform, and build upon the material for any purpose, even commercially. -The licensor cannot revoke these freedoms as long as you follow the license terms. - -Under the following terms: - -Attribution — You must give appropriate credit, provide a link to the license, and -indicate if changes were made. You may do so in any reasonable manner, but not in any way -that suggests the licensor endorses you or your use. - -No additional restrictions — You may not apply legal terms or technological measures that -legally restrict others from doing anything the license permits. - -Notices: - -You do not have to comply with the license for elements of the material in the public -domain or where your use is permitted by an applicable exception or limitation. -No warranties are given. The license may not give you all of the permissions necessary -for your intended use. For example, other rights such as publicity, privacy, or moral -rights may limit how you use the material. - -For more details: -http://creativecommons.org/licenses/by-sa/3.0/ +See LICENSE.txt for details and credits. diff --git a/init.lua b/init.lua index cb9b27d..a3d6b13 100644 --- a/init.lua +++ b/init.lua @@ -25,7 +25,8 @@ local rad_90 = pi / 2 local DEFAULT_FLAG = "rainbow" -- Flag list for the old number-based storing of flags, used up to --- 8fd4f9661e123bc84c0499c4809537e8aeb24c3b. Do not change this list! +-- 8fd4f9661e123bc84c0499c4809537e8aeb24c3b. +-- DO NOT CHANGE THIS LIST! local legacy_flag_list = { "rainbow", "lesbian", "bisexual", "transgender", "genderqueer", "nonbinary", "pansexual", "asexual", "vincian", "polysexual", "omnisexual", "graysexual", "demisexual", "homoromantic", "biromantic", @@ -34,8 +35,9 @@ local legacy_flag_list = { "genderfluid", "intersex", "polyamorous", "queer", "demigirl", "demiboy", "bigender", "trigender", } local flag_list = { - -- rainbow flag / LGBT+ Pride flag / Gay Pride flag - "rainbow", + -- broader community + "rainbow", -- rainbow flag / LGBTQ+ Pride flag / Gay Pride flag + "progress", -- Progress Pride -- orientations (general) "lesbian", "vincian", -- sexual orientations @@ -111,6 +113,18 @@ else S = function(s) return s end end +-- Delete entity if there is no flag mast node +local delete_if_orphan = function( self ) + local pos = self.object:get_pos( ) + local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) + if node.name ~= "pride_flags:upper_mast" and node.name ~= "ignore" then + minetest.log("action", "[pride_flags] Orphan flag entity removed at "..minetest.pos_to_string(pos, 1)) + self.object:remove( ) + return true + end + return false +end + minetest.register_entity( "pride_flags:wavingflag", { initial_properties = { physical = false, @@ -125,6 +139,10 @@ minetest.register_entity( "pride_flags:wavingflag", { }, on_activate = function ( self, staticdata, dtime ) + if delete_if_orphan( self) then + return + end + -- Init stuff self:reset_animation( true ) self.object:set_armor_groups( { immortal = 1 } ) @@ -178,6 +196,9 @@ minetest.register_entity( "pride_flags:wavingflag", { self.anim_timer = self.anim_timer - dtime if self.anim_timer <= 0 then + if delete_if_orphan( self) then + return + end self:reset_animation( ) end end, @@ -500,7 +521,9 @@ minetest.register_node( "pride_flags:upper_mast", { end local def = minetest.registered_nodes["pride_flags:upper_mast"] - minetest.sound_play(def.sounds.place, {pos = pos}, true) + if def and def.sounds then + minetest.sound_play(def.sounds.place, {pos = pos}, true) + end after_place_node(pos, placer) return itemstack diff --git a/mod.conf b/mod.conf index 01122a5..8c7d6c5 100644 --- a/mod.conf +++ b/mod.conf @@ -1,6 +1,5 @@ name = pride_flags title = Pride Flags -author = sorcerykid -license = LGPL-3.0 +author = sorcerykid, Wuzzy optional_depends = default, screwdriver - +description = Adds a variety of animated flags to celebrate Pride. diff --git a/textures/prideflag_progress.png b/textures/prideflag_progress.png new file mode 100644 index 0000000..aff67ba Binary files /dev/null and b/textures/prideflag_progress.png differ