mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 07:41:16 +01:00
Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts: # _maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm # _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # _maps/map_files/tramstation/tramstation.dmm # code/_onclick/hud/new_player.dm # code/datums/components/squashable.dm # code/datums/diseases/advance/symptoms/heal.dm # code/datums/diseases/chronic_illness.dm # code/datums/status_effects/buffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/stamcrit.dm # code/game/machinery/computer/crew.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/wall_mounted.dm # code/game/turfs/closed/indestructible.dm # code/modules/admin/view_variables/filterrific.dm # code/modules/antagonists/heretic/influences.dm # code/modules/cargo/orderconsole.dm # code/modules/client/preferences.dm # code/modules/events/space_vines/vine_mutations.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/carbon/human/death.dm # code/modules/mob/living/carbon/human/species_types/jellypeople.dm # code/modules/mob/living/damage_procs.dm # code/modules/mob/living/living.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mob_spawn/mob_spawn.dm # code/modules/projectiles/ammunition/energy/laser.dm # code/modules/projectiles/guns/ballistic/launchers.dm # code/modules/projectiles/guns/energy/laser.dm # code/modules/reagents/chemistry/machinery/chem_dispenser.dm # code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/medicine_reagents.dm # code/modules/surgery/healing.dm # code/modules/unit_tests/designs.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # tgui/packages/tgui/interfaces/ChemDispenser.tsx
This commit is contained in:
@@ -41,9 +41,9 @@
|
||||
if(stored_card.flush)
|
||||
restoring = FALSE
|
||||
return
|
||||
A.adjustOxyLoss(-5, FALSE)
|
||||
A.adjustFireLoss(-5, FALSE)
|
||||
A.adjustBruteLoss(-5, FALSE)
|
||||
A.adjust_oxy_loss(-5, FALSE)
|
||||
A.adjust_fire_loss(-5, FALSE)
|
||||
A.adjust_brute_loss(-5, FALSE)
|
||||
|
||||
// Please don't forget to update health, otherwise the below if statements will probably always fail.
|
||||
A.updatehealth()
|
||||
|
||||
@@ -127,11 +127,9 @@
|
||||
if(SSshuttle.supply_blocked)
|
||||
message = blockade_warning
|
||||
data["message"] = message
|
||||
var/list/amount_by_name = list()
|
||||
var/cart_list = list()
|
||||
for(var/datum/supply_order/order in SSshuttle.shopping_list)
|
||||
if(cart_list[order.pack.name])
|
||||
amount_by_name[order.pack.name] += 1
|
||||
cart_list[order.pack.name][1]["amount"]++
|
||||
cart_list[order.pack.name][1]["cost"] += order.get_final_cost()
|
||||
if(order.department_destination)
|
||||
@@ -147,27 +145,26 @@
|
||||
"id" = order.id,
|
||||
"amount" = 1,
|
||||
"orderer" = order.orderer,
|
||||
"paid" = !isnull(order.paying_account) ? 1 : 0, //number of orders purchased privatly
|
||||
"dep_order" = order.department_destination ? 1 : 0, //number of orders purchased by a department
|
||||
"paid" = !isnull(order.paying_account), //number of orders purchased privatly
|
||||
"dep_order" = !!order.department_destination, //number of orders purchased by a department
|
||||
"can_be_cancelled" = order.can_be_cancelled,
|
||||
))
|
||||
data["cart"] = list()
|
||||
for(var/item_id in cart_list)
|
||||
data["cart"] += cart_list[item_id]
|
||||
|
||||
|
||||
data["requests"] = list()
|
||||
for(var/datum/supply_order/order in SSshuttle.request_list)
|
||||
var/datum/supply_pack/pack = order.pack
|
||||
amount_by_name[pack.name] += 1
|
||||
data["requests"] += list(list(
|
||||
"object" = pack.name,
|
||||
"cost" = pack.get_cost(),
|
||||
"orderer" = order.orderer,
|
||||
"reason" = order.reason,
|
||||
"id" = order.id,
|
||||
"account" = order.paying_account?.account_holder || "Cargo Department"
|
||||
"account" = order.paying_account ? order.paying_account.account_holder : "Cargo Department"
|
||||
))
|
||||
data["amount_by_name"] = amount_by_name
|
||||
|
||||
return data
|
||||
|
||||
@@ -178,6 +175,7 @@
|
||||
|
||||
/datum/computer_file/program/budgetorders/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
var/mob/user = ui.user
|
||||
switch(action)
|
||||
if("send")
|
||||
if(!SSshuttle.supply.canMove())
|
||||
@@ -189,9 +187,9 @@
|
||||
if(SSshuttle.supply.getDockedId() == docking_home)
|
||||
SSshuttle.moveShuttle(cargo_shuttle, docking_away, TRUE)
|
||||
computer.say("The supply shuttle is departing.")
|
||||
usr.investigate_log("sent the supply shuttle away.", INVESTIGATE_CARGO)
|
||||
user.investigate_log("sent the supply shuttle away.", INVESTIGATE_CARGO)
|
||||
else
|
||||
usr.investigate_log("called the supply shuttle.", INVESTIGATE_CARGO)
|
||||
user.investigate_log("called the supply shuttle.", INVESTIGATE_CARGO)
|
||||
computer.say("The supply shuttle has been called and will arrive in [SSshuttle.supply.timeLeft(600)] minute\s.")
|
||||
SSshuttle.moveShuttle(cargo_shuttle, docking_home, TRUE)
|
||||
. = TRUE
|
||||
@@ -210,8 +208,8 @@
|
||||
else
|
||||
SSshuttle.shuttle_loan.loan_shuttle()
|
||||
computer.say("The supply shuttle has been loaned to CentCom.")
|
||||
usr.investigate_log("accepted a shuttle loan event.", INVESTIGATE_CARGO)
|
||||
usr.log_message("accepted a shuttle loan event.", LOG_GAME)
|
||||
user.investigate_log("accepted a shuttle loan event.", INVESTIGATE_CARGO)
|
||||
user.log_message("accepted a shuttle loan event.", LOG_GAME)
|
||||
. = TRUE
|
||||
if("add")
|
||||
var/id = text2path(params["id"])
|
||||
@@ -223,17 +221,17 @@
|
||||
|
||||
var/name = "*None Provided*"
|
||||
var/rank = "*None Provided*"
|
||||
var/ckey = usr.ckey
|
||||
var/ckey = user.ckey
|
||||
var/mob/living/carbon/human/hwoman
|
||||
if(ishuman(usr))
|
||||
hwoman = usr
|
||||
if(ishuman(user))
|
||||
hwoman = user
|
||||
rank = hwoman.get_assignment(hand_first = TRUE)
|
||||
else if(issilicon(usr))
|
||||
name = usr.real_name
|
||||
else if(issilicon(user))
|
||||
name = user.real_name
|
||||
rank = "Silicon"
|
||||
|
||||
// Our account that we want to end up paying with. Defaults to the cargo budget!
|
||||
var/datum/bank_account/account = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
// Our account that we want to end up paying with.
|
||||
var/datum/bank_account/account
|
||||
// Our ID card that we want to pull from for identification. Modifies either name, account, or neither depending on function.
|
||||
var/obj/item/card/id/id_card_customer = computer.stored_id?.GetID()
|
||||
if(!id_card_customer)
|
||||
@@ -254,20 +252,20 @@
|
||||
return
|
||||
|
||||
var/reason = ""
|
||||
var/datum/bank_account/personal_department
|
||||
if((requestonly && !self_paid) || !(computer.stored_id?.GetID()))
|
||||
reason = tgui_input_text(usr, "Reason", name, max_length = MAX_MESSAGE_LEN)
|
||||
reason = tgui_input_text(user, "Reason", name, max_length = MAX_MESSAGE_LEN)
|
||||
if(isnull(reason) || ..())
|
||||
return
|
||||
|
||||
if(id_card_customer?.registered_account?.account_job && !self_paid) //Find a budget to pull from
|
||||
var/datum/bank_account/personal_department = SSeconomy.get_dep_account(id_card_customer.registered_account.account_job.paycheck_department)
|
||||
personal_department = SSeconomy.get_dep_account(id_card_customer.registered_account.account_job.paycheck_department)
|
||||
if(!(personal_department.account_holder == "Cargo Budget"))
|
||||
var/choice = tgui_alert(usr, "Which department are you requesting this for?", "Choose request department", list("Cargo Budget", "[personal_department.account_holder]"))
|
||||
if(!choice)
|
||||
var/dept_choice = tgui_alert(user, "Which department are you requesting this for?", "Choose request department", list("Cargo Budget", "[personal_department.account_holder]"))
|
||||
if(!dept_choice)
|
||||
return
|
||||
if(choice != "Cargo Budget")
|
||||
account = personal_department
|
||||
name = id_card_customer.registered_account?.account_holder
|
||||
if(dept_choice == "Cargo Budget")
|
||||
personal_department = null
|
||||
|
||||
if(pack.goody && !self_paid)
|
||||
playsound(computer, 'sound/machines/buzz/buzz-sigh.ogg', 50, FALSE)
|
||||
@@ -279,9 +277,8 @@
|
||||
computer.say("ERROR: No more then [CARGO_MAX_ORDER] of any pack may be ordered at once")
|
||||
return
|
||||
|
||||
if(!requestonly && !self_paid && ishuman(usr) && !account)
|
||||
var/obj/item/card/id/id_card = computer.stored_id?.GetID()
|
||||
account = SSeconomy.get_dep_account(id_card?.registered_account?.account_job.paycheck_department)
|
||||
if(!self_paid)
|
||||
account = personal_department
|
||||
|
||||
var/turf/T = get_turf(computer)
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason, account)
|
||||
|
||||
@@ -155,7 +155,8 @@
|
||||
else
|
||||
data["relations"][partner.type] = "Undefined"
|
||||
data["purchaseableBoosts"][partner.type] = list()
|
||||
for(var/node_id in linked_techweb.get_available_nodes())
|
||||
var/displayable_nodes = linked_techweb.get_available_nodes() + linked_techweb.get_researched_nodes()
|
||||
for(var/node_id in displayable_nodes)
|
||||
// Not from our partner
|
||||
if(!(node_id in partner.boostable_nodes))
|
||||
continue
|
||||
@@ -218,8 +219,9 @@
|
||||
var/datum/scientific_partner/partner = locate(text2path(params["boost_seller"])) in SSresearch.scientific_partners
|
||||
var/datum/techweb_node/node = SSresearch.techweb_node_by_id(params["purchased_boost"])
|
||||
if(partner && node)
|
||||
if(partner.purchase_boost(linked_techweb, node))
|
||||
computer.say("Purchase successful.")
|
||||
var/possible_boost = partner.purchase_boost(linked_techweb, node)
|
||||
if(possible_boost)
|
||||
computer.say("Purchase successful[possible_boost == SCIPAPER_ALREADY_BOUGHT ? ", refunding [partner.boostable_nodes[params["purchased_boost"]]] points" : ""].")
|
||||
playsound(computer, 'sound/machines/ping.ogg', 25)
|
||||
return TRUE
|
||||
playsound(computer, 'sound/machines/terminal/terminal_error.ogg', 25)
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
SEND_SIGNAL(computer, COMSIG_MODULAR_COMPUTER_NT_PAY_RESULT, payment_result)
|
||||
|
||||
/datum/computer_file/program/nt_pay/proc/_pay(token, money_to_send, mob/user)
|
||||
var/area/user_area = get_area(user)
|
||||
if(user_area && is_area_virtual(user_area))
|
||||
to_chat(user, span_notice("You cannot send virtual money to real accounts."))
|
||||
return NT_PAY_STATUS_NO_ACCOUNT
|
||||
|
||||
money_to_send = round(money_to_send)
|
||||
|
||||
if(IS_DEPARTMENTAL_ACCOUNT(current_user))
|
||||
|
||||
Reference in New Issue
Block a user