Main Page   Modules   File List   File Members  

LuaSobGroupQuery.cpp File Reference


Detailed Description

System: Scar

>


Namespaces

namespace  luateamquery

Functions

bool SobGroup_Empty (const char *sobGroupName)
 will return true if the group is empty, use this instead of count to check if the group doesn't contain any element

udword SobGroup_Count (const char *sobGroupName)
 returns the amount of ships in the sobGroup

bool SobGroup_IsInVolume (const char *sobGroupName, const char *volumeName)
 returns true if the sobGroup is colliding with the volume

bool SobGroup_OnScreen (const char *sobGroupName)
 returns true if any ships in the specified sobGroup are currently on the screen

bool SobGroup_IsShipNearPoint (const char *sobGroupName, const char *volumeName, float distance)
 will return true if a sobgroup are near a point

bool SobGroup_IsDockedSobGroup (const char *sobGroupName, const char *sobGroupNameDockedWith)
 will return true if the sobGroupName is docked with sobGroupNameDockedWith

bool SobGroup_IsDocked (const char *sobGroupName)
 returns true if the sobGroup is docked with any ship

bool SobGroup_InStrikeGroup (const char *sobGroupName)
 returns true if the given sobgroup is in a strikegroup

bool SobGroup_IsGateDeployed (const char *gateStartName, const char *gateEndName)
 true if all the gates in the group are deplooyed

float SobGroup_HealthPercentage (const char *sobGroupName)
 get the health of all the ships in the sob group as a number between 0 and 1

void SobGroup_SetSpeed (const char *sobGroupName, float speed)
 Sets the speed of all ships in the sobGroup, Speed is a multiplier between 0.0 and 1.0.

void SobGroup_SetMaxSpeedMultiplier (const char *sobGroupName, float speed)
 Sets the max speed of all ships in the sobGroup, Speed is a multiplier between 0.0 and 1.0.

float SobGroup_GetSpeed (const char *sobGroupName)
 returns the multiplier speed info of the lead ship of the first squadron

float SobGroup_GetActualSpeed (const char *sobGroupName)
 returns the actual speed of the lead ship of the first squadron in the sobGroup

bool SobGroup_FillSobGroupInVolume (const char *sobGroupOutName, const char *sobGroupName, const char *volumeName)
 returns a subset of the sobgroup if it is found in volume (false), or true if the whole group is in the volume

bool SobGroup_FillProximitySobGroup (const char *sobGroupNameOut, const char *sobGroupNameToCheck, const char *sobGroupName, float distance)
 this will return true if it returns a sobGroup containing the squadrons of sobGroupNameToCheck that are within distance of sobGroupName an average position of all ships is used for sobGroupName

template<typename T, class Manager> T * findGroup (const char *startName, udword str_len, const char *funcname, const Manager &manager)
 Find a nebula group with a given name. The name can be 'dirty': it can contain spaces etc.

template<typename T, class Manager> void tokenizeGroups (const char *nebulaName, std::vector< T * > &groups, const char *funcname, const Manager &manager)
 helper function to rip apart the nebulaName in subparts divided by ',' characters.

void SobGroup_GetSquadronsInsideNebula (const char *sobGroupName, const char *nebulaName, udword PlayerIndex)
 this function will return true if any squadron from the sobgroup is INside the nebula

bool SobGroup_AreAnySquadronsInsideNebula (const char *sobGroupName, const char *nebulaName)
 this function will return true if any squadron from the sobgroup is INside the nebula

bool SobGroup_AreAnySquadronsOutsideNebula (const char *sobGroupName, const char *nebulaName)
 this function will return true if any squadron from the sobgroup is OUTside the nebula

void SobGroup_GetSquadronsInsideDustCloud (const char *sobGroupName, const char *DustCloudName, udword PlayerIndex)
 this function will return true if any squadron from the sobgroup is INside the DustCloud

bool SobGroup_AreAnySquadronsInsideDustCloud (const char *sobGroupName, const char *DustCloudName)
 this function will return true if any squadron from the sobgroup is INside the DustCloud

bool SobGroup_AreAnySquadronsOutsideDustCloud (const char *sobGroupName, const char *DustCloudName)
 this function will return true if any squadron from the sobgroup is OUTside the DustCloud

bool SobGroup_GroupInGroup (const char *sobGroupName, const char *sobGroupNameToFind)
 returns true if any member of sobGroupToFind is in sobGroupName

void FOW_RevealGroup (const char *sobGroupName, bool revealGroup)
 set all of the ships in the group to the visibilty setting

bool SobGroup_Selected (const char *sobGroupName)
 returns true if all the ships in the sob group are selected

bool SobGroup_IsCloaked (const char *sobGroupName)
 will return true if all the ships in the sob group are cloaked

bool SobGroup_HasFiredAtSobGroup (const char *sobGroupFiringName, const char *sobGroupBeingShotName, const char *weaponBeingFiredName)
 true if any of the firing group have fired at any of the being shot group with the named weapon

bool SobGroup_PlayerIsInSensorRange (const char *sobGroupName, udword playerID)
 this will return true if at least one ship in the sobgroup is within sensor range of the playerID

bool SobGroup_SalvagedByPlayer (const char *sobGroupName, udword playerID)
 true if the sobgroup is owned by the player and is sleeping

void SobGroup_GetSobGroupDockedWithGroup (const char *dockedWithName, const char *outputName)
 fill the sobgroup with name "outputName" with all the squads docked to any of the ships in sob group "dockedWithName"

bool SobGroup_SubSystemSelected (const char *sobGroupName)
 are any of the subsystems on any of the ships in the sob group selected?

int SobGroup_ResearchModuleExistOrSelected (const char *sobGroupName)
 does the Research Module exist on any of the ships in the sobgroup and is it selected? returns 1 if RM exists but not selected, 2 if RM exists and selected, 0 if RM does not exist, -1 on error

bool SobGroup_AssignedToGroup (const char *sobGroupName, udword group)
 is the sob group assigned to the given number?

udword SobGroup_GetTactics (const char *sobGroupName)
 retrieve the tactics setting for the sob group

bool SobGroup_IsGuardingSobGroup (const char *guardingSobGroupName, const char *targetSobGroupName)
 are any of the ships in the first sob group guarding any of the ships in the second?

bool SobGroup_IsDoingAbility (const char *sobGroupName, udword ability)
 true if any of the ships in the sobgroup are doing the ability valid abilities are: AB_None AB_Move AB_Attack AB_Guard AB_Repair AB_Cloak AB_Harvest AB_Mine AB_Capture AB_Dock AB_AcceptDocking AB_Builder AB_Stop AB_Hyperspace AB_Parade AB_FormHyperspaceGate AB_HyperspaceViaGate AB_SensorPing AB_SpecialAttack AB_Retire AB_DefenseField AB_DefenseFieldShield AB_HyperspaceInhibitor AB_Salvage AB_Steering AB_Targeting AB_Sensors AB_Lights AB_Scuttle AB_UseSpecialWeaponsInNormalAttack

bool SobGroup_CanDoAbility (const char *sobGroupName, udword ability)
 true if any of the ships in the sob group can perform the ability valid abilities are: AB_None AB_Move AB_Attack AB_Guard AB_Repair AB_Cloak AB_Harvest AB_Mine AB_Capture AB_Dock AB_AcceptDocking AB_Builder AB_Stop AB_Hyperspace AB_Parade AB_FormHyperspaceGate AB_HyperspaceViaGate AB_SensorPing AB_SpecialAttack AB_Retire AB_DefenseField AB_DefenseFieldShield AB_HyperspaceInhibitor AB_Salvage AB_Steering AB_Targeting AB_Sensors AB_Lights AB_Scuttle AB_UseSpecialWeaponsInNormalAttack

bool SobGroup_HasUpgrade (const char *sobGroupName, const char *upgradeName)
 true if any of the ships in the sob group have the names upgrade

bool SobGroup_IsInControlGroup (size_t ctrlGroup, const char *sobGroupName)
 returns true iff all ships in this sobgroup belong to the specified control group (0 = no group)

bool SobGroup_IsBuilding (const char *sobGroupName, const char *sobName)
 Are any of the ships in the sob group building an item with the given name? The item just has to be in the queue, not actually being built.

bool SobGroup_UnderAttack (const char *sobGroupName)
 are any of the ships in the sob group under attack?

void SobGroup_GetAttackers (const char *sobGroupName, const char *outputSobGroupName)
 Adds all the attackers of the sob group to the output group, creates the group if it does not already exist, empties it first if it does.

bool SobGroup_AreAllInHyperspace (const char *sobGroupName)
 true if all of the ships in the sob group are in hyperspace

bool SobGroup_AreAllInRealSpace (const char *sobGroupName)
 true if all of the ships in the sob group are in real space (may be docked or not)

void SobGroup_GetSobGroupSalvagingGroup (const char *sobGroupName, const char *outputSobGroupName)
 Fill the group named "outputSobGroupName" with all the squadrons who are in the process of salvaging the first sob group (they're salvaging and latched).

void SobGroup_GetSobGroupCapturingGroup (const char *sobGroupName, const char *outputSobGroupName)
 Fill the group named "outputSobGroupName" with all the squadrons who are in the process of capturing the first sob group (they're capturing and latched).

void SobGroup_GetSobGroupRepairingGroup (const char *sobGroupName, const char *outputSobGroupName)
 Fill the group named "outputSobGroupName" with all the squadrons who are in the process of repairing the first sob group (they're repairing and latched).

bool SobGroup_AreAnyFromTheseAttackFamilies (const char *sobGroupName, const char *families)
 Do any of the ships in the sob group belong to any of the specified attack families? is a comma separated string e.g.

bool SobGroup_AreAnyOfTheseTypes (const char *sobGroupName, const char *shipNames)
 Are any of the ships in the sob group one of the ship typed in the shipNames? shipNames is a comma separated list of ships e.g.


Function Documentation

bool SobGroup_AreAnyFromTheseAttackFamilies const char *    sobGroupName,
const char *    families
 

Do any of the ships in the sob group belong to any of the specified attack families? is a comma separated string e.g.

"Frigate, Corvette, Fighter" where each entry is an attack family name from 'data/scripts/FamilyList.lua'

bool SobGroup_AreAnyOfTheseTypes const char *    sobGroupName,
const char *    shipNames
 

Are any of the ships in the sob group one of the ship typed in the shipNames? shipNames is a comma separated list of ships e.g.

"Hgn_Scout, Hgn_AssaultFrigate, Vgr_Interceptor"

void SobGroup_GetSobGroupCapturingGroup const char *    sobGroupName,
const char *    outputSobGroupName
 

Fill the group named "outputSobGroupName" with all the squadrons who are in the process of capturing the first sob group (they're capturing and latched).

If the output group does not exist it will be created. If it does exist it will be cleared first.

void SobGroup_GetSobGroupRepairingGroup const char *    sobGroupName,
const char *    outputSobGroupName
 

Fill the group named "outputSobGroupName" with all the squadrons who are in the process of repairing the first sob group (they're repairing and latched).

If the output group does not exist it will be created. If it does exist it will be cleared first.

void SobGroup_GetSobGroupSalvagingGroup const char *    sobGroupName,
const char *    outputSobGroupName
 

Fill the group named "outputSobGroupName" with all the squadrons who are in the process of salvaging the first sob group (they're salvaging and latched).

If the output group does not exist it will be created. If it does exist it will be cleared first.


Generated on Fri Oct 31 04:05:39 2003 for Scar by doxygen1.3-rc3