Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into Enables-Prison
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg-Joffer committed Feb 26, 2024
2 parents 377d92f + f6a870a commit e9f9ab5
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ GLOBAL_LIST_INIT(possible_vote_types, list(
if(!(params["vote_type"] in GLOB.possible_vote_types))
return

if(!check_rights(R_ADMIN))
if(!check_rights(R_MOD))
var/list/vote_type = GLOB.possible_vote_types[params["vote_type"]]
if(vote_type["admin_only"])
return
Expand Down
6 changes: 2 additions & 4 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ GLOBAL_LIST_INIT(admin_verbs_minor_event, list(
/client/proc/cmd_admin_change_custom_event,
/datum/admins/proc/admin_force_distress,
/datum/admins/proc/admin_force_ERT_shuttle,
/client/proc/enable_event_mob_verbs,
/client/proc/force_hijack,
/datum/admins/proc/force_predator_round, //Force spawns a predator round.
/client/proc/adjust_predator_round,
Expand Down Expand Up @@ -141,7 +142,6 @@ GLOBAL_LIST_INIT(admin_verbs_minor_event, list(
))

GLOBAL_LIST_INIT(admin_verbs_major_event, list(
/client/proc/enable_event_mob_verbs,
/client/proc/cmd_admin_dress_all,
/client/proc/free_all_mobs_in_view,
/client/proc/drop_bomb,
Expand Down Expand Up @@ -238,6 +238,7 @@ GLOBAL_LIST_INIT(debug_verbs, list(
))

GLOBAL_LIST_INIT(admin_verbs_possess, list(
/client/proc/cmd_assume_direct_control,
/client/proc/possess,
/client/proc/release
))
Expand All @@ -262,10 +263,7 @@ GLOBAL_LIST_INIT(admin_mob_event_verbs_hideable, list(
/client/proc/editappear,
/client/proc/cmd_admin_addhud,
/client/proc/cmd_admin_change_their_hivenumber,
/client/proc/cmd_assume_direct_control,
/client/proc/free_mob_for_ghosts,
/client/proc/possess,
/client/proc/release,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_grantallskills,
/client/proc/admin_create_account
Expand Down
22 changes: 22 additions & 0 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/datum/admin_help/proc/Close(key_name = key_name_admin(usr), silent = FALSE)
if(state != AHELP_ACTIVE)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

RemoveActive()
state = AHELP_CLOSED
GLOB.ahelp_tickets.ListInsert(src)
Expand All @@ -483,6 +488,11 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/datum/admin_help/proc/Resolve(key_name = key_name_admin(usr), silent = FALSE)
if(state != AHELP_ACTIVE)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

RemoveActive()
state = AHELP_RESOLVED
GLOB.ahelp_tickets.ListInsert(src)
Expand All @@ -501,6 +511,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE || !initial_message)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

if(!initiator.current_mhelp)
initiator.current_mhelp = new(initiator)

Expand Down Expand Up @@ -559,6 +573,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

if(initiator)
initiator.giveadminhelpverb()

Expand All @@ -582,6 +600,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
to_chat(usr, SPAN_WARNING("This ticket is already closed!"))
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

var/chosen = tgui_input_list(usr, "Which auto response do you wish to send?", "AutoReply", GLOB.adminreplies)
var/datum/autoreply/admin/response = GLOB.adminreplies[chosen]

Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/adminpm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

var/message_prompt = "Message:"

if((AH?.opening_responders && length(AH.ticket_interactions) == 1 ) || (AH?.marked_admin && AH?.marked_admin != usr.key) && length(AH.ticket_interactions) == 2)
if((AH?.opening_responders && length(AH.ticket_interactions) == 1 ) || ((AH?.marked_admin && AH?.marked_admin != usr.key) && length(AH.ticket_interactions) == 2))
SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg', volume=30))
message_prompt += "\n\n**This ticket is already being responded to by: [length(AH.opening_responders) ? english_list(AH.opening_responders) : AH.marked_admin]**"

Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@
account_user.mind.store_memory(remembered_info)
account_user.mind.initial_account = generated_account

log_admin("[key_name(usr)] has created a new bank account for [key_name(account_user)].")

/client/proc/cmd_assume_direct_control(mob/M in GLOB.mob_list)
set name = "Control Mob"
set desc = "Assume control of the mob"
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-5779.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "harryob"
delete-after: True
changes:
- admin: "marking a ticket now actually stops other people from messing with your marked ticket"
6 changes: 6 additions & 0 deletions html/changelogs/AutoChangeLog-pr-5809.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: "realforest2001"
delete-after: True
changes:
- admin: "Mods can now run votes where appropriate."
- admin: "Moved a few event verbs from Admin level to Senior Mod."
- admin: "Added a log to creating new bank accounts."

0 comments on commit e9f9ab5

Please sign in to comment.