mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Cleanup helper files maths.dm, time.dm, type2type.dm, add macros for bit-manipulation
`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.
This commit is contained in:
@@ -543,7 +543,7 @@ What a mess.*/
|
||||
if ("Change Criminal Status")
|
||||
if (active2)
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
H.hud_updateflag |= 1 << WANTED_HUD
|
||||
BITSET(H.hud_updateflag, WANTED_HUD)
|
||||
switch(href_list["criminal2"])
|
||||
if("none")
|
||||
active2.fields["criminal"] = "None"
|
||||
@@ -608,4 +608,4 @@ What a mess.*/
|
||||
|
||||
/obj/machinery/computer3/secure_data/detective_computer
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "messyfiles"
|
||||
icon_state = "messyfiles"
|
||||
|
||||
Reference in New Issue
Block a user