|
int | ade_get_operator (char *tablename) |
|
int | ade_set_object_with_breed (lua_State *L, int obj_idx) |
|
| if (!numargs||s[1]!= '\0') return ade_set_error(L |
|
| if (s[0]=='p') idx = -2 |
|
else | if (atoi(s)) idx |
|
| if (idx< -3||idx==0||idx > 9) return ade_set_error(L |
|
| if (idx< 0) |
|
| if (ADE_SETTING_VAR &&*val!=newval) |
|
return | ade_set_args (L,"f",*val) |
|
| ADE_FUNC (__mul, l_Matrix,"orientation","Multiplies two matrix objects)","orientation","matrix, or empty matrix if unsuccessful") |
|
| ADE_FUNC (__tostring, l_Matrix, NULL,"Converts a matrix to a string with format \"[r1c1 r2c1 r3c1 | r1c2 r2c2 r3c2| r1c3 r2c3 r3c3]\"","string","Formatted string or \"<NULL\"") |
|
| if (!ade_get_args(L,"oof", l_Matrix.GetPtr(&oriA), l_Matrix.GetPtr(&oriB),&factor)) return ade_set_error(L |
|
l_Matrix | Set (matrix_h())) |
|
| for (int i=0;i< 9;i++) |
|
return | ade_set_args (L,"o", l_Matrix.Set(matrix_h(&final))) |
|
| ADE_FUNC (getTranspose, l_Matrix, NULL,"Returns a transpose version of the specified orientation","orientation","Transpose matrix, or null orientation on failure") |
|
| ADE_FUNC (rotateVector, l_Matrix,"vector Input","Returns rotated version of given vector","vector","Rotated vector, or empty vector on error") |
|
| ADE_FUNC (unrotateVector, l_Matrix,"vector Input","Returns unrotated version of given vector","vector","Unrotated vector, or empty vector on error") |
|
| if (!ade_get_args(L,"o", l_Matrix.GetPtr(&mh))) return ade_set_error(L |
|
l_Vector | Set (vmd_zero_vector)) |
|
return | ade_set_args (L,"o", l_Vector.Set(mh->GetMatrix() ->vec.uvec)) |
|
return | ade_set_args (L,"o", l_Vector.Set(mh->GetMatrix() ->vec.fvec)) |
|
return | ade_set_args (L,"o", l_Vector.Set(mh->GetMatrix() ->vec.rvec)) |
|
| ADE_FUNC (__newindex, l_Enum,"enumeration","Sets enumeration to specified value (if it is not a global","enumeration","enumeration") |
|
| ADE_FUNC (__tostring, l_Enum, NULL,"Returns enumeration name","string","Enumeration name, or \"<INVALID>\" if invalid") |
|
| ADE_FUNC (__eq, l_Enum,"enumeration","Compares the two enumerations for equality","boolean","true if equal, false otherwise") |
|
| ADE_VIRTVAR (Name, l_Event,"string","Mission event name","string", NULL) |
|
| ADE_VIRTVAR (DirectiveText, l_Event,"string","Directive text","string", NULL) |
|
| ADE_VIRTVAR (DirectiveKeypressText, l_Event,"string","Raw directive keypress text, as seen in FRED.","string", NULL) |
|
| if (!ade_get_args(L,"o|i", l_Event.Get(&idx),&newinterval)) return ade_set_error(L |
|
| if (idx< 0||idx >=Num_mission_events) return ade_set_error(L |
|
| if (ADE_SETTING_VAR) |
|
return | ade_set_args (L,"i", mep->interval) |
|
| ADE_VIRTVAR (ObjectCount, l_Event,"number","Number of objects left for event","number","Repeat count, or 0 if invalid handle") |
|
| ADE_VIRTVAR (RepeatCount, l_Event,"number","Event repeat count","number","Repeat count, or 0 if invalid handle") |
|
| ADE_VIRTVAR (Score, l_Event,"number","Event score","number","Event score, or 0 if invalid handle") |
|
| ADE_FUNC (isValid, l_Event, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (isValid, l_File, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (close, l_File, NULL,"Instantly closes file and invalidates all file handles", NULL, NULL) |
|
| ADE_FUNC (flush, l_File, NULL,"Flushes file buffer to disk.","boolean","True for success, false on failure") |
|
| ADE_FUNC (getPath, l_File, NULL,"Determines path of the given file","string","Path string of the file handle, or an empty string if it doesn't have one, or the handle is invalid") |
|
int | cfread_lua_number (double *buf, CFILE *cfile) |
|
| ADE_FUNC (read, l_File,"number or string, ...","Reads part of or all of a file, depending on arguments passed. Based on basic Lua file:read function.""Returns nil when the end of the file is reached.""<br><ul><li>\"*n\" - Reads a number.</li>""<li>\"*a\" - Reads the rest of the file and returns it as a string.</li>""<li>\"*l\" - Reads a line. Skips the end of line markers.</li>""<li>(number) - Reads given number of characters, then returns them as a string.</li></ul>","number or string, ...","Requested data, or nil if the function fails") |
|
| ADE_FUNC (seek, l_File,"[string Whence=\"cur\", number Offset=0]","Changes position of file, or gets location.""Whence can be:""<li>\"set\" - File start.</li>""<li>\"cur\" - Current position in file.</li>""<li>\"end\" - File end.</li></ul>","number","new offset, or false or nil on failure") |
|
| ADE_FUNC (write, l_File,"string or number, ...","Writes a series of Lua strings or numbers to the current file.","number","Number of items successfully written.") |
|
| ADE_FUNC (__tostring, l_Font, NULL,"Filename of font","string","Font filename, or an empty string if the handle is invalid") |
|
| if (!ade_get_args(L,"o|s", l_Font.Get(&font_num),&newname)) return ade_set_error(L |
|
| if (font_num< 0||font_num >=Num_fonts) return ade_set_error(L |
|
return | ade_set_args (L,"s", Fonts[font_num].filename) |
|
| if (!ade_get_args(L,"o|i", l_Font.Get(&font_num),&newheight)) return ade_set_error(L |
|
| if (ADE_SETTING_VAR &&newheight > 0) |
|
return | ade_set_args (L,"i", Fonts[font_num].h) |
|
| ADE_FUNC (isValid, l_Font, NULL,"True if valid, false or nil if not","boolean","Detects whether handle is valid") |
|
| ADE_FUNC (__tostring, l_GameEvent, NULL,"Game event name","string","Game event name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Name, l_GameEvent,"string","Game event name","string","Game event name, or empty string if handle is invalid") |
|
| ADE_FUNC (__tostring, l_GameState, NULL,"Game state name","string","Game state name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Name, l_GameState,"string","Game state name","string","Game state name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Name, l_HudGauge,"string","Custom HUD Gauge name","string","Custom HUD Gauge name, or nil if handle is invalid") |
|
| ADE_VIRTVAR (Text, l_HudGauge,"string","Custom HUD Gauge text","string","Custom HUD Gauge text, or nil if handle is invalid") |
|
| ADE_VIRTVAR (Normal, l_Eyepoint,"vector","Eyepoint normal","vector","Eyepoint normal, or null vector if handle is invalid") |
|
| if (!ade_get_args(L,"o|o", l_Eyepoint.GetPtr(&eh), l_Vector.GetPtr(&v))) return ade_set_error(L |
|
| if (!eh->IsValid()) return ade_set_error(L |
|
| if (ADE_SETTING_VAR &&v!=NULL) |
|
return | ade_set_args (L,"o", l_Vector.Set(pm->view_positions[eh->eye_idx].pnt)) |
|
| ADE_FUNC (IsValid, l_Eyepoint, NULL,"Detect whether this handle is valid","boolean","true if valid false otherwise") |
|
| ADE_VIRTVAR (Textures, l_Model,"modeltextures_h","Model textures","modeltextures_h","Model textures, or an invalid modeltextures handle if the model handle is invalid") |
|
| ADE_VIRTVAR (Thrusters, l_Model,"thrusters","Model thrusters","thrusters","Thrusters of the model or invalid handle") |
|
| ADE_VIRTVAR (Eyepoints, l_Model,"eyepoints","Model eyepoints","eyepoints","Array of eyepoints or invalid handle on error") |
|
| ADE_VIRTVAR (Dockingbays, l_Model,"dockingbays","Docking bays handle of model","dockingbays","Array of docking bays on this model, or invalid handle on error") |
|
void | model_calc_bound_box (vec3d *box, vec3d *big_mn, vec3d *big_mx) |
|
| ADE_VIRTVAR (BoundingBoxMax, l_Model,"vector","Model bounding box maximum","vector","Model bounding box, or an empty vector if the handle is invalid") |
|
| ADE_VIRTVAR (BoundingBoxMin, l_Model,"vector","Model bounding box minimum","vector","Model bounding box, or an empty vector if the handle is invalid") |
|
| ADE_VIRTVAR (Filename, l_Model,"string","Model filename","string","Model filename, or an empty string if the handle is invalid") |
|
| ADE_VIRTVAR (Mass, l_Model,"number","Model mass","number","Model mass, or 0 if the model handle is invalid") |
|
| ADE_VIRTVAR (MomentOfInertia, l_Model,"orientation","Model moment of inertia","orientation","Moment of Inertia matrix or identity matrix if invalid") |
|
| if (!ade_get_args(L,"o|f", l_Model.GetPtr(&mdl),&nr)) return ade_set_error(L |
|
| if (pm==NULL) return ade_set_error(L |
|
return | ade_set_args (L,"f", pm->rad) |
|
| ADE_FUNC (isValid, l_Model, NULL,"True if valid, false or nil if not","boolean","Detects whether handle is valid") |
|
| ADE_FUNC (__len, l_Eyepoints, NULL,"Gets the number of eyepoints on this model","number","Number of eyepoints on this model or 0 on error") |
|
| ADE_INDEXER (l_Eyepoints,"eyepoint","Gets en eyepoint handle","eyepoint","eye handle or invalid handle on error") |
|
| ADE_FUNC (isValid, l_Eyepoints, NULL,"Detects whether handle is valid or not","boolean","true if valid false otherwise") |
|
| ADE_FUNC (__len, l_Thrusters, NULL,"Number of thruster banks on the model","number","Number of thrusterbanks") |
|
| ADE_INDEXER (l_Thrusters,"number Index","Array of all thrusterbanks on this thruster","thrusterbank","Handle to the thrusterbank or invalid handle if index is invalid") |
|
| ADE_FUNC (isValid, l_Thrusters, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__len, l_Thrusterbank, NULL,"Number of thrusters on this thrusterbank","number","Number of thrusters on this bank or 0 if handle is invalid") |
|
| ADE_INDEXER (l_Thrusterbank,"number Index","Array of glowpoint","glowpoint","Glowpoint, or invalid glowpoint handle on failure") |
|
| ADE_FUNC (isValid, l_Thrusterbank, NULL,"Detectes if this handle is valid","boolean","true if this handle is valid, false otherwise") |
|
| if (!ade_get_args(L,"o|o", l_Glowpoint.GetPtr(&glh), l_Vector.Get(&newVec))) return ADE_RETURN_NIL |
|
| if (!glh->isValid()) return ADE_RETURN_NIL |
|
return | ade_set_args (L,"o", l_Vector.Set(vec)) |
|
| ADE_VIRTVAR (Radius, l_Glowpoint, NULL,"The radius of the glowpoint","number","The radius of the glowpoint or -1 of invalid") |
|
| ADE_FUNC (isValid, l_Glowpoint, NULL,"Returns wether this handle is valid or not","boolean","True if handle is valid, false otherwise") |
|
| ADE_INDEXER (l_Dockingbays,"dockingbay","Gets a dockingbay handle from this model. If a string is given then a dockingbay with that name is searched.","dockingbay","Handle or invalid handle on error") |
|
| ADE_FUNC (__len, l_Dockingbays, NULL,"Retrieves the number of dockingbays on this model","number","number of docking bays or 0 on error") |
|
| ADE_FUNC (__len, l_Dockingbay, NULL,"Gets the number of docking points in this bay","number","The number of docking points or 0 on error") |
|
| ADE_FUNC (getName, l_Dockingbay, NULL,"Gets the name of this docking bay","string","The name or an empty string on error") |
|
| ADE_FUNC (getPoint, l_Dockingbay,"number index","Gets the location of a docking point in this bay","vector","The local location or null vector on error") |
|
| ADE_FUNC (getNormal, l_Dockingbay,"number index","Gets the normal of a docking point in this bay","vector","The normal vector or null vector on error") |
|
| ADE_FUNC (computeDocker, l_Dockingbay,"dockingbay","Computes the final position and orientation of a docker bay that docks with this bay.","vector, orientation","The local location and orientation of the docker vessel in the reference to the vessel of the docking bay handle, or a nil value on error") |
|
| ADE_FUNC (isValid, l_Dockingbay, NULL,"Detects whether is valid or not","number","<i>true</i> if valid, <i>false</i> otherwise") |
|
| ADE_VIRTVAR (AfterburnerAccelerationTime, l_Physics,"number","Afterburner acceleration time","number","Afterburner acceleration time, or 0 if handle is invalid") |
|
| if (!ade_get_args(L,"o|o", l_Physics.GetPtr(&pih), l_Vector.GetPtr(&v3))) return ade_set_error(L |
|
| if (!pih->IsValid()) return ade_set_error(L |
|
| if (ADE_SETTING_VAR &&v3!=NULL) |
|
return | ade_set_args (L,"o", l_Vector.Set(pih->pi->afterburner_max_vel)) |
|
| ADE_VIRTVAR (BankingConstant, l_Physics,"number","Banking constant","number","Banking constant, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (ForwardAccelerationTime, l_Physics,"number","Forward acceleration time","number","Forward acceleration time, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (ForwardDecelerationTime, l_Physics,"number","Forward deceleration time","number","Forward decleration time, or 0 if handle is invalid") |
|
| if (!ade_get_args(L,"o|f", l_Physics.GetPtr(&pih),&f)) return ade_set_error(L |
|
return | ade_set_args (L,"f", pih->pi->forward_thrust) |
|
| ADE_VIRTVAR (Mass, l_Physics,"number","Object mass","number","Object mass, or 0 if handle is invalid") |
|
return | ade_set_args (L,"o", l_Vector.Set(pih->pi->rotvel)) |
|
| ADE_VIRTVAR (RotationalVelocityDamping, l_Physics,"number","Rotational damping, ie derivative of rotational speed","number","Rotational damping, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (RotationalVelocityDesired, l_Physics,"vector","Desired rotational velocity","vector","Desired rotational velocity, or null vector if handle is invalid") |
|
return | ade_set_args (L,"o", l_Vector.Set(pih->pi->max_rotvel)) |
|
| ADE_VIRTVAR (ShockwaveShakeAmplitude, l_Physics,"number","How much shaking from shockwaves is applied to object","number","Shockwave shake amplitude, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (SlideAccelerationTime, l_Physics,"number","Time to accelerate to maximum slide velocity","number","Sliding acceleration time, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (SlideDecelerationTime, l_Physics,"number","Time to decelerate from maximum slide speed","number","Sliding deceleration time, or 0 if handle is invalid") |
|
return | ade_set_args (L,"o", l_Vector.Set(pih->pi->vel)) |
|
return | ade_set_args (L,"o", l_Vector.Set(pih->pi->desired_vel)) |
|
return | ade_set_args (L,"o", l_Vector.Set(pih->pi->max_vel)) |
|
| ADE_VIRTVAR (AfterburnerActive, l_Physics,"boolean","Specifies if the afterburner is active or not","boolean","true if afterburner is active false otherwise") |
|
| ADE_FUNC (isValid, l_Physics, NULL,"True if valid, false or nil if not","boolean","Detects whether handle is valid") |
|
| ADE_FUNC (getSpeed, l_Physics, NULL,"Gets total speed as of last frame","number","Total speed, or 0 if handle is invalid") |
|
| ADE_FUNC (getForwardSpeed, l_Physics, NULL,"Gets total speed in the ship's 'forward' direction as of last frame","number","Total forward speed, or 0 if handle is invalid") |
|
| ADE_FUNC (isAfterburnerActive, l_Physics, NULL,"True if Afterburners are on, false or nil if not","boolean","Detects whether afterburner is active") |
|
| ADE_FUNC (isGliding, l_Physics, NULL,"True if glide mode is on, false or nil if not","boolean","Detects if ship is gliding") |
|
| ADE_FUNC (applyWhack, l_Physics,"vector Impulse, [ vector Position]","Applies a whack to an object at a position (a local vector) based on impulse supplied (a world vector). If no position is supplied, an empty vector is used.","boolean","true if it succeeded, false otherwise") |
|
| ADE_VIRTVAR (Persistence, l_SEXPVariable,"enumeration","SEXP Variable persistance, uses SEXPVAR_*_PERSISTENT enumerations","enumeration","SEXPVAR_*_PERSISTENT enumeration, or invalid numeration if handle is invalid") |
|
| ADE_VIRTVAR (Type, l_SEXPVariable,"enumeration","SEXP Variable type, uses SEXPVAR_TYPE_* enumerations","enumeration","SEXPVAR_TYPE_* enumeration, or invalid numeration if handle is invalid") |
|
| ADE_VIRTVAR (Value, l_SEXPVariable,"number/string","SEXP variable value","string","SEXP variable contents, or nil if the variable is of an invalid type or the handle is invalid") |
|
| ADE_FUNC (__tostring, l_SEXPVariable, NULL,"Returns SEXP name","string","SEXP name, or empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_SEXPVariable, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (delete, l_SEXPVariable, NULL,"Deletes a SEXP Variable","boolean","True if successful, false if the handle is invalid") |
|
| ADE_FUNC (__len, l_Shields, NULL,"Number of shield segments","number","Number of shield segments or 0 if handle is invalid") |
|
| if (lua_isstring(L, 2)) |
|
| if (!ade_get_args(L,"oo|f", l_Shields.GetPtr(&objh), l_Enum.GetPtr(&qd),&nval)) return 0 |
|
| if (!objh->IsValid()) return ade_set_error(L |
|
| switch (qd->index) |
|
| if (qdx==-1) |
|
| if (ADE_SETTING_VAR &&nval >=0.0f) shield_set_quad(objp |
|
return | ade_set_args (L,"f", shield_get_quad(objp, qdx)) |
|
| if (!ade_get_args(L,"o|f", l_Shields.GetPtr(&objh),&nval)) return ade_set_error(L |
|
return | ade_set_args (L,"f", shield_get_strength(objh->objp)) |
|
return | ade_set_args (L,"f", shield_get_max_strength(objh->objp)) |
|
| ADE_FUNC (isValid, l_Shields, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_VIRTVAR (Name, l_Shiptype,"string","Ship type name","string","Ship type name, or empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_Shiptype, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_VIRTVAR (Name, l_Species,"string","Species name","string","Species name, or empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_Species, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__eq, l_Team,"team, team","Checks whether two teams are the same team","boolean","true if equal") |
|
| ADE_VIRTVAR (Name, l_Team,"string","Team name","string","Team name, or empty string if handle is invalid") |
|
| ADE_FUNC (getColor, l_Team, NULL,"Gets the IFF color of the specified Team","number, number, number","rgb color for the specified team or nil if invalid") |
|
| ADE_FUNC (isValid, l_Team, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__gc, l_Texture, NULL,"Auto-deletes texture", NULL, NULL) |
|
| ADE_FUNC (__eq, l_Texture,"texture, texture","Checks if two texture handles refer to the same texture","boolean","True if textures are equal") |
|
| ADE_INDEXER (l_Texture,"number","Returns texture handle to specified frame number in current texture's animation.""This means that [1] will always return the first frame in an animation, no matter what frame an animation is.""You cannot change a texture animation frame.","texture","Texture handle, or invalid texture handle if index is invalid") |
|
| ADE_FUNC (isValid, l_Texture, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (unload, l_Texture, NULL,"Unloads a texture from memory", NULL, NULL) |
|
| ADE_FUNC (getFilename, l_Texture, NULL,"Returns filename for texture","string","Filename, or empty string if handle is invalid") |
|
| ADE_FUNC (getWidth, l_Texture, NULL,"Gets texture width","number","Texture width, or 0 if handle is invalid") |
|
| ADE_FUNC (getHeight, l_Texture, NULL,"Gets texture height","number","Texture height, or 0 if handle is invalid") |
|
| ADE_FUNC (getFPS, l_Texture, NULL,"Gets frames-per-second of texture","number","Texture FPS, or 0 if handle is invalid") |
|
| ADE_FUNC (getFramesLeft, l_Texture, NULL,"Gets number of frames left, from handle's position in animation","number","Frames left, or 0 if handle is invalid") |
|
| ADE_INDEXER (l_Vector,"x,y,z or 1-3","Vector component","number","Value at index, or 0 if vector handle is invalid") |
|
| ADE_FUNC (__add, l_Vector,"number/vector","Adds vector by another vector, or adds all axes by value","vector","Final vector, or null vector if error occurs") |
|
| ADE_FUNC (__sub, l_Vector,"number/vector","Subtracts vector from another vector, or subtracts all axes by value","vector","Final vector, or null vector if error occurs") |
|
| if (lua_isnumber(L, 1)||lua_isnumber(L, 2)) |
|
| if (!ade_get_args(L,"oo", l_Vector.GetPtr(&v1), l_Vector.GetPtr(&v2))) return ade_set_args(L |
|
return | ade_set_args (L,"o", l_Vector.Set(v3)) |
|
| if (!ade_get_args(L,"o", l_Vector.GetPtr(&v3))) return ade_set_error(L |
|
| sprintf (buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z) |
|
return | ade_set_args (L,"s", buf) |
|
| ADE_FUNC (getOrientation, l_Vector, NULL,"Returns orientation object representing the direction of the vector. Does not require vector to be normalized.","orientation","Orientation object, or null orientation object if handle is invalid") |
|
return | ade_set_args (L,"f", vm_vec_mag(v3)) |
|
| ADE_FUNC (getDistance, l_Vector,"Vector","Distance","number","Returns distance from another vector") |
|
| ADE_FUNC (getDotProduct, l_Vector,"vector OtherVector","Returns dot product of vector object with vector argument","number","Dot product, or 0 if a handle is invalid") |
|
| ADE_FUNC (getCrossProduct, l_Vector,"vector OtherVector","Returns cross product of vector object with vector argument","vector","Cross product, or null vector if a handle is invalid") |
|
| ADE_FUNC (getScreenCoords, l_Vector, NULL,"Gets screen cordinates of a world vector","number,number","X (number), Y (number), or false if off-screen") |
|
| ADE_FUNC (getNormalized, l_Vector, NULL,"Returns a normalized version of the vector","vector","Normalized Vector, or NIL if invalid") |
|
| ADE_VIRTVAR (BaseMap, l_TextureMap,"texture","Base texture","texture","Base texture, or invalid texture handle if material handle is invalid") |
|
| ADE_VIRTVAR (GlowMap, l_TextureMap,"texture","Glow texture","texture","Glow texture, or invalid texture handle if material handle is invalid") |
|
| ADE_VIRTVAR (SpecularMap, l_TextureMap,"texture","Specular texture","texture","Texture handle, or invalid texture handle if material handle is invalid") |
|
| ADE_FUNC (__tostring, l_Weaponclass, NULL,"Weapon class name","string","Weapon class name, or an empty string if handle is invalid") |
|
| ADE_FUNC (__eq, l_Weaponclass,"weaponclass, weaponclass","Checks if the two classes are equal","boolean","true if equal false otherwise") |
|
| ADE_VIRTVAR (Name, l_Weaponclass,"string","Weapon class name","string","Weapon class name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Title, l_Weaponclass,"string","Weapon class title","string","Weapon class title, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Description, l_Weaponclass,"string","Weapon class description string","string","Description string, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (TechTitle, l_Weaponclass,"string","Weapon class tech title","string","Tech title, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (TechAnimationFilename, l_Weaponclass,"string","Weapon class animation filename","string","Filename, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (TechDescription, l_Weaponclass,"string","Weapon class tech description string","string","Description string, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Model, l_Weaponclass,"model","Model","model","Weapon class model, or invalid model handle if weaponclass handle is invalid") |
|
| if (!ade_get_args(L,"o|f", l_Weaponclass.Get(&idx),&f)) return ade_set_error(L |
|
return | ade_set_args (L,"f", Weapon_info[idx].armor_factor) |
|
| ADE_VIRTVAR (Damage, l_Weaponclass,"number","Amount of damage that weapon deals","number","Damage amount, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (FreeFlightTime, l_Weaponclass,"number","The time the weapon will fly before turing onto its target","number","Free flight time or emty string if invalid") |
|
| ADE_VIRTVAR (LifeMax, l_Weaponclass,"number","Life of weapon in seconds","number","Life of weapon, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Range, l_Weaponclass,"number","Range of weapon in meters","number","Weapon Range, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Mass, l_Weaponclass,"number","Weapon mass","number","Weapon mass, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (TargetLOD, l_Weaponclass,"number","LOD used for weapon model in the targeting computer","number","LOD number, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Speed, l_Weaponclass,"number","Weapon max speed, aka $Velocity in weapons.tbl","number","Weapon speed, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Bomb, l_Weaponclass,"boolean","Is weapon class flagged as bomb","boolean","New flag") |
|
| ADE_VIRTVAR (CargoSize, l_Weaponclass,"number","The cargo size of this weapon class","number","The new cargo size or -1 on error") |
|
| ADE_FUNC (isValid, l_Weaponclass, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (getWeaponClassIndex, l_Weaponclass, NULL,"Gets the index value of the weapon class","number","index value of the weapon class") |
|
| if (!ade_get_args(L,"o", l_Weaponclass.Get(&idx))) return ADE_RETURN_NIL |
|
| if (Weapon_info[idx].subtype==WP_LASER) return ADE_RETURN_TRUE |
|
| ADE_FUNC (isMissile, l_Weaponclass, NULL,"Return true if the weapon is a secondary weapon. This function is deprecated, use isSecondary instead.","boolean","true if the weapon is a secondary, false otherwise") |
|
| ADE_FUNC (isSecondary, l_Weaponclass, NULL,"Return true if the weapon is a secondary weapon","boolean","true if the weapon is a secondary, false otherwise") |
|
| ADE_FUNC (isBeam, l_Weaponclass, NULL,"Return true if the weapon is a beam","boolean","true if the weapon is a beam, false otherwise") |
|
| ADE_FUNC (__gc, l_ColInfo, NULL,"Removes the allocated reference of this handle", NULL, NULL) |
|
| ADE_VIRTVAR (Model, l_ColInfo,"model","The model this collision info is about","model","The model") |
|
| ADE_FUNC (getCollisionDistance, l_ColInfo, NULL,"The distance to the closest collision point","number","distance or -1 on error") |
|
| if (!ade_get_args(L,"o|b", l_ColInfo.GetPtr(&info),&local)) return ADE_RETURN_NIL |
|
| if (!info->IsValid()) return ADE_RETURN_NIL |
|
| if (collide->num_hits<=0) |
|
else return | ade_set_args (L,"o", l_Vector.Set(collide->hit_point_world)) |
|
| ADE_FUNC (__eq, l_Object,"object, object","Checks whether two object handles are for the same object","boolean","True if equal, false if not or a handle is invalid") |
|
| if (!ade_get_args(L,"o", l_Object.GetPtr(&objh))) return ade_set_error(L |
|
| switch (objh->objp->type) |
|
| ADE_VIRTVAR (Parent, l_Object,"object","Parent of the object. Value may also be a deriviative of the 'object' class, such as 'ship'.","object","Parent handle, or invalid handle if object is invalid") |
|
| if (!ade_get_args(L,"o|o", l_Object.GetPtr(&objh), l_Vector.GetPtr(&v3))) return ade_set_error(L |
|
return | ade_set_args (L,"o", l_Vector.Set(objh->objp->pos)) |
|
return | ade_set_args (L,"o", l_Vector.Set(objh->objp->last_pos)) |
|
| if (!ade_get_args(L,"o|o", l_Object.GetPtr(&objh), l_Matrix.GetPtr(&mh))) return ade_set_error(L |
|
l_Matrix | Set (matrix_h(&vmd_identity_matrix))) |
|
| if (ADE_SETTING_VAR &&mh!=NULL) |
|
return | ade_set_args (L,"o", l_Matrix.Set(matrix_h(&objh->objp->orient))) |
|
return | ade_set_args (L,"o", l_Matrix.Set(matrix_h(&objh->objp->last_orient))) |
|
| ADE_VIRTVAR (Physics, l_Object,"physics","Physics data used to move ship between frames","physics","Physics data, or invalid physics handle if object handle is invalid") |
|
| ADE_VIRTVAR (HitpointsLeft, l_Object,"number","Hitpoints an object has left","number","Hitpoints left, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Shields, l_Object,"shields","Shields","shields","Shields handle, or invalid shields handle if object handle is invalid") |
|
| ADE_FUNC (getSignature, l_Object, NULL,"Gets the object's unique signature","number","Returns the object's unique numeric signature, or -1 if invalid. Useful for creating a metadata system") |
|
| ADE_FUNC (isValid, l_Object, NULL,"Detects whether handle is valid","boolean","true if handle is valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (getBreedName, l_Object, NULL,"Gets object type","string","Object type name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (CollisionGroups, l_Object,"number","Collision group data","number","Current collision group signature. NOTE: This is a bitfield, NOT a normal number.") |
|
| ADE_FUNC (getfvec, l_Object,"[boolean normalize]","Returns the objects' current fvec.","vector","Objects' forward vector, or nil if invalid. If called with a true argument, vector will be normalized.") |
|
| ADE_FUNC (getuvec, l_Object,"[boolean normalize]","Returns the objects' current uvec.","vector","Objects' up vector, or nil if invalid. If called with a true argument, vector will be normalized.") |
|
| ADE_FUNC (getrvec, l_Object,"[boolean normalize]","Returns the objects' current rvec.","vector","Objects' rvec, or nil if invalid. If called with a true argument, vector will be normalized.") |
|
| if (!ade_get_args(L,"ooo|b", l_Object.GetPtr(&objh), l_Vector.GetPtr(&v3a), l_Vector.GetPtr(&v3b),&local)) return ADE_RETURN_NIL |
|
| switch (obj->type) |
|
| if (obj->type==OBJ_SHIP) |
|
| if (!model_collide(&hull_check)) |
|
| if (local) return ade_set_args(L |
|
l_Vector | Set (hull_check.hit_point) |
|
l_Vector l_ColInfo | Set (mc_info_h(new mc_info(hull_check)))) |
|
else return | ade_set_args (L,"oo", l_Vector.Set(hull_check.hit_point_world), l_ColInfo.Set(mc_info_h(new mc_info(hull_check)))) |
|
| ADE_VIRTVAR (Target, l_Asteroid,"object","Asteroid target object; may be object derivative, such as ship.","object","Target object, or invalid handle if asteroid handle is invalid") |
|
| ADE_FUNC (kill, l_Asteroid,"[ship killer=nil, wvector hitpos=nil]","Kills the asteroid. Set \"killer\" to designate a specific ship as having been the killer, and \"hitpos\" to specify the world position of the hit location; if nil, the asteroid center is used.","boolean","True if successful, false or nil otherwise") |
|
| ADE_FUNC (getName, l_DisplayInfo, NULL,"Gets the name of this cockpit display as defined in ships.tbl","string","Name string or empty string on error") |
|
| ADE_FUNC (getFileName, l_DisplayInfo, NULL,"Gets the file name of the target texture of this cockpit display","string","Texture name string or empty string on error") |
|
| ADE_FUNC (getForegroundFileName, l_DisplayInfo, NULL,"Gets the file name of the foreground texture of this cockpit display","string","Foreground texture name string or nil if texture is not set or on error") |
|
| ADE_FUNC (getBackgroundFileName, l_DisplayInfo, NULL,"Gets the file name of the background texture of this cockpit display","string","Background texture name string or nil if texture is not set or on error") |
|
| ADE_FUNC (getSize, l_DisplayInfo, NULL,"Gets the size of this cockpit display","number, number","Width and height of the display or -1, -1 on error") |
|
| ADE_FUNC (getOffset, l_DisplayInfo, NULL,"Gets the offset of this cockpit display","number, number","x and y offset of the display or -1, -1 on error") |
|
| ADE_FUNC (isValid, l_DisplayInfo, NULL,"Detects whether this handle is valid","boolean","true if valid false otherwise") |
|
| ADE_FUNC (startRendering, l_CockpitDisplay,"[boolean setClip = true]","Starts rendering to this cockpit display. That means if you get a valid texture handle from this function then the rendering system is ready to do a render to texture. If setClip is true then the clipping region will be set to the region of the cockpit display.<br><b>Important:</b> You have to call stopRendering after you're done or this render target will never be released!","texture","texture handle that is being drawn to or invalid handle on error") |
|
| ADE_FUNC (stopRendering, l_CockpitDisplay, NULL,"Stops rendering to this cockpit display","boolean","true if successfull, false otherwise") |
|
| ADE_FUNC (getBackgroundTexture, l_CockpitDisplay, NULL,"Gets the background texture handle of this cockpit display","texture","texture handle or invalid handle if no background texture or an error happened") |
|
| ADE_FUNC (getForegroundTexture, l_CockpitDisplay, NULL,"Gets the foreground texture handle of this cockpit display<br>""<b>Important:</b> If you want to do render to texture then you have to use startRendering/stopRendering","texture","texture handle or invalid handle if no foreground texture or an error happened") |
|
| ADE_FUNC (getSize, l_CockpitDisplay, NULL,"Gets the size of this cockpit display","number, number","Width and height of the display or -1, -1 on error") |
|
| ADE_FUNC (getOffset, l_CockpitDisplay, NULL,"Gets the offset of this cockpit display","number, number","x and y offset of the display or -1, -1 on error") |
|
| ADE_FUNC (isValid, l_CockpitDisplay, NULL,"Detects whether this handle is valid or not","boolean","true if valid, false otherwise") |
|
| ADE_FUNC (__len, l_CockpitDisplayInfos, NULL,"Number of cockpit displays for this ship class","number","number of cockpit displays or -1 on error") |
|
| ADE_INDEXER (l_CockpitDisplayInfos,"number/string","Returns the handle at the requested index or the handle with the specified name","display info","display handle or invalid handle on error") |
|
| ADE_FUNC (isValid, l_CockpitDisplayInfos, NULL,"Detects whether this handle is valid","boolean","true if valid, false otehrwise") |
|
| ADE_FUNC (__tostring, l_Shipclass, NULL,"Ship class name","string","Ship class name, or an empty string if handle is invalid") |
|
| ADE_FUNC (__eq, l_Shipclass,"shipclass, shipclass","Checks if the two classes are equal","boolean","true if equal false otherwise") |
|
| ADE_VIRTVAR (Name, l_Shipclass,"string","Ship class name","string","Ship class name, or an empty string if handle is invalid") |
|
| ADE_VIRTVAR (ShortName, l_Shipclass,"string","Ship class short name","string","Ship short name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (TypeString, l_Shipclass,"string","Ship class type string","string","Type string, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (ManeuverabilityString, l_Shipclass,"string","Ship class maneuverability string","string","Maneuverability string, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (ArmorString, l_Shipclass,"string","Ship class armor string","string","Armor string, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (ManufacturerString, l_Shipclass,"string","Ship class manufacturer","string","Manufacturer, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (Description, l_Shipclass,"string","Ship class description","string","Description, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (TechDescription, l_Shipclass,"string","Ship class tech description","string","Tech description, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (AfterburnerFuelMax, l_Shipclass,"number","Afterburner fuel capacity","number","Afterburner capacity, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (CountermeasuresMax, l_Shipclass,"number","Maximum number of countermeasures the ship can carry","number","Countermeasure capacity, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Model, l_Shipclass,"model","Model","model","Ship class model, or invalid model handle if shipclass handle is invalid") |
|
| ADE_VIRTVAR (CockpitModel, l_Shipclass,"model","Model used for first-person cockpit","model","Cockpit model") |
|
| ADE_VIRTVAR (CockpitDisplays, l_Shipclass,"cockpitdisplays","Gets the cockpit display information array of this ship class","cockpitdisplays","Array handle containing the information or invalid handle on error") |
|
| ADE_VIRTVAR (HitpointsMax, l_Shipclass,"number","Ship class hitpoints","number","Hitpoints, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Species, l_Shipclass,"Species","Ship class species","species","Ship class species, or invalid species handle if shipclass handle is invalid") |
|
| ADE_VIRTVAR (Type, l_Shipclass,"shiptype","Ship class type","shiptype","Ship type, or invalid handle if shipclass handle is invalid") |
|
| ADE_VIRTVAR (AltName, l_Shipclass,"string","Alternate name for ship class","string","Alternate string or empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_Shipclass, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (isInTechroom, l_Shipclass, NULL,"Gets whether or not the ship class is available in the techroom","boolean","Whether ship has been revealed in the techroom, false if handle is invalid") |
|
| ADE_FUNC (renderTechModel, l_Shipclass,"X1, Y1, X2, Y2, [Rotation %=0, Pitch %=0, Bank %=40, number Zoom=1.3]","Draws ship model as if in techroom","boolean","Whether ship was rendered") |
|
| ADE_FUNC (renderTechModel2, l_Shipclass,"X1, Y1, X2, Y2, [orientation Orientation=nil, number Zoom=1.3]","Draws ship model as if in techroom","boolean","Whether ship was rendered") |
|
| ADE_FUNC (isModelLoaded, l_Shipclass,"[boolean Load = false]","Checks if the model used for this shipclass is loaded or not and optionally loads the model, which might be a slow operation.","boolean","If the model is loaded or not") |
|
| ADE_FUNC (getShipClassIndex, l_Shipclass, NULL,"Gets the index valus of the ship class","number","index value of the ship class") |
|
| ADE_VIRTVAR (IsHull, l_Debris,"boolean","Whether or not debris is a piece of hull","boolean","Whether debris is a hull fragment, or false if handle is invalid") |
|
| ADE_VIRTVAR (OriginClass, l_Debris,"shipclass","The shipclass of the ship this debris originates from","shipclass","The shipclass of the ship that created this debris") |
|
| ADE_FUNC (getDebrisRadius, l_Debris, NULL,"The radius of this debris piece","number","The radius of this debris piece or -1 if invalid") |
|
| ADE_FUNC (isValid, l_Debris, NULL,"Return if this debris handle is valid","boolean","true if valid false otherwise") |
|
| ADE_INDEXER (l_WaypointList,"number Index","Array of waypoints that are part of the waypoint list","waypoint","Waypoint, or invalid handle if the index or waypointlist handle is invalid") |
|
| ADE_FUNC (__len, l_WaypointList, NULL,"Number of waypoints in the list. ""Note that the value returned cannot be relied on for more than one frame.","number","Number of waypoints in the list, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Name, l_WaypointList,"string","Name of WaypointList","string","Waypointlist name, or empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_WaypointList, NULL,"Return if this waypointlist handle is valid","boolean","true if valid false otherwise") |
|
| ADE_FUNC (getList, l_Waypoint, NULL,"Returns the waypoint list","waypointlist","waypointlist handle or invalid handle if waypoint was invalid") |
|
| ADE_VIRTVAR (WeaponClass, l_WeaponBank,"weaponclass","Class of weapon mounted in the bank","weaponclass","Weapon class, or an invalid weaponclass handle if bank handle is invalid") |
|
| ADE_VIRTVAR (AmmoLeft, l_WeaponBank,"number","Ammo left for the current bank","number","Ammo left, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (AmmoMax, l_WeaponBank,"number","Maximum ammo for the current bank<br>""<b>Note:</b> Setting this value actually sets the <i>capacity</i> of the weapon bank. To set the actual maximum ammunition use <tt>AmmoMax = <amount> * class.CargoSize</tt>","number","Ammo capacity, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Armed, l_WeaponBank,"boolean","Weapon armed status. Does not take linking into account.","boolean","True if armed, false if unarmed or handle is invalid") |
|
| ADE_VIRTVAR (Capacity, l_WeaponBank,"number","The actual capacity of a weapon bank as specified in the table","number","The capacity or -1 if handle is invalid") |
|
| ADE_FUNC (isValid, l_WeaponBank, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_INDEXER (l_WeaponBankType,"number Index","Array of weapon banks","weaponbank","Weapon bank, or invalid handle on failure") |
|
| if (!numargs) return ade_set_error(L |
|
| if (!bh->IsValid()) return ade_set_error(L |
|
| switch (bh->type) |
|
return | ade_set_error (L,"b", false) |
|
| ADE_FUNC (isValid, l_WeaponBankType, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__len, l_WeaponBankType, NULL,"Number of weapons in the mounted bank","number","Number of bank weapons, or 0 if handle is invalid") |
|
| ADE_FUNC (__tostring, l_Subsystem, NULL,"Returns name of subsystem","string","Subsystem name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (ArmorClass, l_Subsystem,"string","Current Armor class","string","Armor class name, or empty string if none is set") |
|
| ADE_VIRTVAR (AWACSIntensity, l_Subsystem,"number","Subsystem AWACS intensity","number","AWACS intensity, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (AWACSRadius, l_Subsystem,"number","Subsystem AWACS radius","number","AWACS radius, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Orientation, l_Subsystem,"orientation","Orientation of subobject or turret base","orientation","Subsystem orientation, or null orientation if handle is invalid") |
|
| ADE_VIRTVAR (GunOrientation, l_Subsystem,"orientation","Orientation of turret gun","orientation","Gun orientation, or null orientation if handle is invalid") |
|
| ADE_VIRTVAR (HitpointsLeft, l_Subsystem,"number","Subsystem hitpoints left","number","Hitpoints left, or 0 if handle is invalid. Setting a value of 0 will disable it - set a value of -1 or lower to actually blow it up.") |
|
| ADE_VIRTVAR (HitpointsMax, l_Subsystem,"number","Subsystem hitpoints max","number","Max hitpoints, or 0 if handle is invalid") |
|
| if (!ade_get_args(L,"o|o", l_Subsystem.GetPtr(&sso), l_Vector.GetPtr(&v))) return ade_set_error(L |
|
| if (!sso->IsValid()) return ade_set_error(L |
|
return | ade_set_args (L,"o", l_Vector.Set(sso->ss->system_info->pnt)) |
|
| Assert (pm!=NULL) |
|
return | ade_set_args (L,"o", l_Vector.Set(sm->offset)) |
|
| ADE_VIRTVAR (Name, l_Subsystem,"string","Subsystem name","string","Subsystem name, or an empty string if handle is invalid") |
|
| ADE_FUNC (getModelName, l_Subsystem, NULL,"Returns the original name of the subsystem in the model file","string","name or empty string on error") |
|
| ADE_VIRTVAR (PrimaryBanks, l_Subsystem,"weaponbanktype","Array of primary weapon banks","weaponbanktype","Primary banks, or invalid weaponbanktype handle if subsystem handle is invalid") |
|
| ADE_VIRTVAR (SecondaryBanks, l_Subsystem,"weaponbanktype","Array of secondary weapon banks","weaponbanktype","Secondary banks, or invalid weaponbanktype handle if subsystem handle is invalid") |
|
| ADE_VIRTVAR (Target, l_Subsystem,"object","Object targeted by this subsystem. If used to set a new target, AI targeting will be switched off.","object","Targeted object, or invalid object handle if subsystem handle is invalid") |
|
| ADE_VIRTVAR (TurretResets, l_Subsystem,"boolean","Specifies wether this turrets resets after a certain time of inactivity","boolean","true if turret resets, false otherwise") |
|
| if (!ade_get_args(L,"o|i", l_Subsystem.GetPtr(&sso),&newVal)) return ade_set_error(L |
|
| if (!(sso->ss->system_info->flags &MSS_FLAG_TURRET_RESET_IDLE)) return ade_set_error(L |
|
return | ade_set_args (L,"i", sso->ss->system_info->turret_reset_delay) |
|
| ADE_VIRTVAR (TurnRate, l_Subsystem,"number","The turn rate","number","Turnrate or -1 on error") |
|
| ADE_VIRTVAR (Targetable, l_Subsystem,"boolean","Targetability of this subsystem","boolean","true if targetable, false otherwise or on error") |
|
| ADE_VIRTVAR (Radius, l_Subsystem,"number","The radius of this subsystem","number","The radius or 0 on error") |
|
| ADE_VIRTVAR (TurretLocked, l_Subsystem,"boolean","Whether the turret is locked. Setting to true locks the turret, setting to false frees it.","boolean","True if turret is locked, false otherwise") |
|
| if (!ade_get_args(L,"o|f", l_Subsystem.GetPtr(&sso),&newVal)) return ade_set_error(L |
|
return | ade_set_args (L,"f", sso->ss->turret_next_fire_stamp/1000.0f) |
|
| ADE_FUNC (targetingOverride, l_Subsystem,"boolean","If set to true, AI targeting for this turret is switched off. If set to false, the AI will take over again.","boolean","Returns true if successful, false otherwise") |
|
| ADE_FUNC (hasFired, l_Subsystem, NULL,"Determine if a subsystem has fired","boolean","true if if fired, false if not fired, or nil if invalid. resets fired flag when called.") |
|
| ADE_FUNC (isTurret, l_Subsystem, NULL,"Determines if this subsystem is a turret","boolean","true if subsystem is turret, false otherwise or nil on error") |
|
| ADE_FUNC (isTargetInFOV, l_Subsystem,"object Target","Determines if the object is in the turrets FOV","boolean","true if in FOV, false if not, nil on error or if subsystem is not a turret ") |
|
bool | turret_fire_weapon (int weapon_num, ship_subsys *turret, int parent_objnum, vec3d *turret_pos, vec3d *turret_fvec, vec3d *predicted_pos=NULL, float flak_range_override=100.0f) |
|
| ADE_FUNC (fireWeapon, l_Subsystem,"[Turret weapon index = 1, Flak range = 100]","Fires weapon on turret", NULL, NULL) |
|
| ADE_FUNC (rotateTurret, l_Subsystem,"vector Pos[, boolean reset=false","Rotates the turret to face Pos or resets the turret to its original state","boolean","true on success false otherwise") |
|
| ADE_FUNC (getTurretHeading, l_Subsystem, NULL,"Returns the turrets forward vector","vector","Returns a normalized version of the forward vector or null vector on error") |
|
| ADE_FUNC (getFOVs, l_Subsystem, NULL,"Returns current turrets FOVs","number, number, number","Standard FOV, maximum barrel elevation, turret base fov.") |
|
| ADE_FUNC (getNextFiringPosition, l_Subsystem, NULL,"Retrieves the next position and firing normal this turret will fire from. This function returns a world position","vector, vector","vector or null vector on error") |
|
| ADE_FUNC (getTurretMatrix, l_Subsystem, NULL,"Returns current subsystems turret matrix","matrix","Turret matrix.") |
|
| ADE_FUNC (getParent, l_Subsystem, NULL,"The object parent of this subsystem, is of type ship","object","object handle or invalid handle on error") |
|
| ADE_FUNC (isValid, l_Subsystem, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_VIRTVAR (Priority, l_Order,"number","Priority of the given order","number","Order priority or 0 if invalid") |
|
| ADE_FUNC (remove, l_Order, NULL,"Removes the given order from the ship's priority queue.","boolean","True if order was successfully removed, otherwise false or nil.") |
|
| ADE_FUNC (getType, l_Order, NULL,"Gets the type of the order.","enumeration","The type of the order as one of the ORDER_* enumerations.") |
|
| ADE_VIRTVAR (Target, l_Order,"object","Target of the order. Value may also be a deriviative of the 'object' class, such as 'ship'.","object","Target object or invalid object handle if order handle is invalid or order requires no target.") |
|
| ADE_VIRTVAR (TargetSubsystem, l_Order,"subsystem","Target subsystem of the order.","subsystem","Target subsystem, or invalid subsystem handle if order handle is invalid or order requires no subsystem target.") |
|
| ADE_FUNC (isValid, l_Order, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__len, l_ShipOrders, NULL,"Number of ship orders","number","Number of ship orders, or 0 if handle is invalid") |
|
| ADE_INDEXER (l_ShipOrders,"number Index","Array of ship orders","order","Order, or invalid order handle on failure") |
|
| ADE_FUNC (isValid, l_ShipOrders, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__len, l_ShipTextures, NULL,"Number of textures on ship","number","Number of textures on ship, or 0 if handle is invalid") |
|
| ADE_INDEXER (l_ShipTextures,"number Index/string TextureFilename","Array of ship textures","texture","Texture, or invalid texture handle on failure") |
|
| ADE_FUNC (isValid, l_ShipTextures, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (__len, l_CockpitDisplays, NULL,"Gets the number of cockpit displays for the player ship","number","number of displays or -1 on error") |
|
| ADE_INDEXER (l_CockpitDisplays,"number/string","Gets a cockpit display from the present player displays by either the index or the name of the display","display","Display handle or invalid handle on error") |
|
| ADE_FUNC (isValid, l_CockpitDisplays, NULL,"Detects whether this handle is valid or not","boolean","true if valid, false otherwise") |
|
| ADE_VIRTVAR (DefaultVolume, l_SoundEntry,"number","The default volume of this game sound","number","Volume in the range from 1 to 0 or -1 on error") |
|
| ADE_FUNC (getFilename, l_SoundEntry, NULL,"Returns the filename of this sound","string","filename or empty string on error") |
|
| ADE_FUNC (getDuration, l_SoundEntry, NULL,"Gives the length of the sound in seconds.","number","the length, or -1 on error") |
|
| ADE_FUNC (get3DValues, l_SoundEntry,"vector Postion[, number radius=0.0]","Computes the volume and the panning of the sound when it would be played from the specified position.<br>""If range is given then the volume will diminish when the listener is withing that distance to the source.<br>""The position of the listener is always the the current viewing position.","number, number","The volume and the panning, in that sequence, or both -1 on error") |
|
| ADE_FUNC (isValid, l_SoundEntry, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_VIRTVAR (Pitch, l_Sound,"number","Pitch of sound, from 100 to 100000","number","Pitch, or 0 if handle is invalid") |
|
| ADE_FUNC (getRemainingTime, l_Sound, NULL,"The remaining time of this sound handle","number","Remaining time, or -1 on error") |
|
| ADE_FUNC (setVolume, l_Sound,"number","Sets the volume of this sound instance","boolean","true if succeeded, false otherwise") |
|
| ADE_FUNC (setPanning, l_Sound,"number","Sets the panning of this sound. Argument ranges from -1 for left to 1 for right","boolean","true if succeeded, false otherwise") |
|
| ADE_FUNC (setPosition, l_Sound,"number[,boolean = true]","Sets the absolute position of the sound. If boolean argument is true then the value is given as a percentage<br>""This operation fails if there is no backing soundentry!","boolean","true if successfull, false otherwise") |
|
| ADE_FUNC (rewind, l_Sound,"number","Rewinds the sound by the given number of seconds<br>""This operation fails if there is no backing soundentry!","boolean","true if succeeded, false otherwise") |
|
| ADE_FUNC (skip, l_Sound,"number","Skips the given number of seconds of the sound<br>""This operation fails if there is no backing soundentry!","boolean","true if succeeded, false otherwise") |
|
| ADE_FUNC (isPlaying, l_Sound, NULL,"Specifies if this handle is currently playing","boolean","true if playing, false if otherwise") |
|
| ADE_FUNC (stop, l_Sound, NULL,"Stops the sound of this handle","boolean","true if succeeded, false otherwise") |
|
| ADE_FUNC (isValid, l_Sound, NULL,"Detects whether the whole handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (isSoundValid, l_Sound, NULL,"Checks if only the sound is valid, should be used for non soundentry sounds","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (updatePosition, l_Sound3D,"vector Position[, number radius = 0.0]","Updates the given 3D sound with the specified position and an optional range value","boolean","true if succeesed, false otherwise") |
|
| ADE_VIRTVAR (Duration, l_Soundfile,"number","The duration of the sound file, in seconds","number","The duration or -1 on error") |
|
| ADE_VIRTVAR (Filename, l_Soundfile,"string","The filename of the file","string","The file name or empty string on error") |
|
| ADE_FUNC (play, l_Soundfile,"[number volume = 1.0[, number panning = 0.0]]","Plays the sound","sound","A sound handle or invalid handle on error") |
|
| ADE_FUNC (isValid, l_Soundfile, NULL,"Checks if the soundfile handle is valid","boolean","true if valid, false otherwise") |
|
| ADE_VIRTVAR (Name, l_Persona,"string","The name of the persona","string","The name or empty string on error") |
|
| ADE_FUNC (isValid, l_Persona, NULL,"Detect if the handle is valid","boolean","true if valid, false otherwise") |
|
| ADE_VIRTVAR (Name, l_Message,"string","The name of the message as specified in the mission file","string","The name or an empty string if handle is invalid") |
|
| ADE_VIRTVAR (Message, l_Message,"string","The unaltered text of the message, see getMessage() for options to replace variables<br>""<b>NOTE:</b> Changing the text will also change the text for messages not yet played but already in the message queue!","string","The message or an empty string if handle is invalid") |
|
int | add_wave (const char *wave_name) |
|
| ADE_VIRTVAR (VoiceFile, l_Message,"soundfile","The voice file of the message","soundfile","The voice file handle or invalid handle when not present") |
|
| ADE_VIRTVAR (Persona, l_Message,"persona","The persona of the message","persona","The persona handle or invalid handle if not present") |
|
| ADE_FUNC (getMessage, l_Message,"[boolean replaceVars = true]","Gets the text of the message and optionally replaces SEXP variables with their respective values.","string","The message or an empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_Message, NULL,"Checks if the message handle is valid","boolean","true if valid, false otherwise") |
|
| ADE_INDEXER (l_Wing,"number Index","Array of ships in the wing","ship","Ship handle, or invalid ship handle if index is invalid or wing handle is invalid") |
|
| ADE_FUNC (__len, l_Wing, NULL,"Gets the number of ships in the wing","number","Number of ships in wing, or 0 if invalid handle") |
|
| ADE_VIRTVAR (Name, l_Wing,"string","Name of Wing","string","Wing name, or empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_Wing, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_INDEXER (l_Ship,"string Name/number Index","Array of ship subsystems","subsystem","Subsystem handle, or invalid subsystem handle if index or ship handle is invalid") |
|
| ADE_FUNC (__len, l_Ship, NULL,"Number of subsystems on ship","number","Subsystem number, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (ShieldArmorClass, l_Ship,"string","Current Armor class of the ships' shield","string","Armor class name, or empty string if none is set") |
|
| ADE_VIRTVAR (ArmorClass, l_Ship,"string","Current Armor class","string","Armor class name, or empty string if none is set") |
|
| ADE_VIRTVAR (Name, l_Ship,"string","Ship name","string","Ship name, or empty string if handle is invalid") |
|
| ADE_VIRTVAR (AfterburnerFuelLeft, l_Ship,"number","Afterburner fuel left","number","Afterburner fuel left, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (AfterburnerFuelMax, l_Ship,"number","Afterburner fuel capacity","number","Afterburner fuel capacity, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (Class, l_Ship,"shipclass","Ship class","shipclass","Ship class, or invalid shipclass handle if ship handle is invalid") |
|
| ADE_VIRTVAR (CountermeasuresLeft, l_Ship,"number","Number of countermeasures left","number","Countermeasures left, or 0 if ship handle is invalid") |
|
| ADE_VIRTVAR (CockpitDisplays, l_Ship,"displays","An array of the cockpit displays on this ship.<br>NOTE: Only the ship of the player has these","displays","displays handle or invalid handle on error") |
|
| ADE_VIRTVAR (CountermeasureClass, l_Ship,"weaponclass","Weapon class mounted on this ship's countermeasure point","weaponclass","Countermeasure hardpoint weapon class, or invalid weaponclass handle if no countermeasure class or ship handle is invalid") |
|
| ADE_VIRTVAR (HitpointsMax, l_Ship,"number","Total hitpoints","number","Ship maximum hitpoints, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (WeaponEnergyLeft, l_Ship,"number","Current weapon energy reserves","number","Ship current weapon energy reserve level, or 0 if invalid") |
|
| ADE_VIRTVAR (WeaponEnergyMax, l_Ship,"number","Maximum weapon energy","number","Ship maximum weapon energy reserve level, or 0 if invalid") |
|
| if (!ade_get_args(L,"o|f", l_Ship.GetPtr(&objh),&fov)) return ade_set_error(L |
|
| if (ADE_SETTING_VAR &&fov >=0.0f) |
|
return | ade_set_args (L,"f", shipp->autoaim_fov *180.0f/PI) |
|
| ADE_VIRTVAR (PrimaryTriggerDown, l_Ship,"boolean","Determines if primary trigger is pressed or not","boolean","True if pressed, false if not, nil if ship handle is invalid") |
|
| ADE_VIRTVAR (PrimaryBanks, l_Ship,"weaponbanktype","Array of primary weapon banks","weaponbanktype","Primary weapon banks, or invalid weaponbanktype handle if ship handle is invalid") |
|
| ADE_VIRTVAR (SecondaryBanks, l_Ship,"weaponbanktype","Array of secondary weapon banks","weaponbanktype","Secondary weapon banks, or invalid weaponbanktype handle if ship handle is invalid") |
|
| ADE_VIRTVAR (TertiaryBanks, l_Ship,"weaponbanktype","Array of tertiary weapon banks","weaponbanktype","Tertiary weapon banks, or invalid weaponbanktype handle if ship handle is invalid") |
|
| ADE_VIRTVAR (Target, l_Ship,"object","Target of ship. Value may also be a deriviative of the 'object' class, such as 'ship'.","object","Target object, or invalid object handle if no target or ship handle is invalid") |
|
| ADE_VIRTVAR (TargetSubsystem, l_Ship,"subsystem","Target subsystem of ship.","subsystem","Target subsystem, or invalid subsystem handle if no target or ship handle is invalid") |
|
| ADE_VIRTVAR (Team, l_Ship,"team","Ship's team","team","Ship team, or invalid team handle if ship handle is invalid") |
|
| ADE_VIRTVAR (Textures, l_Ship,"shiptextures","Gets ship textures","shiptextures","Ship textures, or invalid shiptextures handle if ship handle is invalid") |
|
| ADE_VIRTVAR (FlagAffectedByGravity, l_Ship,"boolean","Checks for the \"affected-by-gravity\" flag","boolean","True if flag is set, false if flag is not set and nil on error") |
|
void | ship_reset_disabled_physics (object *objp, int ship_class) |
|
| ADE_VIRTVAR (Disabled, l_Ship,"boolean","The disabled state of this ship","boolean","true if ship is diabled, false otherwise") |
|
| ADE_VIRTVAR (Stealthed, l_Ship,"boolean","Stealth status of this ship","boolean","true if stealthed, false otherwise or on error") |
|
| ADE_VIRTVAR (HiddenFromSensors, l_Ship,"boolean","Hidden from sensors status of this ship","boolean","true if invisible to hidden from sensors, false otherwise or on error") |
|
| ADE_VIRTVAR (Gliding, l_Ship,"boolean","Specifies whether this ship is currently gliding or not.","boolean","true if gliding, false otherwise or in case of error") |
|
| if (!ade_get_args(L,"o|i", l_Ship.GetPtr(&objh),&ets_idx)) return ade_set_error(L |
|
return | ade_set_args (L,"i", Ships[objh->objp->instance].engine_recharge_index) |
|
| ADE_VIRTVAR (Orders, l_Ship,"shiporders","Array of ship orders","shiporders","Ship orders, or invalid handle if ship handle is invalid") |
|
| ADE_FUNC (kill, l_Ship,"[object Killer]","Kills the ship. Set \"Killer\" to the ship you are killing to self-destruct","boolean","True if successful, false or nil otherwise") |
|
| ADE_FUNC (addShipEffect, l_Ship,"string name, int duration (in milliseconds)","Activates an effect for this ship. Effect names are defined in Post_processing.tbl, and need to be implemented in the main shader. This functions analogous to the ship-effect sexp. NOTE: only one effect can be active at any time, adding new effects will override effects already in progress.\n","boolean","Returns true if the effect was successfully added, false otherwise") |
|
| ADE_FUNC (hasShipExploded, l_Ship, NULL,"Checks if the ship explosion event has already happened","number","Returns 1 if first explosion timestamp is passed, 2 if second is passed, 0 otherwise") |
|
| ADE_FUNC (fireCountermeasure, l_Ship, NULL,"Launches a countermeasure from the ship","boolean","Whether countermeasure was launched or not") |
|
| if (!ade_get_args(L,"o", l_Ship.GetPtr(&objh))) return ade_set_error(L |
|
return | ade_set_args (L,"i", i) |
|
return | ade_set_args (L,"i", ship_fire_secondary(objh->objp, 0)) |
|
| if (!ade_get_args(L,"o|si", l_Ship.GetPtr(&objh),&s,&subtype)) return ade_set_error(L |
|
return | ade_set_args (L,"f", time_s) |
|
| ADE_FUNC (clearOrders, l_Ship, NULL,"Clears a ship's orders list","boolean","True if successful, otherwise false or nil") |
|
| ADE_FUNC (giveOrder, l_Ship,"enumeration Order, [object Target=nil, subsystem TargetSubsystem=nil, number Priority=1.0]","Uses the goal code to execute orders","boolean","True if order was given, otherwise false or nil") |
|
| ADE_FUNC (doManeuver, l_Ship,"number Duration, number Heading, number Pitch, number Bank, boolean Force Rotation, number Vertical, number Horizontal, number Forward, boolean Force Movement","Sets ship maneuver over the defined time period","boolean","True if maneuver order was given, otherwise false or nil") |
|
| ADE_FUNC (triggerAnimation, l_Ship,"string Type, [number Subtype, boolean Forwards]","Triggers an animation. Type is the string name of the animation type, ""Subtype is the subtype number, such as weapon bank #, and Forwards is boolean.""<br><strong>IMPORTANT: Function is in testing and should not be used with official mod releases</strong>","boolean","True if successful, false or nil otherwise") |
|
| ADE_FUNC (warpIn, l_Ship, NULL,"Warps ship in","boolean","True if successful, or nil if ship handle is invalid") |
|
| ADE_FUNC (warpOut, l_Ship, NULL,"Warps ship out","boolean","True if successful, or nil if ship handle is invalid") |
|
| ADE_FUNC (canWarp, l_Ship, NULL,"Checks whether ship has a working subspace drive and is allowed to use it","boolean","True if successful, or nil if ship handle is invalid") |
|
| ADE_FUNC (isWarpingIn, l_Ship, NULL,"Checks if ship is warping in","boolean","True if the ship is warping in, false or nil otherwise") |
|
| ADE_FUNC (getEMP, l_Ship, NULL,"Returns the current emp effect strength acting on the object","number","Current EMP effect strength or NIL if object is invalid") |
|
| ADE_FUNC (getTimeUntilExplosion, l_Ship, NULL,"Returns the time in seconds until the ship explodes","number","Time until explosion or -1, if invalid handle or ship isn't exploding") |
|
| ADE_FUNC (getCallsign, l_Ship, NULL,"Gets the callsign of the ship in the current mission","string","The callsign or an empty string if the ship doesn't have a callsign or an error occurs") |
|
| ADE_FUNC (getAltClassName, l_Ship, NULL,"Gets the alternate class name of the ship","string","The alternate class name or an empty string if the ship doesn't have such a thing or an error occurs") |
|
| ADE_FUNC (getMaximumSpeed, l_Ship,"[number energy = 0.333]","Gets the maximum speed of the ship with the given energy on the engines","number","The maximum speed or -1 on error") |
|
| ADE_FUNC (EtsSetIndexes, l_Ship,"number Engine Index, number Shield Index, number Weapon Index","Sets ships ETS systems to specified values","boolean","True if successful, false if target ships ETS was missing, or only has one system") |
|
| ADE_FUNC (getWing, l_Ship, NULL,"Returns the ship's wing","wing","Wing handle, or invalid wing handle if ship is not part of a wing") |
|
| ADE_VIRTVAR (Class, l_Weapon,"weaponclass","Weapon's class","weaponclass","Weapon class, or invalid weaponclass handle if weapon handle is invalid") |
|
| ADE_VIRTVAR (DestroyedByWeapon, l_Weapon,"boolean","Whether weapon was destroyed by another weapon","boolean","True if weapon was destroyed by another weapon, false if weapon was destroyed by another object or if weapon handle is invalid") |
|
| ADE_VIRTVAR (LifeLeft, l_Weapon,"number","Weapon life left (in seconds)","number","Life left (seconds) or 0 if weapon handle is invalid") |
|
| ADE_VIRTVAR (FlakDetonationRange, l_Weapon,"number","Range at which flak will detonate (meters)","number","Detonation range (meters) or 0 if weapon handle is invalid") |
|
| ADE_VIRTVAR (Target, l_Weapon,"object","Target of weapon. Value may also be a deriviative of the 'object' class, such as 'ship'.","object","Weapon target, or invalid object handle if weapon handle is invalid") |
|
| ADE_VIRTVAR (ParentTurret, l_Weapon,"subsystem","Turret which fired this weapon.","subsystem","Turret subsystem handle, or an invalid handle if the weapon not fired from a turret") |
|
| ADE_VIRTVAR (HomingObject, l_Weapon,"object","Object that weapon will home in on. Value may also be a deriviative of the 'object' class, such as 'ship'","object","Object that weapon is homing in on, or an invalid object handle if weapon is not homing or the weapon handle is invalid") |
|
| ADE_VIRTVAR (HomingPosition, l_Weapon,"vector","Position that weapon will home in on (World vector), setting this without a homing object in place will not have any effect!","vector","Homing point, or null vector if weapon handle is invalid") |
|
| ADE_VIRTVAR (HomingSubsystem, l_Weapon,"subsystem","Subsystem that weapon will home in on.","subsystem","Homing subsystem, or invalid subsystem handle if weapon is not homing or weapon handle is invalid") |
|
| ADE_VIRTVAR (Team, l_Weapon,"team","Weapon's team","team","Weapon team, or invalid team handle if weapon handle is invalid") |
|
| ADE_FUNC (isArmed, l_Weapon,"[boolean Hit target]","Checks if the weapon is armed.","boolean","boolean value of the weapon arming status") |
|
| ADE_FUNC (getCollisionInformation, l_Weapon, NULL,"Returns the collision information for this weapon","collision info","The collision information or invalid handle if none") |
|
| ADE_VIRTVAR (Class, l_Beam,"weaponclass","Weapon's class","weaponclass","Weapon class, or invalid weaponclass handle if beam handle is invalid") |
|
| ADE_VIRTVAR (LastShot, l_Beam,"vector","End point of the beam","vector","vector or null vector if beam handle is not valid") |
|
| ADE_VIRTVAR (LastStart, l_Beam,"vector","Start point of the beam","vector","vector or null vector if beam handle is not valid") |
|
| ADE_VIRTVAR (Target, l_Beam,"object","Target of beam. Value may also be a deriviative of the 'object' class, such as 'ship'.","object","Beam target, or invalid object handle if beam handle is invalid") |
|
| ADE_VIRTVAR (TargetSubsystem, l_Beam,"subsystem","Subsystem that beam is targeting.","subsystem","Target subsystem, or invalid subsystem handle if beam handle is invalid") |
|
| ADE_VIRTVAR (ParentShip, l_Beam,"object","Parent of the beam.","object","Beam parent, or invalid object handle if beam handle is invalid") |
|
| ADE_VIRTVAR (ParentSubsystem, l_Beam,"subsystem","Subsystem that beam is fired from.","subsystem","Parent subsystem, or invalid subsystem handle if beam handle is invalid") |
|
| ADE_FUNC (getCollisionCount, l_Beam, NULL,"Get the number of collisions in frame.","number","Number of beam collisions") |
|
| ADE_FUNC (getCollisionPosition, l_Beam,"number","Get the position of the defined collision.","vector","World vector") |
|
| ADE_FUNC (getCollisionInformation, l_Beam,"number","Get the collision information of the specified collision","collision info","handle to information or invalid handle on error") |
|
| ADE_FUNC (getCollisionObject, l_Beam,"number","Get the target of the defined collision.","object","Object the beam collided with") |
|
| ADE_FUNC (isExitCollision, l_Beam,"number","Checks if the defined collision was exit collision.","boolean","True if the collision was exit collision, false if entry, nil otherwise") |
|
| ADE_FUNC (getStartDirectionInfo, l_Beam, NULL,"Gets the start information about the direction. The vector is a normalized vector from LastStart showing the start direction of a slashing beam","vector","The start direction or null vector if invalid") |
|
| ADE_FUNC (getEndDirectionInfo, l_Beam, NULL,"Gets the end information about the direction. The vector is a normalized vector from LastStart showing the end direction of a slashing beam","vector","The start direction or null vector if invalid") |
|
| ADE_FUNC (isValid, l_Player, NULL,"Detects whether handle is valid","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_FUNC (getName, l_Player, NULL,"Gets current player name","string","Player name, or empty string if handle is invalid") |
|
| ADE_FUNC (getCampaignFilename, l_Player, NULL,"Gets current player campaign filename","string","Campaign name, or empty string if handle is invalid") |
|
| ADE_FUNC (getImageFilename, l_Player, NULL,"Gets current player image filename","string","Player image filename, or empty string if handle is invalid") |
|
| ADE_FUNC (getMainHallName, l_Player, NULL,"Gets player's current main hall name","string","Main hall name, or name of first mainhall in campaign if something goes wrong") |
|
| ADE_FUNC (getMainHallIndex, l_Player, NULL,"Gets player's current main hall number","number","Main hall index, or index of first mainhall in campaign if something goes wrong") |
|
| ADE_FUNC (getSquadronName, l_Player, NULL,"Gets current player squad name","string","Squadron name, or empty string if handle is invalid") |
|
| ADE_FUNC (getMultiSquadronName, l_Player, NULL,"Gets current player multi squad name","string","Squadron name, or empty string if handle is invalid") |
|
| ADE_FUNC (__tostring, l_Camera, NULL,"Camera name","string","Camera name, or an empty string if handle is invalid") |
|
| ADE_FUNC (isValid, l_Camera, NULL,"True if valid, false or nil if not","boolean","true if valid, false if handle is invalid, nil if a syntax/type error occurs") |
|
| ADE_VIRTVAR (Name, l_Camera,"string","New camera name","string","Camera name") |
|
| ADE_VIRTVAR (FOV, l_Camera,"number","New camera FOV (in radians)","number","Camera FOV (in radians)") |
|
| ADE_VIRTVAR (Orientation, l_Camera,"orientation","New camera orientation","orientation","Camera orientation") |
|
| ADE_VIRTVAR (Position, l_Camera,"vector","New camera position","vector","Camera position") |
|
| ADE_VIRTVAR (Self, l_Camera,"object","New mount object","object","Camera object") |
|
| ADE_VIRTVAR (SelfSubsystem, l_Camera,"subsystem","New mount object subsystem","subsystem","Subsystem that the camera is mounted on") |
|
| ADE_VIRTVAR (Target, l_Camera,"object","New target object","object","Camera target object") |
|
| ADE_VIRTVAR (TargetSubsystem, l_Camera,"subsystem","New target subsystem","subsystem","Subsystem that the camera is pointed at") |
|
| ADE_FUNC (setFOV, l_Camera,"[number FOV, number Zoom Time, number Zoom Acceleration Time, number Zoom deceleration Time]","Sets camera FOV""<br>FOV is the final field of view, in radians, of the camera.""<br>Zoom Time is the total time to take zooming in or out.""<br>Acceleration Time is the total time it should take the camera to get up to full zoom speed.""<br>Deceleration Time is the total time it should take the camera to slow down from full zoom speed.","boolean","true if successful, false or nil otherwise") |
|
| ADE_FUNC (setOrientation, l_Camera,"[world orientation Orientation, number Rotation Time, number Acceleration Time, number Deceleration time]","Sets camera orientation and velocity data.""<br>Orientation is the final orientation for the camera, after it has finished moving. If not specified, the camera will simply stop at its current orientation.""<br>Rotation time (seconds) is how long total, including acceleration, the camera should take to rotate. If it is not specified, the camera will jump to the specified orientation.""<br>Acceleration time (seconds) is how long it should take the camera to get 'up to speed'. If not specified, the camera will instantly start moving.""<br>Deceleration time (seconds) is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.","boolean","true if successful, false or nil otherwise") |
|
| ADE_FUNC (setPosition, l_Camera,"[wvector Position, number Translation Time, number Acceleration Time, number Deceleration Time]","Sets camera position and velocity data.""<br>Position is the final position for the camera. If not specified, the camera will simply stop at its current position.""<br>Translation time (seconds) is how long total, including acceleration, the camera should take to move. If it is not specified, the camera will jump to the specified position.""<br>Acceleration time (seconds) is how long it should take the camera to get 'up to speed'. If not specified, the camera will instantly start moving.""<br>Deceleration time (seconds) is how long it should take the camera to slow down. If not specified, the camera will instantly stop moving.","boolean","true if successful, false or nil otherwise") |
|
| ADE_VIRTVAR (Pitch, l_Control_Info,"number","Pitch of the player ship","number","Pitch") |
|
| ADE_VIRTVAR (Heading, l_Control_Info,"number","Heading of the player ship","number","Heading") |
|
| ADE_VIRTVAR (Bank, l_Control_Info,"number","Bank of the player ship","number","Bank") |
|
| ADE_VIRTVAR (Vertical, l_Control_Info,"number","Vertical control of the player ship","number","Vertical control") |
|
| ADE_VIRTVAR (Sideways, l_Control_Info,"number","Sideways control of the player ship","number","Sideways control") |
|
| ADE_VIRTVAR (Forward, l_Control_Info,"number","Forward control of the player ship","number","Forward") |
|
| ADE_VIRTVAR (ForwardCruise, l_Control_Info,"number","Forward control of the player ship","number","Forward") |
|
| ADE_VIRTVAR (PrimaryCount, l_Control_Info,"number","Number of primary weapons that will fire","number","Number of weapons to fire, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (SecondaryCount, l_Control_Info,"number","Number of secondary weapons that will fire","number","Number of weapons to fire, or 0 if handle is invalid") |
|
| ADE_VIRTVAR (CountermeasureCount, l_Control_Info,"number","Number of countermeasures that will launch","number","Number of countermeasures to launch, or 0 if handle is invalid") |
|
| ADE_FUNC (clearLuaButtonInfo, l_Control_Info, NULL,"Clears the lua button control info", NULL, NULL) |
|
| ADE_FUNC (getButtonInfo, l_Control_Info, NULL,"Access the four bitfields containing the button info","number, number, number,number","Four bitfields") |
|
| ADE_FUNC (accessButtonInfo, l_Control_Info,"number, number, number, number","Access the four bitfields containing the button info","number, number, number,number","Four bitfields") |
|
| ADE_FUNC (useButtonControl, l_Control_Info,"number, string","Adds the defined button control to lua button control data, if number is -1 it tries to use the string", NULL, NULL) |
|
| ADE_FUNC (getButtonControlName, l_Control_Info,"number","Gives the name of the command corresponding with the given number","string","Name of the command") |
|
| ADE_FUNC (getButtonControlNumber, l_Control_Info,"string","Gives the number of the command corresponding with the given string","number","Number of the command") |
|
| ADE_VIRTVAR (AllButtonPolling, l_Control_Info,"boolean","Toggles the all button polling for lua","boolean","If the all button polling is enabled or not") |
|
| ADE_FUNC (pollAllButtons, l_Control_Info, NULL,"Access the four bitfields containing the button info","number, number, number,number","Four bitfields") |
|
| if (!ade_get_args(L,"o|o", l_Particle.GetPtr(&ph), l_Vector.Get(&newVec))) return ade_set_error(L |
|
| if (ph==NULL) return ade_set_error(L |
|
| if (!ph->isValid()) return ade_set_error(L |
|
return | ade_set_args (L,"o", l_Vector.Set(ph->Get() ->pos)) |
|
return | ade_set_args (L,"o", l_Vector.Set(ph->Get() ->velocity)) |
|
| ADE_VIRTVAR (Age, l_Particle,"number","The time this particle already lives","number","The current age or -1 on error") |
|
| ADE_VIRTVAR (MaximumLife, l_Particle,"number","The time this particle can live","number","The maximal life or -1 on error") |
|
| ADE_VIRTVAR (Radius, l_Particle,"number","The radius of the particle","number","The radius or -1 on error") |
|
| ADE_VIRTVAR (TracerLength, l_Particle,"number","The tracer legth of the particle","number","The radius or -1 on error") |
|
| ADE_VIRTVAR (AttachedObject, l_Particle,"object","The object this particle is attached to. If valid the position will be relativ to this object and the velocity will be ignored.","object","Attached object or invalid object handle on error") |
|
| ADE_FUNC (isValid, l_Particle, NULL,"Detects whether this handle is valid","boolean","true if valid false if not") |
|
| ADE_FUNC (getSoundentry, l_Audio,"string/number","Return a sound entry matching the specified index or name. If you are using a number then the first valid index is 1","soundentry","soundentry or invalid handle on error") |
|
| ADE_FUNC (loadSoundfile, l_Audio,"string filename","Loads the specified sound file","soundfile","A soundfile handle") |
|
| ADE_FUNC (playSound, l_Audio,"soundentry","Plays the specified sound entry handle","sound","A handle to the playing sound") |
|
| ADE_FUNC (playLoopingSound, l_Audio,"soundentry","Plays the specified sound as a looping sound","sound","A handle to the playing sound or invalid handle if playback failed") |
|
| ADE_FUNC (play3DSound, l_Audio,"soundentry[, vector source[, vector listener]]","Plays the specified sound entry handle. Source if by default 0, 0, 0 and listener is by default the current viewposition","3Dsound","A handle to the playing sound") |
|
| ADE_FUNC (playGameSound, l_Audio,"Sound index, [Panning (-1.0 left to 1.0 right), Volume %, Priority 0-3, Voice Message?]","Plays a sound from #Game Sounds in sounds.tbl. A priority of 0 indicates that the song must play; 1-3 will specify the maximum number of that sound that can be played","boolean","True if sound was played, false if not (Replaced with a sound instance object in the future)") |
|
| ADE_FUNC (playInterfaceSound, l_Audio,"Sound index","Plays a sound from #Interface Sounds in sounds.tbl","boolean","True if sound was played, false if not") |
|
| ADE_FUNC (playMusic, l_Audio,"string Filename, [float volume = 1.0, bool looping = true]","Plays a music file using FS2Open's builtin music system. Volume is currently ignored, uses players music volume setting. Files passed to this function are looped by default.","number","Audiohandle of the created audiostream, or -1 on failure") |
|
| ADE_FUNC (stopMusic, l_Audio,"int audiohandle, [bool fade = false], [string 'briefing|credits|mainhall']","Stops a playing music file, provided audiohandle is valid. If the 3rd arg is set to one of briefing,credits,mainhall then that music will be stopped despite the audiohandle given.", NULL, NULL) |
|
| ADE_FUNC (pauseMusic, l_Audio,"int audiohandle, bool pause","Pauses or unpauses a playing music file, provided audiohandle is valid. The boolean argument should be true to pause and false to unpause. If the audiohandle is -1, *all* audio streams are paused or unpaused.", NULL, NULL) |
|
| ADE_FUNC (print, l_Base,"string Message","Prints a string", NULL, NULL) |
|
| ADE_FUNC (error, l_Base,"string Message","Displays a FreeSpace error message with the string provided", NULL, NULL) |
|
| ADE_FUNC (createOrientation, l_Base,"[p/r1c1, b/r1c2, h/r1c3, r2c1, r2c2, r2c3, r3c1, r3c2, r3c3]","Given 0, 3, or 9 arguments, creates an orientation object with that orientation.","orientation","New orientation object, or null orientation on failure") |
|
| ADE_FUNC (createVector, l_Base,"[x, y, z]","Creates a vector object","vector","Vector object") |
|
| ADE_FUNC (getFrametime, l_Base,"[Do not adjust for time compression (Boolean)]","Gets how long this frame is calculated to take. Use it to for animations, physics, etc to make incremental changes.","number","Frame time (seconds)") |
|
| ade_get_args (L,"|i",&depth) |
|
| if (depth > gameseq_get_depth()) return ade_set_args(L |
|
l_GameState | Set (gamestate_h())) |
|
return | ade_set_args (L,"o", l_GameState.Set(gamestate_h(gameseq_get_state(depth)))) |
|
| ADE_FUNC (getCurrentMPStatus, l_Base,"NIL","Gets this computers current MP status","string","Current MP status") |
|
| ADE_FUNC (getCurrentPlayer, l_Base, NULL,"Gets a handle of the currently used player.<br><b>Note:</b> If there is no current player then the first player will be returned, check the game state to make sure you have a valid player handle.","player","Player handle") |
|
| ADE_FUNC (setControlMode, l_Base,"NIL or enumeration LE_*_CONTROL","Sets the current control mode for the game.","string","Current control mode") |
|
| ADE_FUNC (setButtonControlMode, l_Base,"NIL or enumeration LE_*_BUTTON_CONTROL","Sets the current control mode for the game.","string","Current control mode") |
|
| ADE_FUNC (getControlInfo, l_Base, NULL,"Gets the control info handle.","control info","control info handle") |
|
| ADE_FUNC (setTips, l_Base,"True or false","Sets whether to display tips of the day the next time the current pilot enters the mainhall.", NULL, NULL) |
|
| ADE_FUNC (getGameDifficulty, l_Base, NULL,"Returns the difficulty level from 1-5, 1 being the lowest, (Very Easy) and 5 being the highest (Insane)","integer","Difficulty level as integer") |
|
| ADE_FUNC (postGameEvent, l_Base,"gameevent Event","Sets current game event. Note that you can crash FreeSpace 2 by posting an event at an improper time, so test extensively if you use it.","boolean","True if event was posted, false if passed event was invalid") |
|
| ADE_INDEXER (l_Base_Events,"number Index/string Name","Array of game events","gameevent","Game event, or invalid gameevent handle if index is invalid") |
|
| ADE_FUNC (__len, l_Base_Events, NULL,"Number of events","number","Number of events") |
|
| ADE_INDEXER (l_Base_States,"number Index/string Name","Array of game states","gamestate","Game state, or invalid gamestate handle if index is invalid") |
|
| ADE_FUNC (__len, l_Base_States, NULL,"Number of states","number","Number of states") |
|
int | l_cf_get_path_id (char *n_path) |
|
| ADE_FUNC (deleteFile, l_CFile,"string Filename, string Path","Deletes given file. Path must be specified. Use a slash for the root directory.","boolean","True if deleted, false") |
|
| ADE_FUNC (fileExists, l_CFile,"string Filename, [string Path = \"\", boolean CheckVPs = false]","Checks if a file exists. Use a blank string for path for any directory, or a slash for the root directory.","boolean","True if file exists, false or nil otherwise") |
|
| ADE_FUNC (openFile, l_CFile,"string Filename, [string Mode=\"r\", string Path = \"\"]","Opens a file. 'Mode' uses standard C fopen arguments. Use a blank string for path for any directory, or a slash for the root directory.""Be EXTREMELY CAREFUL when using this function, as you may PERMANENTLY delete any file by accident","file","File handle, or invalid file handle if the specified file couldn't be opened") |
|
| ADE_FUNC (openTempFile, l_CFile, NULL,"Opens a temp file that is automatically deleted when closed","file","File handle, or invalid file handle if tempfile couldn't be created") |
|
| ADE_FUNC (renameFile, l_CFile,"string CurrentFilename, string NewFilename, string Path","Renames given file. Path must be specified. Use a slash for the root directory.","boolean","True if file was renamed, otherwise false") |
|
| ADE_FUNC (getMouseX, l_Mouse, NULL,"Gets Mouse X pos","number","Mouse x position, or 0 if mouse is not initialized yet") |
|
| ADE_FUNC (getMouseY, l_Mouse, NULL,"Gets Mouse Y pos","number","Mouse y position, or 0 if mouse is not initialized yet") |
|
| ADE_FUNC (isMouseButtonDown, l_Mouse,"{MOUSE_*_BUTTON enumeration}, [..., ...]","Returns whether the specified mouse buttons are up or down","boolean","Whether specified mouse buttons are down, or false if mouse is not initialized yet") |
|
| if (!ade_get_args(L,"s|o",&s, l_Enum.GetPtr(&u))) return ADE_RETURN_NIL |
|
| if (u!=NULL) |
|
| gr_set_cursor_bitmap (bm_load(s), ul) |
|
| ADE_FUNC (setCursorHidden, l_Mouse,"True to hide mouse, false to show it","Shows or hides mouse cursor", NULL, NULL) |
|
| if (!(ade_get_args(L,"ii",&x,&y))) return ADE_RETURN_FALSE |
|
| if (!((x >=0)&&(x<=gr_screen.max_w))) return ADE_RETURN_FALSE |
|
| if (!((y >=0)&&(y<=gr_screen.max_h))) return ADE_RETURN_FALSE |
|
| mouse_set_pos (x, y) |
|
| ADE_VIRTVAR (MouseControlStatus, l_Mouse,"boolean","Gets and sets the retail mouse control status","boolean","if the retail mouse is on or off") |
|
| ADE_FUNC (getMouseSensitivity, l_Mouse, NULL,"Gets mouse sensitivity setting","number","Mouse sensitivity in range of 0-9") |
|
| ADE_FUNC (getJoySensitivity, l_Mouse, NULL,"Gets joystick sensitivity setting","number","Joystick sensitivity in range of 0-9") |
|
| ADE_FUNC (getJoyDeadzone, l_Mouse, NULL,"Gets joystick deadzone setting","number","Joystick deadzone in range of 0-9") |
|
| ADE_FUNC (updateTrackIR, l_Mouse, NULL,"Updates Tracking Data. Call before using get functions","boolean","Checks if trackir is available and updates variables, returns true if successful, otherwise false") |
|
| ADE_FUNC (getTrackIRPitch, l_Mouse, NULL,"Gets pitch axis from last update","number","Pitch value -1 to 1, or 0 on failure") |
|
| ADE_FUNC (getTrackIRYaw, l_Mouse, NULL,"Gets yaw axis from last update","number","Yaw value -1 to 1, or 0 on failure") |
|
| ADE_FUNC (getTrackIRRoll, l_Mouse, NULL,"Gets roll axis from last update","number","Roll value -1 to 1, or 0 on failure") |
|
| ADE_FUNC (getTrackIRX, l_Mouse, NULL,"Gets x position from last update","number","X value -1 to 1, or 0 on failure") |
|
| ADE_FUNC (getTrackIRY, l_Mouse, NULL,"Gets y position from last update","number","Y value -1 to 1, or 0 on failure") |
|
| ADE_FUNC (getTrackIRZ, l_Mouse, NULL,"Gets z position from last update","number","Z value -1 to 1, or 0 on failure") |
|
| ADE_VIRTVAR (HUDDrawn, l_HUD,"boolean","Current HUD draw status","boolean","If the HUD is drawn or not") |
|
| ADE_VIRTVAR (HUDDisabledExceptMessages, l_HUD,"boolean","Specifies if only the messages gauges of the hud are drawn","boolean","true if only the message gauges are drawn, false otherwise") |
|
| if (!ade_get_args(L,"i|iiii",&idx,&r,&g,&b,&a)) return ADE_RETURN_FALSE |
|
| if ((idx< 0)||(idx >=NUM_HUD_GAUGES)) return ADE_RETURN_FALSE |
|
| if (!ade_get_args(L,"i",&idx)) return ADE_RETURN_NIL |
|
return | ade_set_args (L,"iiii",(int) c.red,(int) c.green,(int) c.blue,(int) c.alpha) |
|
| ADE_FUNC (getHUDGaugeHandle, l_HUD,"string Name","Returns a handle to a specified HUD gauge","HudGauge","HUD Gauge handle, or nil if invalid") |
|
| ADE_INDEXER (l_Graphics_Cameras,"number Index/string Name","Gets camera","camera","Ship handle, or invalid ship handle if index was invalid") |
|
| ADE_FUNC (__len, l_Graphics_Cameras, NULL,"Gets number of cameras","number","Number of cameras") |
|
| ADE_FUNC (__len, l_Graphics_Fonts, NULL,"Number of loaded fonts","number","Number of loaded fonts") |
|
| ADE_INDEXER (l_Graphics_Fonts,"number Index/string Filename","Array of loaded fonts","font","Font handle, or invalid font handle if index is invalid") |
|
| ADE_VIRTVAR (CurrentFont, l_Graphics,"font","Current font","font", NULL) |
|
| ADE_INDEXER (l_Graphics_Posteffects,"number index","Gets the name of the specified post processing index","string","post processing name or empty string on error") |
|
| ADE_FUNC (__len, l_Graphics_Posteffects, NULL,"Gets the number or available post processing effects","number","number of post processing effects or 0 on error") |
|
| ADE_FUNC (setPostEffect, l_Graphics,"string name, [number value=0]","Sets the intensity of the specified post processing effect","boolean","true when successful, false otherwise") |
|
| ADE_FUNC (resetPostEffects, l_Graphics, NULL,"Resets all post effects to their default values","boolean","true if successful, false otherwise") |
|
| ADE_VIRTVAR (CurrentOpacityType, l_Graphics,"enumeration","Current alpha blending type; uses ALPHABLEND_* enumerations","enumeration", NULL) |
|
| ADE_VIRTVAR (CurrentRenderTarget, l_Graphics,"texture","Current rendering target","texture","Current rendering target, or invalid texture handle if screen is render target") |
|
| ADE_FUNC (clearScreen, l_Graphics,"[integer red, number green, number blue, number alpha]","Clears the screen to black, or the color specified.", NULL, NULL) |
|
| ADE_FUNC (createCamera, l_Graphics,"string Name, [wvector Position, orientation Orientation]","Creates a new camera using the specified position and orientation (World)","camera","Camera handle, or invalid camera handle if camera couldn't be created") |
|
| ADE_FUNC (isMenuStretched, l_Graphics, NULL,"Returns whether the standard interface is stretched","boolean","True if stretched, false if aspect ratio is maintained") |
|
| ADE_FUNC (getScreenWidth, l_Graphics, NULL,"Gets screen width","number","Width in pixels, or 0 if graphics are not initialized yet") |
|
| ADE_FUNC (getScreenHeight, l_Graphics, NULL,"Gets screen height","number","Height in pixels, or 0 if graphics are not initialized yet") |
|
return | ade_set_args (L,"i", gr_screen.center_w) |
|
| ADE_FUNC (getCenterOffsetX, l_Graphics, NULL,"Gets X offset of center monitor","number","X offset of center monitor in pixels") |
|
| ADE_FUNC (getCenterOffsetY, l_Graphics, NULL,"Gets Y offset of center monitor","number","Y offset of center monitor in pixels") |
|
| ADE_FUNC (getCurrentCamera, l_Graphics,"[boolean]","Gets the current camera handle, if argument is <i>true</i> then it will also return the main camera when no custom camera is in use","camera","camera handle or invalid handle on error") |
|
| ADE_FUNC (getVectorFromCoords, l_Graphics,"[number X=center, number Y=center, number Depth, boolean normalize = false]","Returns a vector through screen coordinates x and y. ""If depth is specified, vector is extended to Depth units into space""If normalize is true, vector will be normalized.","vector","Vector, or zero vector on failure") |
|
| ADE_FUNC (setTarget, l_Graphics,"[texture Texture]","If texture is specified, sets current rendering surface to a texture.""Otherwise, sets rendering surface back to screen.","boolean","True if successful, false otherwise") |
|
| ADE_FUNC (setCamera, l_Graphics,"[camera handle Camera]","Sets current camera, or resets camera if none specified","boolean","true if successful, false or nil otherwise") |
|
| ADE_FUNC (setColor, l_Graphics,"integer Red, number Green, number Blue, [integer Alpha]","Sets 2D drawing color; each color number should be from 0 (darkest) to 255 (brightest)", NULL, NULL) |
|
| ADE_FUNC (setLineWidth, l_Graphics,"[number width=1.0]","Sets the line width for lines. This call might fail if the specified width is not supported by the graphics implementation. Then the width will be the nearest supported value.","boolean","true if succeeded, false otherwise") |
|
| ADE_FUNC (drawCircle, l_Graphics,"number Radius, number X, number Y, [boolean Filled=true]","Draws a circle", NULL, NULL) |
|
| ADE_FUNC (drawArc, l_Graphics,"number Radius, number X, number Y, number StartAngle, number EndAngle, [boolean Filled=true]","Draws an arc", NULL, NULL) |
|
| ADE_FUNC (drawCurve, l_Graphics,"number X, number Y, number Radius","Draws a curve", NULL, NULL) |
|
| ADE_FUNC (drawGradientLine, l_Graphics,"number X1, number Y1, number X2, number Y2","Draws a line from (x1,y1) to (x2,y2) with the CurrentColor that steadily fades out", NULL, NULL) |
|
| ADE_FUNC (drawLine, l_Graphics,"number X1, number Y1, number X2, number Y2","Draws a line from (x1,y1) to (x2,y2) with CurrentColor", NULL, NULL) |
|
| ADE_FUNC (drawPixel, l_Graphics,"number X, number Y","Sets pixel to CurrentColor", NULL, NULL) |
|
| ADE_FUNC (drawPolygon, l_Graphics,"texture Texture, [vector Position={0,0,0}, orientation Orientation=nil, number Width=1.0, number Height=1.0]","Draws a polygon. May not work properly in hooks other than On Object Render.", NULL, NULL) |
|
| ADE_FUNC (drawRectangle, l_Graphics,"number X1, number Y1, number X2, number Y2, [boolean Filled=true]","Draws a rectangle with CurrentColor", NULL, NULL) |
|
| ADE_FUNC (drawSphere, l_Graphics,"[number Radius = 1.0, vector Position]","Draws a sphere with radius Radius at world vector Position. May not work properly in hooks other than On Object Render.","boolean","True if successful, false or nil otherwise") |
|
| ADE_FUNC (drawModel, l_Graphics,"model, position, orientation","Draws the given model with the specified position and orientation - Use with extreme care, may not work properly in all scripting hooks.","int","Zero if successful, otherwise an integer error code") |
|
| ADE_FUNC (drawModelOOR, l_Graphics,"model Model, vector Position, matrix Orientation, [integer Flags]","Draws the given model with the specified position and orientation - Use with extreme care, designed to operate properly only in On Object Render hooks.","int","Zero if successful, otherwise an integer error code") |
|
| ADE_FUNC (drawTargetingBrackets, l_Graphics,"object Object, [boolean draw=true, int padding=5]","Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.","number,number,number,number","Left, top, right, and bottom positions of the brackets, or nil if invalid") |
|
| ADE_FUNC (drawSubsystemTargetingBrackets, l_Graphics,"subsystem subsys, [boolean draw=true, boolean setColor=false]","Gets the edge position of the targeting brackets drawn for a subsystem as if they were drawn on the HUD. Only actually draws the brackets if <i>draw</i> is true, optionally sets the color the as if it was drawn on the HUD","number,number,number,number","Left, top, right, and bottom positions of the brackets, or nil if invalid or off-screen") |
|
| ADE_FUNC (drawOffscreenIndicator, l_Graphics,"object Object, [boolean draw=true, boolean setColor=false]","Draws an off-screen indicator for the given object. The indicator will not be drawn if draw=false, but the coordinates will be returned in either case. The indicator will be drawn using the current color if setColor=true and using the IFF color of the object if setColor=false.","number,number","Coordinates of the indicator (at the very edge of the screen), or nil if object is on-screen") |
|
| ADE_FUNC (drawString, l_Graphics,"string Message, [number X1, number Y1, number X2, number Y2]","Draws a string. Use x1/y1 to control position, x2/y2 to limit textbox size.""Text will automatically move onto new lines, if x2/y2 is specified.""Additionally, calling drawString with only a string argument will automatically""draw that string below the previously drawn string (or 0,0 if no strings""have been drawn yet","number","Number of lines drawn, or 0 on failure") |
|
| ADE_FUNC (getStringWidth, l_Graphics,"string String","Gets string width","number","String width, or 0 on failure") |
|
| ADE_FUNC (createTexture, l_Graphics,"[number Width=512, number Height=512, enumeration Type=TEXTURE_DYNAMIC]","Creates a texture for rendering to.""Types are TEXTURE_STATIC - for infrequent rendering - and TEXTURE_DYNAMIC - for frequent rendering.","texture","New texture handle, or invalid texture handle if texture couldn't be created") |
|
| ADE_FUNC (loadTexture, l_Graphics,"string Filename, [boolean LoadIfAnimation, boolean NoDropFrames]","Gets a handle to a texture. If second argument is set to true, animations will also be loaded.""If third argument is set to true, every other animation frame will not be loaded if system has less than 48 MB memory.""<br><strong>IMPORTANT:</strong> Textures will not be unload themselves unless you explicitly tell them to do so.""When you are done with a texture, call the Unload() function to free up memory.","texture","Texture handle, or invalid texture handle if texture couldn't be loaded") |
|
| ADE_FUNC (drawImage, l_Graphics,"string Filename/texture Texture, [number X1=0, Y1=0, number X2, number Y2, number UVX1 = 0.0, number UVY1 = 0.0, number UVX2=1.0, number UVY2=1.0, number alpha=1.0]","Draws an image or texture. Any image extension passed will be ignored.""The UV variables specify the UV value for each corner of the image. ""In UV coordinates, (0,0) is the top left of the image; (1,1) is the lower right.","boolean","Whether image was drawn") |
|
| ADE_FUNC (drawMonochromeImage, l_Graphics,"string Filename/texture Texture, number X1, number Y1, [number X2, number Y2, number alpha=1.0]","Draws a monochrome image using the current color","boolean","Whether image was drawn") |
|
| ADE_FUNC (getImageWidth, l_Graphics,"string Filename","Gets image width","number","Image width, or 0 if filename is invalid") |
|
| ADE_FUNC (getImageHeight, l_Graphics,"Image name","Gets image height","number","Image height, or 0 if filename is invalid") |
|
| ADE_FUNC (flashScreen, l_Graphics,"number Red, number Green, number Blue","Flashes the screen", NULL, NULL) |
|
| ADE_FUNC (loadModel, l_Graphics,"string Filename","Loads the model - will not setup subsystem data, DO NOT USE FOR LOADING SHIP MODELS","model","Handle to a model") |
|
| ADE_FUNC (hasViewmode, l_Graphics,"enumeration","Specifies if the current viemode has the specified flag, see VM_* enumeration","boolean","true if flag is present, false otherwise") |
|
| ADE_FUNC (setClip, l_Graphics,"x, y, width, height","Sets the clipping region to the specified rectangle. Most drawing functions are able to handle the offset.","boolean","true if successful, false otherwise") |
|
| ADE_FUNC (resetClip, l_Graphics, NULL,"Resets the clipping region that might have been set","boolean","true if successful, false otherwise") |
|
| ADE_INDEXER (l_HookVar_Globals,"number Index","Array of current HookVariable names","string","Hookvariable name, or empty string if invalid index specified") |
|
| ADE_FUNC (__len, l_HookVar_Globals, NULL,"Number of HookVariables","number","Number of HookVariables") |
|
| ADE_FUNC (getObjectFromSignature, l_Mission,"number Signature","Gets a handle of an object from its signature","object","Handle of object with signaure, invalid handle if signature is not in use") |
|
| ADE_FUNC (evaluateSEXP, l_Mission,"string","Runs the defined SEXP script","boolean","if the operation was successful") |
|
| ADE_FUNC (runSEXP, l_Mission,"string","Runs the defined SEXP script","boolean","if the operation was successful") |
|
| ADE_INDEXER (l_Mission_Asteroids,"number Index","Gets asteroid","asteroid","Asteroid handle, or invalid handle if invalid index specified") |
|
| ADE_FUNC (__len, l_Mission_Asteroids, NULL,"Number of asteroids in mission. Note that the value returned is only good until an asteroid is destroyed, and so cannot be relied on for more than one frame.","number","Number of asteroids in the mission, or 0 if asteroids are not enabled") |
|
| ADE_INDEXER (l_Mission_Debris,"number Index","Array of debris in the current mission","debris","Debris handle, or invalid debris handle if index wasn't valid") |
|
| ADE_FUNC (__len, l_Mission_Debris, NULL,"Number of debris pieces in the mission. ""Note that the value returned is only good until a piece of debris is destroyed, and so cannot be relied on for more than one frame.","number","Current number of debris particles") |
|
| ADE_INDEXER (l_Mission_EscortShips,"number Index","Gets escort ship at specified index on escort list","ship","Specified ship, or invalid ship handle if invalid index") |
|
| ADE_FUNC (__len, l_Mission_EscortShips, NULL,"Current number of escort ships","number","Current number of escort ships") |
|
| ADE_INDEXER (l_Mission_Events,"number Index/string Name","Indexes events list","event","Event handle, or invalid event handle if index was invalid") |
|
| ADE_FUNC (__len, l_Mission_Events, NULL,"Number of events in mission","number","Number of events in mission") |
|
| ADE_INDEXER (l_Mission_SEXPVariables,"number Index/string Name","Array of SEXP variables. Note that you can set a sexp variable using the array, eg \'SEXPVariables[\"newvariable\"] = \"newvalue\"\'","sexpvariable","Handle to SEXP variable, or invalid sexpvariable handle if index was invalid") |
|
| ADE_FUNC (__len, l_Mission_SEXPVariables, NULL,"Current number of SEXP variables","number","Counts number of loaded SEXP Variables. May be slow.") |
|
| ADE_INDEXER (l_Mission_Ships,"number Index/string Name","Gets ship","ship","Ship handle, or invalid ship handle if index was invalid") |
|
| ADE_FUNC (__len, l_Mission_Ships, NULL,"Number of ships in the mission. ""This function is somewhat slow, and should be set to a variable for use in looping situations. ""Note that the value returned is only good until a ship is destroyed, and so cannot be relied on for more than one frame.","number","Number of ships in the mission, or 0 if ships haven't been initialized yet") |
|
| ADE_INDEXER (l_Mission_Waypoints,"number Index","Array of waypoints in the current mission","waypoint","Waypoint handle, or invalid waypoint handle if index was invalid") |
|
| ADE_FUNC (__len, l_Mission_Waypoints, NULL,"Gets number of waypoints in mission. Note that this is only accurate for one frame.","number","Number of waypoints in the mission") |
|
| ADE_INDEXER (l_Mission_WaypointLists,"number Index/string WaypointListName","Array of waypoint lists","waypointlist","Gets waypointlist handle") |
|
| ADE_FUNC (__len, l_Mission_WaypointLists, NULL,"Number of waypoint lists in mission. Note that this is only accurate for one frame.","number","Number of waypoint lists in the mission") |
|
| ADE_INDEXER (l_Mission_Weapons,"number Index","Gets handle to a weapon object in the mission.","weapon","Weapon handle, or invalid weapon handle if index is invalid") |
|
| ADE_FUNC (__len, l_Mission_Weapons, NULL,"Number of weapon objects in mission. Note that this is only accurate for one frame.","number","Number of weapon objects in mission") |
|
| ADE_INDEXER (l_Mission_Beams,"number Index","Gets handle to a beam object in the mission.","beam","Beam handle, or invalid beam handle if index is invalid") |
|
| ADE_FUNC (__len, l_Mission_Beams, NULL,"Number of beam objects in mission. Note that this is only accurate for one frame.","number","Number of beam objects in mission") |
|
| ADE_FUNC (getNextMissionFilename, l_Campaign, NULL,"Gets next mission filename","string","Next mission filename, or nil if the next mission is invalid") |
|
| ADE_FUNC (getPrevMissionFilename, l_Campaign, NULL,"Gets previous mission filename","string","Previous mission filename, or nil if the previous mission is invalid") |
|
| ADE_FUNC (jumpToMission, l_Campaign,"string filename, [boolean hub]","Jumps to a mission based on the filename. Optionally, the player can be sent to a hub mission without setting missions to skipped.","boolean","Jumps to a mission, or returns nil.") |
|
| ADE_INDEXER (l_Mission_Wings,"number Index/string WingName","Wings in the mission","wing","Wing handle, or invalid wing handle if index or name was invalid") |
|
| ADE_FUNC (__len, l_Mission_Wings, NULL,"Number of wings in mission","number","Number of wings in mission") |
|
| ADE_INDEXER (l_Mission_Teams,"number Index/string TeamName","Teams in the mission","team","Team handle or invalid team handle if the requested team could not be found") |
|
| ADE_FUNC (__len, l_Mission_Teams, NULL,"Number of teams in mission","number","Number of teams in mission") |
|
| ADE_INDEXER (l_Mission_Messages,"number Index/string messageName","Messages of the mission","message","Message handle or invalid handle on error") |
|
| ADE_FUNC (__len, l_Mission_Messages, NULL,"Number of messages in the mission","number","Number of messages in mission") |
|
| ADE_INDEXER (l_Mission_BuiltinMessages,"number Index/string messageName","Built-in messages of the mission","message","Message handle or invalid handle on error") |
|
| ADE_FUNC (__len, l_Mission_BuiltinMessages, NULL,"Number of built-in messages in the mission","number","Number of messages in mission") |
|
| ADE_INDEXER (l_Mission_Personas,"number Index/string name","Personas of the mission","persona","Persona handle or invalid handle on error") |
|
| ADE_FUNC (__len, l_Mission_Personas, NULL,"Number of personas in the mission","number","Number of messages in mission") |
|
| ADE_FUNC (addMessage, l_Mission,"string name, string text[, persona persona]","Adds a message","message","The new message or invalid handle on error") |
|
| ADE_FUNC (sendMessage, l_Mission,"string sender, message message[, number delay=0.0[, enumeration priority = MESSAGE_PRIORITY_NORMAL[, boolean fromCommand = false]]]","Sends a message from the given source (not from a ship!) with the given priority or optionally sends it from the missions command source.<br>""If delay is specified the message will be delayed by the specified time in seconds<br>""If you pass <i>nil</i> as the sender then the message will not have a sender.","boolean","true if successfull, false otherwise") |
|
| ADE_FUNC (sendTrainingMessage, l_Mission,"message message, number time[, number delay=0.0]","Sends a training message to the player. <i>time</i> is the amount in seconds to display the message, only whole seconds are used!","boolean","true if successfull, false otherwise") |
|
| ADE_FUNC (createShip, l_Mission,"[string Name, shipclass Class=Shipclass[1], orientation Orientation=null, vector Position={0,0,0}]","Creates a ship and returns a handle to it using the specified name, class, world orientation, and world position","ship","Ship handle, or invalid ship handle if ship couldn't be created") |
|
| ADE_FUNC (createWaypoint, l_Mission,"[vector Position, waypointlist List]","Creates a waypoint","waypoint","Waypoint handle, or invalid waypoint handle if waypoint couldn't be created") |
|
| ADE_FUNC (createWeapon, l_Mission,"[weaponclass Class=WeaponClass[1], orientation Orientation=null, world vector Position={0,0,0}, object Parent = nil, number Group = -1","Creates a weapon and returns a handle to it. 'Group' is used for lighting grouping purposes;"" for example, quad lasers would only need to act as one light source.","weapon","Weapon handle, or invalid weapon handle if weapon couldn't be created.") |
|
| ADE_FUNC (getMissionFilename, l_Mission, NULL,"Gets mission filename","string","Mission filename, or empty string if game is not in a mission") |
|
| ADE_FUNC (startMission, l_Mission,"[Filename or MISSION_* enumeration, Briefing = true]","Starts the defined mission","boolean","True, or false if the function fails") |
|
return | ade_set_args (L,"x", Missiontime) |
|
| ADE_FUNC (loadMission, l_Mission,"Mission name","Loads a mission","boolean","True if mission was loaded, otherwise false") |
|
| ADE_FUNC (unloadMission, l_Mission, NULL,"Stops the current mission and unloads it", NULL, NULL) |
|
| ADE_FUNC (simulateFrame, l_Mission, NULL,"Simulates mission frame", NULL, NULL) |
|
| ADE_FUNC (renderFrame, l_Mission, NULL,"Renders mission frame, but does not move anything", NULL, NULL) |
|
| ADE_FUNC (applyShudder, l_Mission,"number time, number intesity","Applies a shudder effects to the camera. Time is in seconds. Intensity specifies the shudder effect strength, the Maxim has a value of 1440.","boolean","true if successfull, false otherwise") |
|
| if (Game_mode &GM_CAMPAIGN_MODE) |
|
return | ade_set_args (L,"b", b) |
|
| ADE_FUNC (AND, l_BitOps,"number, number","Values for which bitwise boolean AND operation is performed","number","Result of the AND operation") |
|
| ADE_FUNC (OR, l_BitOps,"number, number","Values for which bitwise boolean OR operation is performed","number","Result of the OR operation") |
|
| ADE_FUNC (XOR, l_BitOps,"number, number","Values for which bitwise boolean XOR operation is performed","number","Result of the XOR operation") |
|
| if (!ade_get_args(L,"ii",&a,&b)) return ade_set_error(L |
|
| if (!((b >=0)&&(b< 32))) return ade_set_error(L |
|
| if (a &(1<< b)) c |
|
return | ade_set_args (L,"i", c) |
|
| ADE_FUNC (addBit, l_BitOps,"number, number (bit)","Performs inclusive or (OR) operation on the set bit of the value","number","Result of the operation") |
|
| ADE_INDEXER (l_Tables_ShipClasses,"number Index/string Name","Array of ship classes","shipclass","Ship handle, or invalid ship handle if index is invalid") |
|
| ADE_FUNC (__len, l_Tables_ShipClasses, NULL,"Number of ship classes","number","Number of ship classes, or 0 if ship classes haven't been loaded yet") |
|
| ADE_INDEXER (l_Tables_WeaponClasses,"number Index/string WeaponName","Array of weapon classes","weapon","Weapon class handle, or invalid weaponclass handle if index is invalid") |
|
| ADE_FUNC (__len, l_Tables_WeaponClasses, NULL,"Number of weapon classes","number","Number of weapon classes, or 0 if weapon classes haven't been loaded yet") |
|
| ADE_FUNC (avdTest, l_Testing, NULL,"Test the AVD Physics code", NULL, NULL) |
|
| ADE_FUNC (createParticle, l_Testing,"vector Position, vector Velocity, number Lifetime, number Radius, enumeration Type, [number Tracer length=-1, boolean Reverse=false, texture Texture=Nil, object Attached Object=Nil]","Creates a particle. Use PARTICLE_* enumerations for type.""Reverse reverse animation, if one is specified""Attached object specifies object that Position will be (and always be) relative to.","particle","Handle to the created particle") |
|
| ADE_FUNC (getStack, l_Testing, NULL,"Generates an ADE stackdump","string","Current Lua stack") |
|
| ADE_FUNC (isCurrentPlayerMulti, l_Testing, NULL,"Returns whether current player is a multiplayer pilot or not.","boolean","Whether current player is a multiplayer pilot or not") |
|
| ADE_FUNC (isPXOEnabled, l_Testing, NULL,"Returns whether PXO is currently enabled in the configuration.","boolean","Whether PXO is enabled or not") |
|
| if (!ade_get_args(L,"s",&filename)) return ADE_RETURN_FALSE |
|
| movie_play (filename) |
|
void | ade_debug_call (lua_State *L, lua_Debug *ar) |
|
void | ade_debug_ret (lua_State *L, lua_Debug *ar) |
|
void | ade_stackdump (lua_State *L, char *stackdump) |
|
const char * | ade_get_type_string (lua_State *L, int argnum) |
|
int | ade_get_args (lua_State *L, const char *fmt,...) |
|
int | ade_set_args (lua_State *L, const char *fmt,...) |
|
int | ade_friendly_error (lua_State *L) |
|
char * | ade_concat_helper (lua_State *L, int obj_ldx) |
|
void | ade_output_type_link (FILE *fp, char *typestr) |
|
void | ade_output_toc (FILE *fp, ade_table_entry *ate) |
|