Commit Graph

12 Commits

Author SHA1 Message Date
sieve32@gmail.com
7bf6788082 -OPTIMIZATION TIME
-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
2012-07-26 03:04:05 +00:00
elly1989@rocketmail.com
04f0a79866 Rewrote blackholes (gravitational anomalies) and wormholes to try and optimise them a little. If you have any concerns about how I've done so just give me a shout and I'll either rework them or revert my changes back. Wormholes especially seem a bit faster on my laptop. Smoke has temporarily been removed from the blackhole event until I get time to investigate why the hell effect_systems are using so much memory ( spark effects were using 40% of my processor a second ago D: ). To compensate this I made them a new sprite.
Commented out the authentication system. It was the remnants of the old goon authentication stuff (or maybe even older) and wasn't actually used in our code at all (at least not in any useful way, it was merely called and short-circuited to 1, so all those if(authenticated) were totally pointless. This has removed 3 unused variables from every client, a bunch of unused variables from the config and two empty text files!

Committed (as a config option) a feature requested by Apoc station. It causes a 'reply to' window to popup when an admin PMs a non-admin player. It's meant to grab their attention so they can't say "I didn't see your PM". It defaults to off. To turn it on just uncomment the #POPUP_ADMIN_PM line in config/config.txt

Fixed a derp in isday where it was fetching the month instead of the day.

Removed medal references from Gib()

Removed the medal_hub global variables because they aren't used in any way shape or form.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3444 316c924e-a436-60f5-8080-3fe189b3f50e
2012-04-12 21:54:51 +00:00
kortgstation@gmail.com
c801c50cea Removed Karma. It was a shitty system used to punish security for doing their jobs even when it worked, and now it just spits runtimes.
Better defined the viewers in range of the vent crawl to hopefully stop the runtimes that was causing.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3196 316c924e-a436-60f5-8080-3fe189b3f50e
2012-02-26 03:52:40 +00:00
petethegoat@gmail.com
062bb8c6cb Added a fix for the karma runtimes.
The problem was that the SQL sanitization returned a string, when it was trying to add a number.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3156 316c924e-a436-60f5-8080-3fe189b3f50e
2012-02-19 15:19:14 +00:00
only.lurking@gmail.com
fd268e7b18 More SQL injection patches. Added a standardized method of SQL sanitization [sanitizeSQL()].
Corrected a href list vulnerability that let players spawn Arcane Tomes from non-e-magged library computers.
Tweaked and disabled forum_activation.dm. Way too many SQL vulnerabilities to justify keeping it around.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3012 316c924e-a436-60f5-8080-3fe189b3f50e
2012-01-29 20:56:05 +00:00
rockdtben
84888d5ec3 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2536 316c924e-a436-60f5-8080-3fe189b3f50e 2011-11-20 15:53:23 +00:00
rockdtben
faee0422ae implemented getOxyLoss()
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2520 316c924e-a436-60f5-8080-3fe189b3f50e
2011-11-14 14:44:52 +00:00
rockdtben
ff84314ce6 Added a getBruteLoss() proc to mob.dm and then replaced all calls of bruteloss with it. Except for the ones commented out.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2505 316c924e-a436-60f5-8080-3fe189b3f50e
2011-11-10 14:45:25 +00:00
baloh.matevz
e6aa3fc0b1 My very own feedback gathering system! The blackbox can now gather feedback via the feedback_set(var_name,amt), feedback_inc(var_name,amt) and feedback_dec(var_name,amt) procs.
The way feedback is gathered is that the three procs are placed in code where feedback is wanted, these in turn set variables in the blackbox (Yes, I could have done it in an out-of-world datum or object, but I just prefer having an actual physical object gather this stuff.) At the end of the round, all acquired data is saved to a database. I still need to get ahold of TLE to make the required tables and bugtest some things.

The saving proc exsists, but is not yet called due to the lack for a table to save to. The rest of it should work fine tho, so you can place the feedbac_set, _inc and _dec procs around code and see what they provide via view variables, it just won't save it to the database yet.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2092 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-03 01:00:01 +00:00
rastaf.zero@gmail.com
9b2e9c3420 Fixed bugs:
Players now cannot rejoin the game if their mobs were gibbed/burned while they were disconnected.
Cremating/gibbing for meat now counts as death with triggering log records, gamemode checks, sql reports, etc.
Fixed some bugs with enabling verb ghostize().
Fixed bug with DNA Machine popping out from the protolathe.
Fixed bug with tuning RSD.
Added juicer:
	berry -> berry juice
	banana -> banana juice
	tomato -> tomato juice
	carrot -> carrot juice
Bug your botanists for getting better potence for more juice.
Juicer can be pulled, chef can give it to barmen or botanists.
Blender changed a bit:
	tomato -> ketchup
	corn -> corn oil
	soy beans -> soy milk
	any food -> nutriments and contained reagents.
Sound for the juicer found at http://www.freesound.org/samplesViewSingle.php?id=98053, edited by Nikie.
You can eject ingredients from the microwave. However, you cannot get back your reagents, they will be lost and can make microwave dirty.
Essence of Banana was renamed to Banana Juice.
Added Carrot Juice. Heals eyes much slower than imidazoline.
Carrots now contain imidazoline (however, carrot cake contains more imidazoline).
Potency for peppers, tomatoes, carrots and druggy mushrooms should work now.
New cocktail "Bahama mama": 2 rum,  2 orangejuice, limejuice, ice.
Changed recipe for soy sauce: 4 soy milk + 1 acid.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1477 316c924e-a436-60f5-8080-3fe189b3f50e
2011-04-20 14:44:13 +00:00
only.lurking@gmail.com
6041ec5c69 Centralized SQL configuration data into dbconfig.txt. Server hosts should never have to edit their source to get their MySQL servers talking to SS13, now.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@57 316c924e-a436-60f5-8080-3fe189b3f50e
2010-09-05 04:29:17 +00:00
only.lurking
662c08272a git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2 316c924e-a436-60f5-8080-3fe189b3f50e 2010-08-23 14:29:20 +00:00