I hereby claim:
- I am mctwist on github.
- I am mctwist (https://keybase.io/mctwist) on keybase.
- I have a public key ASC5PRJewudjFa2Z5InRBTqnsBW5l0ueJlqTTvOfcI6Z2wo
To claim this, I am signing this object:
// ================ | |
// Unsigned Integer safe arithemtic operators | |
// ================ | |
// Author: McTwist | |
// Description: Safely operates unsigned integer numbers together | |
// License: Free to use | |
// ================ | |
// Safely add two values together like they are unsigned | |
// Algorithm: https://forum.blockland.us/index.php?topic=248922.msg7177640#msg7177640 |
// ================ | |
// ISAAC fast cryptographic random number generator | |
// ================ | |
// Author: McTwist | |
// Description: Generates cryptographic safe random numbers | |
// License: Free to use | |
// Source: http://www.burtleburtle.net/bob/rand/isaacafa.html | |
// ================ | |
// Init vars |
// Echo a huge string in a safe way | |
// Note: It will try to make the output consistent, but too long chunks with | |
// no newline will break the consistency | |
function echos(%str) | |
{ | |
// Maximum amount of characters that can be output with normal echo | |
%max = 4095; | |
%len = strlen(%str); | |
for (%i = 0; %i < %len; %i += getMin(%size + 1, %max)) | |
{ |
I hereby claim:
To claim this, I am signing this object:
// Converts a number to a string correctly | |
function num2str(%num) | |
{ | |
if (mAbs(%num) < 1000000) | |
return "" @ %num; | |
if (%num < 0) | |
{ | |
%neg = true; | |
%num = -%num; | |
} |
// -------------------------- | |
// Name: Saver | |
// Description: Database System | |
// Version: 1.5a | |
// Author: McTwist | |
// Copyright: Free for all | |
// License: Do not change anything | |
// -------------------------- | |
// Notes | |
// No saving system is the same, but all saving systems is the other one alike. |
// Clone current object | |
function SimObject::clone(%this, %name) | |
{ | |
%this = %this.getID(); | |
%oldName = %this.getName(); | |
%name = %name !$= "" ? %name : %oldName; | |
%this.setName(__CLONE_OBJECT__); | |
%obj = new (%this.getClassName())(%name : __CLONE_OBJECT__); | |
%this.setName(%oldName); | |
return %obj; |
// Create a possible bind to a function. This will place it in respective division. | |
// If division and name is the same, it will replace the function. | |
function CreateBind(%division, %name, %cmd) | |
{ | |
if (%name $= "" || %cmd $= "") | |
return; | |
%remapid = $remapCount; | |
%new = true; | |
// ================ | |
// INI Parser | |
// ================ | |
// Author: McTwist | |
// Version: 1.0 | |
// Description: Parses ini code in an easy way | |
// License: Free to use | |
// ================ | |
// INI reading |
// ====================== // | |
// McTwist's Math library // | |
// ====================== // | |
// Version: 0.5 (prototype) | |
// Integer allowed only(Unless function tells otherwise) | |
// Note: Library is for demonstration only. Be aware that it might not be | |
// correct and performance may be horrible on some methods. | |
function Math::onAdd(%this) | |
{ |