ID:154087
 
Okay, I was thinking, the easiest way to make a team system, its to do a mob/list/teamates with a leader and a name....


But that is just too...I dont know..simple..and not very editable....

Then I thought about using datums, but being the newbie with datums that I am, I couldn't figure out anything...

Help/Suggestions/Comments welcome.


-ST
var/list/teams = new()

datum/Team
var/list/members
var/mob/player/leader
var/name
proc
Add_Member(var/mob/player/M)
//do checks here.
members += M
M.team = src

mob/player
var/datum/Team/team
verb
Create_Team()
var/datum/Team/T = new()
T.leader = src
T.name = input("What name?","Name") as txt
T.Add_Member(src)
teams += T
Join_Team(var/mob/player/M)
M.team.Add_Member(src)

I just threw that together but the concept should work. The only difference (that I know of) between datums and atoms is that datums don't have all the extra baggage, they're basically blank slates except for some built in functions like New() and Del().
I worked on a clan/team/group thingy system for a ROM (MUD).

Instead of leaders, I determined what things a person could do to a clan. I then made my code for these activities only check if the person had the specific right to do whatever the activity was. That way, the rights could be divided into different forms of government. (Of course, a single person could have all of the rights so the leader system was a subset of my system.)

Along with the rights to perform those actions, I had rights to assign those rights and rights to remove those rights. I wanted players to be able to govern themselves without having some admin/whatever have to adjust their ranks... Of course, I can't quite remember how I decided to handle assigning those assignment and removal rights. ;) (Actually, I think I made the players decide when the clan was made.)