Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 58 additions & 2 deletions code/game/objects/structures/fake_machines/steward.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a very spammy announce

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()
Expand Down Expand Up @@ -373,6 +416,7 @@
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_STOCK]'>\[Stockpile\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_IMPORT]'>\[Import\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_BOUNTIES]'>\[Bounties\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_JOBS]'>\[Jobs\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_LOG]'>\[Log\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_CUSTOM]'>\[Custom Stocks\]</a><BR>"
contents += "</center>"
Expand Down Expand Up @@ -463,6 +507,17 @@
else
contents += "Bounty Price: <a href='byond://?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]</a><BR><BR>"
contents += "</div>"
if(TAB_JOBS)
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<center>Jobs<BR>"
contents += "--------------<BR>"
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)])<BR>"
else
contents += "[A.real_name]<BR>"
contents += "<a href='byond://?src=\ref[src];changejob=\ref[A]'>\[Change Job\]</a><BR><BR>"
contents += "</div>"
if(TAB_LOG)
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<center>Log<BR>"
Expand Down Expand Up @@ -546,5 +601,6 @@
#undef TAB_STOCK
#undef TAB_IMPORT
#undef TAB_BOUNTIES
#undef TAB_JOBS
#undef TAB_LOG
#undef TAB_CUSTOM
Loading