Faction chest bug fix
Faction chests can be dug up even tho they have stuff in them.
This commit is contained in:
parent
932645b5a0
commit
80001c9a15
28
README.md
28
README.md
@ -5,13 +5,13 @@ Mod for handling in game factions and reputation.
|
|||||||
|
|
||||||
# TODO LIST
|
# TODO LIST
|
||||||
|
|
||||||
Redo the parcel attack system.
|
Redo the parcel attack system(Can be turned on in settings).
|
||||||
|
|
||||||
Add command to show or hide all parcel position locations as markers.
|
Add command to show or hide all parcel position locations as markers.
|
||||||
|
|
||||||
Add money.
|
Add money.
|
||||||
|
|
||||||
Player tax.
|
Player money tax.
|
||||||
|
|
||||||
faction territory titles.
|
faction territory titles.
|
||||||
|
|
||||||
@ -35,26 +35,6 @@ Parcels should show up at a more accurate position just like in mc factions.
|
|||||||
|
|
||||||
Allow faction chest to become big when you place two chests by each other like in mc.
|
Allow faction chest to become big when you place two chests by each other like in mc.
|
||||||
|
|
||||||
mc style tnt.
|
Add-on mod mc style tnt.
|
||||||
|
|
||||||
lag-free fire(if thats possible).
|
Add-on mod lag-free fire(if thats possible).
|
||||||
|
|
||||||
# COMPLETED BUT NEEDS TESTING LIST
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
# COMPLETED
|
|
||||||
|
|
||||||
Make factions power max based on how many players are in the team, and players with the same ip address can not add to the power max.
|
|
||||||
|
|
||||||
Make factions without parcels disband after a few hours.
|
|
||||||
|
|
||||||
Complete the diplomacy system.
|
|
||||||
|
|
||||||
Make claim's depth not go to high or low. Or make it act like a protection block where you have to claim land upwards and downwards.
|
|
||||||
|
|
||||||
Add a show claim command (show small entity boxes like in protection mod).
|
|
||||||
|
|
||||||
Remove banner code.
|
|
||||||
|
|
||||||
Add command to set the faction message of the day.
|
|
@ -377,7 +377,6 @@ function factions.Faction.disband(self, reason)
|
|||||||
self:on_disband(reason)
|
self:on_disband(reason)
|
||||||
local playerslist = self.onlineplayers
|
local playerslist = self.onlineplayers
|
||||||
for i,l in pairs(playerslist) do
|
for i,l in pairs(playerslist) do
|
||||||
local faction = factions.get_player_faction(i)
|
|
||||||
removeHud(i,"factionName")
|
removeHud(i,"factionName")
|
||||||
removeHud(i,"powerWatch")
|
removeHud(i,"powerWatch")
|
||||||
end
|
end
|
||||||
|
21
nodes.lua
21
nodes.lua
@ -32,7 +32,26 @@ minetest.register_node("factions:chest", {
|
|||||||
description = "Faction chest",
|
description = "Faction chest",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
minetest.get_meta(pos):get_inventory():set_size("main", 8*4)
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("infotext", "Faction Chest")
|
||||||
|
meta:set_string("faction", "")
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 8*4)
|
||||||
|
end,
|
||||||
|
after_place_node = function(pos, placer)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local cf = factions.get_player_faction(placer:get_player_name())
|
||||||
|
if cf ~= nil then
|
||||||
|
meta:set_string("faction", cf.name or "")
|
||||||
|
meta:set_string("infotext", "Faction Chest (owned by faction " ..
|
||||||
|
meta:get_string("faction") .. ")")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
can_dig = function(pos,player)
|
||||||
|
local meta = minetest.get_meta(pos);
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return inv:is_empty("main") and
|
||||||
|
default.can_interact_with_node(player, pos)
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
if factions.can_use_chest(pos, player:get_player_name()) then
|
if factions.can_use_chest(pos, player:get_player_name()) then
|
||||||
|
Loading…
Reference in New Issue
Block a user