Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
SmiLeYre committed Feb 13, 2025
1 parent 93e5217 commit f712a1f
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 65 deletions.
42 changes: 38 additions & 4 deletions code/datums/sleep_adv/sleep_adv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,57 @@

/datum/sleep_adv/proc/show_ui(mob/living/user)
var/list/dat = list()
dat += "<center>Cycle \Roman[sleep_adv_cycle]</center>"
SSassets.transport.send_assets(user.client, list("try4_border.png", "try4.png", "slop_menustyle2.css", "gragstar.gif"))
dat += {"
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'/>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<style>
@import url('https://fonts.googleapis.com/css2?family=Tangerine:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Charm:wght@700&display=swap');
body {
background-color: rgb(31, 20, 24);
background:
url('[SSassets.transport.get_asset_url("try4_border.png")]'),
url('[SSassets.transport.get_asset_url("try4.png")]');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<link rel='stylesheet' type='text/css' href='[SSassets.transport.get_asset_url("slop_menustyle2.css")]'>
</head>
"}
dat += "<body>"
dat += "<div id='top_handwriting'><center>Cycle \Roman[sleep_adv_cycle]</center></div>"
dat += "<div id='class_select_box_div'>"
dat += "<br><center>Dream, for those who dream may reach higher heights</center><br>"
dat += "<center>\Roman[sleep_adv_points]</center>"
dat += "<br>"
for(var/skill_type in SSskills.all_skills)
var/datum/skill/skill = GetSkillRef(skill_type)
if(!enough_sleep_xp_to_advance(skill_type, 1))
continue
var/can_buy = can_buy_skill(skill_type)
var/next_level = get_next_level_for_skill(skill_type)
var/level_name = SSskills.level_names[next_level]
dat += "<br><a [can_buy ? "" : "class='linkOff'"] href='?src=[REF(src)];task=buy_skill;skill_type=[skill_type]'>[skill.name] ([level_name])</a> - \Roman[get_skill_cost(skill_type)]"
dat += "<div class='class_bar_div'><a class='vagrant' [can_buy ? "" : "class='linkOff'"] href='byond://?src=[REF(src)];task=buy_skill;skill_type=[skill_type]'>[skill.name] ([level_name])><img class='ninetysskull' src='[SSassets.transport.get_asset_url("gragstar.gif")]' width=32 height=32>\Roman[get_skill_cost(skill_type)]</span><img class='ninetysskull' src='[SSassets.transport.get_asset_url("gragstar.gif")]' width=32 height=32></a></div>"
dat += "<br>"
if(rolled_specials > 0)
var/can_buy = can_buy_special()
dat += "<br><a [can_buy ? "" : "class='linkOff'"] href='?src=[REF(src)];task=buy_special'>Dream something <b>special</b></a> - \Roman[get_special_cost()]"
dat += "<div class='class_bar_div'><a class='vagrant' [can_buy ? "" : "class='linkOff'"] href='byond://?src=[REF(src)];task=buy_special'>>Dream something <b>special</b></a>><img class='ninetysskull' src='[SSassets.transport.get_asset_url("gragstar.gif")]' width=32 height=32>\Roman[get_special_cost()]</span><img class='ninetysskull' src='[SSassets.transport.get_asset_url("gragstar.gif")]' width=32 height=32></a></div>"
dat += "<br><a [can_buy ? "" : "class='linkOff'"] href='byond://?src=[REF(src)];task=buy_special'>Dream something <b>special</b></a> - \Roman[get_special_cost()]"
dat += "<br>Specials can have negative or positive effects"
dat += "<br><br><center>Your points will be retained<br><a href='?src=[REF(src)];task=continue'>Continue</a></center>"
dat += "<div class='footer'>"
dat += "<br><br><center>Your points will be retained<br><a href='byond://?src=[REF(src)];task=continue'>Continue</a></center>"
dat += {"
</body>
</html>
"}
var/datum/browser/popup = new(user, "dreams", "<center>Dreams</center>", 350, 450)
popup.set_window_options("can_close=0")
popup.set_content(dat.Join())
Expand Down
129 changes: 68 additions & 61 deletions code/modules/roguetown/roguemachine/steward.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,48 +235,58 @@
if(.)
return
if(locked)
to_chat(user, span_warning("It's locked. Of course."))
to_chat(user, "<span class='warning'>It's locked. Of course.</span>")
return
user.changeNext_move(CLICK_CD_MELEE)
playsound(loc, 'sound/misc/keyboard_enter.ogg', 100, FALSE, -1)
var/canread = user.can_read(src, TRUE)
SSassets.transport.send_assets(user?.client, list("try4_border.png", "try5.png", "slop_menustyle2.css"))
var/contents
contents += {"
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'/>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<style>
@import url('https://fonts.googleapis.com/css2?family=Tangerine:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Charm:wght@700&display=swap');
body {
background-color: rgb(31, 20, 24);
background:
url('[SSassets.transport.get_asset_url("try4_border.png")]'),
url('[SSassets.transport.get_asset_url("try5.png")]');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<link rel='stylesheet' type='text/css' href='[SSassets.transport.get_asset_url("slop_menustyle2.css")]'>
</head> "}

switch(current_tab)
if(TAB_MAIN)
contents += "<center>NERVE MASTER<BR>"
contents += "<center>MASTER OF NERVES<BR>"
contents += "--------------<BR>"
contents += "<a href='?src=\ref[src];switchtab=[TAB_BANK]'>\[Bank\]</a><BR>"
contents += "<a href='?src=\ref[src];switchtab=[TAB_STOCK]'>\[Stockpile\]</a><BR>"
contents += "<a href='?src=\ref[src];switchtab=[TAB_IMPORT]'>\[Import\]</a><BR>"
contents += "<a href='?src=\ref[src];switchtab=[TAB_BOUNTIES]'>\[Bounties\]</a><BR>"
contents += "<a href='?src=\ref[src];switchtab=[TAB_LOG]'>\[Log\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_BANK]'>\[Bank\]</a><BR>"
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_LOG]'>\[Log\]</a><BR>"
contents += "</center>"
if(TAB_BANK)
contents += "<a href='?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a>"
contents += " <a href='?src=\ref[src];compact=1'>\[Compact: [compact? "ENABLED" : "DISABLED"]\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<center>Bank<BR>"
contents += "--------------<BR>"
contents += "Treasury: [SStreasury.treasury_value]m<BR>"
contents += "<a href='?src=\ref[src];withdraw=1'>\[Withdraw\]</a></center><BR>"
contents += "<a href='?src=\ref[src];payroll=1'>\[Pay by Class\]</a><BR><BR>"
if(compact)
for(var/mob/living/carbon/human/A in SStreasury.bank_accounts)
if(ishuman(A))
var/mob/living/carbon/human/tmp = A
contents += "[tmp.real_name] ([tmp.advjob ? tmp.advjob : tmp.job]) - [SStreasury.bank_accounts[A]]m"
else
contents += "[A.real_name] - [SStreasury.bank_accounts[A]]m"
contents += " / <a href='?src=\ref[src];givemoney=\ref[A]'>\[PAY\]</a> <a href='?src=\ref[src];fineaccount=\ref[A]'>\[FINE\]</a><BR><BR>"
else
for(var/mob/living/carbon/human/A in SStreasury.bank_accounts)
if(ishuman(A))
var/mob/living/carbon/human/tmp = A
contents += "[tmp.real_name] ([tmp.advjob ? tmp.advjob : tmp.job]) - [SStreasury.bank_accounts[A]]m<BR>"
else
contents += "[A.real_name] - [SStreasury.bank_accounts[A]]m<BR>"
contents += "<a href='?src=\ref[src];givemoney=\ref[A]'>\[Give Money\]</a> <a href='?src=\ref[src];fineaccount=\ref[A]'>\[Fine Account\]</a><BR><BR>"
contents += "Treasury: [SStreasury.treasury_value]m</center><BR>"
contents += "<a href='byond://?src=\ref[src];payroll=1'>\[Pay by Class\]</a><BR><BR>"
for(var/mob/living/A in SStreasury.bank_accounts)
contents += "[A.real_name] - [SStreasury.bank_accounts[A]]m<BR>"
contents += "<a href='byond://?src=\ref[src];givemoney=\ref[A]'>\[Give Money\]</a> <a href='byond://?src=\ref[src];fineaccount=\ref[A]'>\[Fine Account\]</a><BR><BR>"
if(TAB_STOCK)
contents += "<a href='?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += " <a href='?src=\ref[src];compact=1'>\[Compact: [compact? "ENABLED" : "DISABLED"]\]</a><BR>"
contents += "<center>Stockpile<BR>"
contents += "--------------<BR>"
Expand All @@ -287,10 +297,11 @@
for(var/datum/roguestock/stockpile/A in SStreasury.stockpile_datums)
contents += "<b>[A.name]:</b>"
contents += " [A.held_items[1] + A.held_items[2]]"
contents += " | SELL: <a href='?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]m</a>"
contents += " / BUY: <a href='?src=\ref[src];setprice=\ref[A]'>[A.withdraw_price]m</a>"
contents += " | SELL: <a href='byond://?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]</a><BR>"
contents += " / BUY: <a href='byond://?src=\ref[src];setprice=\ref[A]'>[A.withdraw_price]</a><BR>"
if(A.importexport_amt)
contents += " <a href='?src=\ref[src];import=\ref[A]'>\[IMP [A.importexport_amt] ([A.get_import_price()])\]</a> <a href='?src=\ref[src];export=\ref[A]'>\[EXP [A.importexport_amt] ([A.get_export_price()])\]</a> <BR>"
contents += "<a href='byond://?src=\ref[src];import=\ref[A]'>\[IMP [A.importexport_amt] ([A.get_import_price()])\]</a> <a href='byond://?src=\ref[src];export=\ref[A]'>\[EXP [A.importexport_amt] ([A.get_export_price()])\]</a> <BR>"
contents += "<a href='byond://?src=\ref[src];togglewithdraw=\ref[A]'>\[[A.withdraw_disabled ? "Enable" : "Disable"] Withdrawing\]</a><BR><BR>"
else
contents += "Treasury: [SStreasury.treasury_value]m<BR>"
contents += "Lord's Tax: [SStreasury.tax_value*100]%<BR>"
Expand All @@ -299,59 +310,55 @@
contents += "[A.name]<BR>"
contents += "[A.desc]<BR>"
contents += "Stockpiled Amount: [A.held_items[1] + A.held_items[2]]<BR>"
contents += "Bounty Price: <a href='?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]</a><BR>"
contents += "Withdraw Price: <a href='?src=\ref[src];setprice=\ref[A]'>[A.withdraw_price]</a><BR>"
contents += "Bounty Price: <a href='byond://?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]</a><BR>"
contents += "Withdraw Price: <a href='byond://?src=\ref[src];setprice=\ref[A]'>[A.withdraw_price]</a><BR>"
contents += "Demand: [A.demand2word()]<BR>"
if(A.importexport_amt)
contents += "<a href='?src=\ref[src];import=\ref[A]'>\[Import [A.importexport_amt] ([A.get_import_price()])\]</a> <a href='?src=\ref[src];export=\ref[A]'>\[Export [A.importexport_amt] ([A.get_export_price()])\]</a> <BR>"
contents += "<a href='?src=\ref[src];togglewithdraw=\ref[A]'>\[[A.withdraw_disabled ? "Enable" : "Disable"] Withdrawing\]</a><BR><BR>"
contents += "<a href='byond://?src=\ref[src];import=\ref[A]'>\[Import [A.importexport_amt] ([A.get_import_price()])\]</a> <a href='byond://?src=\ref[src];export=\ref[A]'>\[Export [A.importexport_amt] ([A.get_export_price()])\]</a> <BR>"
contents += "<a href='byond://?src=\ref[src];togglewithdraw=\ref[A]'>\[[A.withdraw_disabled ? "Enable" : "Disable"] Withdrawing\]</a><BR><BR>"
if(TAB_IMPORT)
contents += "<a href='?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a>"
contents += " <a href='?src=\ref[src];compact=1'>\[Compact: [compact? "ENABLED" : "DISABLED"]\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<center>Imports<BR>"
contents += "--------------<BR>"
if(compact)
contents += "Treasury: [SStreasury.treasury_value]m"
contents += " / Lord's Tax: [SStreasury.tax_value*100]%"
contents += " / Guild's Tax: [SStreasury.queens_tax*100]%</center><BR>"
for(var/datum/roguestock/import/A in SStreasury.stockpile_datums)
contents += "<b>[A.name]:</b>"
contents += " <a href='?src=\ref[src];import=\ref[A]'>\[Import [A.importexport_amt] ([A.get_import_price()])\]</a><BR><BR>"
else
contents += "Treasury: [SStreasury.treasury_value]m<BR>"
contents += "Lord's Tax: [SStreasury.tax_value*100]%<BR>"
contents += "Guild's Tax: [SStreasury.queens_tax*100]%</center><BR>"
for(var/datum/roguestock/import/A in SStreasury.stockpile_datums)
contents += "[A.name]<BR>"
contents += "[A.desc]<BR>"
if(!A.stable_price)
contents += "Demand: [A.demand2word()]<BR>"
contents += "<a href='?src=\ref[src];import=\ref[A]'>\[Import [A.importexport_amt] ([A.get_import_price()])\]</a><BR><BR>"
contents += "Treasury: [SStreasury.treasury_value]m<BR>"
contents += "Lord's Tax: [SStreasury.tax_value*100]%<BR>"
contents += "Guild's Tax: [SStreasury.queens_tax*100]%</center><BR>"
for(var/datum/roguestock/import/A in SStreasury.stockpile_datums)
contents += "[A.name]<BR>"
contents += "[A.desc]<BR>"
if(!A.stable_price)
contents += "Demand: [A.demand2word()]<BR>"
contents += "<a href='byond://?src=\ref[src];import=\ref[A]'>\[Import [A.importexport_amt] ([A.get_import_price()])\]</a><BR><BR>"
if(TAB_BOUNTIES)
contents += "<a href='?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<center>Bounties<BR>"
contents += "--------------<BR>"
contents += "Treasury: [SStreasury.treasury_value]m<BR>"
contents += "Duke's Tax: [SStreasury.tax_value*100]%</center><BR>"
contents += "Lord's Tax: [SStreasury.tax_value*100]%</center><BR>"
for(var/datum/roguestock/bounty/A in SStreasury.stockpile_datums)
contents += "[A.name]<BR>"
contents += "[A.desc]<BR>"
contents += "Total Collected: [A.held_items[1] + A.held_items[2]]<BR>"
if(A.percent_bounty)
contents += "Bounty Price: <a href='?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]%</a><BR><BR>"
contents += "Bounty Price: <a href='byond://?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]%</a><BR><BR>"
else
contents += "Bounty Price: <a href='?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]</a><BR><BR>"
contents += "Bounty Price: <a href='byond://?src=\ref[src];setbounty=\ref[A]'>[A.payout_price]</a><BR><BR>"
if(TAB_LOG)
contents += "<a href='?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<a href='byond://?src=\ref[src];switchtab=[TAB_MAIN]'>\[Return\]</a><BR>"
contents += "<center>Log<BR>"
contents += "--------------</center><BR><BR>"
for(var/i = SStreasury.log_entries.len to 1 step -1)
contents += "<span class='info'>[SStreasury.log_entries[i]]</span><BR>"

contents += {"
</head>
</html>
"}
if(!canread)
contents = stars(contents)
var/datum/browser/popup = new(user, "VENDORTHING", "", 500, 800)
var/datum/browser/popup = new(user, "VENDORTHING", "", 370, 220)
popup.set_content(contents)
popup.set_window_options("can_minimize=0;can_maximize=0")
popup.open()

#undef TAB_MAIN
Expand Down

0 comments on commit f712a1f

Please sign in to comment.