Skip to content

Commit

Permalink
Aaaand now PltCo can do it
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 7, 2023
1 parent 0352948 commit 306caac
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ var/list/roundstart_mod_verbs = list(
add_verb(src, /client/proc/togglebuildmodeself)
add_verb(src, /client/proc/toggle_game_master)
add_verb(src, /client/proc/toggle_join_xeno)
add_verb(src, /client/proc/rename_platoon)
add_verb(src, /client/proc/game_master_rename_platoon)
if(CLIENT_HAS_RIGHTS(src, R_SERVER))
add_verb(src, admin_verbs_server)
if(CLIENT_HAS_RIGHTS(src, R_DEBUG))
Expand Down Expand Up @@ -360,7 +360,7 @@ var/list/roundstart_mod_verbs = list(
/client/proc/togglebuildmodeself,
/client/proc/toggle_game_master,
/client/proc/toggle_join_xeno,
/client/proc/rename_platoon,
/client/proc/game_master_rename_platoon,
admin_verbs_admin,
admin_verbs_ban,
admin_verbs_minor_event,
Expand Down
22 changes: 20 additions & 2 deletions code/modules/admin/game_master/extra_buttons/rename_platoon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,35 @@
GLOBAL_VAR_INIT(main_platoon_name, SQUAD_MARINE_1)

/// Ability to rename the platoon
/client/proc/rename_platoon()
set name = "Rename Platoon"
/client/proc/game_master_rename_platoon()
set name = "Rename Platoon Override"
set category = "Game Master.Extras"

if(!admin_holder || !check_rights(R_MOD, FALSE))
return

rename_platoon()

/client/proc/commander_rename_platoon()
set name = "Rename Platoon"
set category = "OOC.Commander"

if(GLOB.main_platoon_name != SQUAD_MARINE_1)
to_chat(src, SPAN_NOTICE("The platoon has already been renamed this round."))
return

rename_platoon()

/// Actually renames the platoon
/client/proc/rename_platoon()
var/new_name = tgui_input_text(mob, "New platoon name?", "Platoon Name", GLOB.main_platoon_name)
if(!new_name || !istext(new_name))
return

if(length(new_name) > 10)
to_chat(src, SPAN_NOTICE("The platoon name should be 10 characters or less."))
return

var/old_name = GLOB.main_platoon_name

var/channel = radiochannels[old_name]
Expand Down
8 changes: 8 additions & 0 deletions code/modules/gear_presets/uscm_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,14 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND)

/datum/equipment_preset/uscm_ship/so/load_status(mob/living/carbon/human/new_human, client/mob_client)
. = ..()

if(!new_human.client)
return

add_verb(new_human.client, /client/proc/commander_rename_platoon)

/datum/equipment_preset/uscm_ship/so/lesser_rank
paygrade = "MO1"

Expand Down

0 comments on commit 306caac

Please sign in to comment.