29 for ( i = 0; i < presets_array.Count(); i++ )
36 for ( i = 0; i < custom_presets_array.Count(); i++ )
42 if ( default_preset !=
"" )
48 default_preset =
"[" + default_preset +
"]";
106 if ( default_preset !=
"" )
112 default_preset =
"[" + default_preset +
"]";
118 prev_preset_params_array.param3 =
false;
128 preset_name =
"[" + preset_name +
"]";
136 preset_params_array.param3 =
true;
268 void SetPreset(
bool clear_inventory,
string preset_name)
276 if ( is_preset_fixed )
286 if ( clear_inventory )
291 for ( i = 0; i < preset_array.Count(); i++)
295 if ( is_preset_fixed )
306 m_Developer.SpawnEntityInPlayerInventory(player, preset_array.Get(i), health, quantity);
396 m_WgtPnlWrapper = layoutRoot.FindAnyWidget(
"pnl_presets_wrapper_outer");
403 m_SlWgtSelect = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_select") );
404 m_SlWgtFocus = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_focus") );
417 m_ClWgtButtonAddAtt = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_cl_add_attachment") );
418 m_WgtBtnSceneSave = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_save_scene") );
431 m_PrWgtAttRoot = layoutRoot.FindAnyWidget(
"pnl_right_inspector_attachments");
463 m_UpButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget(
"btn_up") );
464 m_DownButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget(
"btn_down") );
519 super.OnClick(w,
x,
y, button);
608 int hitComponentIndex;
609 ref set<Object> hitObjects =
new set<Object>;
610 DayZPhysics.
RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, hitObjects, NULL, player);
613 if( hitObjects.Count() )
614 target = hitObjects.Get(0);
616 if ( target != NULL && target.IsInherited(
EntityAI) )
949 string pos_x =
"n/a";
950 string pos_y =
"n/a";
951 string pos_z =
"n/a";
976 float prop_count = attachments_slots.Count();
977 float prop_root_h = prop_h * (prop_count + 1);
978 float line_h = 1.0 / (prop_count + 1);
989 for (
int j = 0; j < attachments_in_slots.Count(); ++j )
991 TStringArray attachments_in_slot = attachments_in_slots.GetElement(j);
995 ui_prop.
Show(
m_ModuleSceneManager.GetSelectedSceneObject().GetObject(), attachments_in_slots.GetKey(j), attachments_in_slot);
996 ui_prop.
SetPos( 0, (1 + j) * line_h );
1221 for (
int s = 0; s < searching_in.Count(); ++s )
1223 string config_path = searching_in.Get(s);
1225 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
1226 for (
int i = 0; i < objects_count; i++)
1229 g_Game.ConfigGetChildName(config_path, i, childName);
1231 int scope =
g_Game.ConfigGetInt(config_path +
" " + childName +
" scope");
1237 string nchName = childName;
1240 if ( nchName.
Contains(search_string))
1242 array_ret.Insert(childName);
1344 for (
int m = 0; m < slots.Count(); ++m )
1353 for (
int s = 0; s < searching_in.Count(); ++s )
1355 string config_path = searching_in.Get(s);
1357 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
1358 for (
int i = 0; i < objects_count; i++)
1360 g_Game.ConfigGetChildName(config_path, i, childName);
1362 g_Game.ConfigGetTextArray(config_path +
" " + childName +
" inventorySlot", inv_slots);
1364 if ( inv_slots.Count() > 0 )
1366 for (
int j = 0; j < inv_slots.Count(); ++j )
1369 inv_slot = inv_slots.Get(j);
1371 for (
int k = 0; k < slots.Count(); ++k )
1373 string finding_slot_type = slots.Get(k);
1375 if ( inv_slot == finding_slot_type )
1377 array_ret.Get(finding_slot_type).Insert(childName);
1385 g_Game.ConfigGetText(config_path +
" " + childName +
" inventorySlot", inv_slot);
1387 if ( inv_slot !=
"" )
1389 for (
int l = 0; l < slots.Count(); ++l )
1391 string finding_slot_type_2 = slots.Get(l);
1393 if ( inv_slot == finding_slot_type_2 )
1395 array_ret.Get(finding_slot_type_2).Insert(childName);
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.