We won't regenerate the list for Manifests every tick while viewing the manifest, instead we have a global variable for it PDA_Manifest that we Cut() if there is a change to the manifest then when the next player goes to view the manifest on their PDA it will recreate the list that one time.
Some sections of the PDA will no longer auto-refresh every tick because...well that's dumb.
Modes that will no longer autoupdate at all: Viewing medical/sec records, viewing notes (will update when you change them of course), and the station alert menu.
Modes that will only autoupdate every 5 ticks: APC list (Because it's a huge fuck off list), the manifest, mulebots and secbots screens, supply requests/orders, and janitor supply locator)
Some other things that I just can't remember right now.
- Renamed the variable for the smoke density mechanic to density. Also clamped it to a minimum of 1 so it cant multiply reagents.
- Added some checks so the chemsmoke effect doesn't run if it's in nullspace.
- Removed an unnecessary distance calculation.
- Added a null turf check to prevent runtimes if a really big smoke grenade goes off at the edge of the map.
- Added a check so the reagent copy code doesn't run if there's no reagents to run it on.
- Complete rewrite of the chemsmoke spawning code (everything that happens after the reaction to create the smoke).
- Moved it into it's own file since it's a little longer than the old one code-wise.
- Tweaked the smoke sprites; gave chemsmoke directions for more randomization, and tweaked the timing of their animations so they are smooth now.
Most of the code is documented, so you should be able to follow what's going on just reading through it. In short though:
- Chemsmoke now affects a circular area with a variable range depending on the total amount of chemsmoke created (no more 1-of-each-ingredient smoke grenades - sorry).
- The carried reagent volume in the cloud balances itself according to how big the affected area is (larger area, less carried reagent per turf).
- The carried reagent has more volume the closer you are to the centre of the cloud.
- The visual smoke effect scales with how big the affected area is.
Fixes#4447
- Added a parent call to each wardrobe subtypes New() proc.
Wardrobes weren't calling obj/structure/closet/New(), so weren't adding items in the same location to their contents when first created.
- Removed wardrobe/New() proc.
So all subtypes don't inherit an extra set of blue uniforms and brown shoes. Only one wardrobe on the map is of this type, and it's on the derelict, so didn't think it was worth making a map change.
- Restored "steam" code to chem grenades to handle grenades that don't have any reagents in them that react i.e. water grenades. (I removed it thinking it was only in there for handling foam reagents, but it seems it has more uses.)
This splashes the surrounding area in whatever reagents were leftover in the grenade after all reactions have occurred.
Fixes#3986
- Foam reagent inheritance fixed:
The trans_to() proc in Chemistry-Holder.dm was calling handle_reactions() every time it would add and remove reagents with add_reagent() and remove_reagent(). I've added a safety flag to both of these procs (and copy_to()) so that trans_to will not call handle_reactions() until it has added all the reagents to the target container. This allows foam to reliably take on the properties of other leftover reagents.
- Fixed a bug in effect_system.dm that wasn't applying reagents from foam to the environment.
- Tweaked smoke to apply reagent effects after it has stopped moving
This was causing huge reagent spam at the center of the smoke cloud as it was spawning, since they were being applied every time the cloud of smoke moved. Also changed it to apply the effects 2-3 times at longer intervals (2 seconds).
- Smoke also only effects tiles in a 3x3 grid now, rather than 5x5.
- Summary:
Chem smoke does slightly less damage (if it contains damaging reagents)
Chem smoke proc calls reduced by 60-70% (significant lag reduction)
Foam works properly again
Foam proc calls reduced by 70-80%