DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CanReceiveAttachment()

override bool ImprovisedExplosive::CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprotected

См. определение в файле ImprovisedExplosive.c строка 189

190 {
191 InventoryLocation il = new InventoryLocation();
192 GetInventory().GetCurrentInventoryLocation(il);
193
194 foreach (string slotName : SLOT_TRIGGERS)
195 {
196 if (slotId == InventorySlots.GetSlotIdFromString(slotName))
197 {
198 if (il.GetType() == InventoryLocationType.HANDS)
199 return false;
200 }
201 }
202
203 return !GetArmed();
204 }
PlayerSpawnPreset slotName
bool GetArmed()
Определения ExplosivesBase.c:266
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
const string SLOT_TRIGGERS[SLOT_TRIGGERS_COUNT]
Определения ImprovisedExplosive.c:21
proto native int GetType()
returns type of InventoryLocation

Перекрестные ссылки GetArmed(), InventorySlots::GetSlotIdFromString(), InventoryLocation::GetType(), SLOT_TRIGGERS и slotName.