The surgical kit can now contain the equipment it came with. It can also not contain more items of a given type than it was spawned with.
This means that even if the storage container otherwise has sufficient space it can, for example, still only ever contain 1 surgical saw.
Fixes#11298. Fixes#11297.
Credits go to /TG/, I just figured I'd do what the other codebases do and take it over for us as well.
Changes:
Optimises uniquelist()
also renames it from uniquelist() to uniqueList()
Test 1:
1,000,000 random numbers between 1 and 7 in a list.
Clean out duplicates with current uniquelist(), once:
self: 0.362
Clean out duplicates with my new uniqueList(), once:
self: 0.184
Test 2:
3,000,000 random numbers between 1 and 7 in a list.
Clean out duplicates with current uniquelist(), once:
self: 1.069
Clean out duplicates with my new uniqueList(), once:
self: 0.496
Adds ability to wear female underwear as male and vice versa.
Changes 'underwear'/'undershirt' vars to hold iconstate instead of esoteric dances with array indexes.
`maths.dm`:
Removed `var/const`s `E`, `Pi`, `Sqrt2`.
`setup.dm`:
Re-added `PI` here, and added `Sqrt2`, `E` as macros.
The reason for this is that macros have a performance improvement over `var/const`s.
`lists.dm`
Changed the formatting of the `BITTEST(...)` etc. macros so that they can be found by
searching for `#define BITTEST`
`rig.dm`:
Fixed unknown variable error resulting from the usage if `STOPSPRESSUREDMAGE`
which was renamed to `STOPPRESSUREDAMAGE` in one of my earlier commits.
Others:
Replaced constant variable `Pi` usage, with macro `PI`.
`maths.dm`:
Rewrite `Gcd(x)` to remove recursive behaviour.
Remove `RaiseToPower(x)` and its usage from `event_manager.dm`.
Rename `Lerp()` to `Interpolate()`.
Add `Square(x)`, which squares a number.
Rearrange most of the functions in the file. (trigonometric functions together, etc.)
`type2type.dm`:
Rewrite `num2hex()` and optimise `hex2num()` for superior clarity and a 100% speed improvement.
Correct indenting, spaces, make switches more concise.
`time.dm`:
Remove old, slanderous commented-out function `/proc/time_stamp()`
`lists.dm`:
Add the macros, `BITTEST(bitfield,index)`, `BITSET(...)`, `BITRESET(...)`
and `BITFLIP(...)` for bit-manipulation and use them where 20+ files
do it manually, for arguments of reader clarity and standardness.
-Added some extra virus protection to objects.
-This should all fix randomly being infected while wearing full virus protection gear.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5233 316c924e-a436-60f5-8080-3fe189b3f50e
-Added a new symptom. Voice Change will randomly change the voice of the affected mob. It isn't obtainable by Mutagen and I'll likely put it in the virus crate when I have more dangerous viruses.
-Added two new symptom procs. Start() will be called once and it'll be called when the advance disease processes. Allows you to setup stuff for your symptom. End() will be called before the disease is deleted.
-Diseases that spread by blood won't spread by contact anymore. You will need to directly inject someone to get them to catch the disease.
-Put a limit on shivering and fevers.
-Added a specialvoice variable. You can use SetSpecialVoice() to set a special voice that the player will say instead. To unset it, use UnsetSpecialVoice(). GetSpecialVoice() will return the player's special voice value.
-Added two DEFINEs for the limit which is how much a human can take before taking burn damage from heat or coldness.
-Some symptom value changes.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5136 316c924e-a436-60f5-8080-3fe189b3f50e
-Spaceacillin will now prevent the spread of diseases while it is a mob.
-Moved the "Create A Disease" code into a proc.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5101 316c924e-a436-60f5-8080-3fe189b3f50e
Fixed advance diseases using the same reference in mobs.
Fixed advance diseases referencing other advance diseases' symptoms, instead of just copying it.
I tested it more thoroughly this time and I can't find any issues but if you do please add them to the bug tracker and or contact me on #coderbus.
Added a new reaction which will remove symptoms from a disease. Needs blood and synaptizine.
Added a new symptom, shivering will make you cold.
Tweaked and balanced some symptoms.
Removed the "flex" emote that hulks will do randomly.
Reduced the change to speak for hulks and brain damaged mobs. ( 7% -> 3% chance)
Please let me know if anything is out of place or wrong.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5048 316c924e-a436-60f5-8080-3fe189b3f50e
-Added two new symptoms, fever and itching.
-Changed some stats on existing symptoms.
-Emotes sucks so I used visible_message if there was no preset emote.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5021 316c924e-a436-60f5-8080-3fe189b3f50e
>Replaced dd_text2list, dd_text2listcase, tg_text2listcase and tg_text2list with text2list and text2listEx. text2list will return a list of each and every character in the string if you set separator=""
>added return_file_text(filepath) which returns text from a file after doing some checks: does the file exist? is the file empty? It prints helpful error messages to the world.log if it runs into problems
>Replaced dd_file2list(filepath, seperator) with file2list(filepath, seperator). It just calls text2list(return_file_text(filepath), seperator). rather than copypasta
>Replaced time_stamp() so it's not as retarded
>Lots of the world setup stuff uses file2list now, rather than file2text -> sanity -> text2list
>Added error() warning() testing() procs. These print messages to world.log with a prefix. e.g. ## ERROR: msg.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4948 316c924e-a436-60f5-8080-3fe189b3f50e