added armor mod (WIP)
16
mods/armor/LICENSE.txt
Normal file
@ -0,0 +1,16 @@
|
||||
License for Code
|
||||
----------------
|
||||
|
||||
Copyright (C) 2016 cd2 (cdqwertz) <cdqwertz@gmail.com>
|
||||
|
||||
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 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
License for Media
|
||||
-----------------
|
||||
|
||||
CC-BY-SA 3.0 UNPORTED. Created by cd2 (cdqwertz)
|
3
mods/armor/init.lua
Normal file
@ -0,0 +1,3 @@
|
||||
armor = {}
|
||||
function armor.register_armor(name, def)
|
||||
end
|
BIN
mods/armor/textures/armor_copper_boots.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
mods/armor/textures/armor_copper_chestplate.png
Normal file
After Width: | Height: | Size: 243 B |
BIN
mods/armor/textures/armor_copper_leggings.png
Normal file
After Width: | Height: | Size: 319 B |
BIN
mods/armor/textures/armor_diamond_boots.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
mods/armor/textures/armor_diamond_chestplate.png
Normal file
After Width: | Height: | Size: 294 B |
BIN
mods/armor/textures/armor_diamond_leggings.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
mods/armor/textures/armor_iron_boots.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
mods/armor/textures/armor_iron_chestplate.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
mods/armor/textures/armor_iron_leggings.png
Normal file
After Width: | Height: | Size: 293 B |
@ -1,6 +1,7 @@
|
||||
places = {}
|
||||
places.pos = {}
|
||||
places.places_file = minetest.get_worldpath() .. "/places"
|
||||
places.show_places = false
|
||||
function places.register_place(name, pos)
|
||||
places.pos[name] = pos
|
||||
end
|
||||
@ -53,6 +54,9 @@ minetest.register_chatcommand("setplace", {
|
||||
})
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if not places.show_places then
|
||||
return
|
||||
end
|
||||
if places.pos then
|
||||
for k, v in pairs(places.pos) do
|
||||
player:hud_add({
|
||||
|
@ -181,6 +181,11 @@ function story.generator.run(part, player, line_pos)
|
||||
if cmd[1] == "$wait" then
|
||||
return {cmd="$wait", param=i, wait=true}
|
||||
end
|
||||
if cmd[1] == "$spawn" and cmd[2] and cmd[3] then
|
||||
if places.pos[cmd[3]] then
|
||||
minetest.add_entity(places.pos[cmd[3]], cmd[2])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
i = i +1
|
||||
@ -207,6 +212,21 @@ minetest.register_on_newplayer(function(player)
|
||||
story.generator.gen_next_step(player)
|
||||
end)
|
||||
|
||||
minetest.register_chatcommand("restart_story", {
|
||||
params = "",
|
||||
description = "restarts your story",
|
||||
privs = {},
|
||||
func = function(name, text)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if player and player:is_player() then
|
||||
story.generator.new_player(player)
|
||||
story.generator.gen_next_step(player)
|
||||
return true, ""
|
||||
end
|
||||
return true, "Error"
|
||||
end,
|
||||
})
|
||||
|
||||
-- human
|
||||
minetest.register_entity("story:human", {
|
||||
hp_max = 50,
|
||||
|
@ -1,7 +1,9 @@
|
||||
$dialog test
|
||||
$pos
|
||||
$place home
|
||||
$create
|
||||
$wait
|
||||
$dialog test
|
||||
$place testplace
|
||||
$place homeB
|
||||
$create
|
||||
$wait
|
||||
$spawn pets:pig homePig
|
||||
|