Fixes runtime when a borg is reset.
Fixes issue where /proc/select_active_ai_with_fewest_borgs() would not always return the intended AI.
Fixes issues with new borgs spamming the master AI with creation messages under some circumstances.
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.
Announcements are no longer parsed twice, avoiding messages such as "T's nice".
Fixes the strip_html_properly proc, to avoid out of memory runtimes.
`type2type.dm`
Remove no-op `else return`s at the end of a switch and function.
`setup.dm`:
Remove outdated comment "Must be between 0 and 1.", as noted by mwerezak.
Fix typo in comment "FOOR_RIGHT" to "FOOT_RIGHT"
You can now dry plants using a special machine, and you can now stuff
those plants into pipes to smoke then. It slowly transfers the reagents
from the plant into the smoker.
HE pipes will now change colour as they heat up, the procs for
calculating this are in type2type.dm.
Mobs buckled to HE pipes will be forced to lie down and will share
heat with and get burned by the pipe network.
Signed-off-by: Mloc-Argent <colmohici@gmail.com>
Long story short, the json encoding doesn't know how to handle "
Adding a check specifically for it breaks other stuff, after banging my head against it for an hour
this is the best means of fixing the problem without breaking and fixing a lot of other things.
`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.
stack/use() now only deletes an empty stack after the current context
yields, removing the need for some awkward patterns when dealing with
stacks. Also adds procs for transferring and splitting stacks.