Skip to content

Commit

Permalink
organizing spelllist
Browse files Browse the repository at this point in the history
  • Loading branch information
tioluko authored Sep 5, 2024
1 parent 2ed389a commit a88eceb
Showing 1 changed file with 2 additions and 60 deletions.
62 changes: 2 additions & 60 deletions code/modules/jobs/job_types/roguetown/nobility/lord.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ GLOBAL_LIST_EMPTY(lord_titles)
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
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
shoes = /obj/item/clothing/shoes/roguetown/boots
if(H.mind)
H.mind.adjust_skillrank(/datum/skill/combat/polearms, 2, TRUE)
H.mind.adjust_skillrank(/datum/skill/combat/maces, 2, TRUE)
Expand Down Expand Up @@ -140,61 +140,3 @@ GLOBAL_LIST_EMPTY(lord_titles)
else
family_guy.fully_replace_character_name(family_guy.real_name, family_guy.real_name + " " + GLOB.lordsurname)
return family_guy.real_name

/obj/effect/proc_holder/spell/self/grant_title
name = "Grant Title"
desc = "Grant someone a title of honor... Or shame."
antimagic_allowed = TRUE
charge_max = 100
/// Maximum range for title granting
var/title_range = 3
/// Maximum length for the title
var/title_length = 42

/obj/effect/proc_holder/spell/self/grant_title/cast(list/targets, mob/user = usr)
. = ..()
var/granted_title = input(user, "What title do you wish to grant?", "[name]") as null|text
granted_title = reject_bad_text(granted_title, title_length)
if(!granted_title)
return
var/list/recruitment = list()
for(var/mob/living/carbon/human/village_idiot in (get_hearers_in_view(title_range, user) - user))
//not allowed
if(!can_title(village_idiot))
continue
recruitment[village_idiot.name] = village_idiot
if(!length(recruitment))
to_chat(user, span_warning("There are no potential honoraries in range."))
return
var/inputty = input(user, "Select an honorary!", "[name]") as anything in recruitment
if(inputty)
var/mob/living/carbon/human/recruit = recruitment[inputty]
if(!QDELETED(recruit) && (recruit in get_hearers_in_view(title_range, user)))
INVOKE_ASYNC(src, PROC_REF(village_idiotify), recruit, user, granted_title)
else
to_chat(user, span_warning("Honorific failed!"))
else
to_chat(user, span_warning("Honorific cancelled."))

/obj/effect/proc_holder/spell/self/grant_title/proc/can_title(mob/living/carbon/human/recruit)
//wtf
if(QDELETED(recruit))
return FALSE
//need a mind
if(!recruit.mind)
return FALSE
//need to see their damn face
if(!recruit.get_face_name(null))
return FALSE
return TRUE

/obj/effect/proc_holder/spell/self/grant_title/proc/village_idiotify(mob/living/carbon/human/recruit, mob/living/carbon/human/recruiter, granted_title)
if(QDELETED(recruit) || QDELETED(recruiter) || !granted_title)
return FALSE
if(GLOB.lord_titles[recruit.real_name])
recruiter.say("I HEREBY STRIP YOU, [uppertext(recruit.name)], OF THE TITLE OF [uppertext(GLOB.lord_titles[recruit.real_name])]!")
GLOB.lord_titles -= recruit.real_name
return FALSE
recruiter.say("I HEREBY GRANT YOU, [uppertext(recruit.name)], THE TITLE OF [uppertext(granted_title)]!")
GLOB.lord_titles[recruit.real_name] = granted_title
return TRUE

0 comments on commit a88eceb

Please sign in to comment.