Skip to content

Commit

Permalink
add Emperor job role and announce feature for admins
Browse files Browse the repository at this point in the history
  • Loading branch information
efzapa committed Nov 17, 2024
1 parent 528bdce commit 5552b18
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 0 deletions.
13 changes: 13 additions & 0 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='adminnotice'><b>All Hail the Emperor</b></span>")
//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

Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
128 changes: 128 additions & 0 deletions code/modules/jobs/job_types/roguetown/other/emperor.dm
Original file line number Diff line number Diff line change
@@ -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, "<b><span class='notice'><span class='big'>[L.real_name] is Emperor of the Empire.</span></span></b>")
addtimer(CALLBACK(L, TYPE_PROC_REF(/mob, emperor_color_choice)), 50)
else
to_chat(world, "<b><span class='notice'><span class='big'>[L.real_name] is Empress of the Empire.</span></span></b>")
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)

0 comments on commit 5552b18

Please sign in to comment.