From 5552b1804f6d2c8064b6570f525f45fde5338ec0 Mon Sep 17 00:00:00 2001 From: gl0ck Date: Sun, 17 Nov 2024 04:12:51 -0500 Subject: [PATCH] add Emperor job role and announce feature for admins --- code/modules/admin/admin.dm | 13 ++ code/modules/admin/admin_verbs.dm | 1 + .../jobs/job_types/roguetown/other/emperor.dm | 128 ++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 code/modules/jobs/job_types/roguetown/other/emperor.dm diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index a3041511..0202cac9 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -544,6 +544,19 @@ usr << browse(dat, "window=admin2;size=240x280") return +/datum/admins/proc/announce_emperor() //make this better later, maybe use the sound system + set category = "Fun" + set name = "Announce Emperor" + set desc = "Announce 'All Hail the Emperor' to the world" + if(!check_rights(0)) + return + + to_chat(world, "All Hail the Emperor") + //SEND_SOUND(world, 'sound/emperor.ogg') + log_admin("Announce Emperor: [key_name(usr)] announced 'All Hail the Emperor'") + SSblackbox.record_feedback("tally", "admin_verb", 1, "Announce Emperor") + + /////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge //i.e. buttons/verbs diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f802428d..97b40724 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -111,6 +111,7 @@ GLOBAL_PROTECT(admin_verbs_ban) GLOBAL_LIST_INIT(admin_verbs_sounds, list(/client/proc/play_local_sound, /client/proc/play_sound, /client/proc/set_round_end_sound)) GLOBAL_PROTECT(admin_verbs_sounds) GLOBAL_LIST_INIT(admin_verbs_fun, list( + /datum/admins/proc/announce_emperor, /client/proc/cmd_admin_dress, /client/proc/cmd_admin_gib_self, /client/proc/drop_bomb, diff --git a/code/modules/jobs/job_types/roguetown/other/emperor.dm b/code/modules/jobs/job_types/roguetown/other/emperor.dm new file mode 100644 index 00000000..ea0aa1fa --- /dev/null +++ b/code/modules/jobs/job_types/roguetown/other/emperor.dm @@ -0,0 +1,128 @@ +GLOBAL_VAR(emperorsurname) +GLOBAL_LIST_EMPTY(emperor_titles) + +/datum/job/roguetown/emperor + title = "Emperor" + f_title = "Empress" + flag = EMPEROR + department_flag = NOBLEMEN + faction = "Station" + total_positions = 0 + spawn_positions = 1 + selection_color = JCOLOR_NOBLE + allowed_races = list("Humen") + allowed_sexes = list(MALE, FEMALE) + + spells = list( + /obj/effect/proc_holder/spell/self/grant_title, + /obj/effect/proc_holder/spell/self/convertrole/servant, + /obj/effect/proc_holder/spell/self/convertrole/guard, + /obj/effect/proc_holder/spell/self/convertrole/bog, + ) + outfit = /datum/outfit/job/roguetown/emperor + + display_order = JDO_EMPEROR + tutorial = "You are the supreme ruler of the lands, with absolute authority over all. Your word is law, and your power is unmatched. Use your influence wisely to maintain control and ensure the prosperity of your empire." + whitelist_req = TRUE + min_pq = 10 + max_pq = null + give_bank_account = 5000 + required = TRUE + +/datum/job/roguetown/exemperor //just used to change the emperor's title + title = "Emperor Emeritus" + f_title = "Empress Emeritus" + flag = EMPEROR + department_flag = NOBLEMEN + faction = "Station" + total_positions = 0 + spawn_positions = 0 + display_order = JDO_LADY + give_bank_account = TRUE + +/datum/job/roguetown/emperor/after_spawn(mob/living/L, mob/M, latejoin = TRUE) + ..() + if(L) + var/list/chopped_name = splittext(L.real_name, " ") + if(length(chopped_name) > 1) + chopped_name -= chopped_name[1] + GLOB.emperorsurname = jointext(chopped_name, " ") + else + GLOB.emperorsurname = "of [L.real_name]" + SSticker.select_ruler() + if(L.gender != FEMALE) + to_chat(world, "[L.real_name] is Emperor of the Empire.") + addtimer(CALLBACK(L, TYPE_PROC_REF(/mob, emperor_color_choice)), 50) + else + to_chat(world, "[L.real_name] is Empress of the Empire.") + addtimer(CALLBACK(L, TYPE_PROC_REF(/mob, emperor_color_choice)), 50) + +/datum/outfit/job/roguetown/emperor/pre_equip(mob/living/carbon/human/H) //TODO: add proper sprited equipment to the emperor when they spawn in + ..() + head = /obj/item/clothing/head/roguetown/crown/serpcrown + neck = /obj/item/storage/belt/rogue/pouch/coins/rich + cloak = /obj/item/clothing/cloak/lordcloak + belt = /obj/item/storage/belt/rogue/leather/plaquegold + l_hand = /obj/item/rogueweapon/lordscepter + backpack_contents = list(/obj/item/rogueweapon/huntingknife/idagger/steel/special = 1) + id = /obj/item/clothing/ring/active/nomag + if(H.gender == MALE) + pants = /obj/item/clothing/under/roguetown/tights/black + shirt = /obj/item/clothing/suit/roguetown/shirt/undershirt/black + armor = /obj/item/clothing/suit/roguetown/armor/leather/vest/black + shoes = /obj/item/clothing/shoes/roguetown/boots + if(H.mind) + H.mind.adjust_skillrank(/datum/skill/combat/polearms, 3, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/maces, 3, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/crossbows, 4, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/wrestling, 4, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/unarmed, 2, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/swords, 5, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/knives, 4, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/swimming, 2, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/climbing, 2, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/athletics, 5, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/reading, 5, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/riding, 4, TRUE) + if(H.age == AGE_OLD) + H.mind.adjust_skillrank(/datum/skill/combat/swords, 2, TRUE) + H.change_stat("strength", 2) + H.change_stat("intelligence", 4) + H.change_stat("endurance", 4) + H.change_stat("speed", 2) + H.change_stat("perception", 3) + H.change_stat("fortune", 6) + if(ishumannorthern(H)) + H.dna.species.soundpack_m = new /datum/voicepack/male/evil() + + if(H.wear_mask) + if(istype(H.wear_mask, /obj/item/clothing/mask/rogue/eyepatch)) + qdel(H.wear_mask) + mask = /obj/item/clothing/mask/rogue/lordmask + if(istype(H.wear_mask, /obj/item/clothing/mask/rogue/eyepatch/left)) + qdel(H.wear_mask) + mask = /obj/item/clothing/mask/rogue/lordmask/l + else //Empress + armor = /obj/item/clothing/suit/roguetown/armor/armordress + belt = /obj/item/storage/belt/rogue/leather/plaquegold + shoes = /obj/item/clothing/shoes/roguetown/shortboots + if(H.mind) + H.mind.adjust_skillrank(/datum/skill/combat/swords, 4, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/knives, 3, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/swimming, 1, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/climbing, 1, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/athletics, 4, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/reading, 4, TRUE) + H.mind.adjust_skillrank(/datum/skill/misc/medicine, 2, TRUE) + H.mind.adjust_skillrank(/datum/skill/combat/bows, 3, TRUE) + if(H.age == AGE_OLD) + H.mind.adjust_skillrank(/datum/skill/combat/swords, 1, TRUE) + H.change_stat("intelligence", 3) + H.change_stat("endurance", 3) + H.change_stat("speed", 2) + H.change_stat("perception", 2) + H.change_stat("fortune", 5) + + ADD_TRAIT(H, TRAIT_NOBLE, TRAIT_GENERIC) + ADD_TRAIT(H, TRAIT_NOSEGRAB, TRAIT_GENERIC) + ADD_TRAIT(H, TRAIT_HEAVYARMOR, TRAIT_GENERIC)