diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm index 30cc6d4d5a3a..236a2a8b9aec 100644 --- a/code/controllers/subsystem/economy.dm +++ b/code/controllers/subsystem/economy.dm @@ -3,53 +3,18 @@ SUBSYSTEM_DEF(economy) init_order = INIT_ORDER_ECONOMY flags = SS_NO_FIRE runlevels = RUNLEVEL_GAME - var/roundstart_paychecks = 5 - var/budget_pool = 35000 - var/list/department_accounts = list(ACCOUNT_CIV = ACCOUNT_CIV_NAME, - ACCOUNT_ENG = ACCOUNT_ENG_NAME, - ACCOUNT_SCI = ACCOUNT_SCI_NAME, - ACCOUNT_MED = ACCOUNT_MED_NAME, - ACCOUNT_SRV = ACCOUNT_SRV_NAME, - ACCOUNT_CAR = ACCOUNT_CAR_NAME, - ACCOUNT_SEC = ACCOUNT_SEC_NAME) - var/list/generated_accounts = list() - var/full_ancap = FALSE // Enables extra money charges for things that normally would be free, such as sleepers/cryo/cloning. - //Take care when enabling, as players will NOT respond well if the economy is set up for low cash flows. - var/slime_bounty = list("grey" = 10, - // tier 1 - "orange" = 100, - "metal" = 100, - "blue" = 100, - "purple" = 100, - // tier 2 - "dark purple" = 500, - "dark blue" = 500, - "green" = 500, - "silver" = 500, - "gold" = 500, - "yellow" = 500, - "red" = 500, - "pink" = 500, - // tier 3 - "cerulean" = 750, - "sepia" = 750, - "bluespace" = 750, - "pyrite" = 750, - "light pink" = 750, - "oil" = 750, - "adamantine" = 750, - // tier 4 - "rainbow" = 1000) - var/list/bank_accounts = list() //List of normal accounts (not department accounts) - var/list/dep_cards = list() -/datum/controller/subsystem/economy/Initialize(timeofday) - var/budget_to_hand_out = round(budget_pool / department_accounts.len) - for(var/A in department_accounts) - new /datum/bank_account/department(A, budget_to_hand_out) - return ..() + ///List of normal accounts (not ship accounts) + var/list/bank_accounts = list() + ///Total amount of physical money in the game + var/physical_money = 0 + ///Total amount of money in bank accounts + var/bank_money = 0 -/datum/controller/subsystem/economy/proc/get_dep_account(dep_id) - for(var/datum/bank_account/department/D in generated_accounts) - if(D.department_id == dep_id) - return D +/datum/controller/subsystem/economy/stat_entry(msg) + msg += "{" + msg += "PH: [physical_money]|" + msg += "BN: [bank_money]|" + msg += "TOT: [physical_money + bank_money]" + msg += "}" + return ..() diff --git a/code/datums/components/pricetag.dm b/code/datums/components/pricetag.dm index bf81a595c2be..01a89ea0a754 100644 --- a/code/datums/components/pricetag.dm +++ b/code/datums/components/pricetag.dm @@ -23,7 +23,7 @@ var/price = item_value if(price) var/adjusted_value = price*(profit_ratio/100) - owner.adjust_money(adjusted_value) + owner.adjust_money(adjusted_value, "pricetag") owner.bank_card_talk("Sale recorded. [adjusted_value] credits added to account.") return TRUE diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 342fbe9e722e..0103be96ce03 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -48,33 +48,6 @@ c.dataId = ++securityCrimeCounter return c -/datum/datacore/proc/addCitation(id = "", datum/data/crime/crime) - for(var/datum/data/record/R in security) - if(R.fields["id"] == id) - var/list/crimes = R.fields["citation"] - crimes |= crime - return - -/datum/datacore/proc/removeCitation(id, cDataId) - for(var/datum/data/record/R in security) - if(R.fields["id"] == id) - var/list/crimes = R.fields["citation"] - for(var/datum/data/crime/crime in crimes) - if(crime.dataId == text2num(cDataId)) - crimes -= crime - return - -/datum/datacore/proc/payCitation(id, cDataId, amount) - for(var/datum/data/record/R in security) - if(R.fields["id"] == id) - var/list/crimes = R.fields["citation"] - for(var/datum/data/crime/crime in crimes) - if(crime.dataId == text2num(cDataId)) - crime.paid = crime.paid + amount - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SEC) - D.adjust_money(amount) - return - /** * Adds crime to security record. * @@ -282,7 +255,6 @@ S.fields["id"] = id S.fields["name"] = H.real_name S.fields["criminal"] = "None" - S.fields["citation"] = list() S.fields["crim"] = list() S.fields["notes"] = "No notes." security += S diff --git a/code/game/machinery/bank_machine.dm b/code/game/machinery/bank_machine.dm index 1f80c6a9c3ce..2e93cd179ed5 100644 --- a/code/game/machinery/bank_machine.dm +++ b/code/game/machinery/bank_machine.dm @@ -8,6 +8,7 @@ var/siphoning = FALSE var/next_warning = 0 var/obj/item/radio/radio + var/datum/weakref/ship_account_ref var/radio_channel = RADIO_CHANNEL_COMMON var/minimum_time_between_warnings = 400 var/syphoning_credits = 0 @@ -19,23 +20,21 @@ radio.canhear_range = 0 radio.recalculateChannels() +/obj/machinery/computer/bank_machine/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock) + . = ..() + ship_account_ref = WEAKREF(port.current_ship.ship_account) + /obj/machinery/computer/bank_machine/Destroy() QDEL_NULL(radio) . = ..() /obj/machinery/computer/bank_machine/attackby(obj/item/I, mob/user) - var/value = 0 - if(istype(I, /obj/item/spacecash/bundle)) - var/obj/item/spacecash/bundle/C = I - value = C.value - else if(istype(I, /obj/item/holochip)) - var/obj/item/holochip/H = I - value = H.credits + var/value = I.get_item_credit_value() if(value) - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) - if(D) - D.adjust_money(value) - to_chat(user, "You deposit [I]. The Cargo Budget is now [D.account_balance] cr.") + var/datum/bank_account/ship_account = ship_account_ref.resolve() + if(ship_account) + ship_account.adjust_money(value, "deposit") + to_chat(user, "You deposit [I]. The [ship_account.account_holder] Budget is now [ship_account.account_balance] cr.") qdel(I) return return ..() @@ -46,15 +45,15 @@ if (machine_stat & (BROKEN|NOPOWER)) say("Insufficient power. Halting siphon.") end_syphon() - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) - if(!D.has_money(200)) - say("Cargo budget depleted. Halting siphon.") + var/datum/bank_account/ship_account = ship_account_ref.resolve() + if(!ship_account?.has_money(200)) + say("Ship budget depleted. Halting siphon.") end_syphon() return playsound(src, 'sound/items/poster_being_created.ogg', 100, TRUE) syphoning_credits += 200 - D.adjust_money(-200) + ship_account.adjust_money(-200) if(next_warning < world.time && prob(15)) var/area/A = get_area(loc) var/message = "Unauthorized credit withdrawal underway in [initial(A.name)]!!" @@ -69,14 +68,13 @@ /obj/machinery/computer/bank_machine/ui_data(mob/user) var/list/data = list() - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) - - if(D) - data["current_balance"] = D.account_balance + var/datum/bank_account/ship_account = ship_account_ref.resolve() + if(ship_account) + data["current_balance"] = ship_account.account_balance else data["current_balance"] = 0 data["siphoning"] = siphoning - data["station_name"] = station_name() + data["ship_name"] = ship_account.account_holder return data @@ -87,11 +85,11 @@ switch(action) if("siphon") - say("Siphon of company credits has begun!") + say("Siphon of ship credits has begun!") siphoning = TRUE . = TRUE if("halt") - say("Company credit withdrawal halted.") + say("Ship credit withdrawal halted.") end_syphon() . = TRUE diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 2f8e066a74ba..63f9284c28ae 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -419,8 +419,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) to_chat(usr, "No log exists for this job.") updateUsrDialog() return - if(inserted_modify_id.registered_account) - inserted_modify_id.registered_account.account_job = jobdatum // this is a terrible idea and people will grief but sure whatever inserted_modify_id.access = (istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access()) if (inserted_modify_id) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 2dc9a2c98bed..37759d04b13e 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -190,35 +190,9 @@ if((istype(active2, /datum/data/record) && GLOB.data_core.security.Find(active2))) dat += "Security Data" dat += "
Criminal Status: [active2.fields["criminal"]]" - dat += "

Citations: Add New" - - dat +={" - - - - - - - - "} - for(var/datum/data/crime/c in active2.fields["citation"]) - var/owed = c.fine - c.paid - dat += {" - - "} - if(owed > 0) - dat += "" - else - dat += "" - dat += {" - "} - dat += "
CrimeFineAuthorTime AddedAmount DueDel
[c.crimeName][c.fine] cr[c.author][c.time][owed] cr \[Pay\]All Paid Off - \[X\] -
" dat += "

Crimes: Add New" - dat +={" @@ -347,26 +321,6 @@ What a mess.*/ active2 = E screen = 3 - if("Pay") - for(var/datum/data/crime/p in active2.fields["citation"]) - if(p.dataId == text2num(href_list["cdataid"])) - var/obj/item/holochip/C = usr.is_holding_item_of_type(/obj/item/holochip) - if(C && istype(C)) - var/pay = C.get_item_credit_value() - if(!pay) - to_chat(usr, "[C] doesn't seem to be worth anything!") - else - var/diff = p.fine - p.paid - GLOB.data_core.payCitation(active2.fields["id"], text2num(href_list["cdataid"]), pay) - to_chat(usr, "You have paid [pay] credit\s towards your fine.") - if (pay == diff || pay > diff || pay >= diff) - investigate_log("Citation Paid off: [p.crimeName] Fine: [p.fine] | Paid off by [key_name(usr)]", INVESTIGATE_RECORDS) - to_chat(usr, "The fine has been paid in full.") - qdel(C) - playsound(src, "terminal_type", 25, FALSE) - else - to_chat(usr, "Fines can only be paid with holochips!") - if("Print Record") if(!(printing)) printing = 1 @@ -677,45 +631,6 @@ What a mess.*/ return GLOB.data_core.addCrimeDetails(active1.fields["id"], href_list["cdataid"], t1) investigate_log("New Crime details: [t1] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) - if("citation_add") - if(istype(active1, /datum/data/record)) - var/maxFine = CONFIG_GET(number/maxfine) - - var/t1 = stripped_input(usr, "Please input citation crime:", "Secure. records", "", null) - var/fine = FLOOR(input(usr, "Please input citation fine, up to [maxFine]:", "Secure. records", 50) as num|null, 1) - - if (isnull(fine)) - return - fine = min(fine, maxFine) - - if(fine < 0) - to_chat(usr, "You're pretty sure that's not how money works.") - return - - if(!canUseSecurityRecordsConsole(usr, t1, null, a2)) - return - - var/crime = GLOB.data_core.createCrimeEntry(t1, "", authenticated, station_time_timestamp(), fine) - for (var/obj/item/pda/P in GLOB.PDAs) - if(P.owner == active1.fields["name"]) - var/message = "You have been fined [fine] credits for '[t1]'. Fines may be paid at security." - var/datum/signal/subspace/messaging/pda/signal = new(src, list( - "name" = "Security Citation", - "job" = "Citation Server", - "message" = message, - "targets" = list("[P.owner] ([P.ownjob])"), - "automated" = 1 - )) - signal.send_to_receivers() - usr.log_message("(PDA: Citation Server) sent \"[message]\" to [signal.format_target()]", LOG_PDA) - GLOB.data_core.addCitation(active1.fields["id"], crime) - investigate_log("New Citation: [t1] Fine: [fine] | Added to [active1.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) - if("citation_delete") - if(istype(active1, /datum/data/record)) - if(href_list["cdataid"]) - if(!canUseSecurityRecordsConsole(usr, "delete", null, a2)) - return - GLOB.data_core.removeCitation(active1.fields["id"], href_list["cdataid"]) if("notes") if(istype(active2, /datum/data/record)) var/t1 = stripped_input(usr, "Please summarize notes:", "Secure. records", active2.fields["notes"], null) diff --git a/code/game/machinery/computer/warrant.dm b/code/game/machinery/computer/warrant.dm index 5c48d07f6d79..a5b72e1aae40 100644 --- a/code/game/machinery/computer/warrant.dm +++ b/code/game/machinery/computer/warrant.dm @@ -41,31 +41,6 @@ [current.fields["criminal"]][notice]"} - dat += "

Citations:" - - dat +={"
Crime
- - - - - - - - "} - for(var/datum/data/crime/c in current.fields["citation"]) - var/owed = c.fine - c.paid - dat += {" - - - "} - if(owed > 0) - dat += {" - "} - else - dat += "" - dat += "" - dat += "
CrimeFineAuthorTime AddedAmount DueMake Payment
[c.crimeName][c.fine] cr[c.author][c.time][owed] cr\[Pay\]All Paid Off
" - dat += "
Crimes:" dat +={" @@ -108,24 +83,5 @@ authenticated = null playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE) - if("Pay") - for(var/datum/data/crime/p in current.fields["citation"]) - if(p.dataId == text2num(href_list["cdataid"])) - var/obj/item/holochip/C = M.is_holding_item_of_type(/obj/item/holochip) - if(C && istype(C)) - var/pay = C.get_item_credit_value() - if(!pay) - to_chat(M, "[C] doesn't seem to be worth anything!") - else - var/diff = p.fine - p.paid - GLOB.data_core.payCitation(current.fields["id"], text2num(href_list["cdataid"]), pay) - to_chat(M, "You have paid [pay] credit\s towards your fine.") - if (pay == diff || pay > diff || pay >= diff) - investigate_log("Citation Paid off: [p.crimeName] Fine: [p.fine] | Paid off by [key_name(usr)]", INVESTIGATE_RECORDS) - to_chat(M, "The fine has been paid in full.") - qdel(C) - playsound(src, "terminal_type", 25, FALSE) - else - to_chat(M, "Fines can only be paid with holochips!") updateUsrDialog() add_fingerprint(M) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 0b538d1ce109..aa3e4ece65e9 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -233,11 +233,9 @@ var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math linked_techweb.largest_bomb_value = point_gain point_gain -= old_tech_largest_bomb_value - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI) - if(D) - D.adjust_money(point_gain) - linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain) - say("Explosion details and mixture analyzed and sold to the highest bidder for [point_gain] cr, with a reward of [point_gain] points.") + new /obj/item/spacecash(get_dumping_location(), point_gain) + linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain) + say("Explosion details and mixture analyzed and sold to the highest bidder for [point_gain] cr, with a reward of [point_gain] points.") else //you've made smaller bombs say("Data already captured. Aborting.") diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index 79fb5e83bdf1..d7be7fea98ee 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -20,51 +20,19 @@ density = TRUE circuit = /obj/item/circuitboard/machine/medical_kiosk var/obj/item/scanner_wand - var/default_price = 15 //I'm defaulting to a low price on this, but in the future I wouldn't have an issue making it more or less expensive. - var/active_price = 15 //Change by using a multitool on the board. - var/pandemonium = FALSE //AKA: Emag mode. + /// Emag mode + var/pandemonium = FALSE /// Shows whether the kiosk is being used to scan someone and what it's being used for. var/scan_active = NONE - /// Do we have someone paying to use this? - var/paying_customer = FALSE //Ticked yes if passing inuse() - - var/datum/bank_account/account //payer's account. - var/mob/living/carbon/human/H //The person using the console in each instance. Used for paying for the kiosk. - var/mob/living/carbon/human/altPatient //If scanning someone else, this will be the target. - var/obj/item/card/id/C //the account of the person using the console. + /// The patient that the kiosk is currently scanning. + var/mob/living/carbon/human/altPatient /obj/machinery/medical_kiosk/Initialize() //loaded subtype for mapping use . = ..() scanner_wand = new/obj/item/scanner_wand(src) -/obj/machinery/medical_kiosk/proc/inuse() //Verifies that the user can use the interface, followed by showing medical information. - if (pandemonium == TRUE) - active_price += (rand(10,30)) //The wheel of capitalism says health care ain't cheap. - if(!istype(C)) - say("No ID card detected.") // No unidentified crew. - return - if(C.registered_account) - account = C.registered_account - else - say("No account detected.") //No homeless crew. - return - if(!account.has_money(active_price)) - say("You do not possess the funds to purchase this.") //No jobless crew, either. - return - else - account.adjust_money(-active_price) - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_MED) - if(D) - D.adjust_money(active_price) - use_power(20) - paying_customer = TRUE - icon_state = "[base_icon_state]_active" - say("Thank you for your patronage!") - RefreshParts() - return - /obj/machinery/medical_kiosk/proc/clearScans() //Called it enough times to be it's own proc scan_active = NONE update_appearance() @@ -85,12 +53,6 @@ default_unfasten_wrench(user, I, time = 10) return TRUE -/obj/machinery/medical_kiosk/RefreshParts() - var/obj/item/circuitboard/machine/medical_kiosk/board = circuit - if(board) - active_price = board.custom_cost - return - /obj/machinery/medical_kiosk/attackby(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, "[base_icon_state]_open", "[base_icon_state]_off", O)) return @@ -135,7 +97,7 @@ scanner_wand = null /obj/machinery/medical_kiosk/Destroy() - qdel(scanner_wand) + QDEL_NULL(scanner_wand) return ..() /obj/machinery/medical_kiosk/emag_act(mob/user) @@ -179,8 +141,6 @@ ui.open() icon_state = "[base_icon_state]_active" RefreshParts() - H = user - C = H.get_idcard(TRUE) /obj/machinery/medical_kiosk/ui_data(mob/living/carbon/human/user) var/list/data = list() @@ -299,7 +259,6 @@ else if (user.hallucinating()) chaos_modifier = 0.3 - data["kiosk_cost"] = active_price + (chaos_modifier * (rand(1,25))) data["patient_name"] = patient_name data["patient_health"] = round(((total_health - (chaos_modifier * (rand(1,50)))) / max_health) * 100, 0.001) data["brute_health"] = round(brute_loss+(chaos_modifier * (rand(1,30))),0.001) //To break this down for easy reading, all health values are rounded to the .001 place @@ -338,29 +297,13 @@ switch(action) if("beginScan_1") - if(!(scan_active & KIOSK_SCANNING_GENERAL)) - inuse() - if(paying_customer == TRUE) - scan_active |= KIOSK_SCANNING_GENERAL - paying_customer = FALSE + scan_active |= KIOSK_SCANNING_GENERAL if("beginScan_2") - if(!(scan_active & KIOSK_SCANNING_SYMPTOMS)) - inuse() - if(paying_customer == TRUE) - scan_active |= KIOSK_SCANNING_SYMPTOMS - paying_customer = FALSE + scan_active |= KIOSK_SCANNING_SYMPTOMS if("beginScan_3") - if(!(scan_active & KIOSK_SCANNING_NEURORAD)) - inuse() - if(paying_customer == TRUE) - scan_active |= KIOSK_SCANNING_NEURORAD - paying_customer = FALSE + scan_active |= KIOSK_SCANNING_NEURORAD if("beginScan_4") - if(!(scan_active & KIOSK_SCANNING_REAGENTS)) - inuse() - if(paying_customer == TRUE) - scan_active |= KIOSK_SCANNING_REAGENTS - paying_customer = FALSE + scan_active |= KIOSK_SCANNING_REAGENTS if("clearTarget") altPatient = null clearScans() diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index ce5afeba737a..630759c85afe 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -304,10 +304,6 @@ set_new_account(user) return - if (world.time < registered_account.withdrawDelay) - registered_account.bank_card_talk("ERROR: UNABLE TO LOGIN DUE TO SCHEDULED MAINTENANCE. MAINTENANCE IS SCHEDULED TO COMPLETE IN [(registered_account.withdrawDelay - world.time)/10] SECONDS.", TRUE) - return - var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null, 1) if(!amount_to_remove || amount_to_remove < 0) @@ -322,18 +318,13 @@ log_econ("[amount_to_remove] credits were removed from [src] owned by [src.registered_name]") return else - if (registered_account.frozen) - registered_account.bank_card_talk("ERROR: The linked account is frozen! Contact your department head.", TRUE) - else - var/difference = amount_to_remove - registered_account.account_balance - registered_account.bank_card_talk("ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.", TRUE) + var/difference = amount_to_remove - registered_account.account_balance + registered_account.bank_card_talk("ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.", TRUE) /obj/item/card/id/examine(mob/user) . = ..() if(registered_account) . += "The account linked to the ID belongs to '[registered_account.account_holder]' and reports a balance of [registered_account.account_balance] cr." - if(registered_account.frozen) - . += "The linked account is frozen, and cannot be withdrawn from or deposited into!" . += "There's more information below, you can look again to take a closer look..." /obj/item/card/id/examine_more(mob/user) @@ -704,7 +695,6 @@ update_label() /obj/item/card/id/debug/Initialize() access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() - registered_account = SSeconomy.get_dep_account(ACCOUNT_CAR) . = ..() /obj/item/card/id/prisoner @@ -794,65 +784,3 @@ update_label() name = "\improper SolGov ID" desc = "A SolGov ID with no proper access to speak of. This one indicates a Commander." assignment = "Commander" - -/obj/item/card/id/departmental_budget - name = "departmental card (FUCK)" - desc = "Provides access to the departmental budget." - icon_state = "budgetcard" - uses_overlays = FALSE - var/department_ID = ACCOUNT_CIV - var/department_name = ACCOUNT_CIV_NAME - registered_age = null - -/obj/item/card/id/departmental_budget/Initialize() - . = ..() - var/datum/bank_account/B = SSeconomy.get_dep_account(department_ID) - if(B) - registered_account = B - if(!B.bank_cards.Find(src)) - B.bank_cards += src - name = "departmental card ([department_name])" - desc = "Provides access to the [department_name]." - SSeconomy.dep_cards += src - -/obj/item/card/id/departmental_budget/Destroy() - SSeconomy.dep_cards -= src - return ..() - -/obj/item/card/id/departmental_budget/update_label() - return - -/obj/item/card/id/departmental_budget/civ - department_ID = ACCOUNT_CIV - department_name = ACCOUNT_CIV_NAME - icon_state = "civ_budget" - -/obj/item/card/id/departmental_budget/eng - department_ID = ACCOUNT_ENG - department_name = ACCOUNT_ENG_NAME - icon_state = "eng_budget" - -/obj/item/card/id/departmental_budget/sci - department_ID = ACCOUNT_SCI - department_name = ACCOUNT_SCI_NAME - icon_state = "sci_budget" - -/obj/item/card/id/departmental_budget/med - department_ID = ACCOUNT_MED - department_name = ACCOUNT_MED_NAME - icon_state = "med_budget" - -/obj/item/card/id/departmental_budget/srv - department_ID = ACCOUNT_SRV - department_name = ACCOUNT_SRV_NAME - icon_state = "srv_budget" - -/obj/item/card/id/departmental_budget/car - department_ID = ACCOUNT_CAR - department_name = ACCOUNT_CAR_NAME - icon_state = "car_budget" //saving up for a new tesla - -/obj/item/card/id/departmental_budget/sec - department_ID = ACCOUNT_SEC - department_name = ACCOUNT_SEC_NAME - icon_state = "sec_budget" diff --git a/code/game/objects/items/cash.dm b/code/game/objects/items/cash.dm index c906da16b606..12c9a0b99f0c 100644 --- a/code/game/objects/items/cash.dm +++ b/code/game/objects/items/cash.dm @@ -21,6 +21,24 @@ if(amount) value = amount update_appearance() + SSeconomy.physical_money += value + +/obj/item/spacecash/proc/adjust_value(amount) + value += amount + SSeconomy.physical_money += amount + update_appearance() + +/obj/item/spacecash/proc/transfer_value(amount, obj/item/spacecash/target) + amount = clamp(amount, 0, value) + value -= amount + target.value += amount + target.update_appearance() + + if(value == 0) + qdel(src) + return + + update_appearance() /obj/item/spacecash/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/spacecash)) @@ -31,30 +49,26 @@ var/obj/item/spacecash/cash = W bundle = new (loc) bundle.value = cash.value + cash.value = 0 user.dropItemToGround(cash) qdel(cash) - bundle.value += value - bundle.update_appearance() if(ishuman(user)) var/mob/living/carbon/human/H = user H.dropItemToGround(src) H.dropItemToGround(bundle) H.put_in_hands(bundle) to_chat(user, "You add [value] credits worth of money to the bundle.
It now holds [bundle.value] credits.
") - qdel(src) + bundle.transfer_value(bundle.value, src) /obj/item/spacecash/Destroy() - . = ..() + SSeconomy.physical_money -= value value = 0 // Prevents money from be duplicated anytime.//I'll trust eris on this one + return ..() /obj/item/spacecash/bundle icon_state = "credit20" -/obj/item/spacecash/bundle/Initialize() - . = ..() - update_appearance() - /obj/item/spacecash/bundle/update_appearance() icon_state = "nothing" cut_overlays() @@ -122,45 +136,35 @@ to_chat(usr, "You need to be in arm's reach for that!") return - value -= cashamount - if(!value) - usr.dropItemToGround(src) - qdel(src) - - var/obj/item/spacecash/bundle/bundle = new (usr.loc) - bundle.value = cashamount - bundle.update_appearance() + var/obj/item/spacecash/bundle/bundle = new(usr.loc) + transfer_value(cashamount, bundle) usr.put_in_hands(bundle) update_appearance() /obj/item/spacecash/bundle/AltClick(mob/living/user) - var/cashamount = input(usr, "How many credits do you want to take? (0 to [value])", "Take Money", 20) as num + var/cashamount = input(user, "How many credits do you want to take? (0 to [value])", "Take Money", 20) as num cashamount = round(clamp(cashamount, 0, value)) if(!cashamount) return - else if(!Adjacent(usr)) - to_chat(usr, "You need to be in arm's reach for that!") + else if(!Adjacent(user)) + to_chat(user, "You need to be in arm's reach for that!") return - value -= cashamount + adjust_value(-cashamount) if(!value) - usr.dropItemToGround(src) + user.dropItemToGround(src) qdel(src) - var/obj/item/spacecash/bundle/bundle = new (usr.loc) - bundle.value = cashamount - bundle.update_appearance() - usr.put_in_hands(bundle) - update_appearance() + var/obj/item/spacecash/bundle/bundle = new(user.loc, cashamount) + user.put_in_hands(bundle) /obj/item/spacecash/bundle/attack_hand(mob/user) if(user.get_inactive_held_item() == src) if(value == 0)//may prevent any edge case duping qdel(src) return - var/nuvalue = value - 1 - value = nuvalue + adjust_value(-1) user.put_in_hands(new /obj/item/spacecash/bundle(loc, 1)) update_appearance() else diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 306634a639fc..7b2724f9e53f 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -811,24 +811,10 @@ name = "Medical Kiosk (Machine Board)" icon_state = "medical" build_path = /obj/machinery/medical_kiosk - var/custom_cost = 10 req_components = list( /obj/item/healthanalyzer = 1, /obj/item/stock_parts/scanning_module = 1) -/obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user) - . = ..() - var/new_cost = input("Set a new cost for using this medical kiosk.","New cost", custom_cost) as num|null - if(!new_cost || (loc != user)) - to_chat(user, "You must hold the circuitboard to change its cost!") - return - custom_cost = clamp(round(new_cost, 1), 10, 1000) - to_chat(user, "The cost is now set to [custom_cost].") - -/obj/item/circuitboard/machine/medical_kiosk/examine(mob/user) - . = ..() - . += "The cost to use this kiosk is set to [custom_cost]." - /obj/item/circuitboard/machine/limbgrower name = "Limb Grower (Machine Board)" icon_state = "medical" diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index 9a6663cf2046..fdc17fa8d97f 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -13,6 +13,11 @@ . = ..() credits = amount update_appearance() + SSeconomy.physical_money += amount + +/obj/item/holochip/Destroy() + SSeconomy.physical_money -= credits + return ..() /obj/item/holochip/examine(mob/user) . = ..() @@ -77,6 +82,7 @@ /obj/item/holochip/proc/spend(amount, pay_anyway = FALSE) if(credits >= amount) credits -= amount + SSeconomy.physical_money -= amount if(credits == 0) qdel(src) update_appearance() @@ -92,6 +98,7 @@ if(istype(I, /obj/item/holochip)) var/obj/item/holochip/H = I credits += H.credits + SSeconomy.physical_money += H.credits to_chat(user, "You insert the credits into [src].") update_appearance() qdel(H) diff --git a/code/game/objects/items/wayfinding.dm b/code/game/objects/items/wayfinding.dm index 848ade225ce2..984614529186 100644 --- a/code/game/objects/items/wayfinding.dm +++ b/code/game/objects/items/wayfinding.dm @@ -1,124 +1,3 @@ -/obj/machinery/pinpointer_dispenser - name = "wayfinding pinpointer synthesizer" - icon = 'icons/obj/machines/wayfinding.dmi' - icon_state = "pinpointersynth" - desc = "Having trouble finding your way? This machine synthesizes pinpointers that point to common locations." - density = FALSE - layer = HIGH_OBJ_LAYER - var/list/user_spawn_cooldowns = list() - var/list/user_interact_cooldowns = list() - var/spawn_cooldown = 5 MINUTES //time per person to spawn another pinpointer - var/interact_cooldown = 20 SECONDS //time per person for subsequent interactions - var/start_bal = 200 //how much money it starts with to cover wayfinder refunds - var/refund_amt = 40 //how much money recycling a pinpointer rewards you - var/static/datum/bank_account/synth_acc = new /datum/bank_account/remote - var/ppt_cost = 65 //Jan 6 '20: Assistant can buy one roundstart (125 cr starting) - var/expression_timer - -/obj/machinery/pinpointer_dispenser/Initialize(mapload) - . = ..() - synth_acc.adjust_money(start_bal) - - synth_acc.account_holder = name - - desc += " Only [ppt_cost] credits! It also likes making costumes..." - - set_expression("neutral") - -/obj/machinery/pinpointer_dispenser/attack_hand(mob/living/carbon/user) - if(world.time < user_interact_cooldowns[user.real_name]) - to_chat(user, "It doesn't respond.") - return - - user_interact_cooldowns[user.real_name] = world.time + interact_cooldown - - for(var/obj/item/pinpointer/wayfinding/WP in user.GetAllContents()) - set_expression("unsure", 2 SECONDS) - say("I can detect the pinpointer on you, [user.first_name()].") - user_spawn_cooldowns[user.real_name] = world.time + spawn_cooldown //spawn timer resets for trickers - return - - var/msg - var/dispense = TRUE - var/obj/item/pinpointer/wayfinding/pointat - for(var/obj/item/pinpointer/wayfinding/WP in range(7, user)) - if(WP.Adjacent(user)) - set_expression("facepalm", 2 SECONDS) - say("[WP.owner == user.real_name ? "Your" : "A"] pinpointer is right there.") - pointat(WP) - user_spawn_cooldowns[user.real_name] = world.time + spawn_cooldown - return - else if(WP in oview(7, user)) - pointat = WP - break - - if(world.time < user_spawn_cooldowns[user.real_name]) - var/secsleft = (user_spawn_cooldowns[user.real_name] - world.time) / 10 - msg += "to wait another [secsleft/60 > 1 ? "[round(secsleft/60,1)] minute\s" : "[round(secsleft)] second\s"]" - dispense = FALSE - - var/datum/bank_account/cust_acc = null - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.get_bank_account()) - cust_acc = H.get_bank_account() - - if(cust_acc) - if(!cust_acc.has_money(ppt_cost)) - msg += "[!msg ? "to find [ppt_cost-cust_acc.account_balance] more credit\s" : " and find [ppt_cost-cust_acc.account_balance] more credit\s"]" - dispense = FALSE - - if(!dispense) - set_expression("sad", 2 SECONDS) - if(pointat) - msg += ". I suggest you get [pointat.owner == user.real_name ? "your" : "that"] pinpointer over there instead" - pointat(pointat) - say("You will need [msg], [user.first_name()].") - return - - if(synth_acc.transfer_money(cust_acc, ppt_cost)) - set_expression("veryhappy", 2 SECONDS) - say("That is [ppt_cost] credits. Here is your pinpointer.") - var/obj/item/pinpointer/wayfinding/P = new /obj/item/pinpointer/wayfinding(get_turf(src)) - user_spawn_cooldowns[user.real_name] = world.time + spawn_cooldown - user.put_in_hands(P) - P.owner = user.real_name - -/obj/machinery/pinpointer_dispenser/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/pinpointer/wayfinding)) - var/obj/item/pinpointer/wayfinding/WP = I - to_chat(user, "You put \the [WP] in the return slot.") - var/rfnd_amt - if((!WP.roundstart || WP.owner != user.real_name) && synth_acc.has_money(TRUE)) //can't recycle own pinpointer for money if not bought; given by a neutral quirk - if(synth_acc.has_money(refund_amt)) - rfnd_amt = refund_amt - else - rfnd_amt = synth_acc.account_balance - synth_acc._adjust_money(-rfnd_amt) - var/obj/item/holochip/HC = new /obj/item/holochip(user.loc) - HC.credits = rfnd_amt - HC.name = "[HC.credits] credit holochip" - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - H.put_in_hands(HC) - else - var/crap = pick(subtypesof(/obj/effect/spawner/bundle/costume)) //harmless garbage some people may appreciate - new crap(user.loc) - qdel(WP) - set_expression("happy", 2 SECONDS) - say("Thank you for recycling, [user.first_name()]! Here is [rfnd_amt ? "[rfnd_amt] credits." : "a freshly synthesized costume!"]") - -/obj/machinery/pinpointer_dispenser/proc/set_expression(type, duration) - cut_overlays() - deltimer(expression_timer) - add_overlay(type) - if(duration) - expression_timer = addtimer(CALLBACK(src, PROC_REF(set_expression), "neutral"), duration, TIMER_STOPPABLE) - -/obj/machinery/pinpointer_dispenser/proc/pointat(atom) - visible_message("[src] points at [atom].") - new /obj/effect/temp_visual/point(atom,invisibility) - //Pinpointer itself /obj/item/pinpointer/wayfinding //Help players new to a station find their way around name = "wayfinding pinpointer" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index ddde4a25af5d..a11e647a706d 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -8,7 +8,6 @@ //WS Begin new /obj/item/clothing/head/beret/ce(src) //Berets new /obj/item/clothing/under/rank/command(src) //Better command uniforms - new /obj/item/card/id/departmental_budget/eng(src) //Budger Cards new /obj/item/stack/tape/industrial/pro(src) //Better tape //WS End new /obj/item/clothing/neck/cloak/ce(src) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 4884a757453e..37c816335977 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -447,9 +447,7 @@ to_chat(usr, "You do not possess the funds to purchase this.") return TRUE else - account.adjust_money(-sale_price) - if(payments_acc) - payments_acc.adjust_money(sale_price) + payments_acc.transfer_money(account, sale_price) usr.put_in_hands(showpiece) to_chat(usr, "You purchase [showpiece] for [sale_price] credits.") playsound(src, 'sound/effects/cashregister.ogg', 40, TRUE) diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 5ee0df0ec0f5..e427bfb6d46c 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -289,26 +289,6 @@ SSevents.toggleWizardmode() SSevents.resetFrequency() SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Disable")) - if("eagles") - if(!is_funmin) - return - SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Egalitarian Station")) - for(var/obj/machinery/door/airlock/W in GLOB.machines) - var/area/airlock_area = get_area(W) - if(istype(airlock_area, /area/ship) && !istype(airlock_area, /area/ship/bridge) && !istype(airlock_area, /area/ship/crew) && !istype(airlock_area, /area/ship/security/prison)) - W.req_access = list() - message_admins("[key_name_admin(holder)] activated Egalitarian Station mode") - priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg') - if("ancap") - if(!is_funmin) - return - SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Anarcho-capitalist Station")) - SSeconomy.full_ancap = !SSeconomy.full_ancap - message_admins("[key_name_admin(holder)] toggled Anarcho-capitalist mode") - if(SSeconomy.full_ancap) - priority_announce("The NAP is now in full effect.", null, 'sound/ai/commandreport.ogg') - else - priority_announce("The NAP has been revoked.", null, 'sound/ai/commandreport.ogg') if("blackout") if(!is_funmin) return diff --git a/code/modules/antagonists/traitor/syndicate_contract.dm b/code/modules/antagonists/traitor/syndicate_contract.dm index d012949ba054..a6edcb075361 100644 --- a/code/modules/antagonists/traitor/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/syndicate_contract.dm @@ -124,6 +124,7 @@ // This is slightly delayed because of the sleep calls above to handle the narrative. // We don't want to tell the station instantly. + /* var/points_to_check var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) if(D) @@ -135,6 +136,7 @@ priority_announce("One of your crew was captured by a rival organisation - we've needed to pay their ransom to bring them back. \ As is policy we've taken a portion of the station's funds to offset the overall cost.", null, 'sound/ai/attention.ogg', null, "Nanotrasen Asset Protection") + */ sleep(30) @@ -147,7 +149,7 @@ C = H.get_idcard(TRUE) if(C && C.registered_account) - C.registered_account.adjust_money(ransom * 0.35) + C.registered_account.adjust_money(ransom * 0.35, "syndicate_contract") C.registered_account.bank_card_talk("We've processed the ransom, agent. Here's your cut - your balance is now \ [C.registered_account.account_balance] cr.", TRUE) diff --git a/code/modules/cargo/bounty.dm b/code/modules/cargo/bounty.dm index 255c4bce7f78..01efd57be70b 100644 --- a/code/modules/cargo/bounty.dm +++ b/code/modules/cargo/bounty.dm @@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(bounties_list) // Called when the claim button is clicked. Override to provide fancy rewards. /datum/bounty/proc/claim(datum/bank_account/claimer_account) if(can_claim() && claimer_account) - claimer_account.adjust_money(reward) + claimer_account.adjust_money(reward, "bounty") claimed = TRUE // If an item sent in the cargo shuttle can satisfy the bounty. diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 9f615a5ba3ee..81409d63d031 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -65,13 +65,7 @@ return ..() /obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params) - var/value = 0 - if(istype(W, /obj/item/spacecash/bundle)) - var/obj/item/spacecash/bundle/C = W - value = C.value - else if(istype(W, /obj/item/holochip)) - var/obj/item/holochip/H = W - value = H.credits + var/value = W.get_item_credit_value() if(value && charge_account) charge_account.adjust_money(value) to_chat(user, "You deposit [W]. The Vessel Budget is now [charge_account.account_balance] cr.") diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm index f580aca9c0c9..64280475664a 100644 --- a/code/modules/economy/account.dm +++ b/code/modules/economy/account.dm @@ -1,55 +1,46 @@ -#define DUMPTIME 3000 - /datum/bank_account var/account_holder = "Rusty Venture" var/account_balance = 0 - var/datum/job/account_job var/list/bank_cards = list() - ///If the account has been frozen by someone at an account management terminal. - var/frozen = FALSE var/add_to_accounts = TRUE var/account_id - var/being_dumped = FALSE //pink levels are rising - var/withdrawDelay = 0 /datum/bank_account/New(newname, job) if(add_to_accounts) SSeconomy.bank_accounts += src account_holder = newname - account_job = job account_id = rand(111111,999999) /datum/bank_account/Destroy() if(add_to_accounts) SSeconomy.bank_accounts -= src - for(var/obj/item/card/id/id_card in bank_cards) + for(var/obj/item/card/id/id_card as anything in bank_cards) id_card.registered_account = null + SSeconomy.bank_money -= account_balance return ..() -/datum/bank_account/proc/dumpeet() - being_dumped = TRUE - withdrawDelay = world.time + DUMPTIME - /datum/bank_account/proc/_adjust_money(amt) account_balance += amt if(account_balance < 0) account_balance = 0 /datum/bank_account/proc/has_money(amt) - return account_balance >= amt && !frozen + return account_balance >= amt -/datum/bank_account/proc/adjust_money(amt) - if((amt < 0 && has_money(-amt)) || amt > 0 && !frozen) +/datum/bank_account/proc/adjust_money(amt, reason = "cash") + if((amt < 0 && has_money(-amt)) || amt > 0) + SSblackbox.record_feedback("tally", "credits", amt, reason) + SSeconomy.bank_money += amt _adjust_money(amt) return TRUE return FALSE /datum/bank_account/proc/transfer_money(datum/bank_account/from, amount) if(from.has_money(amount)) - adjust_money(amount) + adjust_money(amount, "transfer") SSblackbox.record_feedback("amount", "credits_transferred", amount) log_econ("[amount] credits were transferred from [from.account_holder]'s account to [src.account_holder]") - from.adjust_money(-amount) + from.adjust_money(-amount, "transfer_out") return TRUE return FALSE @@ -94,20 +85,4 @@ /datum/bank_account/ship/New(newname, budget) account_holder = newname - account_balance = budget - -/datum/bank_account/department - account_holder = "Guild Credit Agency" - var/department_id = "REPLACE_ME" - add_to_accounts = FALSE - -/datum/bank_account/department/New(dep_id, budget) - department_id = dep_id - account_balance = budget - account_holder = SSeconomy.department_accounts[dep_id] - SSeconomy.generated_accounts += src - -/datum/bank_account/remote // Bank account not belonging to the local station - add_to_accounts = FALSE - -#undef DUMPTIME + adjust_money(budget, "starting_money") diff --git a/code/modules/economy/pay_stand.dm b/code/modules/economy/pay_stand.dm index 071971c2a894..af7d9be4b947 100644 --- a/code/modules/economy/pay_stand.dm +++ b/code/modules/economy/pay_stand.dm @@ -54,7 +54,7 @@ if(momsdebitcard < 1) to_chat(user, "ERROR: Invalid amount designated.") return - if(vbucks.registered_account.adjust_money(-momsdebitcard)) + if(vbucks.registered_account.adjust_money(-momsdebitcard, "transfer")) purchase(vbucks.registered_account.account_holder, momsdebitcard) to_chat(user, "Thanks for purchasing! The vendor has been informed.") return @@ -117,7 +117,7 @@ return ..() /obj/machinery/paystand/proc/purchase(buyer, price) - my_card.registered_account.adjust_money(price) + my_card.registered_account.adjust_money(price, "transfer") my_card.registered_account.bank_card_talk("Purchase made at your vendor by [buyer] for [price] credits.") amount_deposited = amount_deposited + price if(signaler && amount_deposited >= signaler_threshold) diff --git a/code/modules/economy/selling_pad.dm b/code/modules/economy/selling_pad.dm index 46d660c5cec3..cf155ad251bd 100644 --- a/code/modules/economy/selling_pad.dm +++ b/code/modules/economy/selling_pad.dm @@ -34,15 +34,9 @@ sell_account = port.current_ship?.ship_account /obj/machinery/computer/selling_pad_control/attackby(obj/item/I, mob/user) - var/value = 0 - if(istype(I, /obj/item/spacecash/bundle)) - var/obj/item/spacecash/bundle/C = I - value = C.value - else if(istype(I, /obj/item/holochip)) - var/obj/item/holochip/H = I - value = H.credits + var/value = I.get_item_credit_value() if(value) - sell_account.adjust_money(value) + sell_account.adjust_money(value, "selling_pad") to_chat(user, "You deposit [I]. The Vessel Budget is now [sell_account.account_balance] cr.") qdel(I) return TRUE @@ -156,7 +150,7 @@ total_report.total_amount[E] += ex.total_amount[E] total_report.total_value[E] += ex.total_value[E] - sell_account.adjust_money(value) + sell_account.adjust_money(value, "selling_pad") if(!value) status_report += "Nothing" diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 67d45dd8d058..ee0d7789355e 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -124,7 +124,7 @@ return FALSE if(!visualsOnly) var/datum/bank_account/bank_account = new(H.real_name, src) - bank_account.adjust_money(officer ? 250 : 100) //just a little bit of money for you + bank_account.adjust_money(officer ? 250 : 100, "starting_money") //just a little bit of money for you H.account_id = bank_account.account_id //Equip the rest of the gear diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 2af7db0f4b6c..c84d61ab7cf2 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -11,7 +11,6 @@ shoot_inventory_chance = 0 circuit = /obj/item/circuitboard/machine/vending/mining_equipment refill_canister = /obj/item/vending_refill/mining_equipment - payment_department = ACCOUNT_CAR vend_ready = "Good luck, you're going to need it." mining_point_vendor = TRUE default_price = 100 diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index ceda44284f46..b024be2f96f7 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -367,7 +367,6 @@ . += "Criminal status:\[[criminal]\]" . += jointext(list("Security record:\[View\]", - "\[Add citation\]", "\[Add crime\]", "\[View comment log\]", "\[Add comment\]"), "") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 93276a6710a6..f3802e381c55 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -432,38 +432,6 @@ to_chat(usr, "Notes: [R.fields["notes"]]") return - if(href_list["add_citation"]) - var/maxFine = CONFIG_GET(number/maxfine) - var/t1 = stripped_input("Please input citation crime:", "Security HUD", "", null) - var/fine = FLOOR(input("Please input citation fine, up to [maxFine]:", "Security HUD", 50) as num|null, 1) - if(!R || !t1 || !fine || !allowed_access) - return - if(!H.canUseHUD()) - return - if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD)) - return - if(fine < 0) - to_chat(usr, "You're pretty sure that's not how money works.") - return - fine = min(fine, maxFine) - - var/crime = GLOB.data_core.createCrimeEntry(t1, "", allowed_access, station_time_timestamp(), fine) - for (var/obj/item/pda/P in GLOB.PDAs) - if(P.owner == R.fields["name"]) - var/message = "You have been fined [fine] credits for '[t1]'. Fines may be paid at security." - var/datum/signal/subspace/messaging/pda/signal = new(src, list( - "name" = "Security Citation", - "job" = "Citation Server", - "message" = message, - "targets" = list("[P.owner] ([P.ownjob])"), - "automated" = 1 - )) - signal.send_to_receivers() - usr.log_message("(PDA: Citation Server) sent \"[message]\" to [signal.format_target()]", LOG_PDA) - GLOB.data_core.addCitation(R.fields["id"], crime) - investigate_log("New Citation: [t1] Fine: [fine] | Added to [R.fields["name"]] by [key_name(usr)]", INVESTIGATE_RECORDS) - return - if(href_list["add_crime"]) var/t1 = stripped_input("Please input crime name:", "Security HUD", "", null) if(!R || !t1 || !allowed_access) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index af33ef493167..df2508c5f4a0 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -40,7 +40,6 @@ var/fair_market_price_arrest = 25 // On arrest, charges the violator this much. If they don't have that much in their account, the securitron will beat them instead var/fair_market_price_detain = 5 // Charged each time the violator is stunned on detain var/weapon_force = 20 // Only used for NAP violation beatdowns on non-grievous securitrons - var/market_verb = "Suspect" var/payment_department = ACCOUNT_SEC /mob/living/simple_animal/bot/secbot/beepsky @@ -237,10 +236,7 @@ Auto Patrol: []"}, if(iscarbon(A)) var/mob/living/carbon/C = A if(!C.IsParalyzed() || arrest_type) - if(!check_nap_violations()) - stun_attack(A, TRUE) - else - stun_attack(A) + stun_attack(A) else if(C.canBeHandcuffed() && !C.handcuffed) cuff(A) else @@ -320,10 +316,7 @@ Auto Patrol: []"}, if(target) // make sure target exists if(Adjacent(target) && isturf(target.loc)) // if right next to perp - if(!check_nap_violations()) - stun_attack(target, TRUE) - else - stun_attack(target) + stun_attack(target) mode = BOT_PREP_ARREST set_anchored(TRUE) @@ -367,9 +360,6 @@ Auto Patrol: []"}, return if(target.handcuffed) //no target or target cuffed? back to idle. - if(!check_nap_violations()) - stun_attack(target, TRUE) - return back_to_idle() return @@ -497,38 +487,3 @@ Auto Patrol: []"}, /obj/machinery/bot_core/secbot req_access = list(ACCESS_SECURITY) - -/// Returns false if the current target is unable to pay the fair_market_price for being arrested/detained -/mob/living/simple_animal/bot/secbot/proc/check_nap_violations() - if(!SSeconomy.full_ancap) - return TRUE - - if(target) - if(ishuman(target)) - var/mob/living/carbon/human/H = target - var/obj/item/card/id/I = H.get_idcard(TRUE) - if(I) - var/datum/bank_account/insurance = I.registered_account - if(!insurance) - say("[market_verb] NAP Violation: No bank account found.") - nap_violation(target) - return FALSE - else - var/fair_market_price = (arrest_type ? fair_market_price_detain : fair_market_price_arrest) - if(!insurance.adjust_money(-fair_market_price)) - say("[market_verb] NAP Violation: Unable to pay.") - nap_violation(target) - return FALSE - var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department) - say("Thank you for your compliance. Your account been charged [fair_market_price] credits.") - if(D) - D.adjust_money(fair_market_price) - else - say("[market_verb] NAP Violation: No ID card found.") - nap_violation(target) - return FALSE - return TRUE - -/// Does nothing -/mob/living/simple_animal/bot/secbot/proc/nap_violation(mob/violator) - return diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 7d518c0b2f6d..eb363de15792 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -254,7 +254,7 @@ var/obj/item/card/id/ID = I var/datum/bank_account/account = ID.registered_account var/target_credits = total_price - credits - if(!account.adjust_money(-target_credits)) + if(!account.adjust_money(-target_credits, "laptop_vendor")) say("Insufficient credits on card to purchase!") return credits += target_credits diff --git a/code/modules/overmap/missions.dm b/code/modules/overmap/missions.dm index 41ac27dce3a1..0bc2c2f34722 100644 --- a/code/modules/overmap/missions.dm +++ b/code/modules/overmap/missions.dm @@ -63,7 +63,7 @@ return ..() /datum/mission/proc/turn_in() - servant.ship_account.adjust_money(value) + servant.ship_account.adjust_money(value, "mission") qdel(src) /datum/mission/proc/give_up() diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 2d801de426af..8850c4e68981 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -70,9 +70,7 @@ loaded_tank.air_contents.adjust_moles(GAS_O2, -gasdrained) loaded_tank.air_contents.adjust_moles(GAS_CO2, gasdrained*2) var/bitcoins_mined = RAD_COLLECTOR_OUTPUT - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG) - if(D) - D.adjust_money(bitcoins_mined*RAD_COLLECTOR_MINING_CONVERSION_RATE) + new /obj/item/spacecash(get_dumping_location(), bitcoins_mined * RAD_COLLECTOR_MINING_CONVERSION_RATE) stored_research += bitcoins_mined*RAD_COLLECTOR_MINING_CONVERSION_RATE*PRIVATE_TECHWEB_GAIN linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, bitcoins_mined*RAD_COLLECTOR_MINING_CONVERSION_RATE*PUBLIC_TECHWEB_GAIN) stored_energy-=bitcoins_mined diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 82372d221baf..ccbb774f0224 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -96,9 +96,7 @@ var/power_produced = powernet ? power / power_loss : power add_avail(power_produced*input_power_multiplier) flick("coilhit", src) - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG) - if(D) - D.adjust_money(min(power_produced, 1)) + new /obj/item/spacecash(get_dumping_location(), power_produced) if(istype(linked_techweb) && (zap_flags & ZAP_GIVES_RESEARCH) && can_generate_research) linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min(power_produced, 3)) // x4 coils = 12 points a shock for RND, if they even bothered to link the server. addtimer(CALLBACK(src, PROC_REF(reset_shocked)), 10) @@ -135,9 +133,7 @@ var/power_produced = powernet ? power / power_loss : power add_avail(power_produced*input_power_multiplier) flick("rpcoilhit", src) - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG) - if(D) - D.adjust_money(min(power_produced, 12)) + new /obj/item/spacecash(get_dumping_location(), min(power_produced, 12)) if(istype(linked_techweb) && (zap_flags & ZAP_GIVES_RESEARCH)) linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min(power_produced, 25)) // x4 coils = 100 points per shock, which is a good reward for building a research tesla or electrical storm harvest ship addtimer(CALLBACK(src, PROC_REF(reset_shocked)), 10) diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 23093e5d8d51..20bcdc4e63d9 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -281,8 +281,8 @@ credit_card_details = H.get_bank_account() if(H in gun_owners) if(multi_payment && credit_card_details) - if(credit_card_details.adjust_money(-payment_amount)) - pin_owner.registered_account.adjust_money(payment_amount) + if(credit_card_details.has_money(payment_amount)) + pin_owner.registered_account.transfer_money(credit_card_details, payment_amount) return TRUE to_chat(user, "ERROR: User balance insufficent for successful transaction!") return FALSE @@ -295,8 +295,8 @@ return FALSE switch(license_request) if("Yes") - if(credit_card_details.adjust_money(-payment_amount)) - pin_owner.registered_account.adjust_money(payment_amount) + if(credit_card_details.has_money(payment_amount)) + pin_owner.registered_account.transfer_money(credit_card_details, payment_amount) gun_owners += H to_chat(user, "Gun license purchased, have a secure day!") active_prompt = FALSE diff --git a/code/modules/research/bepis.dm b/code/modules/research/bepis.dm index 3b9aaceb9f4e..84d948f7c2b9 100644 --- a/code/modules/research/bepis.dm +++ b/code/modules/research/bepis.dm @@ -101,7 +101,7 @@ if(!account.has_money(deposit_value)) say("You do not possess enough credits.") return - account.adjust_money(-deposit_value) //The money vanishes, not paid to any accounts. + account.adjust_money(-deposit_value, "bepis") //The money vanishes, not paid to any accounts. SSblackbox.record_feedback("amount", "BEPIS_credits_spent", deposit_value) log_econ("[deposit_value] credits were inserted into [src] by [account.account_holder]") banked_cash += deposit_value diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index c00a62546b3f..2603d9ea3e24 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -277,7 +277,7 @@ if(account) if(account.account_balance < threshold - payees[AM]) - account.adjust_money(-account.account_balance) + account.adjust_money(-account.account_balance, "luxury_shuttle") payees[AM] += account.account_balance else var/money_owed = threshold - payees[AM] diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index caf9b6afa757..93fcacba45b1 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -54,7 +54,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C integrity_failure = 0.33 armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70) circuit = /obj/item/circuitboard/machine/vendor - var/payment_department = ACCOUNT_SRV + var/datum/weakref/payment_account_ref light_power = 0.5 light_range = MINIMUM_USEFUL_LIGHT_RANGE clicksound = 'sound/machines/pda_button1.ogg' @@ -676,7 +676,6 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C . = list() .["all_items_free"] = all_items_free .["miningvendor"] = mining_point_vendor - .["department"] = payment_department .["product_records"] = list() for (var/datum/data/vending_product/R in product_records) var/list/data = list( @@ -713,21 +712,18 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/machinery/vending/ui_data(mob/user) . = list() var/mob/living/carbon/human/H - var/obj/item/card/id/C + var/obj/item/card/id/card if(ishuman(user)) H = user - C = H.get_idcard(TRUE) - if(C) + card = H.get_idcard(TRUE) + if(card) .["user"] = list() - .["user"]["points"] = C.mining_points - .["user"]["name"] = C.registered_name - if(C.registered_account) - .["user"]["name"] = C.registered_account.account_holder - .["user"]["cash"] = C.registered_account.account_balance - if(C.registered_account.account_job) - .["user"]["job"] = C.registered_account.account_job.name - else - .["user"]["job"] = "No Job" + .["user"]["points"] = card.mining_points + .["user"]["name"] = card.registered_name + .["user"]["job"] = card.assignment || "No Job" + if(card.registered_account) + .["user"]["name"] = card.registered_account.account_holder + .["user"]["cash"] = card.registered_account.account_balance .["stock"] = list() for (var/datum/data/vending_product/R in product_records + coin_records + hidden_records) .["stock"][R.name] = R.amount @@ -794,16 +790,19 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C var/datum/bank_account/account = C.registered_account if(coin_records.Find(R) || hidden_records.Find(R)) price_to_use = R.custom_premium_price ? R.custom_premium_price : extra_price - if(price_to_use && !account.adjust_money(-price_to_use)) + if(price_to_use && !account.has_money(price_to_use)) say("You do not possess the funds to purchase [R.name].") flick(icon_deny,src) vend_ready = TRUE return - var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department) - if(D) - D.adjust_money(price_to_use) - SSblackbox.record_feedback("amount", "vending_spent", price_to_use) - log_econ("[price_to_use] credits were inserted into [src] by [D.account_holder] to buy [R].") + + var/datum/bank_account/payment_account = payment_account_ref.resolve() + if(payment_account) + payment_account.transfer_money(account, price_to_use) + else + account.adjust_money(-price_to_use, "vendor_purchase") + SSblackbox.record_feedback("amount", "vending_spent", price_to_use) + log_econ("[price_to_use] credits were inserted into [src] by [H] to buy [R].") if(last_shopper != REF(usr) || purchase_message_cooldown < world.time) say("Thank you for shopping with [src]!") purchase_message_cooldown = world.time + 5 SECONDS @@ -933,7 +932,6 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C icon_state = "robotics" icon_deny = "robotics-deny" max_integrity = 400 - payment_department = NO_FREEBIES refill_canister = /obj/item/vending_refill/custom all_items_free = FALSE /// where the money is sent @@ -1030,12 +1028,13 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C updateUsrDialog() return if(account.has_money(S.custom_price)) - account.adjust_money(-S.custom_price) var/datum/bank_account/owner = private_a if(owner) - owner.adjust_money(S.custom_price) - SSblackbox.record_feedback("amount", "vending_spent", S.custom_price) - log_econ("[S.custom_price] credits were spent on [src] buying a [S] by [owner.account_holder], owned by [private_a.account_holder].") + owner.transfer_money(account, S.custom_price) + else + account.adjust_money(-S.custom_price, "vendor_purchase") + SSblackbox.record_feedback("amount", "vending_spent", S.custom_price) + log_econ("[S.custom_price] credits were spent on [src] buying a [S] by [owner.account_holder], owned by [private_a.account_holder].") vending_machine_input[N] = max(vending_machine_input[N] - 1, 0) S.forceMove(drop_location()) loaded_items-- diff --git a/code/modules/vending/assist.dm b/code/modules/vending/assist.dm index 36c3d67c790d..8a1c86cc9536 100644 --- a/code/modules/vending/assist.dm +++ b/code/modules/vending/assist.dm @@ -25,7 +25,6 @@ product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!" default_price = 125 extra_price = 100 - payment_department = NO_FREEBIES light_mask = "generic-light-mask" /obj/item/vending_refill/assist diff --git a/code/modules/vending/autodrobe.dm b/code/modules/vending/autodrobe.dm index 4bca9034dd9b..b1d85fb3fcbb 100644 --- a/code/modules/vending/autodrobe.dm +++ b/code/modules/vending/autodrobe.dm @@ -132,7 +132,6 @@ refill_canister = /obj/item/vending_refill/autodrobe default_price = 180 extra_price = 360 - payment_department = ACCOUNT_SRV light_mask="theater-light-mask" /obj/machinery/vending/autodrobe/canLoadItem(obj/item/I,mob/user) diff --git a/code/modules/vending/boozeomat.dm b/code/modules/vending/boozeomat.dm index 9c7b8622d536..1b7b2d9e5ccb 100644 --- a/code/modules/vending/boozeomat.dm +++ b/code/modules/vending/boozeomat.dm @@ -60,7 +60,6 @@ refill_canister = /obj/item/vending_refill/boozeomat default_price = 120 extra_price = 200 - payment_department = ACCOUNT_SRV light_mask = "boozeomat-light-mask" /obj/machinery/vending/boozeomat/all_access diff --git a/code/modules/vending/cartridge.dm b/code/modules/vending/cartridge.dm index 36db52996e1f..b2608b6556f4 100644 --- a/code/modules/vending/cartridge.dm +++ b/code/modules/vending/cartridge.dm @@ -16,7 +16,6 @@ refill_canister = /obj/item/vending_refill/cart default_price = 250 extra_price = 500 - payment_department = ACCOUNT_SRV light_mask="cart-light-mask" /obj/item/vending_refill/cart diff --git a/code/modules/vending/cigarette.dm b/code/modules/vending/cigarette.dm index ce2616711d3c..7dd0b6004ea7 100644 --- a/code/modules/vending/cigarette.dm +++ b/code/modules/vending/cigarette.dm @@ -27,7 +27,6 @@ refill_canister = /obj/item/vending_refill/cigarette default_price = 75 extra_price = 250 - payment_department = ACCOUNT_SRV light_mask = "cigs-light-mask" /obj/machinery/vending/cigarette/syndicate diff --git a/code/modules/vending/classicbeats.dm b/code/modules/vending/classicbeats.dm index 0b3fb5c93498..76589b5e479d 100644 --- a/code/modules/vending/classicbeats.dm +++ b/code/modules/vending/classicbeats.dm @@ -23,7 +23,6 @@ refill_canister = /obj/item/vending_refill/classicbeats default_price = 100 extra_price = 60 - payment_department = ACCOUNT_SRV /obj/item/vending_refill/classicbeats machine_name = "Cuban Pete's Classic Beats" diff --git a/code/modules/vending/clothesmate.dm b/code/modules/vending/clothesmate.dm index 140d8c42a283..8a7199968774 100644 --- a/code/modules/vending/clothesmate.dm +++ b/code/modules/vending/clothesmate.dm @@ -127,7 +127,6 @@ refill_canister = /obj/item/vending_refill/clothing default_price = 60 extra_price = 120 - payment_department = NO_FREEBIES light_mask = "wardrobe-light-mask" light_color = LIGHT_COLOR_ELECTRIC_GREEN diff --git a/code/modules/vending/coffee.dm b/code/modules/vending/coffee.dm index 67b9878744be..3e45b431b16d 100644 --- a/code/modules/vending/coffee.dm +++ b/code/modules/vending/coffee.dm @@ -15,7 +15,6 @@ refill_canister = /obj/item/vending_refill/coffee default_price = 45 extra_price = 150 - payment_department = ACCOUNT_SRV light_mask = "coffee-light-mask" light_color = COLOR_DARK_MODERATE_ORANGE diff --git a/code/modules/vending/cola.dm b/code/modules/vending/cola.dm index 8be6000ddc69..2ce937979e74 100644 --- a/code/modules/vending/cola.dm +++ b/code/modules/vending/cola.dm @@ -27,7 +27,6 @@ refill_canister = /obj/item/vending_refill/cola default_price = 45 extra_price = 200 - payment_department = ACCOUNT_SRV /obj/item/vending_refill/cola diff --git a/code/modules/vending/drinnerware.dm b/code/modules/vending/drinnerware.dm index 067596091dde..7ff7d80ddccd 100644 --- a/code/modules/vending/drinnerware.dm +++ b/code/modules/vending/drinnerware.dm @@ -25,7 +25,6 @@ refill_canister = /obj/item/vending_refill/dinnerware default_price = 50 extra_price = 250 - payment_department = ACCOUNT_SRV light_mask = "dinnerware-light-mask" /obj/item/vending_refill/dinnerware diff --git a/code/modules/vending/engineering.dm b/code/modules/vending/engineering.dm index d0f3a3e88725..b5a9d073e8fa 100644 --- a/code/modules/vending/engineering.dm +++ b/code/modules/vending/engineering.dm @@ -31,7 +31,6 @@ refill_canister = /obj/item/vending_refill/engineering default_price = 450 extra_price = 500 - payment_department = ACCOUNT_ENG light_mask = "engi-light-mask" /obj/item/vending_refill/engineering diff --git a/code/modules/vending/engivend.dm b/code/modules/vending/engivend.dm index 04b7d26a533e..096bffb1adf7 100644 --- a/code/modules/vending/engivend.dm +++ b/code/modules/vending/engivend.dm @@ -24,7 +24,6 @@ refill_canister = /obj/item/vending_refill/engivend default_price = 450 extra_price = 500 - payment_department = ACCOUNT_ENG light_mask = "engivend-light-mask" /obj/item/vending_refill/engivend diff --git a/code/modules/vending/games.dm b/code/modules/vending/games.dm index ca99c8e4bf34..d209c93eae8e 100644 --- a/code/modules/vending/games.dm +++ b/code/modules/vending/games.dm @@ -21,7 +21,6 @@ refill_canister = /obj/item/vending_refill/games default_price = 50 extra_price = 250 - payment_department = ACCOUNT_SRV light_mask = "games-light-mask" /obj/item/vending_refill/games diff --git a/code/modules/vending/liberation.dm b/code/modules/vending/liberation.dm index 015bbdc2c340..ffc1214e6bdf 100644 --- a/code/modules/vending/liberation.dm +++ b/code/modules/vending/liberation.dm @@ -32,5 +32,4 @@ resistance_flags = FIRE_PROOF default_price = 150 extra_price = 500 - payment_department = ACCOUNT_SEC light_mask = "liberation-light-mask" diff --git a/code/modules/vending/liberation_toy.dm b/code/modules/vending/liberation_toy.dm index 90df6b673b16..fd899f251d25 100644 --- a/code/modules/vending/liberation_toy.dm +++ b/code/modules/vending/liberation_toy.dm @@ -28,5 +28,4 @@ refill_canister = /obj/item/vending_refill/donksoft default_price = 150 extra_price = 300 - payment_department = ACCOUNT_SRV light_mask = "donksoft-light-mask" diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm index e4489b0a23d8..1fff1bd03398 100644 --- a/code/modules/vending/medical.dm +++ b/code/modules/vending/medical.dm @@ -41,7 +41,6 @@ refill_canister = /obj/item/vending_refill/medical default_price = 250 extra_price = 500 - payment_department = ACCOUNT_MED light_mask = "med-light-mask" /obj/item/vending_refill/medical diff --git a/code/modules/vending/medical_wall.dm b/code/modules/vending/medical_wall.dm index 7ba19c75d617..cf0bca7c3bdb 100644 --- a/code/modules/vending/medical_wall.dm +++ b/code/modules/vending/medical_wall.dm @@ -23,7 +23,6 @@ refill_canister = /obj/item/vending_refill/wallmed default_price = 250 extra_price = 500 - payment_department = ACCOUNT_MED tiltable = FALSE light_mask = "wallmed-light-mask" diff --git a/code/modules/vending/megaseed.dm b/code/modules/vending/megaseed.dm index bdb3ae4c02eb..899bbac5ea87 100644 --- a/code/modules/vending/megaseed.dm +++ b/code/modules/vending/megaseed.dm @@ -56,7 +56,6 @@ refill_canister = /obj/item/vending_refill/hydroseeds default_price = 50 extra_price = 150 - payment_department = ACCOUNT_SRV /obj/item/vending_refill/hydroseeds machine_name = "MegaSeed Servitor" diff --git a/code/modules/vending/modularpc.dm b/code/modules/vending/modularpc.dm index 2b0c82ba084f..fd9277b895d0 100644 --- a/code/modules/vending/modularpc.dm +++ b/code/modules/vending/modularpc.dm @@ -26,7 +26,6 @@ refill_canister = /obj/item/vending_refill/modularpc default_price = 150 extra_price = 400 - payment_department = ACCOUNT_SCI /obj/item/vending_refill/modularpc machine_name = "Deluxe Silicate Selections" diff --git a/code/modules/vending/nutrimax.dm b/code/modules/vending/nutrimax.dm index 753851e53894..1849750d3fce 100644 --- a/code/modules/vending/nutrimax.dm +++ b/code/modules/vending/nutrimax.dm @@ -22,7 +22,6 @@ refill_canister = /obj/item/vending_refill/hydronutrients default_price = 50 extra_price = 150 - payment_department = ACCOUNT_SRV /obj/item/vending_refill/hydronutrients machine_name = "NutriMax" diff --git a/code/modules/vending/plasmaresearch.dm b/code/modules/vending/plasmaresearch.dm index fdd200edba97..650d9878ad36 100644 --- a/code/modules/vending/plasmaresearch.dm +++ b/code/modules/vending/plasmaresearch.dm @@ -14,4 +14,3 @@ contraband = list(/obj/item/assembly/health = 3) default_price = 400 extra_price = 600 - payment_department = ACCOUNT_SCI diff --git a/code/modules/vending/robotics.dm b/code/modules/vending/robotics.dm index e8b377db3dbf..f35b92ebb2d0 100644 --- a/code/modules/vending/robotics.dm +++ b/code/modules/vending/robotics.dm @@ -22,7 +22,6 @@ /obj/item/crowbar = 5) refill_canister = /obj/item/vending_refill/robotics default_price = 600 - payment_department = ACCOUNT_SCI /obj/item/vending_refill/robotics machine_name = "Robotech Deluxe" diff --git a/code/modules/vending/security.dm b/code/modules/vending/security.dm index e4e9d303ae0e..7af332630105 100644 --- a/code/modules/vending/security.dm +++ b/code/modules/vending/security.dm @@ -27,7 +27,6 @@ refill_canister = /obj/item/vending_refill/security default_price = 650 extra_price = 700 - payment_department = ACCOUNT_SEC var/voucher_items = list( "NT-E-Rifle" = /obj/item/gun/energy/e_gun, diff --git a/code/modules/vending/snack.dm b/code/modules/vending/snack.dm index 5f6a4b6d937a..0785df82f14d 100644 --- a/code/modules/vending/snack.dm +++ b/code/modules/vending/snack.dm @@ -22,7 +22,6 @@ canload_access_list = list(ACCESS_KITCHEN) default_price = 60 extra_price = 160 - payment_department = ACCOUNT_SRV input_display_header = "Chef's Food Selection" /obj/item/vending_refill/snack diff --git a/code/modules/vending/sovietsoda.dm b/code/modules/vending/sovietsoda.dm index 0f80bf5324bc..f9eff36e5e6c 100644 --- a/code/modules/vending/sovietsoda.dm +++ b/code/modules/vending/sovietsoda.dm @@ -10,7 +10,6 @@ refill_canister = /obj/item/vending_refill/sovietsoda default_price = 1 extra_price = 1 - payment_department = NO_FREEBIES light_color = COLOR_PALE_ORANGE /obj/item/vending_refill/sovietsoda diff --git a/code/modules/vending/sustenance.dm b/code/modules/vending/sustenance.dm index aa8ae97fb112..0519285d26a5 100644 --- a/code/modules/vending/sustenance.dm +++ b/code/modules/vending/sustenance.dm @@ -18,7 +18,6 @@ refill_canister = /obj/item/vending_refill/sustenance default_price = 0 extra_price = 0 - payment_department = NO_FREEBIES /obj/item/vending_refill/sustenance machine_name = "Sustenance Vendor" diff --git a/code/modules/vending/toys.dm b/code/modules/vending/toys.dm index 8a938b50d435..5f284718b6f3 100644 --- a/code/modules/vending/toys.dm +++ b/code/modules/vending/toys.dm @@ -28,7 +28,6 @@ refill_canister = /obj/item/vending_refill/donksoft default_price = 150 extra_price = 300 - payment_department = ACCOUNT_SRV /obj/item/vending_refill/donksoft machine_name = "Donksoft Toy Vendor" diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm index 20c270ebb885..933c54f64602 100644 --- a/code/modules/vending/wardrobes.dm +++ b/code/modules/vending/wardrobes.dm @@ -4,7 +4,6 @@ /obj/machinery/vending/wardrobe default_price = 350 extra_price = 450 - payment_department = NO_FREEBIES input_display_header = "Returned Clothing" light_mask = "wardrobe-light-mask" @@ -40,7 +39,6 @@ contraband = list(/obj/item/clothing/head/helmet/justice = 1, /obj/item/clothing/head/helmet/justice/escape = 1) refill_canister = /obj/item/vending_refill/wardrobe/sec_wardrobe - payment_department = ACCOUNT_SEC light_color = COLOR_MOSTLY_PURE_RED /obj/item/vending_refill/wardrobe/sec_wardrobe @@ -74,7 +72,6 @@ /obj/item/clothing/accessory/armband/med = 4, /obj/item/clothing/mask/surgical = 4) refill_canister = /obj/item/vending_refill/wardrobe/medi_wardrobe - payment_department = ACCOUNT_MED /obj/item/vending_refill/wardrobe/medi_wardrobe machine_name = "MediDrobe" @@ -101,7 +98,6 @@ /obj/item/clothing/head/hardhat = 3, /obj/item/clothing/head/hardhat/weldhat = 3) refill_canister = /obj/item/vending_refill/wardrobe/engi_wardrobe - payment_department = ACCOUNT_ENG light_color = COLOR_VIVID_YELLOW /obj/item/vending_refill/wardrobe/engi_wardrobe @@ -125,7 +121,6 @@ /obj/item/clothing/shoes/sneakers/black = 3 ) refill_canister = /obj/item/vending_refill/wardrobe/atmos_wardrobe - payment_department = ACCOUNT_ENG light_color = COLOR_VIVID_YELLOW /obj/item/vending_refill/wardrobe/atmos_wardrobe @@ -148,7 +143,6 @@ /obj/item/radio/headset/headset_cargo = 3) premium = list(/obj/item/clothing/under/rank/cargo/miner = 3) refill_canister = /obj/item/vending_refill/wardrobe/cargo_wardrobe - payment_department = ACCOUNT_CAR /obj/item/vending_refill/wardrobe/cargo_wardrobe machine_name = "CargoDrobe" @@ -173,7 +167,6 @@ /obj/item/organ/tongue/robot = 2) refill_canister = /obj/item/vending_refill/wardrobe/robo_wardrobe extra_price = 300 - payment_department = ACCOUNT_SCI /obj/item/vending_refill/wardrobe/robo_wardrobe machine_name = "RoboDrobe" @@ -196,7 +189,6 @@ /obj/item/clothing/head/beret/sci = 3, //WS edit - Berets /obj/item/clothing/mask/gas = 3) refill_canister = /obj/item/vending_refill/wardrobe/science_wardrobe - payment_department = ACCOUNT_SCI /obj/item/vending_refill/wardrobe/science_wardrobe machine_name = "SciDrobe" @@ -219,7 +211,6 @@ /obj/item/clothing/mask/bandana = 3, /obj/item/clothing/accessory/armband/hydro = 3) refill_canister = /obj/item/vending_refill/wardrobe/hydro_wardrobe - payment_department = ACCOUNT_SRV light_color = LIGHT_COLOR_ELECTRIC_GREEN /obj/item/vending_refill/wardrobe/hydro_wardrobe @@ -246,7 +237,6 @@ /obj/item/clothing/glasses/regular/jamjar = 1, /obj/item/storage/bag/books = 1) refill_canister = /obj/item/vending_refill/wardrobe/curator_wardrobe - payment_department = ACCOUNT_SRV /obj/item/vending_refill/wardrobe/curator_wardrobe machine_name = "CuraDrobe" @@ -281,7 +271,6 @@ /obj/item/clothing/neck/tie/blue = 2) premium = list(/obj/item/storage/box/dishdrive = 1) refill_canister = /obj/item/vending_refill/wardrobe/bar_wardrobe - payment_department = ACCOUNT_SRV /obj/item/vending_refill/wardrobe/bar_wardrobe machine_name = "BarDrobe" @@ -310,7 +299,6 @@ /obj/item/clothing/accessory/armband/med = 4, /obj/item/clothing/suit/hooded/wintercoat = 2) refill_canister = /obj/item/vending_refill/wardrobe/chef_wardrobe - payment_department = ACCOUNT_SRV /obj/item/vending_refill/wardrobe/chef_wardrobe machine_name = "ChefDrobe" @@ -342,7 +330,6 @@ /obj/item/watertank/janitor = 1, /obj/item/storage/belt/janitor = 2) refill_canister = /obj/item/vending_refill/wardrobe/jani_wardrobe - payment_department = ACCOUNT_SRV light_color = COLOR_STRONG_MAGENTA /obj/item/vending_refill/wardrobe/jani_wardrobe @@ -379,7 +366,6 @@ /obj/item/clothing/accessory/armband/deputy = 4, /obj/item/clothing/accessory/lawyers_badge = 2) refill_canister = /obj/item/vending_refill/wardrobe/law_wardrobe - payment_department = ACCOUNT_SRV /obj/item/vending_refill/wardrobe/law_wardrobe machine_name = "LawDrobe" @@ -413,7 +399,6 @@ premium = list(/obj/item/clothing/suit/chaplainsuit/bishoprobe = 1, /obj/item/clothing/head/bishopmitre = 1) refill_canister = /obj/item/vending_refill/wardrobe/chap_wardrobe - payment_department = ACCOUNT_SRV /obj/item/vending_refill/wardrobe/chap_wardrobe machine_name = "ChapDrobe" @@ -434,7 +419,6 @@ /obj/item/storage/bag/chemistry = 2) contraband = list(/obj/item/reagent_containers/spray/syndicate = 2) refill_canister = /obj/item/vending_refill/wardrobe/chem_wardrobe - payment_department = ACCOUNT_MED /obj/item/vending_refill/wardrobe/chem_wardrobe machine_name = "ChemDrobe" @@ -453,7 +437,6 @@ /obj/item/storage/backpack/genetics = 2, /obj/item/storage/backpack/satchel/gen = 2) refill_canister = /obj/item/vending_refill/wardrobe/gene_wardrobe - payment_department = ACCOUNT_SCI /obj/item/vending_refill/wardrobe/gene_wardrobe machine_name = "GeneDrobe" @@ -476,7 +459,6 @@ /obj/item/clothing/head/plaguedoctorhat = 1, /obj/item/clothing/mask/gas/plaguedoctor = 1) refill_canister = /obj/item/vending_refill/wardrobe/viro_wardrobe - payment_department = ACCOUNT_MED /obj/item/vending_refill/wardrobe/viro_wardrobe machine_name = "ViroDrobe" @@ -506,7 +488,6 @@ premium = list(/obj/item/clothing/head/flatcap = 1) refill_canister = /obj/item/vending_refill/wardrobe/det_wardrobe extra_price = 350 - payment_department = ACCOUNT_SEC /obj/item/vending_refill/wardrobe/det_wardrobe machine_name = "DetDrobe" diff --git a/code/modules/vending/youtool.dm b/code/modules/vending/youtool.dm index aadb3c6a5b37..6e75c75c7eae 100644 --- a/code/modules/vending/youtool.dm +++ b/code/modules/vending/youtool.dm @@ -26,4 +26,3 @@ resistance_flags = FIRE_PROOF default_price = 125 extra_price = 350 - payment_department = ACCOUNT_ENG diff --git a/tgui/packages/tgui/interfaces/BankMachine.js b/tgui/packages/tgui/interfaces/BankMachine.js index 21087ed7c904..8c7732dea095 100644 --- a/tgui/packages/tgui/interfaces/BankMachine.js +++ b/tgui/packages/tgui/interfaces/BankMachine.js @@ -4,11 +4,11 @@ import { Window } from '../layouts'; export const BankMachine = (props, context) => { const { act, data } = useBackend(context); - const { current_balance, siphoning, station_name } = data; + const { current_balance, siphoning, ship_name } = data; return ( -
+
{ const MedicalKioskInstructions = (props, context) => { const { act, data } = useBackend(context); - const { kiosk_cost, patient_name } = data; + const { patient_name } = data; return (
Greetings Valued Employee! Please select a desired automatic health - check procedure. Diagnosis costs {kiosk_cost} credits. + check procedure. diff --git a/tgui/packages/tgui/interfaces/Secrets.js b/tgui/packages/tgui/interfaces/Secrets.js index b9a3da5dcbc9..51bb3bb39c09 100644 --- a/tgui/packages/tgui/interfaces/Secrets.js +++ b/tgui/packages/tgui/interfaces/Secrets.js @@ -375,33 +375,6 @@ const FunTab = (props, context) => { /> - - -