I made a team system today, it's extremely messy, and I just want to know if it has a lot of tiny bugs in it - no need to post a cleaner format or anything. : P
So, could somebody proofread this, please?
mob
var
tmp
team
list
team_mates
team
verb
Guild_Chat (msg as text)
set category = "Team"
if (muted)
usr << "<font color = red><b>You're muted!</b></font>"
else
if (msg)
for (var/mob/m in world)
if (m.team == usr.team)
m << "<b>Team:</b><font color = #99ffff> [name]</font>: [msg]"
Leave_Guild ()
set category = "Team"
for (var/mob/m in world)
if (m.team == usr.team)
m << "<b><font color = red>[usr] has left the team!</font></b>"
usr.team_mates -= m
m.team_mates -= usr
usr.team = null
team_leader
verb
Boot (mob/m in usr.team_mates)
set category = "Team"
m << "<b><font color = red>You have been booted from [m.team]!</font></b>"
usr << "<b><font color = red>You have booted [m] from the team!</font></b>"
usr.team_mates -= m
m.team_mates -= usr
for (var/mob/h in usr.team_mates)
h.team_mates -= m
m.team_mates -= h
m.team = null
Invite ()
set category = "Team"
var/potentials = list ()
for (var/mob/m in world)
if (m.client)
if (!m == usr)
if (!m.team)
potentials += m
var/mob/inv = input ("Who do you wish to invite?") in potentials
var/answer = input(inv, "Do you want to join [usr]'s team, [usr.team]?", "Team") in list ("Yes", "No")
switch (answer)
if ("Yes")
inv.team = usr.team
inv.team_mates += usr
for (var/mob/f in usr.team_mates)
inv.team_mates += f
usr.team_mates += inv
for (var/mob/a in world)
if (a.team == usr.team)
a << "<b><font color = yellow>[inv] has joined the team!</font></b>"