Skip to content

Commit

Permalink
Reduces automatic research chemical contents property string (#5738)
Browse files Browse the repository at this point in the history
# 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

<details>
<summary>Screenshots & Videos</summary>


![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)

</details>

# Changelog

:cl:
balance: health analyzer no longer shows large custom research chem
property text rows.
/:cl:

---------

Co-authored-by: Megaddd <>
Co-authored-by: BeagleGaming1 <[email protected]>
  • Loading branch information
Megaddd and BeagleGaming1 committed Feb 26, 2024
1 parent c85d4d7 commit 0a04c89
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions code/modules/reagents/chemistry_machinery/chem_simulator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 += "<center><img src = [asset.get_url_mappings()["wylogo.png"]]><HR><I><B>Official Company Document</B><BR>Simulated Synthesis Report</I><HR><H2>Result for [D.name]</H2></center>"
report.name = "Simulation result for [D.id]"
report.info += "<center><img src = [asset.get_url_mappings()["wylogo.png"]]><HR><I><B>Official Company Document</B><BR>Simulated Synthesis Report</I><HR><H2>Result for [D.id]</H2></center>"
report.generate(D)
report.info += "<BR><HR><font size = \"1\"><I>This report was automatically printed by the Synthesis Simulator.<BR>The [MAIN_SHIP_NAME], [time2text(world.timeofday, "MM/DD")]/[GLOB.game_year], [worldtime2text()]</I></font><BR>\n<span class=\"paper_field\"></span>"
playsound(loc, 'sound/machines/twobeep.ogg', 15, 1)
Expand All @@ -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()
Expand Down

0 comments on commit 0a04c89

Please sign in to comment.