Split into components \(WIP\)

This commit is contained in:
Evert Prants 2019-01-13 20:42:14 +02:00
parent f3940aa1fd
commit f77d754b5f
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
35 changed files with 132 additions and 9 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright © 2019 Evert "Diamond" Prants <evert@lunasqu.ee>
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.

23
README.md Normal file
View File

@ -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 <town name>* - 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 <user>* - 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 <resident>* - Add/remove a person from a plot. Adding people to your plot will let them build on it.
* */town kick <user>* - Remove user from your town.
* */town visualize* - Highlight the bounds of your town's claim blocks.

0
modpack.txt Normal file
View File

View File

@ -1,6 +1,4 @@
-- Commands and chat modification -- Commands
-- TODO: Town names in chat
-- Privileges -- Privileges

View File

@ -144,4 +144,4 @@ dofile(modpath.."/storage/init.lua")
dofile(modpath.."/visualize.lua") dofile(modpath.."/visualize.lua")
dofile(modpath.."/regions.lua") dofile(modpath.."/regions.lua")
dofile(modpath.."/town.lua") dofile(modpath.."/town.lua")
dofile(modpath.."/chat.lua") dofile(modpath.."/commands.lua")

View File

@ -23,11 +23,8 @@ towny_distance (Max town claims) int 80
# Recommended to be kept as true, may cause issues with claims otherwise # 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 towny_prevent_protector (Prevent protectors from being placed in a town) bool true
# Chat settings # Command 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
# If true, players must be invited into towns (No direct joining) # If true, players must be invited into towns (No direct joining)
towny_invite (Invite-based membership) bool true towny_invite (Invite-based membership) bool true

View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

1
towny_chat/depends.txt Normal file
View File

@ -0,0 +1 @@
towny

View File

@ -0,0 +1 @@
Towny Chat Mods

5
towny_chat/init.lua Normal file
View File

@ -0,0 +1,5 @@
-- A township system for Minetest servers.
-- The MIT License - 2019 Evert "Diamond" Prants <evert@lunasqu.ee>
local modpath = minetest.get_modpath(minetest.get_current_modname())
towny.chat.modpath = modpath

3
towny_chat/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = towny_chat
description = Towny Chat Mods
depends = towny

View File

2
towny_hud/depends.txt Normal file
View File

@ -0,0 +1,2 @@
towny
towny_nations?

View File

@ -0,0 +1 @@
Wilderness (non-town areas) control

4
towny_hud/init.lua Normal file
View File

@ -0,0 +1,4 @@
-- A township system for Minetest servers.
-- The MIT License - 2019 Evert "Diamond" Prants <evert@lunasqu.ee>
local modpath = minetest.get_modpath(minetest.get_current_modname())

4
towny_hud/mod.conf Normal file
View File

@ -0,0 +1,4 @@
name = towny_hud
description = Heads Up Display information for towns
depends = towny
optional_depends = towny_nations

View File

View File

@ -0,0 +1 @@
towny

View File

@ -0,0 +1 @@
Towny Chat Mods

46
towny_nations/init.lua Normal file
View File

@ -0,0 +1,46 @@
-- A township system for Minetest servers.
-- The MIT License - 2019 Evert "Diamond" Prants <evert@lunasqu.ee>
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',
}
},
}

3
towny_nations/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = towny_nations
description = Nations for Towny
depends = towny

View File

View File

@ -0,0 +1 @@
towny

View File

@ -0,0 +1 @@
Wilderness (non-town areas) control

View File

@ -0,0 +1,7 @@
-- A township system for Minetest servers.
-- The MIT License - 2019 Evert "Diamond" Prants <evert@lunasqu.ee>
local modpath = minetest.get_modpath(minetest.get_current_modname())
towny.wild = {
modpath = modpath
}

View File

@ -0,0 +1,3 @@
name = towny_wilderness
description = Wilderness (non-town areas) control
depends = towny

View File