Move hotbar code/textures, and damage sound, from player_api to default
authorParamat <paramat@users.noreply.github.com>
Fri, 18 Oct 2019 01:43:06 +0000 (02:43 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Oct 2019 01:43:06 +0000 (02:43 +0100)
These are unrelated to the Player API and player object.
All other GUI/HUD code and textures are in default.
All other engine hardcoded sounds are in default.
The player_api mod is highly likely to be used unchanged in new games,
so logical grouping of content will help the creation of new games.

mods/default/README.txt
mods/default/init.lua
mods/default/sounds/player_damage.ogg [new file with mode: 0644]
mods/default/textures/gui_hotbar.png [new file with mode: 0644]
mods/default/textures/gui_hotbar_selected.png [new file with mode: 0644]
mods/player_api/README.txt
mods/player_api/init.lua
mods/player_api/license.txt
mods/player_api/sounds/player_damage.ogg [deleted file]
mods/player_api/textures/gui_hotbar.png [deleted file]
mods/player_api/textures/gui_hotbar_selected.png [deleted file]

index 1bc899b26e5b0e9ddc429288f867f37cc757129a..5f89f74bc1d1e9b43f2398526a00449f87624984 100644 (file)
@@ -123,6 +123,8 @@ paramat (CC BY-SA 3.0):
   default_fence_rail_junglewood
   default_fence_rail_pine_wood
   default_fence_rail_wood -- Derived from a texture by BlockMen (CC BY-SA 3.0)
+  gui_hotbar.png
+  gui_hotbar_selected.png
 
 TumeniNodes (CC BY-SA 3.0):
   default_desert_cobble.png -- Derived from a texture by brunob.santos (CC BY-SA 3.0)
@@ -150,7 +152,10 @@ BlockMen (CC BY-SA 3.0):
   default_mineral_mese.png
   default_meselamp.png
   bubble.png
-  gui_*.png
+  gui_formbg.png
+  gui_furnace_arrow_bg.png
+  gui_furnace_arrow_fg.png
+  gui_hb_bg.png
 
 sofar (CC BY-SA 3.0):
   default_aspen_sapling
@@ -330,6 +335,10 @@ http://freesound.org/people/Ryding/sounds/94337/
 Ferk (CC0 1.0):
   default_item_smoke.ogg, based on a sound by http://opengameart.org/users/bart
 
+sonictechtonic (CC BY 3.0):
+https://www.freesound.org/people/sonictechtonic/sounds/241872/
+  player_damage.ogg
+
 
 Models
 ------
index 0e2b259f5e2de8146bc14e823cadf2253ef0149b..d4388e5f32f41e73bef4431a6f7e1772a68de9a2 100644 (file)
@@ -14,10 +14,10 @@ default.get_translator = S
 
 -- GUI related stuff
 minetest.register_on_joinplayer(function(player)
+       -- Set formspec prepend
        local formspec = [[
                        bgcolor[#080808BB;true]
                        listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]]
-
        local name = player:get_player_name()
        local info = minetest.get_player_information(name)
        if info.formspec_version > 1 then
@@ -26,6 +26,10 @@ minetest.register_on_joinplayer(function(player)
                formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]"
        end
        player:set_formspec_prepend(formspec)
+
+       -- Set hotbar textures
+       player:hud_set_hotbar_image("gui_hotbar.png")
+       player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
 end)
 
 function default.get_hotbar_bg(x,y)
diff --git a/mods/default/sounds/player_damage.ogg b/mods/default/sounds/player_damage.ogg
new file mode 100644 (file)
index 0000000..7888087
Binary files /dev/null and b/mods/default/sounds/player_damage.ogg differ
diff --git a/mods/default/textures/gui_hotbar.png b/mods/default/textures/gui_hotbar.png
new file mode 100644 (file)
index 0000000..7bc7887
Binary files /dev/null and b/mods/default/textures/gui_hotbar.png differ
diff --git a/mods/default/textures/gui_hotbar_selected.png b/mods/default/textures/gui_hotbar_selected.png
new file mode 100644 (file)
index 0000000..7203e9a
Binary files /dev/null and b/mods/default/textures/gui_hotbar_selected.png differ
index 22d040cbb1d5f1a65130ece92ffdeca28b7aea25..5a2b9278bccc8c9183551a8f4d06246985ac1807 100644 (file)
@@ -4,6 +4,7 @@ See license.txt for license information.
 
 Provides an API to allow multiple mods to set player models and textures.
 Also sets the default model, texture, and player flags.
+This mod is only for content related to the Player API and the player object.
 
 Authors of source code
 ----------------------
@@ -19,14 +20,6 @@ stujones11 (CC BY-SA 3.0):
 Jordach (CC BY-SA 3.0):
   character.png
 
-paramat (CC BY-SA 3.0):
-  gui_hotbar.png
-  gui_hotbar_selected.png
-
 celeron55, Perttu Ahola <celeron55@gmail.com> (CC BY-SA 3.0):
   player.png
   player_back.png
-
-sonictechtonic (CC BY 3.0):
-https://www.freesound.org/people/sonictechtonic/sounds/241872/
-  player_damage.ogg
index 783ff7e255d54cd16fc186fe005420d05afa7a8c..19028de18ff6e0b6aecf21999cadb7c8f65e58b1 100644 (file)
@@ -31,6 +31,4 @@ minetest.register_on_joinplayer(function(player)
                {x = 200, y = 219},
                30
        )
-       player:hud_set_hotbar_image("gui_hotbar.png")
-       player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
 end)
index 69bb2f8ee7252d0c422f94e56c0ce17ab6eded27..ce67e9923157bb6915bce0cb5f894940defa455b 100644 (file)
@@ -22,7 +22,6 @@ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
 Copyright (C) 2011-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2012-2018 Jordach
 Copyright (C) 2018 stujones11
-Copyright (C) 2018 paramat
 
 You are free to:
 Share — copy and redistribute the material in any medium or format.
@@ -51,34 +50,3 @@ rights may limit how you use the material.
 
 For more details:
 http://creativecommons.org/licenses/by-sa/3.0/
-
-------------------------------------
-
-Attribution 3.0 Unported (CC BY 3.0)
-Copyright (C) 2014-2018 sonictechtonic
-
-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/3.0/
-
diff --git a/mods/player_api/sounds/player_damage.ogg b/mods/player_api/sounds/player_damage.ogg
deleted file mode 100644 (file)
index 7888087..0000000
Binary files a/mods/player_api/sounds/player_damage.ogg and /dev/null differ
diff --git a/mods/player_api/textures/gui_hotbar.png b/mods/player_api/textures/gui_hotbar.png
deleted file mode 100644 (file)
index 7bc7887..0000000
Binary files a/mods/player_api/textures/gui_hotbar.png and /dev/null differ
diff --git a/mods/player_api/textures/gui_hotbar_selected.png b/mods/player_api/textures/gui_hotbar_selected.png
deleted file mode 100644 (file)
index 7203e9a..0000000
Binary files a/mods/player_api/textures/gui_hotbar_selected.png and /dev/null differ