Add towns
This commit is contained in:
parent
26ba673220
commit
7c08d3f61a
7 changed files with 456 additions and 29 deletions
|
|
@ -2,17 +2,20 @@ rgt_towns.main = {}
|
|||
ns = rgt_towns.main
|
||||
|
||||
ns.plots = {
|
||||
|
||||
"empty_plot"
|
||||
}
|
||||
|
||||
rgt_towns.register_spawner{
|
||||
plot = "covered_wagon",
|
||||
label = "Town Charter"
|
||||
rgt_towns.register_spawner {
|
||||
plot = "empty_plot",
|
||||
label = "Town Charter",
|
||||
on_spawn = function(p)
|
||||
|
||||
end
|
||||
}
|
||||
|
||||
minetest.register_chatcommand("charter", {
|
||||
func = function(name, args)
|
||||
minetest.get_player_by_name(name):get_inventory():add_item("main", rgt_towns.create_spawner("covered_wagon"))
|
||||
minetest.get_player_by_name(name):get_inventory():add_item("main", rgt_towns.create_spawner("empty_plot", name))
|
||||
end
|
||||
})
|
||||
|
||||
|
|
@ -21,5 +24,20 @@ rgt_towns.register_plot{
|
|||
label = "Covered Wagon",
|
||||
description = "Hello world",
|
||||
schematic = minetest.get_modpath(minetest.get_current_modname()).."/schems/covered_wagon.mts",
|
||||
recipe = {},
|
||||
can_build = ns.plots
|
||||
}
|
||||
|
||||
rgt_towns.register_plot{
|
||||
name = "empty_plot",
|
||||
label = "Empty Plot",
|
||||
description = "Hello world",
|
||||
schematic = minetest.get_modpath(minetest.get_current_modname()).."/schems/empty_plot.mts",
|
||||
recipe = {
|
||||
"", "", "",
|
||||
"dirt_grass 1", "dirt_grass 1", "dirt_grass 1",
|
||||
"dirt 1", "dirt 1", "dirt 1",
|
||||
},
|
||||
ground_level = 5,
|
||||
can_build = ns.plots
|
||||
}
|
||||
|
|
|
|||
BIN
mods/rgt_towns/rgt_towns_main/schems/empty_plot.mts
Normal file
BIN
mods/rgt_towns/rgt_towns_main/schems/empty_plot.mts
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue