Fixes journals, quik-pay and credit symbol use (#21844)

Three for one.

- The ability to write in journals held in ones hand was restored.
- The quik-pay quick-input now works properly.
- The credit symbol use was standardised to use 5电 and inserted into a
few places where it used credit instead.
This commit is contained in:
Casper3667
2026-02-11 23:58:45 +00:00
committed by GitHub
parent a7f6cab456
commit d0da59a72e
19 changed files with 69 additions and 60 deletions
+4 -4
View File
@@ -272,10 +272,10 @@
order_data += "<u>Order Fees:</u><br>"
order_data += "<ul>"
for(var/item in get_item_list())
order_data += "<li>[item["name"]]: [item["price"]]</li>"
order_data += "<li>Crate Fee: [SScargo.get_cratefee()]</li>"
order_data += "<li>Handling Fee: [SScargo.get_handlingfee()]</li>"
order_data += "<li>Supplier Fee: [get_shipment_cost()]</li>"
order_data += "<li>[item["name"]]: [item["price"]]</li>"
order_data += "<li>Crate Fee: [SScargo.get_cratefee()]</li>"
order_data += "<li>Handling Fee: [SScargo.get_handlingfee()]</li>"
order_data += "<li>Supplier Fee: [get_shipment_cost()]</li>"
order_data += "</ul>"
return order_data.Join("")
+2 -2
View File
@@ -135,7 +135,7 @@
. += "<th>Fine:</th>"
. += "<td><a href='byond://?src=[REF(src)];button=change_fine;'>"
if( incident.fine )
. += "[incident.fine] Credits"
. += "[incident.fine]"
// . += "</a></td>"
//
// . += "</tr><tr>"
@@ -517,7 +517,7 @@
if( "change_fine" )
if( !incident )
return
var/number = tgui_input_number(usr, "Enter a number between [incident.getMinFine()] and [incident.getMaxFine()] credits.", "Fine", 0, incident.getMaxFine(), incident.getMinFine())
var/number = tgui_input_number(usr, "Enter a number between [incident.getMinFine()] and [incident.getMaxFine()].", "Fine", 0, incident.getMaxFine(), incident.getMinFine())
if( number < incident.getMinFine() )
to_chat(usr, SPAN_ALERT("The entered sentence was less than the minimum sentence!"))
else if( number > incident.getMaxFine() )
+1 -1
View File
@@ -99,7 +99,7 @@
else if(istype(attacking_item, /obj/item/spacecash))
if(paymode == CREDITCHIP)
var/obj/item/spacecash/H = attacking_item
to_chat(user, SPAN_NOTICE("You insert [H.worth] credits into [src]'s slot!"))
to_chat(user, SPAN_NOTICE("You insert [H.worth] into [src]'s slot!"))
playsound(loc, 'sound/arcade/sloto_token.ogg', 10, 1, extrarange = -3, falloff_distance = 10, required_asfx_toggles = ASFX_ARCADE)
balance += H.worth
updateUsrDialog()
+1 -1
View File
@@ -590,7 +590,7 @@ BREATH ANALYZER
var/value = get_value(target)
user.visible_message(SPAN_NOTICE("\The [user] scans \the [target] with \the [src]."))
to_chat(user, SPAN_NOTICE("\The [src] estimates the price of \the [target] at <b>[value ? value : "N/A"]</b>."))
to_chat(user, SPAN_NOTICE("\The [src] estimates the price of \the [target] at <b>[value ? value : "N/A"]</b>."))
/obj/item/breath_analyzer
name = "breath analyzer"
+1 -1
View File
@@ -31,7 +31,7 @@
// Displayed on bounty UI screen.
/datum/bounty/proc/reward_string()
return "[reward] Credits"
return "[reward]"
/datum/bounty/proc/can_claim()
return !claimed
+1 -1
View File
@@ -15,7 +15,7 @@
var/price = SScargo.export_item_and_contents(O, FALSE, FALSE, dry_run=TRUE)
if(price)
to_chat(user, SPAN_NOTICE("Scanned [O], value: <b>[price]</b> credits[O.contents.len ? " (contents included)" : ""]."))
to_chat(user, SPAN_NOTICE("Scanned [O], value: <b>[price]</b>[O.contents.len ? " (contents included)" : ""]."))
else
to_chat(user, SPAN_WARNING("Scanned [O], no export value."))
if(SScargo.bounty_ship_item_and_contents(O, dry_run=TRUE))
+1 -1
View File
@@ -132,7 +132,7 @@ then the player gets the profit from selling his own wasted time.
/datum/export/proc/total_printout(contr = 0, emag = 0)
if(!total_cost && !total_amount)
return ""
var/msg = "[total_cost] credits: Received [total_amount] "
var/msg = "[total_cost]: Received [total_amount] "
if(total_cost > 0)
msg = "+" + msg
@@ -78,7 +78,7 @@
if (I.fine == 0)
dat += "<br>Brig Sentence: [I.getBrigSentence()] <br>"
else
dat += "Fine: [I.fine] Credits<br>"
dat += "Fine: [I.fine]<br>"
dat += "Notes: <br>"
if (I.notes != "")
dat += nl2br(I.notes)
+3 -3
View File
@@ -177,7 +177,7 @@
return
I = user.GetIdCard()
if(istype(I) && (ACCESS_CARGO in I.access))
var/price_guess = text2num(sanitizeSafe( tgui_input_text(user, "How much do you wish to withdraw? Remaining cash: [credit]", "QuikPay", 0, 10), 10))
var/price_guess = text2num(sanitizeSafe( tgui_input_text(user, "How much do you wish to withdraw? Remaining credits: [credit]", "QuikPay", 0, 10), 10))
if(isnull(price_guess) || price_guess == 0)
return
price_guess = max(0, round(price_guess, 0.01))
@@ -375,10 +375,10 @@
var/item_amount = bought_item["amount"]
var/item_price = items_to_price[item_name]
receipt += "<li><b>[item_name]</b>: [item_amount] x [item_price]cr: [item_amount * item_price]cr<br>"
receipt += "<li><b>[item_name]</b>: [item_amount] x [item_price]: [item_amount * item_price]<br>"
sum += item_price * item_amount
receipt += "</ul><HR>Total:</b> [sum]cr<br>"
receipt += "</ul><HR>Total:</b> [sum]<br>"
playsound(src, 'sound/machines/ping.ogg', 25, 1)
audible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(src)))] \The [src] pings."))
. = TRUE
+2 -2
View File
@@ -180,8 +180,8 @@
var/item_price = items_to_price[item_name]
sum += item_price
receipt += "<b>[name]</b>: [item_name] x[item_amount] at [item_price]cr each<br>"
ticket += "<b>[name]</b>: [item_name] x[item_amount] at [item_price]cr each<br>"
receipt += "<b>[name]</b>: [item_name] x[item_amount] at [item_price] each<br>"
ticket += "<b>[name]</b>: [item_name] x[item_amount] at [item_price] each<br>"
receipt += "<hr><b>Total:</b> [sum]电"
ticket += "<hr><b>Total:</b> [sum]电"
sum = sum
+16 -16
View File
@@ -1,6 +1,6 @@
/obj/item/spacecash
name = "0 credit chip"
desc = "It's worth 0 credits."
desc = "It's worth 0."
gender = PLURAL
icon = 'icons/obj/cash.dmi'
icon_state = "spacecash1"
@@ -38,7 +38,7 @@
h_user.drop_from_inventory(src)
h_user.drop_from_inventory(bundle)
h_user.put_in_hands(bundle)
to_chat(user, SPAN_NOTICE("You add [src.worth] credits worth of money to the bundles.<br>It holds [bundle.worth] credits now."))
to_chat(user, SPAN_NOTICE("You add [src.worth] to the bundles.<br>It holds [bundle.worth] now."))
qdel(src)
/proc/coin_typepath_suffix(var/amount)
@@ -55,7 +55,7 @@
name = "credit chips"
icon_state = ""
gender = PLURAL
desc = "They are worth 0 credits."
desc = "They are worth 0."
worth = 0
/obj/item/spacecash/bundle/update_icon()
@@ -97,7 +97,7 @@
AddOverlays(ovr)
UpdateOverlays() // The delay looks weird, so we force an update immediately.
src.desc = "A bundle of Biesel Standard Credits. Combined, this is worth [worth] credits."
src.desc = "A bundle of Biesel Standard Credits. Combined, this is worth [worth]."
/obj/item/spacecash/bundle/attack_self(mob/user as mob)
var/amount = tgui_input_number(user, "How many credits do you want to take out? (0 to [src.worth])", "Take Money", 5, worth, 0, 0, round_value = FALSE)
@@ -171,49 +171,49 @@
/obj/item/spacecash/c5
name = "5 credit chip"
icon_state = "spacecash5"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 5 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 5."
worth = 5
/obj/item/spacecash/c10
name = "10 credit chip"
icon_state = "spacecash10"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 10 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 10."
worth = 10
/obj/item/spacecash/c20
name = "20 credit chip"
icon_state = "spacecash20"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 20 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 20."
worth = 20
/obj/item/spacecash/c50
name = "50 credit chip"
icon_state = "spacecash50"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 50 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 50."
worth = 50
/obj/item/spacecash/c100
name = "100 credit chip"
icon_state = "spacecash100"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 100 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 100."
worth = 100
/obj/item/spacecash/c200
name = "200 credit chip"
icon_state = "spacecash200"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 200 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 200."
worth = 200
/obj/item/spacecash/c500
name = "500 credit chip"
icon_state = "spacecash500"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 500 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 500."
worth = 500
/obj/item/spacecash/c1000
name = "1000 credit chip"
icon_state = "spacecash1000"
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 1000 credits."
desc = "A Biesel Standard Credit chip, used for transactions large and small. This one is worth 1000."
worth = 1000
/obj/item/spacecash/coin
@@ -238,25 +238,25 @@
/obj/item/spacecash/coin/c001
name = "1 cent unie coin"
icon_state = "spacecash0.01"
desc = "A Biesel Standard Credit coin, called a 'unie'. This is worth 0.01 credits."
desc = "A Biesel Standard Credit coin, called a 'unie'. This is worth 0.01."
worth = 0.01
/obj/item/spacecash/coin/c005
name = "5 cent quin coin"
icon_state = "spacecash0.05"
desc = "A Biesel Standard Credit coin, called a 'quin'. This is worth 0.05 credits."
desc = "A Biesel Standard Credit coin, called a 'quin'. This is worth 0.05."
worth = 0.05
/obj/item/spacecash/coin/c010
name = "10 cent dece coin"
icon_state = "spacecash0.10"
desc = "A Biesel Standard Credit coin, called a 'dece'. This is worth 0.10 credits."
desc = "A Biesel Standard Credit coin, called a 'dece'. This is worth 0.10."
worth = 0.10
/obj/item/spacecash/coin/c025
name = "25 cent quarter coin"
icon_state = "spacecash0.25"
desc = "A Biesel Standard Credit coin, called a 'quarter'. This is worth 0.25 credits."
desc = "A Biesel Standard Credit coin, called a 'quarter'. This is worth 0.25."
worth = 0.25
/proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
+3 -2
View File
@@ -203,10 +203,10 @@
var/item_amount = bought_item["amount"]
var/item_price = items_to_price[item_name]
receipt += "<li><b>[item_name]</b>: [item_amount] x [item_price]cr: [item_amount * item_price]cr<br>"
receipt += "<li><b>[item_name]</b>: [item_amount] x [item_price]: [item_amount * item_price]<br>"
sum += item_price * item_amount
receipt += "</ul><HR>Total:</b> [sum]cr<br>"
receipt += "</ul><HR>Total:</b> [sum]<br>"
playsound(src, 'sound/machines/ping.ogg', 25, 1)
audible_message(SPAN_NOTICE("[icon2html(src, viewers(get_turf(src)))] \The [src] pings."))
. = TRUE
@@ -259,5 +259,6 @@
price_guess = max(0, round(price_guess, 0.01))
items += list(list("name" = "[name_guess]", "price" = price_guess))
items_to_price[name_guess] = price_guess
to_chat(user, SPAN_NOTICE("[src]: added '[name_guess]' for [price_guess]."))
+2 -2
View File
@@ -28,8 +28,8 @@
var/author = "[SSatlas.current_map.company_name] Editor"
var/channel = "Tau Ceti Daily"
var/body = "Tau Ceti Daily wishes to congratulate <b>[winner_name]</b> for recieving the Tau Ceti Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
var/body = "Tau Ceti Daily wishes to congratulate <b>[winner_name]</b> for recieving the Tau Ceti Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum]!"
if(!deposit_success)
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 credits to ND 'Stellar Slam' office on the Tau Ceti gateway containing updated details, and your winnings'll be re-sent within the month."
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 to ND 'Stellar Slam' office on the Tau Ceti gateway containing updated details, and your winnings'll be re-sent within the month."
var/datum/feed_channel/ch = SSnews.GetFeedChannel(channel)
SSnews.SubmitArticle(body, author, ch, null, 1)
+1 -1
View File
@@ -171,7 +171,7 @@
else
. += "\t<b>BRIG</b>: <i>[brig_sentence] minutes</i><br>"
else if ( fine != 0 )
. += "As decided by the arbiter(s), they have been fined [fine] credits.<br>"
. += "As decided by the arbiter(s), they have been fined [fine].<br>"
else
. += "As decided by the arbiter(s), they will serve no time for their crimes.<br>"
. += "<br><table>"
+1 -1
View File
@@ -84,7 +84,7 @@
if(!istype(paper) || paper.loc != src)
return
var/obj/item/pen = usr.get_inactive_hand()
if(!pen || !pen.tool_behaviour == TOOL_PEN)
if(!pen || pen.tool_behaviour != TOOL_PEN)
pen = usr.get_active_hand()
if(pen?.tool_behaviour == TOOL_PEN)
paper.attackby(pen, usr)
+8
View File
@@ -0,0 +1,8 @@
author: TheGreyWolf
delete-after: True
changes:
- bugfix: "Fixed that journals and notepads could not be written in when held in hand."
- bugfix: "Fixed the quik-pay not getting prices correct when clicking an item with it to input it quickly."
- spellcheck: "Standardised how the credit symbol is shown in several places, and replaces several instances of credits with the symbol."
+12 -12
View File
@@ -208,16 +208,16 @@ export const CargoControl = (props, context) => {
: 'Unauthorised'}
</LabeledList.Item>
<LabeledList.Item label="Price">
{data.order_details.price.toFixed(2)}
{data.order_details.price.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Operations Expense">
{data.order_details.price_cargo.toFixed(2)}
{data.order_details.price_cargo.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Personal Expense">
{data.order_details.price_customer.toFixed(2)}
{data.order_details.price_customer.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Personal Expense">
{data.order_details.price_customer.toFixed(2)}
{data.order_details.price_customer.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Ordered At">
{data.order_details.time_submitted}
@@ -255,7 +255,7 @@ export const CargoControl = (props, context) => {
<Table.Row key={item.name}>
<Table.Cell>{item.name}</Table.Cell>
<Table.Cell>{item.supplier_name}</Table.Cell>
<Table.Cell>{item.price.toFixed(2)} </Table.Cell>
<Table.Cell>{item.price.toFixed(2)}</Table.Cell>
</Table.Row>
))}
</Table>
@@ -296,7 +296,7 @@ export const MainWindow = (props, context) => {
<Box bold>Welcome, {data.username}.</Box>
<LabeledList>
<LabeledList.Item label="Operations Fund">
{data.cargo_money.toFixed(2)}
{data.cargo_money.toFixed(2)}
</LabeledList.Item>
</LabeledList>
{data.shuttle_has_arrive_time ? (
@@ -329,7 +329,7 @@ export const OverviewSubmitted = (props, context) => {
{data.order_approved_shuttle_time / 10} seconds
</LabeledList.Item>
<LabeledList.Item label="Estimated Elevator Fee">
{data.order_approved_shuttle_price.toFixed(2)}
{data.order_approved_shuttle_price.toFixed(2)}
</LabeledList.Item>
</LabeledList>
<Table>
@@ -343,7 +343,7 @@ export const OverviewSubmitted = (props, context) => {
<Table.Row key={order.order_id}>
<Table.Cell>{order.order_id}</Table.Cell>
<Table.Cell>{order.ordered_by}</Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)} </Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)}</Table.Cell>
<Table.Cell>
<Button
content="Approve"
@@ -402,7 +402,7 @@ export const OverviewApproved = (props, context) => {
{data.order_approved_shuttle_time / 10} seconds
</LabeledList.Item>
<LabeledList.Item label="Estimated Elevator Fee">
{data.order_approved_shuttle_price.toFixed(2)}
{data.order_approved_shuttle_price.toFixed(2)}
</LabeledList.Item>
</LabeledList>
<Table>
@@ -416,7 +416,7 @@ export const OverviewApproved = (props, context) => {
<Table.Row key={order.order_id}>
<Table.Cell>{order.order_id}</Table.Cell>
<Table.Cell>{order.ordered_by}</Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)} </Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)}</Table.Cell>
<Table.Cell>
<Button
content="Details"
@@ -465,7 +465,7 @@ export const OverviewShipped = (props, context) => {
<Table.Row key={order.order_id}>
<Table.Cell>{order.order_id}</Table.Cell>
<Table.Cell>{order.ordered_by}</Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)} </Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)}</Table.Cell>
<Table.Cell>
<Button
content="Details"
@@ -514,7 +514,7 @@ export const OverviewDelivered = (props, context) => {
<Table.Row key={order.order_id}>
<Table.Cell>{order.order_id}</Table.Cell>
<Table.Cell>{order.ordered_by}</Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)} </Table.Cell>
<Table.Cell>{order.price_cargo.toFixed(2)}</Table.Cell>
<Table.Cell>
<Button
content="Details"
@@ -161,13 +161,13 @@ export const Overview = (props, context) => {
: 'Unauthorised'}
</LabeledList.Item>
<LabeledList.Item label="Price">
{data.order_details.price.toFixed(2)}
{data.order_details.price.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Operations Expense">
{data.order_details.price_cargo.toFixed(2)}
{data.order_details.price_cargo.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Personal Expense">
{data.order_details.price_customer.toFixed(2)}
{data.order_details.price_customer.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Ordered At">
{data.order_details.time_submitted}
@@ -205,7 +205,7 @@ export const Overview = (props, context) => {
<Table.Row key={item.name}>
<Table.Cell>{item.name}</Table.Cell>
<Table.Cell>{item.supplier_name}</Table.Cell>
<Table.Cell>{item.price} </Table.Cell>
<Table.Cell>{item.price}</Table.Cell>
</Table.Row>
))}
</Table>
@@ -252,7 +252,7 @@ export const Payment = (props, context) => {
>
<LabeledList>
<LabeledList.Item label="Price">
{data.order_details.price_customer.toFixed(2)}
{data.order_details.price_customer.toFixed(2)}
</LabeledList.Item>
<LabeledList.Item label="Paying Account">
{data.paying_account}
+4 -4
View File
@@ -143,7 +143,7 @@ export const MainPage = (props, context) => {
{data.order_item_count}
</LabeledList.Item>
<LabeledList.Item label="Price">
{data.order_value.toFixed(2)}
{data.order_value.toFixed(2)}
</LabeledList.Item>
{data.status_message && (
<LabeledList.Item label="Status">
@@ -272,16 +272,16 @@ export const ShowDetails = (props, context) => {
</Table.Row>
<Table.Row>
<Table.Cell>Handling Fee</Table.Cell>
<Table.Cell>{data.handling_fee.toFixed(2)} </Table.Cell>
<Table.Cell>{data.handling_fee.toFixed(2)}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Crate Fee</Table.Cell>
<Table.Cell>{data.crate_fee.toFixed(2)} </Table.Cell>
<Table.Cell>{data.crate_fee.toFixed(2)}</Table.Cell>
</Table.Row>
{data.order_items.map((item) => (
<Table.Row key={item.name}>
<Table.Cell>{item.name}</Table.Cell>
<Table.Cell>{item.price.toFixed(2)} </Table.Cell>
<Table.Cell>{item.price.toFixed(2)}</Table.Cell>
</Table.Row>
))}
</Table>