Manually set faction leader name to fix for factions_ui
parent
0df99b434a
commit
c106ad1f5f
9
ROADMAP
9
ROADMAP
|
@ -255,6 +255,7 @@ It's really fast. May be used on a website, to show the actual map.
|
|||
Maybe used with https://github.com/octacian/spawnpoint
|
||||
**** TODO [feature_FactionUI] Try to add a factions UI
|
||||
:LOGBOOK:
|
||||
CLOCK: [2019-10-31 jeu. 05:31]--[2019-10-31 jeu. 05:42] => 0:11
|
||||
CLOCK: [2019-10-12 sam. 14:13]--[2019-10-12 sam. 14:25] => 0:12
|
||||
CLOCK: [2019-09-04 mer. 13:24]--[2019-09-04 mer. 13:33] => 0:09
|
||||
CLOCK: [2019-06-06 jeu. 19:22]--[2019-06-06 jeu. 19:25] => 0:03
|
||||
|
@ -276,7 +277,13 @@ It's really fast. May be used on a website, to show the actual map.
|
|||
- [X] Should fix the Awards tab height
|
||||
- [X] Add the invite-only value
|
||||
It's faction.join_free
|
||||
- [ ] Members and leader still at nil
|
||||
- [-] Members and leader still at nil
|
||||
- [X] are these values correctly set ?
|
||||
just tested with an online one, leader and members aren't set
|
||||
Should have fixed leader name
|
||||
- [ ] Retest for members number
|
||||
- [ ] undefined global variable bad.
|
||||
...etest/games/minetest-pvp/mods/redtrees/sakuragi/init.lua
|
||||
- [ ] Just add a create button with a name textedit
|
||||
xpro/sfinv.lua calls a register_page function
|
||||
**** DONE Trying to install mintest on the raspberry
|
||||
|
|
3
TODO
3
TODO
|
@ -11,4 +11,5 @@ minetest-solebull - LGPL-2.1 - A PVP/faction game for minetest based on Cobalt.
|
|||
|
||||
|
||||
* v0.0.2-7 (10 Aug. 2019 - ???) CLOC ???,???
|
||||
- (1) Add invite-only value to factions UI
|
||||
- (2) Manually set faction leader name to fix for factions_ui
|
||||
- Add invite-only value to factions UI
|
||||
|
|
|
@ -277,6 +277,12 @@ factions.register_command("create", {
|
|||
if factions.can_create_faction(factionname) then
|
||||
new_faction = factions.new_faction(factionname, nil)
|
||||
new_faction:add_player(player, new_faction.default_leader_rank)
|
||||
|
||||
-- Manual fix ?
|
||||
new_faction.leader = player
|
||||
new_faction.players[player] = player
|
||||
factions.save()
|
||||
|
||||
return true
|
||||
else
|
||||
send_error(player, "Faction cannot be created.")
|
||||
|
|
|
@ -175,7 +175,10 @@ function factions.Faction.count_land(self)
|
|||
return count
|
||||
end
|
||||
|
||||
-- Add the given player with the given rank to the faction
|
||||
function factions.Faction.add_player(self, player, rank)
|
||||
minetest.chat_send_all("Adding "..player.." to the newly created faction.")
|
||||
|
||||
self:on_player_join(player)
|
||||
self.players[player] = rank or self.default_rank
|
||||
factions.players[player] = self.name
|
||||
|
|
Loading…
Reference in New Issue