mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 04:48:18 +01:00
Bugfixes: Fax machines (again), crew record formatting, RnD machines and wallets (#1987)
Trying to work off some of the older bugs on the issues list: Fix faxmachine getting stuck on "0 seconds remaining". There may be a process scheduler issue which causes a long polling interval for the faxmachine's process()-method. Replace newline in crew record notes with <BR> when generating the records in the filing cabinets. Surround crew record notes with "preformatted text" HTML tags on PDA / pAI screens. When constructing protolathes or circuit imprinters, transfer the reagents contained in the beakers to internal reagent container upon completion. Fix suspension field generator not clearing the qdel'd suspension_field reference. This fixes being unable to unwrench the generator, too. Fix wallet sprite still showing an empty wallet when inserting a guest pass.
This commit is contained in:
@@ -42,6 +42,7 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
var/remaining_cooldown = get_remaining_cooldown()
|
||||
var/dat = "Fax Machine<BR>"
|
||||
|
||||
var/scan_name
|
||||
@@ -65,8 +66,8 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
if(copyitem)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Item</a><br><br>"
|
||||
|
||||
if(sendcooldown)
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by. [round(get_remaining_cooldown() / 10)] seconds remaining.</b><br>"
|
||||
if(remaining_cooldown > 0)
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by. [round(remaining_cooldown / 10)] seconds remaining.</b><br>"
|
||||
|
||||
else
|
||||
|
||||
@@ -75,9 +76,9 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
dat += "<b>Sending to:</b> <a href='byond://?src=\ref[src];dept=1'>[destination]</a><br>"
|
||||
|
||||
else
|
||||
if(sendcooldown)
|
||||
if(remaining_cooldown > 0)
|
||||
dat += "Please insert paper to send via secure connection.<br><br>"
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by. [round(get_remaining_cooldown() / 10)] seconds remaining.</b><br>"
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by. [round(remaining_cooldown / 10)] seconds remaining.</b><br>"
|
||||
else
|
||||
dat += "Please insert paper to send via secure connection.<br><br>"
|
||||
|
||||
@@ -98,7 +99,7 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
|
||||
if (sendcooldown != 0)
|
||||
if (remaining_cooldown > 0)
|
||||
spawn(50)
|
||||
// Auto-refresh every 5 seconds, if cooldown is active
|
||||
updateUsrDialog()
|
||||
@@ -107,7 +108,7 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/Topic(href, href_list)
|
||||
if(href_list["send"])
|
||||
if (sendcooldown > 0)
|
||||
if (get_remaining_cooldown() > 0)
|
||||
// Rate-limit sending faxes
|
||||
usr << "<span class='warning'>The fax machine isn't ready, yet!</span>"
|
||||
updateUsrDialog()
|
||||
@@ -189,8 +190,7 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
.=..()
|
||||
var/static/ui_update_delay = 0
|
||||
|
||||
var/current_time = world.time
|
||||
if (current_time > sendtime + sendcooldown)
|
||||
if ((sendtime + sendcooldown) < world.time)
|
||||
sendcooldown = 0
|
||||
|
||||
/*
|
||||
@@ -231,11 +231,13 @@ var/list/admin_departments = list("[boss_name]", "Tau Ceti Government", "Supply"
|
||||
if( F.department == destination )
|
||||
success = F.recievefax(copyitem)
|
||||
|
||||
if (success)
|
||||
set_cooldown(normalfax_cooldown)
|
||||
|
||||
if (display_message)
|
||||
// Normal fax
|
||||
if (success)
|
||||
visible_message("[src] beeps, \"Message transmitted successfully.\"")
|
||||
sendcooldown = normalfax_cooldown
|
||||
else
|
||||
visible_message("[src] beeps, \"Error transmitting message.\"")
|
||||
return success
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
|
||||
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
|
||||
P.info += "<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: [S.fields["criminal"]]<BR>\n<BR>\nMinor Crimes: [S.fields["mi_crim"]]<BR>\nDetails: [S.fields["mi_crim_d"]]<BR>\n<BR>\nMajor Crimes: [S.fields["ma_crim"]]<BR>\nDetails: [S.fields["ma_crim_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[S.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
P.info += "<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: [S.fields["criminal"]]<BR>\n<BR>\nMinor Crimes: [S.fields["mi_crim"]]<BR>\nDetails: [S.fields["mi_crim_d"]]<BR>\n<BR>\nMajor Crimes: [S.fields["ma_crim"]]<BR>\nDetails: [S.fields["ma_crim_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[replacetext(S.fields["notes"], "\n", "<BR>")]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
var/counter = 1
|
||||
while(S.fields["com_[counter]"])
|
||||
P.info += "[S.fields["com_[counter]"]]<BR>"
|
||||
@@ -151,8 +151,8 @@
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
var/info = "<CENTER><B>Medical Record</B></CENTER><BR>"
|
||||
info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
|
||||
|
||||
info += "<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["b_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[M.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
|
||||
info += "<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["b_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[replacetext(M.fields["notes"], "\n", "<BR>")]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
var/counter = 1
|
||||
while(M.fields["com_[counter]"])
|
||||
info += "[M.fields["com_[counter]"]]<BR>"
|
||||
|
||||
@@ -58,13 +58,21 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/RefreshParts()
|
||||
// Adjust reagent container volume to match combined volume of the inserted beakers
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
T += G.reagents.maximum_volume
|
||||
create_reagents(T)
|
||||
// Transfer all reagents from the beakers to internal reagent container
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
|
||||
// Adjust material storage capacity to scale with matter bin rating
|
||||
max_material_storage = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
max_material_storage += M.rating * 75000
|
||||
|
||||
// Adjust production speed to increase with manipulator rating
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
@@ -87,6 +95,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/dismantle()
|
||||
for(var/obj/I in component_parts)
|
||||
// This will distribute all reagents amongst the contained beakers
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to_obj(I, reagents.total_volume)
|
||||
for(var/f in materials)
|
||||
|
||||
@@ -61,13 +61,21 @@
|
||||
return t
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/RefreshParts()
|
||||
// Adjust reagent container volume to match combined volume of the inserted beakers
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
T += G.reagents.maximum_volume
|
||||
create_reagents(T)
|
||||
// Transfer all reagents from the beakers to internal reagent container
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
|
||||
// Adjust material storage capacity to scale with matter bin rating
|
||||
max_material_storage = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
max_material_storage += M.rating * 75000
|
||||
|
||||
// Adjust production speed to increase with manipulator rating
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
|
||||
src.visible_message("\blue \icon[src] [src] deactivates with a gentle shudder.")
|
||||
qdel(suspension_field)
|
||||
suspension_field = null
|
||||
icon_state = "suspension2"
|
||||
|
||||
/obj/machinery/suspension_gen/Destroy()
|
||||
|
||||
Reference in New Issue
Block a user