Example #1
0
        private void DoBlueprintPreview(int blueprintID)
        {
            Model model = GetDialogCustomData <Model>();

            if (model.IsPreviewing)
            {
                return;
            }
            model.IsPreviewing = true;

            StructureBlueprint entity  = _structure.GetStructureBlueprintByID(blueprintID);
            NWPlaceable        preview = NWPlaceable.Wrap(_.CreateObject(OBJECT_TYPE_PLACEABLE, entity.Resref, GetDialogTarget().Location));

            preview.IsUseable = false;
            preview.IsPlot    = true;
            preview.Destroy(6.0f);
            preview.DelayCommand(() =>
            {
                model.IsPreviewing = false;
            }, 6.0f);
        }