objDef_s Struct Reference

Defines all attributes of objects used in the inventory. More...

#include <inv_shared.h>

Collaboration diagram for objDef_s:
Collaboration graph
[legend]

Data Fields

int idx
char name [MAX_VAR]
char id [MAX_VAR]
char model [MAX_VAR]
char image [MAX_VAR]
char type [MAX_VAR]
char armourPath [MAX_VAR]
uint32_t shape
float scale
vec3_t center
qboolean weapon
qboolean holdTwoHanded
qboolean fireTwoHanded
qboolean extension
qboolean headgear
qboolean thrown
qboolean isVirtual
qboolean isPrimary
qboolean isSecondary
qboolean isHeavy
qboolean isMisc
qboolean isUGVitem
qboolean isDummy
int ammo
int reload
qboolean oneshot
qboolean deplete
int useable
struct objDef_sammos [MAX_AMMOS_PER_OBJDEF]
int numAmmos
struct objDef_sweapons [MAX_WEAPONS_PER_OBJDEF]
fireDef_t fd [MAX_WEAPONS_PER_OBJDEF][MAX_FIREDEFS_PER_WEAPON]
fireDefIndex_t numFiredefs [MAX_WEAPONS_PER_OBJDEF]
int numWeapons
short protection [MAX_DAMAGETYPES]
short ratings [MAX_DAMAGETYPES]
byte dmgtype
byte sx
byte sy
char animationIndex
craftitem_t craftitem
int price
int size
qboolean notOnMarket

Detailed Description

Defines all attributes of objects used in the inventory.

Note:
See also http://ufoai.ninex.info/wiki/index.php/UFO-Scripts/weapon_%2A.ufo

Definition at line 223 of file inv_shared.h.


Field Documentation

This value is set for weapon and it says how many bullets currently loaded clip would have, if that clip would be full. In other words, max bullets for this type of weapon with currently loaded type of ammo.

Definition at line 251 of file inv_shared.h.

Referenced by AII_CarriedItems(), AII_CollectingAmmo(), AII_ReloadWeapon(), AII_RemoveItemFromSlot(), AIR_MoveEmployeeInventoryIntoStorage(), CL_InvReload(), CP_AddWeaponAmmo(), G_EventInventoryReload(), HUD_WeaponCanBeReloaded(), I_MoveInInventory(), I_PackAmmoAndWeapon(), INV_ItemDescription(), and UP_AircraftItemDescription().

struct objDef_s* objDef_s::ammos[MAX_AMMOS_PER_OBJDEF]

The animation index for the character with the weapon.

Definition at line 283 of file inv_shared.h.

Referenced by LE_GetAnim().

char objDef_s::armourPath[MAX_VAR]

Definition at line 231 of file inv_shared.h.

Referenced by CHRSH_CharGetBody(), and CHRSH_CharGetHead().

origin for models

Definition at line 235 of file inv_shared.h.

Referenced by LE_PlaceItem(), and UI_DrawItem().

This weapon useless after all ("oneshot") ammo is used up. If true this item will not be collected on mission-end. (see INV_CollectinItems).

Definition at line 257 of file inv_shared.h.

Referenced by G_ClientShoot(), G_ShootSingle(), I_EquipActor(), and INV_EquipmentDefSanityCheck().

This is an extension. (may not be headgear, too).

Definition at line 239 of file inv_shared.h.

Referenced by CP_ItemsSanityCheck(), I_EquipActor(), I_MoveInInventory(), and INVSH_CheckToInventory().

fireDef_t objDef_s::fd[MAX_WEAPONS_PER_OBJDEF][MAX_FIREDEFS_PER_WEAPON]

This is a headgear. (may not be extension, too).

Definition at line 240 of file inv_shared.h.

Referenced by CP_ItemsSanityCheck(), I_EquipActor(), I_MoveInInventory(), INVSH_CheckToInventory(), and UI_ContainerNodeAutoPlace().

The soldier needs both hands to hold this object.

Definition at line 237 of file inv_shared.h.

Referenced by CL_ActorReload(), HUD_GetLeftHandWeapon(), HUD_RefreshButtons(), HUD_UpdateAllActors(), INVSH_CheckToInventory(), and UI_ContainerNodeDrawSingle().

char objDef_s::id[MAX_VAR]

Index of the objDef in the global item list (ods).

Definition at line 225 of file inv_shared.h.

Referenced by AII_AddAmmoToSlot(), AII_CarriedItems(), AII_CollectingAmmo(), AII_CollectItem(), AIM_CheckTechnologyIntoSlot(), AIM_SelectableCraftItem(), AIM_UpdateAircraftItemList(), AIR_MoveEmployeeInventoryIntoStorage(), B_AddToStorage(), B_AntimatterInBase(), B_BaseHasItem(), B_ItemInBase(), B_LoadStorageXML(), B_ManageAntimatter(), B_SellOrAddItems(), B_UpdateAntimatterCap(), B_UpdateStorageAndCapacity(), BS_AddItemToMarket(), BS_Autosell_f(), BS_BuyItem_f(), BS_CheckAndDoBuyItem(), BS_GetItemBuyingPrice(), BS_GetItemSellingPrice(), BS_GetMinMaxValueByItemID(), BS_LoadXML(), BS_MarketScroll_f(), BS_RemoveItemFromMarket(), BS_SellItem_f(), CL_ActorGetMuzzle(), CL_CleanupAircraftCrew(), CL_InvAdd(), CL_InvReload(), CL_NetSendItem(), Com_ParseEquipment(), Com_ParseItem(), CP_AddWeaponAmmo(), G_EventInventoryAmmo(), G_EventInventoryReload(), G_EventReactionFireChange(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), G_WriteItem(), HUD_PopupFiremodeReservation(), HUD_UpdateReactionFiremodes(), I_EquipActor(), I_PackAmmoAndWeapon(), LE_PlaceItem(), MP_LoadTeamMultiplayer(), MP_SaveTeamMultiplayer(), PR_UpdateProductionList(), RS_GetTechForItem(), RS_InitTree(), TR_CargoListSelect_f(), TR_EmptyTransferCargo(), TR_LoadXML(), TR_TransferAlienAfterMissionStart(), TR_TransferList_Scroll_f(), TR_TransferListClear_f(), TR_TransferListSelect_f(), TR_TransferSelect(), UI_BaseInventoryNodeMouseDown(), UI_ContainerNodeAutoPlace(), UI_ContainerNodeMouseDown(), UI_ContainerNodeUpdateEquipment(), and UI_ItemNodeDraw().

char objDef_s::image[MAX_VAR]

Object image file - relative to game dir.

Definition at line 229 of file inv_shared.h.

Referenced by RS_InitTree(), and UI_DrawItem().

Definition at line 245 of file inv_shared.h.

Referenced by INV_GetFilterFromItem(), and INV_ItemMatchesFilter().

Definition at line 243 of file inv_shared.h.

Referenced by I_EquipActor(), INV_GetFilterFromItem(), and INV_ItemMatchesFilter().

Definition at line 244 of file inv_shared.h.

Referenced by I_EquipActor(), INV_GetFilterFromItem(), and INV_ItemMatchesFilter().

Definition at line 247 of file inv_shared.h.

Referenced by INV_ItemMatchesFilter().

char objDef_s::model[MAX_VAR]

Model name - relative to game dir.

Definition at line 228 of file inv_shared.h.

Referenced by CL_ActorCvars(), CL_ViewPrecacheModels(), GAME_GetModelForItem(), HUD_UpdateActorCvar(), MAP_DrawMapMarkers(), and RS_InitTree().

char objDef_s::name[MAX_VAR]

True if this item should not be available on market.

Definition at line 290 of file inv_shared.h.

Referenced by BS_IsOnMarket().

fireDefIndex_t objDef_s::numFiredefs[MAX_WEAPONS_PER_OBJDEF]

This weapon contains its own ammo (it is loaded in the base). "int ammo" of objDef_s defines the amount of ammo used in oneshoot weapons.

Definition at line 255 of file inv_shared.h.

Referenced by CP_AddWeaponAmmo(), G_ClientShoot(), and I_PackAmmoAndWeapon().

short objDef_s::protection[MAX_DAMAGETYPES]

Protection values for each armour and every damage type.

Definition at line 278 of file inv_shared.h.

Referenced by AI_SearchBestTarget(), Com_ParseItem(), and G_Damage().

short objDef_s::ratings[MAX_DAMAGETYPES]

Rating values for each armour and every damage type to display in the menus.

Definition at line 279 of file inv_shared.h.

Referenced by Com_ParseItem(), and INV_ItemDescription().

scale value for images? and models

Definition at line 234 of file inv_shared.h.

Referenced by UI_DrawItem().

This item can be thrown.

Definition at line 241 of file inv_shared.h.

Referenced by G_ClientShoot(), G_ShootGrenade(), and G_ShootSingle().

char objDef_s::type[MAX_VAR]

melee, rifle, ammo, armour. e.g. used in the ufopedia

Definition at line 230 of file inv_shared.h.

Referenced by CL_ViewPrecacheModels(), INV_ItemMatchesFilter(), INVSH_FindSpace(), and LE_GetAnim().

Defines which team can use this item: TEAM_*. Used in checking the right team when filling the containers with available armour.

Definition at line 260 of file inv_shared.h.

Referenced by GAME_IsArmourUseableForTeam().

struct objDef_s* objDef_s::weapons[MAX_WEAPONS_PER_OBJDEF]

The documentation for this struct was generated from the following file:

Generated by  doxygen 1.6.2