Defines all attributes of objects used in the inventory. More...
#include <inv_shared.h>
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_s * | ammos [MAX_AMMOS_PER_OBJDEF] |
int | numAmmos |
struct objDef_s * | weapons [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 |
Defines all attributes of objects used in the inventory.
Definition at line 223 of file inv_shared.h.
int objDef_s::ammo |
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] |
List of ammo-object pointers that can be used in this one.
Definition at line 263 of file inv_shared.h.
Referenced by AII_AddAmmoToSlot(), AII_AutoAddAmmo(), AIM_CheckTechnologyIntoSlot(), AIM_SelectableCraftItem(), Com_AddObjectLinks(), I_EquipActorRobot(), INV_DecreaseItem_f(), INV_IncreaseItem_f(), INV_ItemDescription(), INV_LoadWeapon(), testItemMassActions(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UP_DrawAssociatedAmmo(), and UP_ResearchedLinkClick_f().
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().
Definition at line 287 of file inv_shared.h.
Referenced by AII_AddAmmoToSlot(), AII_AddItemToSlot(), AII_AutoAddAmmo(), AII_CheckUpdateAircraftStats(), AII_GetCraftitemTechsByType(), AII_GetItemWeightBySize(), AII_ReloadWeapon(), AII_RemoveItemFromSlot(), AII_UpdateAircraftStats(), AIM_AircraftEquipAddItem_f(), AIM_AircraftEquipMenuUpdate(), AIM_AircraftEquipRemoveItem_f(), AIM_CheckTechnologyIntoSlot(), AIM_CrafttypeFilter(), AIM_SelectableCraftItem(), AIR_GetAircraftWeaponRanges(), AIR_GetMaxAircraftWeaponRange(), AIRFIGHT_AddProjectile(), AIRFIGHT_BaseShoot(), AIRFIGHT_CampaignRunProjectiles(), AIRFIGHT_CheckWeapon(), AIRFIGHT_ExecuteActions(), AIRFIGHT_GetDamage(), AIRFIGHT_InstallationShoot(), AIRFIGHT_ProbabilityToHit(), AIRFIGHT_ProjectileReachedTarget(), BDEF_AddItem_f(), BDEF_RemoveItem_f(), Com_AddObjectLinks(), Com_ParseItem(), INV_IsBaseDefenceItem(), INV_IsCraftItem(), MAP_DrawMapMarkers(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), and UP_AircraftItemDescription().
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().
Definition at line 281 of file inv_shared.h.
Referenced by AI_SearchBestTarget(), G_Damage(), G_FireAffectedSurface(), G_SplashDamage(), LE_AddProjectile(), and LET_Projectile().
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] |
List of firemodes per weapon (the ammo can be used in).
Definition at line 270 of file inv_shared.h.
Referenced by Com_AddObjectLinks(), Com_ParseItem(), FIRESH_FiredefForWeapon(), FIRESH_GetFiredef(), G_GetObjectForFiredef(), HUD_CheckFiremodeReservation(), HUD_DisplayFiremodeEntry(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), INV_ItemDescription(), and S_LoadSamples().
The soldier needs both hands to fire using object.
Definition at line 238 of file inv_shared.h.
Referenced by G_ClientShoot(), HUD_CheckShooting(), I_EquipActor(), I_EquipActorMelee(), I_MoveInInventory(), I_PackAmmoAndWeapon(), INV_EquipmentDefSanityCheck(), INV_ItemDescription(), INVSH_CheckToInventory(), UI_ContainerNodeAutoPlace(), and UI_ContainerNodeDrawSingle().
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] |
Identifier of the item being item definition in scriptfile.
Definition at line 227 of file inv_shared.h.
Referenced by AII_AddAmmoToSlot(), AII_AddItemToSlot(), AII_SaveOneSlotXML(), AIR_SaveAircraftXML(), AIR_ScriptSanityCheck(), AIRFIGHT_SaveXML(), B_ItemIsStoredInBaseStorage(), B_SaveStorageXML(), B_UpdateStorageAndCapacity(), BS_BuyItem_f(), BS_InitMarket(), BS_SaveXML(), CL_ActorGetMuzzle(), CL_GetComponentsByItem(), CL_InvAdd(), CL_LoadInventoryXML(), CL_NetSendItem(), CL_SaveItemXML(), Com_AddObjectLinks(), Com_ParseEquipment(), Com_ParseItem(), CP_AddItemAsCollected_f(), CP_AddWeaponAmmo(), CP_ItemsSanityCheck(), FIRESH_GetFiredef(), G_ClientReadInventory(), G_GetWeaponNameForFiredef(), G_InventoryDropToFloorCheck(), G_InventoryRemoveItemByID(), G_InventoryToFloor(), G_MissionThink(), G_MissionTouch(), HUD_UpdateActorCvar(), I_EquipActor(), I_EquipActorMelee(), I_PackAmmoAndWeapon(), INV_GetFilterFromItem(), INV_ItemDescription(), INVSH_FindSpace(), INVSH_GetItemByIDSilent(), INVSH_LoadableInWeapon(), LE_PlaceItem(), MP_SaveTeamMultiplayer(), PR_DisassembleItem(), PR_ItemProductionInfo(), PR_SaveXML(), RS_GetTechForItem(), RS_InitTree(), TR_CargoListSelect_f(), TR_CheckItem(), TR_SaveXML(), TR_TransferListClear_f(), UI_DrawItem(), UP_AircraftItemDescription(), and UP_Article().
int objDef_s::idx |
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 248 of file inv_shared.h.
Referenced by CL_ViewPrecacheModels(), INV_IsBaseDefenceItem(), INV_IsCraftItem(), and INV_ItemMatchesFilter().
Definition at line 245 of file inv_shared.h.
Referenced by INV_GetFilterFromItem(), and INV_ItemMatchesFilter().
Definition at line 246 of file inv_shared.h.
Referenced by I_EquipActor(), INV_GetFilterFromItem(), INV_ItemMatchesFilter(), and UI_ContainerItemIteratorNext().
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().
virtual equipment don't show up in menus, if it's an ammo no item needed for reload
Definition at line 242 of file inv_shared.h.
Referenced by AII_AutoAddAmmo(), AII_RemoveItemFromSlot(), AII_RemoveNextItemFromSlot(), AIM_AircraftEquipMenuUpdate(), AIM_CrafttypeFilter(), B_AddToStorage(), B_BaseHasItem(), B_ItemInBase(), B_ItemIsStoredInBaseStorage(), B_UpdateStorageAndCapacity(), BS_IsOnMarket(), CL_AddActorWeapon(), G_InventoryDropToFloorCheck(), PR_UpdateProductionList(), TR_TransferList_Scroll_f(), TR_TransferListSelect_f(), TR_TransferSelect(), and UP_TechGetsDisplayed().
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] |
Item name taken from scriptfile.
Definition at line 226 of file inv_shared.h.
Referenced by AII_CollectingItems(), AII_CollectItem(), AII_UpdateOneInstallationDelay(), BaseSummary_Init(), BS_Autosell_f(), BS_BuyType(), HUD_UpdateActorFireMode(), HUD_UpdateAllActors(), I_AddToInventory(), I_RemoveFromInventory(), INV_ItemDescription(), PR_DisassemblyInfo(), PR_ItemProductionInfo(), PR_ProductionFrame(), PR_ProductionIncrease_f(), PR_UpdateProductionList(), RS_InitTree(), TR_CargoList(), TR_TransferSelect(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), and UI_GetItemTooltip().
True if this item should not be available on market.
Definition at line 290 of file inv_shared.h.
Referenced by BS_IsOnMarket().
Number of ammos this weapon can be used with, which is <= MAX_AMMOS_PER_OBJDEF.
Definition at line 264 of file inv_shared.h.
Referenced by AII_AddAmmoToSlot(), AII_AutoAddAmmo(), AIM_CheckTechnologyIntoSlot(), AIM_SelectableCraftItem(), Com_AddObjectLinks(), I_EquipActorRobot(), INV_DecreaseItem_f(), INV_IncreaseItem_f(), INV_ItemDescription(), testItemMassActions(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), and UP_DrawAssociatedAmmo().
fireDefIndex_t objDef_s::numFiredefs[MAX_WEAPONS_PER_OBJDEF] |
Number of firemodes per weapon. Maximum value for fireDef_t.fdIdx <= MAX_FIREDEFS_PER_WEAPON.
Definition at line 271 of file inv_shared.h.
Referenced by AI_SearchBestTarget(), Com_AddObjectLinks(), Com_ParseItem(), G_ActorHasWorkingFireModeSet(), G_GetObjectForFiredef(), HUD_CheckFiremodeReservation(), HUD_PopupFiremodeReservation(), INV_ItemDescription(), and S_LoadSamples().
Number of weapons this ammo can be used in. Maximum value for fireDef_t.weapFdsIdx <= MAX_WEAPONS_PER_OBJDEF.
Definition at line 273 of file inv_shared.h.
Referenced by Com_AddObjectLinks(), Com_ParseItem(), FIRESH_FiredefForWeapon(), G_GetObjectForFiredef(), HUD_UpdateActorFireMode(), INV_DecreaseItem_f(), INV_IncreaseItem_f(), INV_ItemDescription(), INV_ItemMatchesFilter(), INVSH_LoadableInWeapon(), S_LoadSamples(), UI_ContainerItemIteratorNext(), and UI_GetItemTooltip().
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().
int objDef_s::price |
Price for this item.
Definition at line 288 of file inv_shared.h.
Referenced by B_InitialEquipment(), B_SellOrAddItems(), BS_InitMarket(), CP_ItemsSanityCheck(), I_EquipActor(), PR_ItemProductionInfo(), and PR_ProductionFrame().
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().
int objDef_s::reload |
Time units (TUs) for reloading the weapon.
Definition at line 254 of file inv_shared.h.
Referenced by AI_GetItemFromInventory(), AII_CarriedItems(), AII_CollectingItems(), AIR_MoveEmployeeInventoryIntoStorage(), CL_ActorReload(), CP_AddWeaponAmmo(), G_ClientGetWeaponFromInventory(), G_ReactionFireGetTUsForItem(), HUD_CheckReload(), HUD_CheckShooting(), HUD_UpdateActor(), HUD_UpdateActorFireMode(), HUD_WeaponCanBeReloaded(), I_EquipActor(), I_MoveInInventory(), I_PackAmmoAndWeapon(), INV_EquipmentDefSanityCheck(), INV_ItemDescription(), UI_DrawItem(), and UP_ResearchedLinkClick_f().
float objDef_s::scale |
scale value for images? and models
Definition at line 234 of file inv_shared.h.
Referenced by UI_DrawItem().
The shape in inventory.
Definition at line 232 of file inv_shared.h.
Referenced by Com_ParseItem(), INVSH_CheckToInventory(), INVSH_CheckToInventory_shape(), INVSH_ShapeCheckPosition(), LE_BiggestItem(), and UI_ContainerNodeDrawFreeSpace().
int objDef_s::size |
Size of an item, used in storage capacities.
Definition at line 289 of file inv_shared.h.
Referenced by AII_AddItemToSlot(), AII_GetItemWeightBySize(), AIR_GetStorageRoom(), B_AddToStorage(), B_InitialEquipment(), B_UpdateStorageAndCapacity(), B_UpdateStorageCap(), BS_BuyItem_f(), BS_CheckAndDoBuyItem(), CP_ItemsSanityCheck(), INV_ItemDescription(), PR_DisassembleItem(), PR_ItemProductionInfo(), PR_ProductionFrame(), and TR_CheckItem().
Definition at line 282 of file inv_shared.h.
Referenced by Com_ParseItem(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_ContainerNodeDNDMove(), UI_ContainerNodeDrawDropPreview(), and UI_DrawItem().
Size in x and y direction.
Definition at line 282 of file inv_shared.h.
Referenced by Com_ParseItem(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_ContainerNodeDNDMove(), UI_ContainerNodeDrawDropPreview(), and 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().
This item is a weapon or ammo.
Definition at line 236 of file inv_shared.h.
Referenced by AI_GetItemFromInventory(), Com_AddObjectLinks(), G_ClientGetWeaponFromInventory(), G_ReactionFireGetTUsForItem(), HUD_UpdateActorFireMode(), I_EquipActor(), INV_EquipmentDefSanityCheck(), INV_ItemDescription(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_ContainerItemIteratorNext(), UI_ContainerNodeAutoPlace(), UI_ContainerNodeDNDFinished(), UI_DrawItem(), UI_GetItemTooltip(), and UP_ResearchedLinkClick_f().
struct objDef_s* objDef_s::weapons[MAX_WEAPONS_PER_OBJDEF] |
List of weapon-object pointers where this item can be used in. Correct index for this array can be get from fireDef_t.weapFdsIdx. or FIRESH_FiredefForWeapon.
Definition at line 267 of file inv_shared.h.
Referenced by AIM_CheckTechnologyIntoSlot(), AIM_SelectableCraftItem(), Com_AddObjectLinks(), CP_AddWeaponAmmo(), FIRESH_FiredefForWeapon(), G_ActorHasWorkingFireModeSet(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), HUD_UpdateReactionFiremodes(), INV_DecreaseItem_f(), INV_IncreaseItem_f(), INV_ItemDescription(), INV_ItemMatchesFilter(), INVSH_LoadableInWeapon(), UI_GetItemTooltip(), and UP_ResearchedLinkClick_f().