From 0a04c899c8558f35f0441d1dbe5c7483815774b0 Mon Sep 17 00:00:00 2001 From: Megaddd Date: Mon, 26 Feb 2024 14:43:39 +0200 Subject: [PATCH] Reduces automatic research chemical contents property string (#5738) # About the pull request Obfuscates automatic research chem suffix on health analyzers, for example, `ACR1ATX1BNM5REG1BST10OMB5NGN1NTR1` to be just `7a`, or any other two random characters instead. Does not hide properties from showing on the research paper as they did before however. # Explain why it's good for the game Cleans research chemicals with many properties from excessive text bloat on health analyzers Non-corpsman grunts with a medical analyzer on the front should probably not be able to deduce all effects of a custom research chemical just based on its unique identifier. You can still ask your local corpsman or researcher. Or they may also simply label the containers appropriately. # Testing Photographs and Procedure
Screenshots & Videos ![image](https://github.com/cmss13-devs/cmss13/assets/8878624/c27b76a5-a9fb-4066-94bf-40e213be38fb) ![image](https://github.com/cmss13-devs/cmss13/assets/8878624/d903b30c-9739-4b69-a20e-47ae41982fd6) (Before this PR, this whole thing would show up in medical analyzer next to your chem name, ew)
# Changelog :cl: balance: health analyzer no longer shows large custom research chem property text rows. /:cl: --------- Co-authored-by: Megaddd <> Co-authored-by: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> --- .../reagents/chemistry_machinery/chem_simulator.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/reagents/chemistry_machinery/chem_simulator.dm b/code/modules/reagents/chemistry_machinery/chem_simulator.dm index 8a95e3f3b07e..dd7f008e47d2 100644 --- a/code/modules/reagents/chemistry_machinery/chem_simulator.dm +++ b/code/modules/reagents/chemistry_machinery/chem_simulator.dm @@ -380,8 +380,7 @@ relate(C) if(!C.original_id) C.original_id = target.data.id - C.id = encode_reagent(C) - C.name = C.id + encode_reagent(C) if(C.id in simulations) //We've already simulated this before, so we don't need to continue C = GLOB.chemical_reagents_list[C.id] @@ -577,8 +576,8 @@ var/obj/item/paper/research_report/report = new /obj/item/paper/research_report/(loc) var/datum/reagent/D = GLOB.chemical_reagents_list[id] var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper) - report.name = "Simulation result for [D.name]" - report.info += "

Official Company Document
Simulated Synthesis Report

Result for [D.name]

" + report.name = "Simulation result for [D.id]" + report.info += "

Official Company Document
Simulated Synthesis Report

Result for [D.id]

" report.generate(D) report.info += "

This report was automatically printed by the Synthesis Simulator.
The [MAIN_SHIP_NAME], [time2text(world.timeofday, "MM/DD")]/[GLOB.game_year], [worldtime2text()]

\n" playsound(loc, 'sound/machines/twobeep.ogg', 15, 1) @@ -590,7 +589,9 @@ var/suffix = " " for(var/datum/chem_property/P in C.properties) suffix += P.code+"[P.level]" - return O.name + suffix + C.id = O.name + " " + copytext(md5(suffix),1,3) + suffix //Show random suffix AND real properties on research paper + C.name = O.name + " " + copytext(md5(suffix),1,3) //Show ONLY random suffix on health analyzers + return /obj/structure/machinery/chem_simulator/proc/complexity_to_string_list() var/list/L = list()