12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -7,12 +7,10 @@
|
||||
var/logged_in = "Cargo Department"
|
||||
var/vmode = 1
|
||||
clockwork = TRUE //it'd look weird
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
light_range_on = 2
|
||||
|
||||
/obj/machinery/computer/stockexchange/New()
|
||||
..()
|
||||
logged_in = "[world.name] Cargo Department"
|
||||
logged_in = "[station_name()] Cargo Department"
|
||||
|
||||
/obj/machinery/computer/stockexchange/proc/balance()
|
||||
if (!logged_in)
|
||||
@@ -85,25 +83,6 @@ a.updated {
|
||||
dat += "<b>Prominent products:</b><br>"
|
||||
for (var/prod in S.products)
|
||||
dat += "<i>[prod]</i><br>"
|
||||
dat += "<br><b>Borrow options:</b><br>"
|
||||
if (S.borrow_brokers.len)
|
||||
for (var/datum/borrow/B in S.borrow_brokers)
|
||||
dat += "<b>[B.broker]</b> offers <i>[B.share_amount] shares</i> for borrowing, for a deposit of <i>[B.deposit * 100]%</i> of the shares' value.<br>"
|
||||
dat += "The broker expects the return of the shares after <i>[B.lease_time / 600] minutes</i>, with a grace period of <i>[B.grace_time / 600]</i> minute(s).<br>"
|
||||
dat += "<i>This offer expires in [(B.offer_expires - world.time) / 600] minutes.</i><br>"
|
||||
dat += "<b>Note:</b> If you do not return all shares by the end of the grace period, you will lose your deposit and the value of all unreturned shares at current value from your account!<br>"
|
||||
dat += "<b>Note:</b> You cannot withdraw or transfer money off your account while a borrow is active.<br>"
|
||||
dat += "<a href='?src=\ref[src];take=\ref[B]'>Take offer</a> (Estimated deposit: [B.deposit * S.current_value * B.share_amount] credits)<br><br>"
|
||||
else
|
||||
dat += "<i>No borrow options available</i><br><br>"
|
||||
for (var/datum/borrow/B in S.borrows)
|
||||
if (B.borrower == logged_in)
|
||||
dat += "You are borrowing <i>[B.share_amount] shares</i> from <b>[B.broker]</b>.<br>"
|
||||
dat += "Your deposit riding on the deal is <i>[B.deposit] credits</i>.<br>"
|
||||
if (world.time < B.lease_expires)
|
||||
dat += "You are expected to return the borrowed shares in [(B.lease_expires - world.time) / 600] minutes.<br><br>"
|
||||
else
|
||||
dat += "The brokering agency is collecting. You still owe them <i>[B.share_debt]</i> shares, which you have [(B.grace_expires - world.time) / 600] minutes to present.<br><br>"
|
||||
var/news = 0
|
||||
if (logged_in)
|
||||
var/list/LR = stockExchange.last_read[S]
|
||||
@@ -269,7 +248,7 @@ a.updated {
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["viewhistory"])
|
||||
var/datum/stock/S = locate(href_list["viewhistory"])
|
||||
var/datum/stock/S = locate(href_list["viewhistory"]) in stockExchange.stocks
|
||||
if (S)
|
||||
S.displayValues(usr)
|
||||
|
||||
@@ -277,20 +256,15 @@ a.updated {
|
||||
logged_in = null
|
||||
|
||||
if (href_list["buyshares"])
|
||||
var/datum/stock/S = locate(href_list["buyshares"])
|
||||
var/datum/stock/S = locate(href_list["buyshares"]) in stockExchange.stocks
|
||||
if (S)
|
||||
buy_some_shares(S, usr)
|
||||
|
||||
if (href_list["sellshares"])
|
||||
var/datum/stock/S = locate(href_list["sellshares"])
|
||||
var/datum/stock/S = locate(href_list["sellshares"]) in stockExchange.stocks
|
||||
if (S)
|
||||
sell_some_shares(S, usr)
|
||||
|
||||
if (href_list["take"])
|
||||
var/datum/borrow/B = locate(href_list["take"])
|
||||
if (B && !B.lease_expires)
|
||||
do_borrowing_deal(B, usr)
|
||||
|
||||
if (href_list["show_logs"])
|
||||
var/dat = "<html><head><title>Stock Transaction Logs</title></head><body><h2>Stock Transaction Logs</h2><div><a href='?src=\ref[src];show_logs=1'>Refresh</a></div><br>"
|
||||
for(var/D in stockExchange.logs)
|
||||
|
||||
Reference in New Issue
Block a user