-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
-Made a 'default' save slot (D), and whenever you connect it automatically selects the default slot to load from, but manually selecting a different slot will allow you to play on that one before it returns to default.
-Added the ability to name your save slots with the '*'. Names can be up to 16 characters and contain letters, numbers, and basic symbols
-The preview icon on the preference screen now takes into account any job you have set on high, and dresses up the icon accordingly. If assistant is set to 'yes', or AI/Cyborg are on high it will put the icon in a grey suit (So you can still customize).
Solves Issue 667 as well
I tested a good bit with other people's saves, so I'm pretty confident it won't bork savefiles. And before anyone asks, the icon blending didn't make any noticeable lag, since icon procs are client-side.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4159 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
-Changed the class type of donuts. donut/normal is now the regular donut. All other donuts have been made this way. (I.E: donut/chaos)
-Hopefully the merged records proc will now not spit out runtimes.
-You cannot enter a name without any character now. This way you can also click on the link.
-Added some coloured caps to their respected coloured wardrobes.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4123 316c924e-a436-60f5-8080-3fe189b3f50e
-Improved the Message Monitor UI to make it easier to use.
-Added a Message Monitor in Tech Storage, hopefully so it will be used more. You will still need the key to use it.
-You need the key to turn servers on/off remotely via the Message Monitor.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4099 316c924e-a436-60f5-8080-3fe189b3f50e
Added the ability to shoot yourself in the head. See changelog.
Added a isnull check on sortRecord proc.
Changed the align to left.
Added Two Russian Revolvers onto the map, on the Derelict Z-Level. Added a single .357 ammo box in a secure crate on the Derelict.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4063 316c924e-a436-60f5-8080-3fe189b3f50e
Rather than calling a function on every single radio object which expensively collects hearers(in closets etc.), the proc will now instead build a list of radios. This list is then passed to another proc, which iterates through all clients in the world, and checks if the client's mob can hear the message.
Note that I did shallow testing, but deeper issues may still be present with stuff like pAIs which I wasn't able to test on my single player server. If any other problems are found, please notify me.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4019 316c924e-a436-60f5-8080-3fe189b3f50e
Breaking bottles over people's heads!
- The bottle will be destroyed and a broken bottle will replace the old bottle
- There is a chance for a glass shard to be created
- The regents of the bottle get splashed onto the mob who got hit
- This affects alcoholic bottles, not to be confused with pill bottles or chemistry bottles.
- - Technically milk cartons and lime juice cartons, so they break as if they're glass.
Names in the PDA list are now ordered alphabetically.
Changelog updated
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3998 316c924e-a436-60f5-8080-3fe189b3f50e
In short:
AI messaging
Time of death for health scanners
Most lists are sorted alphabetically
See http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=9220 for detailed information.
I wasn't able to test this as thoroughly as I'd like, but what I could test seems fine.
I don't forsee any issues popping up with this stuff.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3993 316c924e-a436-60f5-8080-3fe189b3f50e
replaced canweaken and canstun variables with status_flags bitfield. Current flags are CANWEAKEN CANSTUN CANPARALYSE. Although you could add stuff like CANDAMAGE, CANBLIND, CANDEAFEN etc. to add additional flexibility to mob code and reduce on duplication.
Added humans_need_surnames as a config option. If when spawning a human has only one name it will give them a random surname. I'd recommend leaving it on so that people can't name themselves "floor" "Unknown" etc.
totally removed autolowercasing of names (except for first letter) due to people pestering me. inb4 everyone starts CRUISECONTROLLING.
allowed a few characters like @ # etc for when the flag allow_numbers is set. So AIs can use those symbols (numbers and symbols cannot be used as the first character because of syntax.
Added alium nests. They're basically beds that only aliums can use. They are made of sticky resin which aliums secure their prey too for sexytimes.
Weed nodes are no longer dense.
Tidied up some alium verbs so that they are more structured. This will allow me to add Alt-Click neurotoxin shooting for queens and sentinels
Queens can secrete resin now to build nests/walls/membranes (doors to come!)
Drones that evolve into queens when there is already a live Queen will become princesses instead so the hive can tell them how stupid they are for splitting from the will of the hive. It also gives them a number so they can be differentiated between.
Credits to 39kk9t for fixing larva/death.dm, hissing which I forgot to do and some of the alium verbs. You're awesome <3
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3983 316c924e-a436-60f5-8080-3fe189b3f50e
If you feel the restrictions are to strict please let me know here or on the feedback forums.
Generally only A-Z, a-z, space, . - ' are allowed.
Names should be 2 words at least.
Names with too many space, . - ' are rejected.
Names are auto-capitalised.
Names with not enough regular alpha-numeric characters are rejected.
Names with bad characters such as \ etc are rejected.
Raised the minimum character age at the request of a few people. It's now the minimum age for enlisting in the army for most countries (17)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3956 316c924e-a436-60f5-8080-3fe189b3f50e
Replaced every l_hand = and r_hand = and all that if(hand) crap to use standardised procs. This means we can use procs like Dropped() reliably as they will always be called when things are dropped.
Thorough documentation to come. But generally, if you want a mob's icons to update after deleting something in the inventory...use drop_from_inventory(the_thing_you_wanna_drop) just before deleting it. If you wanna put something in a mob's hands use put_in_hands() (or one of the variants). It'll try putting it in active hand first, then inactive, then the floor. They handle layers, overlays, screenlocs calling various procs such as dropped() etc for you. Easy
mob.equipped() is now mob.get_active_hand() because there was another totally unrelated proc named equipped() and stuff was confusing.
Weakening was made instantaneous.
Minor optimisations for human/handle_regular_status_updates(). I'll port these changes over to the other mobs next. Basically it should stop it constantly incrementing every status effect even after death.
umm... bunch of overlays related fixes... I think that's everything. :/
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3900 316c924e-a436-60f5-8080-3fe189b3f50e
Changed RoundExplosions to a temporary define named USE_CIRCULAR_EXPLOSIONS which is a lot more intuitive and less confusing. Removing this define will compile square explosions code instead of circular ones. (So the cost of having a choice between circular/square is seen at compile-time not at run-time)
Fixed aliums being able to pick up storage objects such as bags/boxes/pillboxes and such.
Fixed unbuckling yourself from beds (via clicking the bed). You can also unbuckle yourself via resisting because beds are hard to click on when you're lying on them and they're covered in a sheet.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3854 316c924e-a436-60f5-8080-3fe189b3f50e
Moved an unchecked file into unused, please put any unchecked files out of WIP or FEA into unused that way if you see an unchecked file you know it should be checked. DM loves to uncheck files when you are messing around with folders in the editor.
Moved the old TEG defines into the proper files.
Commented out some old nonfunctioning FEA debug code.
Removed some commented out codechunks from FEA and attempted to clean up a few of the files a bit.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3852 316c924e-a436-60f5-8080-3fe189b3f50e
- This is more of a fix for the current method of explosions, not a fix to make explosions more efficient as a whole.
- Explosions used circlerange() which had improperly named vars. At a glance, it looked like it was just returning turfs in range, but in reality it was returning all atoms in range.
- Explosions now use circlerangeturfs() which only returns turfs
circlerange()
- Changed the variable names to reflect what they actually use to prevent this kind of confusion again.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3832 316c924e-a436-60f5-8080-3fe189b3f50e
Added resources.dm where FILE_DIR can be defined manually. It should speed clean-compiles up by reducing the number of places the compiler searches for resource-files to put in the resource-cache (stuff in ' ' quotes. e.g. icon='human.dmi').
To use manual FILE_DIR defines go to:
Build > Preferences for tgstation
in dreammaker. Then un-tick "Automatically set FILE_DIR for sub-directories"
It also means you have less crap to clean up in the .dme before every commit C:
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3820 316c924e-a436-60f5-8080-3fe189b3f50e
The shower path has changed!
From /obj/structure/shower to /obj/machinery/shower
Made bookcases appear empty if they have no books, and fill up as more books are placed in them.
Updated do_after() to have an extra var that determines if the user is required to keep the item in the active hand. This is only used in swirlies at the moment.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3684 316c924e-a436-60f5-8080-3fe189b3f50e
- Hopefully this will cut down on the server spamming/crashing escapades happening on other servers. (This wont stop that from happening, this just makes it less severe)
- Some of the sanitizes were probably unnecessary, but better safe then sorry.
Added MAX_NAME_LEN constant which is initialized to 26.
- Please use MAX_NAME_LEN instead of typing in 26 when cutting inputs short. 26's are annoying when they have to be changed and you have to hunt through over a hundred files and tens of thousands of lines of code to find them all.
Moved uplink_kits.dm to code/game/objects/storage
Moved uplinks.dm to code/game/objects
- The stuff inside uplinks.dm could really be chopped up and split into separate dm files but this will do for now.
*********************************************************
**********************Important**************************
*********************************************************
When you create code that asks the user for an input consider whether or not it gets shown to the user through html or the like.
If it does please sanatize() or strip_html() it. Also use copytext() to cutoff spam by using MAX_NAME_LEN and MAX_MESSAGE_LEN as the cutoff var.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3652 316c924e-a436-60f5-8080-3fe189b3f50e
Reverted dismemberment
- This is the majority of the files
Reverted the gun change
- You wont shoot yourself putting your gun away
- You don't have to fire off all of your shots before hitting someone with your gun
Reverted Tarajans
- As requested
Hotfix for the Holodeck.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3574 316c924e-a436-60f5-8080-3fe189b3f50e
There's like 1001 things to fix so some of this is somewhat crude for now.
new helper proc located in procs/helpers.dm
reject_bad_text(var/text)
just feed any text in and it will either return the original text or null (if it contains odd characters such as \ / < > or characters reserved by BYOND. It also rejects if there are no non-whitespace characters)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3571 316c924e-a436-60f5-8080-3fe189b3f50e
Adds greater changeling code, but doesn't change the genome count yet on it.
Renames registered to registered_name on IDs because bs12 had it and it seemed like a good idea to do last night. For some reason.
Adds an afterattack to mobs that can be used. (In fairness, lots of shit in attack_hand should be in there instead, like stungloves and stuff, to minimize duplicated code)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3537 316c924e-a436-60f5-8080-3fe189b3f50e
- Made some changes to admin verbs:
- Rejuvenate verb removed from mobs, is now in the options panel above (heal).
- Drop everything verb moved into view variables, added a confirmation message.
- Mute verb removed from mobs, use the options panel.
- Warn verb removed from mobs, use the options panel.
- Grant full access moved to debug verbs.
- Rejuvanate as a verb also still exists in debug verbs.
These changes were made to make right clicking a mob not show a million unneeded verbs. They were moved based on the statistics gathered via feedback logging:
http://www.kamletos.si/tgdb/latest_stats.html#adminverbs
Please post any additional feedback on the admin forum.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3532 316c924e-a436-60f5-8080-3fe189b3f50e
I've added no content just the foundations. All it does is give the station a holiday themed name and say "Happy [Holiday] Everybody!" at the round-start.
Added a .Set Holiday verb for GM and GA Admins. I'd rather people didn't use it for now (there's not much point as there's no content yet anyway). It's mainly for bugtesting.
Foundations are there to create holiday random events and round-start stuff so we can keep everything together. Check out code/game/gamemodes/events/holidays !
NOTE: This is intended for easter eggs! Little trinkets and such to make these days special. It IS NOT for spawning grief items and game-changing stuff. If you REALLY want to add stuff like that, please speak to the project heads. If it's used for spawning bullshit like poop or grief items I'll just remove my code. Thanks.
Happy Friday 13th :)
Other Fixes:
Oxygen tanks no longer spam BEEPBEEPBEEPBEEP at everybody nearby. That only happens for the person holding them.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3450 316c924e-a436-60f5-8080-3fe189b3f50e
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
Modifies do_after to something that fires a lot less, and is hopefully more robust against infinite loops. It is now theoretically possible to run around and then come back to the same place and have it complete, but that's only really valid for extremely long times (like handcuff removal) and if you get lucky and dodge one of the timed checks.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3421 316c924e-a436-60f5-8080-3fe189b3f50e
Moved delete to trial admins because they can already mass delete and that's not particularly as helpful as regular delete (but a lot more destructive)
Trialmins can now toggle adminhelp sounds without observing
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3397 316c924e-a436-60f5-8080-3fe189b3f50e
Shuttle call/recall announcements are now more noticeable. Removed a few ways they could be spammed.
Cats and Dogs can see in the dark.
Recommitted some of the poop stuff by Doohl because, hell it's only one day and I don't hate fun.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3382 316c924e-a436-60f5-8080-3fe189b3f50e
- Vaccine bottles from the panD.E.M.I.C. now auto-name. There was a bug where you could very quickly create a ton of bottles which could cause clients to crash. Fixes issue 326.
- Changed various ASSERT()'s to sanity ifs. ASSERT should really only be used during debugging, not in release. Runtime prevention.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3368 316c924e-a436-60f5-8080-3fe189b3f50e
Adds a holodeck to fitness!
Tensioner now respects antagonist preferences (Mmph. More antagonist for me.)
More flailing attempts to fix the tensioner assigning braindead people. (How?)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3341 316c924e-a436-60f5-8080-3fe189b3f50e
Different fix to make AIs able to hear when being carried. Shouldn't be that much of a cpu burden, although if anyone has better ideas on how to do it
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3318 316c924e-a436-60f5-8080-3fe189b3f50e
Changed the energy gun sprites to a better-looking version, made by Khodoque!
More work on NTSL. Including the ability to create comments by using // and /* insert comment here */.
Removed the traffic control machine from telecomms, as requested by Urist. NTSL is still a work in progress, and needs to be completely fool-proof before players can get anywhere near it.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3252 316c924e-a436-60f5-8080-3fe189b3f50e