diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..45e3c4d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2019 Evert "Diamond" Prants + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..708877f --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Towny + +This is a [minetest](https://minetest.net/) mod based on the popular [Minecraft server mod](http://towny.palmergames.com/) of the same name. + +At it's current state, it's a glorified semi-fixed-grid protection system based on claims and plots. + +**Forum Post:** https://forum.minetest.net/viewtopic.php?f=9&t=21912 + +### Town Claim Blocks +A claim block is 16x64x16 nodes in size. By default, nobody in town except for the mayor can build in an unplotted claim block. The number of available claim blocks depends on the number of town residents. A claim block can be turned into a plot with the */plot claim* command. + +### Plots +Plots are town claim blocks that can be owned by a town resident. Plots can have multiple members. + +### Simple usage +* */town new * - Create a town right where you're standing +* */town claim* - Claim more land for your town. Must be called right outside of an existing town claim. +* */town invite * - Invite a player to your town +* */plot claim* - Create/claim a plot +* */plot set claimable true* - Set the plot as claimable by other town members +* */plot member add/del * - Add/remove a person from a plot. Adding people to your plot will let them build on it. +* */town kick * - Remove user from your town. +* */town visualize* - Highlight the bounds of your town's claim blocks. diff --git a/modpack.txt b/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/chat.lua b/towny/commands.lua similarity index 99% rename from chat.lua rename to towny/commands.lua index c5c296f..87ae9cf 100644 --- a/chat.lua +++ b/towny/commands.lua @@ -1,6 +1,4 @@ --- Commands and chat modification - --- TODO: Town names in chat +-- Commands -- Privileges diff --git a/description.txt b/towny/description.txt similarity index 100% rename from description.txt rename to towny/description.txt diff --git a/init.lua b/towny/init.lua similarity index 99% rename from init.lua rename to towny/init.lua index 7c57bfd..29e3fe2 100644 --- a/init.lua +++ b/towny/init.lua @@ -144,4 +144,4 @@ dofile(modpath.."/storage/init.lua") dofile(modpath.."/visualize.lua") dofile(modpath.."/regions.lua") dofile(modpath.."/town.lua") -dofile(modpath.."/chat.lua") +dofile(modpath.."/commands.lua") diff --git a/mod.conf b/towny/mod.conf similarity index 100% rename from mod.conf rename to towny/mod.conf diff --git a/regions.lua b/towny/regions.lua similarity index 100% rename from regions.lua rename to towny/regions.lua diff --git a/settingtypes.txt b/towny/settingtypes.txt similarity index 86% rename from settingtypes.txt rename to towny/settingtypes.txt index 2a38415..dd3d5bf 100644 --- a/settingtypes.txt +++ b/towny/settingtypes.txt @@ -23,11 +23,8 @@ towny_distance (Max town claims) int 80 # Recommended to be kept as true, may cause issues with claims otherwise towny_prevent_protector (Prevent protectors from being placed in a town) bool true -# Chat settings -################ - -# Set to false if you have any other mods that alter the way player-sent messages look -towny_chat (Allow towny to modify the chat) bool true +# Command settings +################### # If true, players must be invited into towns (No direct joining) towny_invite (Invite-based membership) bool true diff --git a/storage/flatfile.lua b/towny/storage/flatfile.lua similarity index 100% rename from storage/flatfile.lua rename to towny/storage/flatfile.lua diff --git a/storage/init.lua b/towny/storage/init.lua similarity index 100% rename from storage/init.lua rename to towny/storage/init.lua diff --git a/storage/modstorage.lua b/towny/storage/modstorage.lua similarity index 100% rename from storage/modstorage.lua rename to towny/storage/modstorage.lua diff --git a/textures/towny_visualize.png b/towny/textures/towny_visualize.png similarity index 100% rename from textures/towny_visualize.png rename to towny/textures/towny_visualize.png diff --git a/town.lua b/towny/town.lua similarity index 100% rename from town.lua rename to towny/town.lua diff --git a/visualize.lua b/towny/visualize.lua similarity index 100% rename from visualize.lua rename to towny/visualize.lua diff --git a/towny_chat/depends.txt b/towny_chat/depends.txt new file mode 100644 index 0000000..34ed0af --- /dev/null +++ b/towny_chat/depends.txt @@ -0,0 +1 @@ +towny diff --git a/towny_chat/description.txt b/towny_chat/description.txt new file mode 100644 index 0000000..fd9f94e --- /dev/null +++ b/towny_chat/description.txt @@ -0,0 +1 @@ +Towny Chat Mods diff --git a/towny_chat/init.lua b/towny_chat/init.lua new file mode 100644 index 0000000..c8baeab --- /dev/null +++ b/towny_chat/init.lua @@ -0,0 +1,5 @@ +-- A township system for Minetest servers. +-- The MIT License - 2019 Evert "Diamond" Prants + +local modpath = minetest.get_modpath(minetest.get_current_modname()) +towny.chat.modpath = modpath diff --git a/towny_chat/mod.conf b/towny_chat/mod.conf new file mode 100644 index 0000000..967237e --- /dev/null +++ b/towny_chat/mod.conf @@ -0,0 +1,3 @@ +name = towny_chat +description = Towny Chat Mods +depends = towny diff --git a/towny_chat/settingtypes.txt b/towny_chat/settingtypes.txt new file mode 100644 index 0000000..e69de29 diff --git a/towny_hud/depends.txt b/towny_hud/depends.txt new file mode 100644 index 0000000..52841b7 --- /dev/null +++ b/towny_hud/depends.txt @@ -0,0 +1,2 @@ +towny +towny_nations? diff --git a/towny_hud/description.txt b/towny_hud/description.txt new file mode 100644 index 0000000..c058c7a --- /dev/null +++ b/towny_hud/description.txt @@ -0,0 +1 @@ +Wilderness (non-town areas) control diff --git a/towny_hud/init.lua b/towny_hud/init.lua new file mode 100644 index 0000000..5fbbdb9 --- /dev/null +++ b/towny_hud/init.lua @@ -0,0 +1,4 @@ +-- A township system for Minetest servers. +-- The MIT License - 2019 Evert "Diamond" Prants + +local modpath = minetest.get_modpath(minetest.get_current_modname()) diff --git a/towny_hud/mod.conf b/towny_hud/mod.conf new file mode 100644 index 0000000..8baa5e9 --- /dev/null +++ b/towny_hud/mod.conf @@ -0,0 +1,4 @@ +name = towny_hud +description = Heads Up Display information for towns +depends = towny +optional_depends = towny_nations diff --git a/towny_hud/settingtypes.txt b/towny_hud/settingtypes.txt new file mode 100644 index 0000000..e69de29 diff --git a/towny_nations/depends.txt b/towny_nations/depends.txt new file mode 100644 index 0000000..34ed0af --- /dev/null +++ b/towny_nations/depends.txt @@ -0,0 +1 @@ +towny diff --git a/towny_nations/description.txt b/towny_nations/description.txt new file mode 100644 index 0000000..fd9f94e --- /dev/null +++ b/towny_nations/description.txt @@ -0,0 +1 @@ +Towny Chat Mods diff --git a/towny_nations/init.lua b/towny_nations/init.lua new file mode 100644 index 0000000..56223c1 --- /dev/null +++ b/towny_nations/init.lua @@ -0,0 +1,46 @@ +-- A township system for Minetest servers. +-- The MIT License - 2019 Evert "Diamond" Prants + +local modpath = minetest.get_modpath(minetest.get_current_modname()) +towny.nations = { + modpath = modpath, + levels = { + { + king_tag: 'Leader', + members: 0, + tag: '(Nation)', + block_bonus: 10, + prefix: 'Land of', + }, { + king_tag: 'Count', + members: 10, + tag: '(Nation)', + block_bonus: 20, + prefix: 'Federation of', + }, { + king_tag: 'Duke', + members: 20, + tag: '(Nation)', + block_bonus: 40, + prefix: 'Dominion of', + }, { + king_tag: 'King', + members: 30, + tag: '(Nation)', + block_bonus: 60, + prefix: 'Kingdom of', + }, { + king_tag: 'Emperor', + members: 40, + tag: 'Empire', + block_bonus: 100, + prefix: 'The', + }, { + king_tag: 'God Emperor', + members: 60, + tag: 'Realm', + block_bonus: 140, + prefix: 'The', + } + }, +} diff --git a/towny_nations/mod.conf b/towny_nations/mod.conf new file mode 100644 index 0000000..dc36786 --- /dev/null +++ b/towny_nations/mod.conf @@ -0,0 +1,3 @@ +name = towny_nations +description = Nations for Towny +depends = towny diff --git a/towny_nations/settingtypes.txt b/towny_nations/settingtypes.txt new file mode 100644 index 0000000..e69de29 diff --git a/towny_wilderness/depends.txt b/towny_wilderness/depends.txt new file mode 100644 index 0000000..34ed0af --- /dev/null +++ b/towny_wilderness/depends.txt @@ -0,0 +1 @@ +towny diff --git a/towny_wilderness/description.txt b/towny_wilderness/description.txt new file mode 100644 index 0000000..c058c7a --- /dev/null +++ b/towny_wilderness/description.txt @@ -0,0 +1 @@ +Wilderness (non-town areas) control diff --git a/towny_wilderness/init.lua b/towny_wilderness/init.lua new file mode 100644 index 0000000..f14b515 --- /dev/null +++ b/towny_wilderness/init.lua @@ -0,0 +1,7 @@ +-- A township system for Minetest servers. +-- The MIT License - 2019 Evert "Diamond" Prants + +local modpath = minetest.get_modpath(minetest.get_current_modname()) +towny.wild = { + modpath = modpath +} diff --git a/towny_wilderness/mod.conf b/towny_wilderness/mod.conf new file mode 100644 index 0000000..68a32d8 --- /dev/null +++ b/towny_wilderness/mod.conf @@ -0,0 +1,3 @@ +name = towny_wilderness +description = Wilderness (non-town areas) control +depends = towny diff --git a/towny_wilderness/settingtypes.txt b/towny_wilderness/settingtypes.txt new file mode 100644 index 0000000..e69de29