Skip to content

Commit 7caa5d3

Browse files
authored
Move hotbar code/textures, and damage sound, from player_api to default
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.
1 parent 7c1fd9c commit 7caa5d3

File tree

8 files changed

+16
-44
lines changed

8 files changed

+16
-44
lines changed

mods/default/README.txt

+10-1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ paramat (CC BY-SA 3.0):
123123
default_fence_rail_junglewood
124124
default_fence_rail_pine_wood
125125
default_fence_rail_wood -- Derived from a texture by BlockMen (CC BY-SA 3.0)
126+
gui_hotbar.png
127+
gui_hotbar_selected.png
126128

127129
TumeniNodes (CC BY-SA 3.0):
128130
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):
150152
default_mineral_mese.png
151153
default_meselamp.png
152154
bubble.png
153-
gui_*.png
155+
gui_formbg.png
156+
gui_furnace_arrow_bg.png
157+
gui_furnace_arrow_fg.png
158+
gui_hb_bg.png
154159

155160
sofar (CC BY-SA 3.0):
156161
default_aspen_sapling
@@ -330,6 +335,10 @@ http://freesound.org/people/Ryding/sounds/94337/
330335
Ferk (CC0 1.0):
331336
default_item_smoke.ogg, based on a sound by http://opengameart.org/users/bart
332337

338+
sonictechtonic (CC BY 3.0):
339+
https://www.freesound.org/people/sonictechtonic/sounds/241872/
340+
player_damage.ogg
341+
333342

334343
Models
335344
------

mods/default/init.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ default.get_translator = S
1414

1515
-- GUI related stuff
1616
minetest.register_on_joinplayer(function(player)
17+
-- Set formspec prepend
1718
local formspec = [[
1819
bgcolor[#080808BB;true]
1920
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]]
20-
2121
local name = player:get_player_name()
2222
local info = minetest.get_player_information(name)
2323
if info.formspec_version > 1 then
@@ -26,6 +26,10 @@ minetest.register_on_joinplayer(function(player)
2626
formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]"
2727
end
2828
player:set_formspec_prepend(formspec)
29+
30+
-- Set hotbar textures
31+
player:hud_set_hotbar_image("gui_hotbar.png")
32+
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
2933
end)
3034

3135
function default.get_hotbar_bg(x,y)

mods/player_api/README.txt

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ See license.txt for license information.
44

55
Provides an API to allow multiple mods to set player models and textures.
66
Also sets the default model, texture, and player flags.
7+
This mod is only for content related to the Player API and the player object.
78

89
Authors of source code
910
----------------------
@@ -19,14 +20,6 @@ stujones11 (CC BY-SA 3.0):
1920
Jordach (CC BY-SA 3.0):
2021
character.png
2122

22-
paramat (CC BY-SA 3.0):
23-
gui_hotbar.png
24-
gui_hotbar_selected.png
25-
2623
celeron55, Perttu Ahola <celeron55@gmail.com> (CC BY-SA 3.0):
2724
player.png
2825
player_back.png
29-
30-
sonictechtonic (CC BY 3.0):
31-
https://www.freesound.org/people/sonictechtonic/sounds/241872/
32-
player_damage.ogg

mods/player_api/init.lua

-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ minetest.register_on_joinplayer(function(player)
3131
{x = 200, y = 219},
3232
30
3333
)
34-
player:hud_set_hotbar_image("gui_hotbar.png")
35-
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
3634
end)

mods/player_api/license.txt

-32
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
2222
Copyright (C) 2011-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
2323
Copyright (C) 2012-2018 Jordach
2424
Copyright (C) 2018 stujones11
25-
Copyright (C) 2018 paramat
2625

2726
You are free to:
2827
Share — copy and redistribute the material in any medium or format.
@@ -51,34 +50,3 @@ rights may limit how you use the material.
5150

5251
For more details:
5352
http://creativecommons.org/licenses/by-sa/3.0/
54-
55-
------------------------------------
56-
57-
Attribution 3.0 Unported (CC BY 3.0)
58-
Copyright (C) 2014-2018 sonictechtonic
59-
60-
You are free to:
61-
Share — copy and redistribute the material in any medium or format.
62-
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
63-
The licensor cannot revoke these freedoms as long as you follow the license terms.
64-
65-
Under the following terms:
66-
67-
Attribution — You must give appropriate credit, provide a link to the license, and
68-
indicate if changes were made. You may do so in any reasonable manner, but not in any way
69-
that suggests the licensor endorses you or your use.
70-
71-
No additional restrictions — You may not apply legal terms or technological measures that
72-
legally restrict others from doing anything the license permits.
73-
74-
Notices:
75-
76-
You do not have to comply with the license for elements of the material in the public
77-
domain or where your use is permitted by an applicable exception or limitation.
78-
No warranties are given. The license may not give you all of the permissions necessary
79-
for your intended use. For example, other rights such as publicity, privacy, or moral
80-
rights may limit how you use the material.
81-
82-
For more details:
83-
http://creativecommons.org/licenses/by/3.0/
84-

0 commit comments

Comments
 (0)