mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
Refactors antag team code. Adds an admin UI to interact with teams (#19870)
* adds antag team framework code * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * sirryan review * adds the ability for admins to add members * oops Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -1609,6 +1609,49 @@
|
||||
else if(href_list["check_antagonist"])
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["check_teams"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
check_teams()
|
||||
|
||||
else if(href_list["team_command"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/team/team
|
||||
var/datum/mind/member
|
||||
if(href_list["team"])
|
||||
team = locateUID(href_list["team"])
|
||||
if(QDELETED(team))
|
||||
to_chat(usr, "<span class='warning'>This team doesn't exist anymore!</span>")
|
||||
return
|
||||
if(href_list["member"])
|
||||
member = locateUID(href_list["member"])
|
||||
if(QDELETED(member))
|
||||
to_chat(usr, "<span class='warning'>This team member doesn't exist anymore!</span>")
|
||||
return
|
||||
switch(href_list["team_command"])
|
||||
if("communicate")
|
||||
team.admin_communicate(usr)
|
||||
if("delete_team")
|
||||
message_admins("[key_name_admin(usr)] has deleted the '[team.name]' team.")
|
||||
log_admin("[key_name_admin(usr)] has deleted the '[team.name]' team.")
|
||||
qdel(team)
|
||||
if("rename_team")
|
||||
team.admin_rename_team(usr)
|
||||
if("admin_add_member")
|
||||
team.admin_add_member(usr)
|
||||
if("remove_member")
|
||||
team.admin_remove_member(usr, member)
|
||||
if("view_member")
|
||||
show_player_panel(member.current)
|
||||
if("add_objective")
|
||||
team.admin_add_objective(usr)
|
||||
if("remove_objective")
|
||||
var/datum/objective/O = locateUID(href_list["objective"])
|
||||
if(O)
|
||||
team.admin_remove_objective(usr, O)
|
||||
check_teams()
|
||||
|
||||
else if(href_list["take_question"])
|
||||
var/index = text2num(href_list["take_question"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user