Initial commit
This was split out of the venerable Castle mod, https://github.com/minetest-mods/castle, which has been maintained by a long line of distinguished modders.
This commit is contained in:
commit
3a913ca8b5
17
.gitattributes
vendored
Normal file
17
.gitattributes
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
47
.gitignore
vendored
Normal file
47
.gitignore
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# =========================
|
||||
# Operating System Files
|
||||
# =========================
|
||||
|
||||
# OSX
|
||||
# =========================
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Minetest Mods Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
16
README.txt
Normal file
16
README.txt
Normal file
@ -0,0 +1,16 @@
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Orbs of Time
|
||||
by: Philipbenr And DanDuncombe
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Licence: MIT
|
||||
|
||||
see: LICENSE
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
A mod containing magical orbs a player can use a limited number of times to change the time of day
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
3
depends.txt
Normal file
3
depends.txt
Normal file
@ -0,0 +1,3 @@
|
||||
default
|
||||
intllib?
|
||||
loot?
|
1
description.txt
Normal file
1
description.txt
Normal file
@ -0,0 +1 @@
|
||||
A mod containing magical orbs a player can use a limited number of times to change the time of day
|
156
init.lua
Normal file
156
init.lua
Normal file
@ -0,0 +1,156 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
minetest.register_alias("castle:orb_day", "orbs_of_time:orb_day")
|
||||
minetest.register_alias("castle:orb_night", "orbs_of_time:orb_night")
|
||||
|
||||
minetest.register_tool("orbs_of_time:orb_day", {
|
||||
description = S("Orb of Midday"),
|
||||
tiles = {"orbs_orb_day.png"},
|
||||
inventory_image = "orbs_orb_day.png",
|
||||
wield_image = "orbs_orb_day_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.set_timeofday(0.5)
|
||||
minetest.sound_play("orbs_birds", {pos=pos, loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_tool("orbs_of_time:orb_night",{
|
||||
description = S("Orb of Midnight"),
|
||||
tiles = {"orbs_orb_night.png"},
|
||||
inventory_image = "orbs_orb_night.png",
|
||||
wield_image = "orbs_orb_night_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.set_timeofday(0)
|
||||
minetest.sound_play("orbs_owl", {pos=pos, loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_tool("orbs_of_time:orb_dawn", {
|
||||
description = S("Orb of Dawn"),
|
||||
tiles = {"orbs_orb_day.png"},
|
||||
inventory_image = "orbs_orb_day.png^[lowpart:50:orbs_orb_night.png",
|
||||
wield_image = "orbs_orb_day_weild.png^[lowpart:75:orbs_orb_night_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.set_timeofday(0.2)
|
||||
minetest.sound_play("orbs_birds", {pos=pos, loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_tool("orbs_of_time:orb_dusk",{
|
||||
description = S("Orb of Dusk"),
|
||||
tiles = {"orbs_orb_night.png"},
|
||||
inventory_image = "orbs_orb_night.png^[lowpart:50:orbs_orb_day.png",
|
||||
wield_image = "orbs_orb_night_weild.png^[lowpart:75:orbs_orb_day_weild.png",
|
||||
stack_max=1,
|
||||
on_use = function(itemstack, user)
|
||||
minetest.sound_play("orbs_ding", {pos=pos, loop=false})
|
||||
minetest.set_timeofday(0.8)
|
||||
minetest.sound_play("orbs_owl", {pos=pos, loop=false})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(65535/8)
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
-----------
|
||||
--Crafting
|
||||
-----------
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "orbs_of_time:orb_day",
|
||||
recipe = {
|
||||
{"default:diamond", "default:diamond","default:diamond"},
|
||||
{"default:diamond", "default:mese_crystal","default:diamond"},
|
||||
{"default:diamond", "default:diamond","default:diamond"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "orbs_of_time:orb_night",
|
||||
recipe = {
|
||||
{"default:diamond", "default:diamond","default:diamond"},
|
||||
{"default:diamond", "default:obsidian_shard","default:diamond"},
|
||||
{"default:diamond", "default:diamond","default:diamond"}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "orbs_of_time:orb_dawn 2",
|
||||
recipe = {
|
||||
{"orbs_of_time:orb_day"},
|
||||
{"orbs_of_time:orb_night"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "orbs_of_time:orb_dusk 2",
|
||||
recipe = {
|
||||
{"orbs_of_time:orb_night"},
|
||||
{"orbs_of_time:orb_day"},
|
||||
},
|
||||
})
|
||||
|
||||
-----------
|
||||
--Loot mod support
|
||||
-----------
|
||||
|
||||
if minetest.get_modpath("loot") then
|
||||
loot.register_loot({
|
||||
weights = { generic = 10, valuable= 10 },
|
||||
payload = {
|
||||
stack = ItemStack("orbs_of_time:orb_day"),
|
||||
min_size = 1,
|
||||
max_size = 1,
|
||||
},
|
||||
})
|
||||
|
||||
loot.register_loot({
|
||||
weights = { generic = 10, valuable= 10 },
|
||||
payload = {
|
||||
stack = ItemStack("orbs_of_time:orb_night"),
|
||||
min_size = 1,
|
||||
max_size = 1,
|
||||
},
|
||||
})
|
||||
|
||||
loot.register_loot({
|
||||
weights = { generic = 10, valuable= 10 },
|
||||
payload = {
|
||||
stack = ItemStack("orbs_of_time:orb_dawn"),
|
||||
min_size = 1,
|
||||
max_size = 1,
|
||||
},
|
||||
})
|
||||
|
||||
loot.register_loot({
|
||||
weights = { generic = 10, valuable= 10 },
|
||||
payload = {
|
||||
stack = ItemStack("orbs_of_time:orb_dusk"),
|
||||
min_size = 1,
|
||||
max_size = 1,
|
||||
},
|
||||
})
|
||||
|
||||
end
|
45
intllib.lua
Normal file
45
intllib.lua
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
-- Fallback functions for when `intllib` is not installed.
|
||||
-- Code released under Unlicense <http://unlicense.org>.
|
||||
|
||||
-- Get the latest version of this file at:
|
||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
||||
|
||||
local function format(str, ...)
|
||||
local args = { ... }
|
||||
local function repl(escape, open, num, close)
|
||||
if escape == "" then
|
||||
local replacement = tostring(args[tonumber(num)])
|
||||
if open == "" then
|
||||
replacement = replacement..close
|
||||
end
|
||||
return replacement
|
||||
else
|
||||
return "@"..open..num..close
|
||||
end
|
||||
end
|
||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
||||
end
|
||||
|
||||
local gettext, ngettext
|
||||
if minetest.get_modpath("intllib") then
|
||||
if intllib.make_gettext_pair then
|
||||
-- New method using gettext.
|
||||
gettext, ngettext = intllib.make_gettext_pair()
|
||||
else
|
||||
-- Old method using text files.
|
||||
gettext = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in missing functions.
|
||||
|
||||
gettext = gettext or function(msgid, ...)
|
||||
return format(msgid, ...)
|
||||
end
|
||||
|
||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
||||
return format(n==1 and msgid or msgid_plural, ...)
|
||||
end
|
||||
|
||||
return gettext, ngettext
|
33
locale/template.pot
Normal file
33
locale/template.pot
Normal file
@ -0,0 +1,33 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-25 20:04-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: init.lua:9
|
||||
msgid "Orb of Midday"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:24
|
||||
msgid "Orb of Midnight"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:40
|
||||
msgid "Orb of Dawn"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:55
|
||||
msgid "Orb of Dusk"
|
||||
msgstr ""
|
33
sounds/LICENSE.txt
Normal file
33
sounds/LICENSE.txt
Normal file
@ -0,0 +1,33 @@
|
||||
License Sounds
|
||||
------------------
|
||||
|
||||
Author: Brandon Morris
|
||||
file: orbs_ding.ogg
|
||||
original file : completetask_0.mp3
|
||||
http://opengameart.org/content/completion-sound
|
||||
License: CC-BY 3.0
|
||||
http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
------------------
|
||||
|
||||
(From Ambience mod)
|
||||
|
||||
Author: Mike Koenig
|
||||
file: orbs_owl.ogg
|
||||
original file : horned_owl.ogg
|
||||
http://soundbible.com/1851-Horned-Owl.html
|
||||
License: Attribution 3.0
|
||||
http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
------------------
|
||||
|
||||
(From Ambience mod)
|
||||
|
||||
Author: PsychoBird
|
||||
file: orbs_birds.ogg
|
||||
original file : Best Cardinal Bird.ogg
|
||||
http://soundbible.com/1515-Best-Cardinal-Bird.html
|
||||
License: Attribution 3.0
|
||||
http://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
------------------
|
BIN
sounds/orbs_birds.ogg
Normal file
BIN
sounds/orbs_birds.ogg
Normal file
Binary file not shown.
BIN
sounds/orbs_ding.ogg
Normal file
BIN
sounds/orbs_ding.ogg
Normal file
Binary file not shown.
BIN
sounds/orbs_owl.ogg
Normal file
BIN
sounds/orbs_owl.ogg
Normal file
Binary file not shown.
7
textures/LICENSE.txt
Normal file
7
textures/LICENSE.txt
Normal file
@ -0,0 +1,7 @@
|
||||
--------------------------------------------
|
||||
|
||||
License Textures: Philipner - CC-BY-SA 3.0
|
||||
|
||||
-orbs_orb_day.png
|
||||
-orbs_orb_night.png
|
||||
|
BIN
textures/orbs_orb_day.png
Normal file
BIN
textures/orbs_orb_day.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 B |
BIN
textures/orbs_orb_day_weild.png
Normal file
BIN
textures/orbs_orb_day_weild.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 B |
BIN
textures/orbs_orb_night.png
Normal file
BIN
textures/orbs_orb_night.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 B |
BIN
textures/orbs_orb_night_weild.png
Normal file
BIN
textures/orbs_orb_night_weild.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 184 B |
Loading…
x
Reference in New Issue
Block a user