First commit

master
PilzAdam 2012-11-01 14:19:50 +01:00
commit 179b2dec87
6 changed files with 78 additions and 0 deletions

13
README.txt Normal file
View File

@ -0,0 +1,13 @@
3D Player Mod for Minetest-c55
==============================
License of source code:
-----------------------
WTFPL
License of textures:
--------------------
Created by celeron55
Modified by PilzAdam
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

64
init.lua Normal file
View File

@ -0,0 +1,64 @@
local pix = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0},
{0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0},
{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,1,1,1,1,1,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0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0},
{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0},
{0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0},
}
local box = {}
for i=1,#pix do
for j=1,#pix[i] do
if pix[i][j] == 1 then
local y = (i-16)*-1+1
local x = j-16
table.insert(box, {(x-1)/32, (y-1)/32, -0.5/32, x/32, y/32, 0.5/32})
end
end
end
minetest.register_node("3d_player:box", {
drawtype = "nodebox",
tiles = {"3d_player_side.png", "3d_player_side.png", "3d_player_side.png", "3d_player_side.png", "3d_player.png", "3d_player_back.png"},
node_box = {
type = "fixed",
fixed = box
},
})
minetest.register_on_joinplayer(function(player)
player:set_properties({
visual = "wielditem",
textures = {"3d_player:box"},
visual_size = {x=0.667, y=0.667*2},
})
end)

BIN
textures/3d_player.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

BIN
textures/3d_player_back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

BIN
textures/3d_player_side.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B