mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-20 15:12:57 +00:00
How is this an improvement? Before we looped through every possible reaction to see if a reaction would occure with our list of reagents. Now we already make a list of reagents which can have a reactions, cutting down on searching every single time. This will decrease the loop expensive iterations from 100s to only a handful. How does it work? We format our chemical_reactions_list like this: chemical_reactions_list[reagent_id] = list() And then we fill that list of possible reactions. Thanks to Exadv1, to cut down on redundancy we only need to have a reaction in a single list at a single time, because our handle_reaction() loop will handle that. Here is a paste of the structure of the list on runtime. http://privatepaste.com/327bb61628 (has: = an entry in the list that it is nested in) - Fixed mecha weapons shooting over people lying down. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5569 316c924e-a436-60f5-8080-3fe189b3f50e