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

◆ OnSuccess()

override void OpenAndSwitchLambda::OnSuccess ( EntityAI new_item)
inlineprivate

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

48 {
49 super.OnSuccess(new_item);
50
51 ItemBase ib = ItemBase.Cast(new_item);
52 if ( new_item )
53 {
54 float quantity_old = ib.GetQuantity();
55 float spill_amount = quantity_old * m_SpillModifier;
56 float quantity_new = quantity_old - spill_amount;
57
58 Debug.Log("quantity before spill: "+quantity_old.ToString());
59 Debug.Log("spill_amount: "+spill_amount.ToString());
60 Debug.Log("quantity_new: "+quantity_new.ToString());
61
62 ib.SetQuantity(quantity_new);
63 }
64 }
class GP5GasMask extends MaskBase ItemBase
void Debug()
Определения UniversalTemperatureSource.c:349
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88
float m_SpillModifier
Определения OpenItem.c:38
proto string ToString(bool simple=true)

Перекрестные ссылки Debug::Log(), m_SpillModifier, ItemBase::SetQuantity() и float::ToString().