It's about time somebody did this. It still has the really really annoying/bad brute damage, but it doesn't just knock you on your ass in one hit anymore.
Will fix#4600 and the problem with drinks not knowing when they are open/closed.
Hopefully I didn't miss a string of code again,I don't think so,though.
modes that update every 5 ticks won't require clicking the pda 5 times to get a UI window open.
We now check to see if a UI already exists if not we don't check
Before: The stacker and processor used del(item) to get rid of the items causing /obj/movable/del() to spike up and cause fun amounts of lag. Also we have seperate variables for if a certain ore type is selected in the processing machine and the cooking portion of process() uses a huge string of if()'s which check 8 or so variables and is terrible and probably a pain in the ass should someone decide to later add ore types and recipes.
After: We just set item.loc = null when it goes in the stacker of processor and garbage collection takes care of it within a tick. Those different variables for ore selection are now just one variable which is a bitfield, much easier to read, much easier to expand upon.
Before: Every tick each HUD item would recalculate and redo images for every mob in view. For items like the secHUD where we're transversing implants and the various records this gets very expensive.
After: Mobs use their hud_list variable to store varius huditem images, when conditions change for those specific huditem images it updates the specific ones on demand. As a backup every 30 ticks or so the mob will update all of their hud_list.
Also: moved proc/RoundHealth() from 2 seperate locations into __HELPERS/mobs.dm
Conflicts:
code/modules/mob/living/living.dm
Airlock sensors will now store the previous cycles pressure value, then compare it with the current pressure next time it runs.
If the pressure hasn't changed it will skip sending a status update.
The things you can attach to suits should already be determined by the
allowed list, no need to restrict it based off of size if it's in the
allowed items.
Adds an "Expensive Mobs" list that shows what mobs took more then 1 decisecond to process.
This way if mob controller is going nuts we can debug master controller and see why, or atleast see which mob it is.
Fixes#4538
also found when you tried to weld it it would break the sprite also
made the toggle verb just call the attack_hand proc to remove some items from the locker.
Had to do a hacky fix. there was no real way around it.
Also, a couple balances with IPCs
And a totally silly death animation (Which has been commented out for now)
Before: If you turned off the breaker and fiddled with on/off states and turned on the breaker it wouldn't update the overlay because the check_updates wasn't doing an if(operating) check and would think it didn't need to update the overlays once you turned on the breaker.
After: Check_update() is doing a check for the breaker being on or off and taking that into account with the update_overlay flags and will update the overlays properly.
Thanks Razharas from /tg/ #coderbus for bringing this to my attention.