1
0
Fork 0
mirror of https://gitlab.com/niansa/nonamegame.git synced 2025-03-06 20:53:38 +01:00
This commit is contained in:
niansa 2019-03-27 17:16:38 +01:00
parent 1ce5b86c0c
commit 10df84ceaf
100 changed files with 153 additions and 0 deletions

2
game.conf Normal file
View file

@ -0,0 +1,2 @@
name = Noname Game

BIN
menu/background-ld.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
menu/icon-ld.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
menu/icon.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

14
mods/default/commands.lua Normal file
View file

@ -0,0 +1,14 @@
-- HP: Die HP des Spielers festlegen
--minetest.register_chatcommand("hp", {
-- func = function(name, hp)
-- local player = minetest.get_player_by_name(name)
-- if player then
-- if hp == "" then
-- minetest.chat_send_player(name, "Bitte gebe einen Parameter an.")
-- end
-- if name then
-- player:set_hp(tonumber(hp))
-- end
-- end
-- end
--})

6
mods/default/init.lua Normal file
View file

@ -0,0 +1,6 @@
local default_path = minetest.get_modpath("default")
dofile(default_path.."/commands.lua")
dofile(default_path.."/nodes.lua")
dofile(default_path.."/items.lua")
dofile(default_path.."/void.lua")

6
mods/default/items.lua Normal file
View file

@ -0,0 +1,6 @@
-- Stock
--minetest.register_craftitem("default:stick", {
-- description = "Stock",
-- inventory_image = "default_stick.png",
-- on_use = minetest.item_eat(20)
--})

2
mods/default/mod.conf Normal file
View file

@ -0,0 +1,2 @@
name = default
description = Minimal default, adds basic nodes, items, Entities and Commands

69
mods/default/nodes.lua Normal file
View file

@ -0,0 +1,69 @@
-- Stein
minetest.register_node("default:stone", {
description = "Stein",
tiles = {"default_stone.png"},
is_ground_content = true,
drop = "",
groups = {dig_immediate=3}
})
-- Holz
minetest.register_node("default:wood", {
description = "Holzbretter",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_wood.png"},
drop = "",
groups = {dig_immediate=3}
})
-- Erde
minetest.register_node("default:dirt", {
description = "Simple Erde",
tiles = {"default_dirt.png"},
drop = "",
groups = {dig_immediate=3}
})
-- Erde mit Gras
minetest.register_node("default:dirt_with_grass", {
description = "Erde mit Gras",
tiles = {"default_grass.png", "default_dirt.png", {name = "default_dirt.png^default_grass_side.png", tileable_vertical = false}},
drop = "",
groups = {dig_immediate=3}
})
-- kaputte Truhe
minetest.register_node("default:nonworking_chest", {
description = "kaputte Truhe",
drop = "",
groups = {dig_immediate=3},
tiles = {
"default_wood.png",
"default_wood.png",
"default_wood.png",
"default_wood.png",
"default_wood.png",
"default_wood.png"
},
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, -0.4375, 0.4375, 0.125, 0.4375}, -- Unterseite
{-0.4375, 0.125, -0.4375, 0.4375, 0.4375, 0.4375}, -- Oberseite
{0.4375, 0, -0.0625, 0.5, 0.3125, 0.125}, -- Griff
}
},
})
-- Meseblock
minetest.register_node("default:meseblock", {
description = 'Wertvolles Stück "Gold"',
tiles = {"default_mese.png"},
light_source = 6,
is_ground_content = false,
drop = "",
groups = {dig_immediate=3}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

24
mods/default/void.lua Normal file
View file

@ -0,0 +1,24 @@
local voidtimer = 0
minetest.register_globalstep(function(dtime)
voidtimer = voidtimer + dtime
if voidtimer > 0.5 then
voidtimer = 0
local objs = minetest.object_refs
for id, obj in pairs(objs) do
local pos = obj:get_pos()
if pos.y < -10 then
minetest.set_node({ x = 1, y = 0, z = 0 }, { name = "default:stone" })
minetest.set_node({ x = -1, y = 0, z = 0 }, { name = "default:stone" })
minetest.set_node({ x = 1, y = 0, z = 1 }, { name = "default:stone" })
minetest.set_node({ x = -1, y = 0, z = 1 }, { name = "default:stone" })
minetest.set_node({ x = 1, y = 0, z = -1 }, { name = "default:stone" })
minetest.set_node({ x = -1, y = 0, z = -1 }, { name = "default:stone" })
minetest.set_node({ x = 0, y = 0, z = 1 }, { name = "default:stone" })
minetest.set_node({ x = 0, y = 0, z = -1 }, { name = "default:stone" })
minetest.set_node({ x = 0, y = 0, z = 0 }, { name = "default:meseblock" })
obj:set_pos({ x = 0, y = 5, z = 0 })
end
end
end
end)

View file

@ -0,0 +1,27 @@
function minetest.item_drop(itemstack, dropper, pos)
return itemstack
end
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
return true
end)
minetest.register_on_newplayer(function(player)
player:setpos({ x = 0, y = 5, z = 0 })
-- player:get_inventory():add_item('main', 'default:stick')
player:get_inventory():add_item('main', 'default:stone')
player:get_inventory():add_item('main', 'default:meseblock')
player:get_inventory():add_item('main', 'default:wood')
player:get_inventory():add_item('main', 'default:dirt')
player:get_inventory():add_item('main', 'default:dirt_with_grass')
-- player:get_inventory():add_item('main', 'default:chest')
minetest.chat_send_player("singleplayer", "Du hast Startitems bekommen!")
local privs = minetest.get_player_privs(player:get_player_name())
privs.interact = true
privs.fly = true
privs.fast = true
minetest.set_player_privs(player:get_player_name(), privs)
end)

View file

@ -0,0 +1,3 @@
name = do_initial_stuff
description = Runs commands on player registration
depends = default

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.