Removed client check from mob so that if a pAI is being held by a SSD client it can still hear.
Removed 3rd deep .loc check 2 is plenty, and was making the proc rather expensive
(if you shove a pAI in a bag and toss the bag into a locker, the pAI will be deaf, you jerk).
- Tweaked the pressure delta check to "> 0.5", so pumps will stop transferring minor volumes of air every tick (because a delta of 3.05176e-005 is still greater than 0). This also reduces the calls to gas_mixture/merge() and gas_mixture/remove() significantly once the air in the environment has equalized.
The results after running the game for 10 minutes:
```
Proc Name Self CPU Total CPU Real Time Calls
/obj/machinery/atmospherics/unary/vent_pump/process 0.035 0.141 0.141 3808 <- before
/obj/machinery/atmospherics/unary/vent_pump/process 0.014 0.042 0.043 3808 <- after
```
My VERY FIRST PR, I used it to make ghost chat be bold, instead of using viewers() to figure out
what ghosts could see the mob, I used get_mob_in_view() which sounded pretty descriptive.
Unfortunately for me it was one of the most CPU intensive ways of determining who could view the speaker for this.
So yeah, removing the second get_mobs_in_view and replacing it with viewers()
Yes this code has been in since Oct/Nov time frame :(
Before: Everytime you say something. This proc is ran. Along with it, recurses through EVERY /obj/ & /mob/ in view's contents, and EVERY /obj/ & /mob/ in that contents...and once again.
After: Fuck recursion, we're going to loop through clients and see if they are within any obj's or mobs within one iteration. MUCH cheaper, and probably less buggy.
If someone can't hear everyone and they are within an object and it's not catching? add it to the list commented for it of type checks.
Before: If a canister is hooked up to a connector port it's icons were being deleted and recreated every tick.
After: We store an update_flag that is a bitfield of the current icon and overlay states, and created a proc to check if it should change. If not, we don't mess with icons. Real simple.
Conflicts:
code/game/machinery/atmoalter/canister.dm
Before: It updated the icons quite a bit at the start of the game.
After: It updates more often and quicker, but now it isn't as expensive
Conflicts:
code/modules/power/apc.dm
Before: EVERYTIME someone moved their character this proc would be called and loop through every organ looking for implanted items to see if it needs to apply damage.
After: We create a flag that is set when an item embeddes, only when that flag is set do we do that loop through organs upon movement. Also every 10 ticks while that flag
is set we will check to see if we need to unset it.
Conflicts:
code/modules/mob/living/carbon/human/human_damage.dm
Adds animate statues to the Staff of Change pool of mobs
Adds specific synergy between flesh to stone and the staff of animation where if you animate your statue'd people they'll turn to animated statues controlled by the victim who are instructed not to dunk the wizard.
Splits the "animal" sub pool in the Staff of Change into "Beast" and "Helpless Animals" to help raise the odds of the former against the latter. Changed odds will be reported in a comment to follow.
Statue mobs can't change their direction while seen.
Lowered the range for flickering lights.
Lowered the cooldown for blinding people, added user feedback when the spell is used.
The blindness spell will affect people within objects.
Crush a can for Jay Owen.
He has leukemia, please crush a can for Jay Owen.
His only wish is to see a can crushed live in our game.
Sprites by Nienhaus
Conflicts:
code/game/objects/items/trash.dm
code/modules/reagents/reagent_containers/food/drinks.dm
icons/obj/janitor.dmi
Now only humans that are logged in, alive, and not already a revolutionary (no special_role) show up in the list.
Instead of EVERY mob type (simple_animals, borgs, etc.)
Fixes#4324
Resisting out of handcuffs was leaving the handcuffs layer set to 20 (over top of the UI).
Changed it to use the drop_from_inventory() proc so it handles the drop event correctly.
Similar to the handcuff resisting layer bug.
When removing an item from your inventory that has associated inventory slots, items that were dropped from the extra inventory slots would be dropped with incorrect layer variables (set to 20 so they were rendered over the UI).
Now when the extra items are dropped, it calls the drop_from_inventory() proc, which correctly changes their layer back.