Finished most things
This commit is contained in:
parent
63254c55fc
commit
e3068026a4
|
@ -229,6 +229,7 @@ function factionsmod_chat.cmdhandler(playername,parameter)
|
||||||
|
|
||||||
--delete faction
|
--delete faction
|
||||||
if cmd == "delete" then
|
if cmd == "delete" then
|
||||||
|
factionsmod.member_remove(params[2],player)
|
||||||
if factionsmod.delete_faction(params[2]) then
|
if factionsmod.delete_faction(params[2]) then
|
||||||
minetest.chat_send_player(playername,
|
minetest.chat_send_player(playername,
|
||||||
"factionsmod: deleted faction " .. params[2],
|
"factionsmod: deleted faction " .. params[2],
|
||||||
|
|
|
@ -238,6 +238,9 @@ end
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
function factionsmod.delete_faction(name)
|
function factionsmod.delete_faction(name)
|
||||||
|
|
||||||
|
for k,v in pairs(factionsmod.dynamic_data.membertable[name]) do
|
||||||
|
factionsmod.member_remove(name,v)
|
||||||
|
end
|
||||||
factionsmod.data.factionsmod[name] = nil
|
factionsmod.data.factionsmod[name] = nil
|
||||||
|
|
||||||
factionsmod.save()
|
factionsmod.save()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user