Skip to content

Instantly share code, notes, and snippets.

@Cheatoid
Last active September 27, 2021 12:18
Show Gist options
  • Save Cheatoid/35ad6a03a76ec3231cfa33a5b7e3a868 to your computer and use it in GitHub Desktop.
Save Cheatoid/35ad6a03a76ec3231cfa33a5b7e3a868 to your computer and use it in GitHub Desktop.
[E2] Autogenerated convenient push/insert/unshift functions for `array` and `table` types. (Since E2 doesn't have generics, yet.)
function angle array:insert(Index, Value:angle) { return This:insertAngle(Index, Value) }
#ifdef array:insertAttachment(number, attachment)
function attachment array:insert(Index, Value:attachment) { return This:insertAttachment(Index, Value) }
#endif
function bone array:insert(Index, Value:bone) { return This:insertBone(Index, Value) }
#ifdef array:insertCollision(number, collision)
function collision array:insert(Index, Value:collision) { return This:insertCollision(Index, Value) }
#endif
function complex array:insert(Index, Value:complex) { return This:insertComplex(Index, Value) }
#ifdef array:insertCoroutine(number, coroutine)
function coroutine array:insert(Index, Value:coroutine) { return This:insertCoroutine(Index, Value) }
#endif
#ifdef array:insertCurve(number, curve)
function curve array:insert(Index, Value:curve) { return This:insertCurve(Index, Value) }
#endif
#ifdef array:insertDamage(number, damage)
function damage array:insert(Index, Value:damage) { return This:insertDamage(Index, Value) }
#endif
#ifdef array:insertEffect(number, effect)
function effect array:insert(Index, Value:effect) { return This:insertEffect(Index, Value) }
#endif
function entity array:insert(Index, Value:entity) { return This:insertEntity(Index, Value) }
#ifdef array:insertFtrace(number, ftrace)
function ftrace array:insert(Index, Value:ftrace) { return This:insertFtrace(Index, Value) }
#endif
function matrix array:insert(Index, Value:matrix) { return This:insertMatrix(Index, Value) }
function matrix2 array:insert(Index, Value:matrix2) { return This:insertMatrix2(Index, Value) }
function matrix4 array:insert(Index, Value:matrix4) { return This:insertMatrix4(Index, Value) }
function number array:insert(Index, Value) { return This:insertNumber(Index, Value) }
function quaternion array:insert(Index, Value:quaternion) { return This:insertQuaternion(Index, Value) }
function ranger array:insert(Index, Value:ranger) { return This:insertRanger(Index, Value) }
#ifdef array:insertStcontrol(number, stcontrol)
function stcontrol array:insert(Index, Value:stcontrol) { return This:insertStcontrol(Index, Value) }
#endif
function string array:insert(Index, Value:string) { return This:insertString(Index, Value) }
#ifdef array:insertTracedata(number, tracedata)
function tracedata array:insert(Index, Value:tracedata) { return This:insertTracedata(Index, Value) }
#endif
function vector array:insert(Index, Value:vector) { return This:insertVector(Index, Value) }
function vector2 array:insert(Index, Value:vector2) { return This:insertVector2(Index, Value) }
function vector4 array:insert(Index, Value:vector4) { return This:insertVector4(Index, Value) }
#ifdef array:insertWebaudio(number, webaudio)
function webaudio array:insert(Index, Value:webaudio) { return This:insertWebaudio(Index, Value) }
#endif
#ifdef array:insertWebmaterial(number, webmaterial)
function webmaterial array:insert(Index, Value:webmaterial) { return This:insertWebmaterial(Index, Value) }
#endif
function wirelink array:insert(Index, Value:wirelink) { return This:insertWirelink(Index, Value) }
function angle array:push(Value:angle) { return This:pushAngle(Value) }
#ifdef array:pushAttachment(attachment)
function attachment array:push(Value:attachment) { return This:pushAttachment(Value) }
#endif
function bone array:push(Value:bone) { return This:pushBone(Value) }
#ifdef array:pushCollision(collision)
function collision array:push(Value:collision) { return This:pushCollision(Value) }
#endif
function complex array:push(Value:complex) { return This:pushComplex(Value) }
#ifdef array:pushCoroutine(coroutine)
function coroutine array:push(Value:coroutine) { return This:pushCoroutine(Value) }
#endif
#ifdef array:pushCurve(curve)
function curve array:push(Value:curve) { return This:pushCurve(Value) }
#endif
#ifdef array:pushDamage(damage)
function damage array:push(Value:damage) { return This:pushDamage(Value) }
#endif
#ifdef array:pushEffect(effect)
function effect array:push(Value:effect) { return This:pushEffect(Value) }
#endif
function entity array:push(Value:entity) { return This:pushEntity(Value) }
#ifdef array:pushFtrace(ftrace)
function ftrace array:push(Value:ftrace) { return This:pushFtrace(Value) }
#endif
function matrix array:push(Value:matrix) { return This:pushMatrix(Value) }
function matrix2 array:push(Value:matrix2) { return This:pushMatrix2(Value) }
function matrix4 array:push(Value:matrix4) { return This:pushMatrix4(Value) }
function number array:push(Value) { return This:pushNumber(Value) }
function quaternion array:push(Value:quaternion) { return This:pushQuaternion(Value) }
function ranger array:push(Value:ranger) { return This:pushRanger(Value) }
#ifdef array:pushStcontrol(stcontrol)
function stcontrol array:push(Value:stcontrol) { return This:pushStcontrol(Value) }
#endif
function string array:push(Value:string) { return This:pushString(Value) }
#ifdef array:pushTracedata(tracedata)
function tracedata array:push(Value:tracedata) { return This:pushTracedata(Value) }
#endif
function vector array:push(Value:vector) { return This:pushVector(Value) }
function vector2 array:push(Value:vector2) { return This:pushVector2(Value) }
function vector4 array:push(Value:vector4) { return This:pushVector4(Value) }
#ifdef array:pushWebaudio(webaudio)
function webaudio array:push(Value:webaudio) { return This:pushWebaudio(Value) }
#endif
#ifdef array:pushWebmaterial(webmaterial)
function webmaterial array:push(Value:webmaterial) { return This:pushWebmaterial(Value) }
#endif
function wirelink array:push(Value:wirelink) { return This:pushWirelink(Value) }
function angle array:unshift(Value:angle) { return This:unshiftAngle(Value) }
#ifdef array:unshiftAttachment(attachment)
function attachment array:unshift(Value:attachment) { return This:unshiftAttachment(Value) }
#endif
function bone array:unshift(Value:bone) { return This:unshiftBone(Value) }
#ifdef array:unshiftCollision(collision)
function collision array:unshift(Value:collision) { return This:unshiftCollision(Value) }
#endif
function complex array:unshift(Value:complex) { return This:unshiftComplex(Value) }
#ifdef array:unshiftCoroutine(coroutine)
function coroutine array:unshift(Value:coroutine) { return This:unshiftCoroutine(Value) }
#endif
#ifdef array:unshiftCurve(curve)
function curve array:unshift(Value:curve) { return This:unshiftCurve(Value) }
#endif
#ifdef array:unshiftDamage(damage)
function damage array:unshift(Value:damage) { return This:unshiftDamage(Value) }
#endif
#ifdef array:unshiftEffect(effect)
function effect array:unshift(Value:effect) { return This:unshiftEffect(Value) }
#endif
function entity array:unshift(Value:entity) { return This:unshiftEntity(Value) }
#ifdef array:unshiftFtrace(ftrace)
function ftrace array:unshift(Value:ftrace) { return This:unshiftFtrace(Value) }
#endif
function matrix array:unshift(Value:matrix) { return This:unshiftMatrix(Value) }
function matrix2 array:unshift(Value:matrix2) { return This:unshiftMatrix2(Value) }
function matrix4 array:unshift(Value:matrix4) { return This:unshiftMatrix4(Value) }
function number array:unshift(Value) { return This:unshiftNumber(Value) }
function quaternion array:unshift(Value:quaternion) { return This:unshiftQuaternion(Value) }
function ranger array:unshift(Value:ranger) { return This:unshiftRanger(Value) }
#ifdef array:unshiftStcontrol(stcontrol)
function stcontrol array:unshift(Value:stcontrol) { return This:unshiftStcontrol(Value) }
#endif
function string array:unshift(Value:string) { return This:unshiftString(Value) }
#ifdef array:unshiftTracedata(tracedata)
function tracedata array:unshift(Value:tracedata) { return This:unshiftTracedata(Value) }
#endif
function vector array:unshift(Value:vector) { return This:unshiftVector(Value) }
function vector2 array:unshift(Value:vector2) { return This:unshiftVector2(Value) }
function vector4 array:unshift(Value:vector4) { return This:unshiftVector4(Value) }
#ifdef array:unshiftWebaudio(webaudio)
function webaudio array:unshift(Value:webaudio) { return This:unshiftWebaudio(Value) }
#endif
#ifdef array:unshiftWebmaterial(webmaterial)
function webmaterial array:unshift(Value:webmaterial) { return This:unshiftWebmaterial(Value) }
#endif
function wirelink array:unshift(Value:wirelink) { return This:unshiftWirelink(Value) }
function table:insert(Index, Value:angle) { This:insertAngle(Index, Value) }
function table:insert(Index, Value:array) { This:insertArray(Index, Value) }
#ifdef table:insertAttachment(number, attachment)
function table:insert(Index, Value:attachment) { This:insertAttachment(Index, Value) }
#endif
function table:insert(Index, Value:bone) { This:insertBone(Index, Value) }
#ifdef table:insertCollision(number, collision)
function table:insert(Index, Value:collision) { This:insertCollision(Index, Value) }
#endif
function table:insert(Index, Value:complex) { This:insertComplex(Index, Value) }
#ifdef table:insertCoroutine(number, coroutine)
function table:insert(Index, Value:coroutine) { This:insertCoroutine(Index, Value) }
#endif
#ifdef table:insertCurve(number, curve)
function table:insert(Index, Value:curve) { This:insertCurve(Index, Value) }
#endif
#ifdef table:insertDamage(number, damage)
function table:insert(Index, Value:damage) { This:insertDamage(Index, Value) }
#endif
#ifdef table:insertEffect(number, effect)
function table:insert(Index, Value:effect) { This:insertEffect(Index, Value) }
#endif
function table:insert(Index, Value:entity) { This:insertEntity(Index, Value) }
#ifdef table:insertFtrace(number, ftrace)
function table:insert(Index, Value:ftrace) { This:insertFtrace(Index, Value) }
#endif
function table:insert(Index, Value:matrix) { This:insertMatrix(Index, Value) }
function table:insert(Index, Value:matrix2) { This:insertMatrix2(Index, Value) }
function table:insert(Index, Value:matrix4) { This:insertMatrix4(Index, Value) }
function table:insert(Index, Value) { This:insertNumber(Index, Value) }
function table:insert(Index, Value:quaternion) { This:insertQuaternion(Index, Value) }
function table:insert(Index, Value:ranger) { This:insertRanger(Index, Value) }
#ifdef table:insertStcontrol(number, stcontrol)
function table:insert(Index, Value:stcontrol) { This:insertStcontrol(Index, Value) }
#endif
function table:insert(Index, Value:string) { This:insertString(Index, Value) }
function table:insert(Index, Value:table) { This:insertTable(Index, Value) }
#ifdef table:insertTracedata(number, tracedata)
function table:insert(Index, Value:tracedata) { This:insertTracedata(Index, Value) }
#endif
function table:insert(Index, Value:vector) { This:insertVector(Index, Value) }
function table:insert(Index, Value:vector2) { This:insertVector2(Index, Value) }
function table:insert(Index, Value:vector4) { This:insertVector4(Index, Value) }
#ifdef table:insertWebaudio(number, webaudio)
function table:insert(Index, Value:webaudio) { This:insertWebaudio(Index, Value) }
#endif
#ifdef table:insertWebmaterial(number, webmaterial)
function table:insert(Index, Value:webmaterial) { This:insertWebmaterial(Index, Value) }
#endif
function table:insert(Index, Value:wirelink) { This:insertWirelink(Index, Value) }
function table:push(Value:angle) { This:pushAngle(Value) }
function table:push(Value:array) { This:pushArray(Value) }
#ifdef table:pushAttachment(attachment)
function table:push(Value:attachment) { This:pushAttachment(Value) }
#endif
function table:push(Value:bone) { This:pushBone(Value) }
#ifdef table:pushCollision(collision)
function table:push(Value:collision) { This:pushCollision(Value) }
#endif
function table:push(Value:complex) { This:pushComplex(Value) }
#ifdef table:pushCoroutine(coroutine)
function table:push(Value:coroutine) { This:pushCoroutine(Value) }
#endif
#ifdef table:pushCurve(curve)
function table:push(Value:curve) { This:pushCurve(Value) }
#endif
#ifdef table:pushDamage(damage)
function table:push(Value:damage) { This:pushDamage(Value) }
#endif
#ifdef table:pushEffect(effect)
function table:push(Value:effect) { This:pushEffect(Value) }
#endif
function table:push(Value:entity) { This:pushEntity(Value) }
#ifdef table:pushFtrace(ftrace)
function table:push(Value:ftrace) { This:pushFtrace(Value) }
#endif
function table:push(Value:matrix) { This:pushMatrix(Value) }
function table:push(Value:matrix2) { This:pushMatrix2(Value) }
function table:push(Value:matrix4) { This:pushMatrix4(Value) }
function table:push(Value) { This:pushNumber(Value) }
function table:push(Value:quaternion) { This:pushQuaternion(Value) }
function table:push(Value:ranger) { This:pushRanger(Value) }
#ifdef table:pushStcontrol(stcontrol)
function table:push(Value:stcontrol) { This:pushStcontrol(Value) }
#endif
function table:push(Value:string) { This:pushString(Value) }
function table:push(Value:table) { This:pushTable(Value) }
#ifdef table:pushTracedata(tracedata)
function table:push(Value:tracedata) { This:pushTracedata(Value) }
#endif
function table:push(Value:vector) { This:pushVector(Value) }
function table:push(Value:vector2) { This:pushVector2(Value) }
function table:push(Value:vector4) { This:pushVector4(Value) }
#ifdef table:pushWebaudio(webaudio)
function table:push(Value:webaudio) { This:pushWebaudio(Value) }
#endif
#ifdef table:pushWebmaterial(webmaterial)
function table:push(Value:webmaterial) { This:pushWebmaterial(Value) }
#endif
function table:push(Value:wirelink) { This:pushWirelink(Value) }
function table:unshift(Value:angle) { This:unshiftAngle(Value) }
function table:unshift(Value:array) { This:unshiftArray(Value) }
#ifdef table:unshiftAttachment(attachment)
function table:unshift(Value:attachment) { This:unshiftAttachment(Value) }
#endif
function table:unshift(Value:bone) { This:unshiftBone(Value) }
#ifdef table:unshiftCollision(collision)
function table:unshift(Value:collision) { This:unshiftCollision(Value) }
#endif
function table:unshift(Value:complex) { This:unshiftComplex(Value) }
#ifdef table:unshiftCoroutine(coroutine)
function table:unshift(Value:coroutine) { This:unshiftCoroutine(Value) }
#endif
#ifdef table:unshiftCurve(curve)
function table:unshift(Value:curve) { This:unshiftCurve(Value) }
#endif
#ifdef table:unshiftDamage(damage)
function table:unshift(Value:damage) { This:unshiftDamage(Value) }
#endif
#ifdef table:unshiftEffect(effect)
function table:unshift(Value:effect) { This:unshiftEffect(Value) }
#endif
function table:unshift(Value:entity) { This:unshiftEntity(Value) }
#ifdef table:unshiftFtrace(ftrace)
function table:unshift(Value:ftrace) { This:unshiftFtrace(Value) }
#endif
function table:unshift(Value:matrix) { This:unshiftMatrix(Value) }
function table:unshift(Value:matrix2) { This:unshiftMatrix2(Value) }
function table:unshift(Value:matrix4) { This:unshiftMatrix4(Value) }
function table:unshift(Value) { This:unshiftNumber(Value) }
function table:unshift(Value:quaternion) { This:unshiftQuaternion(Value) }
function table:unshift(Value:ranger) { This:unshiftRanger(Value) }
#ifdef table:unshiftStcontrol(stcontrol)
function table:unshift(Value:stcontrol) { This:unshiftStcontrol(Value) }
#endif
function table:unshift(Value:string) { This:unshiftString(Value) }
function table:unshift(Value:table) { This:unshiftTable(Value) }
#ifdef table:unshiftTracedata(tracedata)
function table:unshift(Value:tracedata) { This:unshiftTracedata(Value) }
#endif
function table:unshift(Value:vector) { This:unshiftVector(Value) }
function table:unshift(Value:vector2) { This:unshiftVector2(Value) }
function table:unshift(Value:vector4) { This:unshiftVector4(Value) }
#ifdef table:unshiftWebaudio(webaudio)
function table:unshift(Value:webaudio) { This:unshiftWebaudio(Value) }
#endif
#ifdef table:unshiftWebmaterial(webmaterial)
function table:unshift(Value:webmaterial) { This:unshiftWebmaterial(Value) }
#endif
function table:unshift(Value:wirelink) { This:unshiftWirelink(Value) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment