-Almost every instance of 'for(mob in world)' has been killed. Because GODDAMN was it being run a bunch. Instead, a series of global lists have been made, and they are all handled auto-magically through New()'s, Del()'s, Login()'s, death()'s, etc...
Lists are as follows:
-mob_list : Contains all atom/mobs by ref
-player_list : Like mob_list, but only contains mobs with clients attached
-admin_list : Like player_list, but holds all mobs with clients attached and admin status
-living_mob_list : Contains all mobs that ARE alive, regardless of client status
-dead_mob_list : Contains all mobs that are dead, which comes down to corpses and ghosts
-cable_list : A list containing every obj/structure/cable in existence
Note: There is an object (/obj/item/debuglist) that you can use to check the contents of each of the lists except for cables (Since getting a message saying "a cable," x9001 isn't very helpful)
These lists have been tested as much as I could on my own, and have been mostly implemented. There are still places where they could be used, but for now it's important that the core is working. If this all checks out I would really like to implement it into the MC as well, simply so it doesn't check call Life() on every mob by checking for all the ones in world every damn tick.
Just testing locally I was able to notice improvements with certain aspects, like admin verbs being MUCH more responsive (They checked for every mob in the world every time they were clicked), many sources of needless lag were cut out (Like Adminwho and Who checking every single mob when clicked), and due to the cable_list powernet rebuilding is MUCH more efficient, because instead of checking for every cable in the world every time a powernet was broken (read: A cable was deleted), it runs though the pre-made list, and even with a singulo tearing all the way across the station, the powernet load was VERY small compared to pretty much everything else.
If you want to know how any of this works, check global_lists.dm, there I have it rigorously commented, and it should provide an understanding of what's going on.
Mob related in worlds before this commit: 1262
After: 4
I'm helping
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4179 316c924e-a436-60f5-8080-3fe189b3f50e
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.
r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds
[VGTG]
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
Added some WIP master controller alternatives. Located in code/WorkInProgress/carn They should stop the MC doubling up and smooth the lagspikes over a little bit (depending on how they are set up). They need a bit of work still, but are functional. Just untick code/game/master_controller.dm and tick the version you want to try out.
Committing Giacom's pai remote-signaller code.
Minor map fix for Travis (extra grille NE corner of atmos)
Added a debug tool that prints powernets into a text-based map.
Fixed a runtime that occurred everytime somebody cut a laid cable. It was updating the power networks twice each time >_>
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3920 316c924e-a436-60f5-8080-3fe189b3f50e
* Dragging someone while injured (brute) will have a small chance of injuring them further that increases depending on how damaged they are. This coincides with the blood spatters that are already generated.
* Blood is now actually lost from the person being dragged.
* Added splints that can be applied to broken arms and legs, and will reduce effects of broken limbs. These can be removed the same way as handcuffs. They show up on the mob and on examine.
* Added an autoinjector that can only hold five units, but acts like a hypospray.
* Added an advanced medical kit that Medical Doctors spawn with that has Advanced Trauma Kits, Advanced Burn Kits, autoinjectors, and splints.
* Health Scanners now show unsplinted fractures ONLY in arms or legs.
* People in critical (less than -50 health) from external trauma (100+ damage from brute and/or burn) bleeding, and with unsplinted limbs, will send a message to anyone trying to drag them, to warn them it would be a bad idea trying to move them. They will suffer a lot more damage if dragged while lying down.
* The correct procedure is therefore, A) Bring a roller bed, or B) Splint all limbs, stop all bleeding with gauze, and then drag them.
* Fixed CPR being performed at weird health levels.
created every single time 'say :X' is used
- You can no longer whisper when stung by a changeling or had another thing make
your 'silent' var get set.
- Added a single empty toolbelt to robotics, added a wrench and screwdriver to
toxins.
- Power cells now always spawn full. The double use of the 'charge' variable was
not good, as when creating the map it had a value of 0 - 100 to represent the
percentage of the cell's power, while it was used as a numeric representation of
the amper-hours that were still left in the cell. The problem this caused was
that cells created mid-round (cells which spawned in closets or were spawned by
admins) always started empty. They all start fully charged now. Additional
obj/item/weapon/cell/X/empty types were added if we want empty cells.
Revision: r3763
Author: baloh.matevz
- Item declarations have no place in mob code. MMI and pAI code being the exception.
Removed a cyborg upgrade that made them immune to flashes
- An item that removes one of the very few weaknesses a borg has? No thanks.
Removed mob\living\silicon\robot\robot_defense.dm
- It was an empty file.
Removed uplink.dm and uplink_kits.dm from WorkInProgress
- Duplicate files: they're already in the main chunk of the code.
- They are no longer a work in progress.
Here's hoping I dont break anything with this commit...
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3890 316c924e-a436-60f5-8080-3fe189b3f50e
To use, spawn a /obj/effect/admin_log_trap on whatever tile you want to have a message, then whenever anyone steps on that tile a message will sent to all admins, like explosions.
Feel free to move it out of my WIP folder if you want.
* Adds Skrell, they have their own language which is used by typing :k
* Adds soghun language that can be used by typing :o
* Skintone of all species can now be changed.
* Eye colour of all species, except Skrell, can now be changed.
* The preview picture in setup should now be fully accurate for non-human species (excluding Tajaran ears)
* Various fixes for talking, such as talking as your real name while unknown.
* Fixes pAI's universal translator not being universal.
* Added admin update mob sprite command, which should solve any buggy transformations.
* Fixes and slightly nerfs claw attacks.
* Cosmetic fixes for alien species