Added admin auto promote and moved ranks to playerRanks

This commit is contained in:
Cooldude2606
2017-12-16 14:35:39 +00:00
parent 592761c4af
commit dfea8d6a51
3 changed files with 45 additions and 36 deletions

View File

@@ -44,6 +44,46 @@ groups['Root']:edit('allow',false,{
})
ranks['Root']:edit('test',true,'testing')
ranks['Root']:add_rank{
name='Owner',
short_hand='Owner',
tag='[Owner]',
time=nil,
colour={r=170,g=0,b=0},
is_admin = true
}
ranks['Root']:add_rank{
name='Community Manager',
short_hand='Com Mngr',
tag='[Com Mngr]',
colour={r=150,g=68,b=161},
is_admin = true
}
ranks['Root']:add_rank{
name='Developer',
short_hand='Dev',
tag='[Dev]',
colour={r=179,g=125,b=46},
is_admin = true
}
ranks['Admin']:add_rank{
name='Mod',
short_hand='Mod',
tag='[Mod]',
colour={r=0,g=170,b=0},
disallow={
'server_command'
},
is_admin = true
}
groups['User']:add_rank{
name='Donator',
short_hand='P2W',
tag='[P2W]',
colour={r=233,g=63,b=233}
}
groups['User']:add_rank{
name='Veteran',
short_hand='Vet',

View File

@@ -123,6 +123,7 @@ function Ranking.give_rank(player,rank,by_player,tick)
player.permission_group = game.permissions.get_group(rank.name)
player.tag = rank.tag
if not old_rank.group.name == 'Jail' then Ranking._presets().old[player.index] = rank.name end
player.admin = rank.is_admin
if defines.events.rank_change then
script.raise_event(defines.events.rank_change,{
name=defines.events.rank_change,

View File

@@ -93,50 +93,18 @@ root:add_rank{
short_hand='Root',
tag='[Root]',
colour=defines.color.white,
is_root=true
}
root:add_rank{
name='Owner',
short_hand='Owner',
tag='[Owner]',
time=nil,
colour={r=170,g=0,b=0}
}
root:add_rank{
name='Community Manager',
short_hand='Com Mngr',
tag='[Com Mngr]',
colour={r=150,g=68,b=161}
}
root:add_rank{
name='Developer',
short_hand='Dev',
tag='[Dev]',
colour={r=179,g=125,b=46}
is_root=true,
is_admin = true
}
admin:add_rank{
name='Admin',
short_hand='Admin',
tag='[Admin]',
colour={r=233,g=63,b=233}
}
admin:add_rank{
name='Mod',
short_hand='Mod',
tag='[Mod]',
colour={r=0,g=170,b=0},
disallow={
'server_command'
}
colour={r=233,g=63,b=233},
is_admin = true
}
user:add_rank{
name='Donator',
short_hand='P2W',
tag='[P2W]',
colour={r=233,g=63,b=233}
}
user:add_rank{
name='Member',
short_hand='Mem',