diff --git a/code/game/objects/structures/fake_machines/steward.dm b/code/game/objects/structures/fake_machines/steward.dm index f5065983dd9..375763c312b 100644 --- a/code/game/objects/structures/fake_machines/steward.dm +++ b/code/game/objects/structures/fake_machines/steward.dm @@ -3,8 +3,9 @@ #define TAB_STOCK 3 #define TAB_IMPORT 4 #define TAB_BOUNTIES 5 -#define TAB_LOG 6 -#define TAB_CUSTOM 7 +#define TAB_JOBS 6 +#define TAB_LOG 7 +#define TAB_CUSTOM 8 /datum/stock/stockpile/custom abstract_type = /datum/stock/stockpile/custom @@ -278,6 +279,48 @@ record_round_statistic(STATS_FINES_INCOME, newtax) SStreasury.give_money_account(-newtax, A) break + if(href_list["changejob"]) + var/X = locate(href_list["changejob"]) + if(!X) + return + for(var/mob/living/A in SStreasury.bank_accounts) + if(A == X) + var/list/jobs = list() + jobs += GLOB.noble_positions + jobs += GLOB.garrison_positions + jobs += GLOB.serf_positions + jobs += GLOB.company_positions + jobs += GLOB.peasant_positions + jobs += GLOB.apprentices_positions + jobs += GLOB.youngfolk_positions + jobs += GLOB.allmig_positions + jobs -= list( + /datum/job/lord::title, + /datum/job/innkeep_son::title, + /datum/job/bandit::title, + ) + jobs += "Cancel" + var/new_pos = input(usr, "Select their new position", src, null) as anything in jobs + if(!usr.can_perform_action(src, NEED_DEXTERITY|FORBID_TELEKINESIS_REACH) || locked()) + return + if(new_pos == "Cancel") + return + A.job = new_pos + A.mind?.set_assigned_role(new_pos) + if(ishuman(A)) + var/mob/living/carbon/human/human = A + if(!HAS_TRAIT(human, TRAIT_RECRUITED) && HAS_TRAIT(human, TRAIT_FOREIGNER)) + ADD_TRAIT(human, TRAIT_RECRUITED, TRAIT_GENERIC) + + if(A.mind?.assigned_role) + new_pos = A.mind.assigned_role.get_informed_title(A) + A.mind.assigned_role.assign_honorary_titles(A) + + if(!SScommunications.can_announce(usr)) + return + + priority_announce("[A.real_name] has been assigned the title of [new_pos].", "Steward's Desk", 'sound/misc/alert.ogg', "Captain") + break if(href_list["payroll"]) var/list/L = list(GLOB.noble_positions) + list(GLOB.garrison_positions) + list(GLOB.church_positions) + list(GLOB.serf_positions) + list(GLOB.company_positions) + list(GLOB.peasant_positions) + list(GLOB.youngfolk_positions) + list(GLOB.apprentices_positions) + list(GLOB.inquisition_positions) var/list/jobs = list() @@ -373,6 +416,7 @@ contents += "\[Stockpile\]
" contents += "\[Import\]
" contents += "\[Bounties\]
" + contents += "\[Jobs\]
" contents += "\[Log\]
" contents += "\[Custom Stocks\]
" contents += "" @@ -463,6 +507,17 @@ else contents += "Bounty Price: [A.payout_price]

" contents += "" + if(TAB_JOBS) + contents += "\[Return\]
" + contents += "
Jobs
" + contents += "--------------
" + for(var/mob/living/carbon/human/A in SStreasury.bank_accounts) + if(ishuman(A)) + contents += "[A.real_name] ([A.get_role_title(steward_check = TRUE)])
" + else + contents += "[A.real_name]
" + contents += "\[Change Job\]

" + contents += "" if(TAB_LOG) contents += "\[Return\]
" contents += "
Log
" @@ -546,5 +601,6 @@ #undef TAB_STOCK #undef TAB_IMPORT #undef TAB_BOUNTIES +#undef TAB_JOBS #undef TAB_LOG #undef TAB_CUSTOM