Beispiel #1
0
        public void DrawActionsOf(VMEntity obj)
        {
            objNameLabel.Text = "Active Object: " + obj.ToString();

            actionView.Items.Clear();
            for (int i = 0; i < obj.Thread.Queue.Count; i++)
            {
                actionView.Items.Add(new ListViewItem(obj.Thread.Queue[i].Name, (i == 0) ? 0 : 1));
            }
        }
Beispiel #2
0
 public string ObjectSummary(VMEntity obj)
 {
     return obj.ToString() + " | " + obj.ObjectID + " | " + "container: " + obj.Container;
 }
Beispiel #3
0
        public void SetInfo(VMEntity entity, bool bought)
        {
            var obj = entity.Object;
            var def = entity.MasterDefinition;
            if (def == null) def = entity.Object.OBJ;
            CTSS catString = obj.Resource.Get<CTSS>(def.CatalogStringsID);
            if (catString != null)
            {
                DescriptionText.CurrentText = catString.GetString(0) + "\r\n" + catString.GetString(1);
                ObjectNameText.Caption = catString.GetString(0);
            }
            else
            {
                DescriptionText.CurrentText = entity.ToString();
                ObjectNameText.Caption = entity.ToString();
            }
            StringBuilder motivesString = new StringBuilder();
            motivesString.AppendFormat(GameFacade.Strings.GetString("206", "19") + "${0}\r\n", def.Price);
            if (def.RatingHunger != 0) { motivesString.AppendFormat(AdStrings[0], def.RatingHunger); }
            if (def.RatingComfort != 0) { motivesString.AppendFormat(AdStrings[1], def.RatingComfort); }
            if (def.RatingHygiene != 0) { motivesString.AppendFormat(AdStrings[2], def.RatingHygiene); }
            if (def.RatingBladder != 0) { motivesString.AppendFormat(AdStrings[3], def.RatingBladder); }
            if (def.RatingEnergy != 0) { motivesString.AppendFormat(AdStrings[4], def.RatingEnergy); }
            if (def.RatingFun != 0) { motivesString.AppendFormat(AdStrings[5], def.RatingFun); }
            if (def.RatingRoom != 0) { motivesString.AppendFormat(AdStrings[6], def.RatingRoom); }

            var sFlags = def.RatingSkillFlags;
            for (int i = 0; i < 7; i++)
            {
                if ((sFlags & (1 << i)) > 0) motivesString.Append(AdStrings[i+7]);
            }

            MotivesText.CurrentText = motivesString.ToString();
            ObjectOwnerText.Caption = GameFacade.Strings.GetString("206", "24", new string[] { "You" });

            SpecificTabButton.Disabled = !bought;

            if (entity is VMGameObject) {
                var objects = entity.MultitileGroup.Objects;
                ObjectComponent[] objComps = new ObjectComponent[objects.Count];
                for (int i=0; i<objects.Count; i++) {
                    objComps[i] = (ObjectComponent)objects[i].WorldUI;
                }
                var thumb = World.GetObjectThumb(objComps, entity.MultitileGroup.GetBasePositions(), GameFacade.GraphicsDevice);
                if (Thumbnail.Texture != null) Thumbnail.Texture.Dispose();
                Thumbnail.Texture = thumb;
                UpdateImagePosition();
            } else
            {
                if (Thumbnail.Texture != null) Thumbnail.Texture.Dispose();
                Thumbnail.Texture = null;
            }
        }
Beispiel #4
0
        public BHAVEditor(VM vm, VMEntity entity)
            : this()
        {
            DebugMode = true;
            DebugEntity = entity;
            Text = "Tracer - " + entity.ToString() + " (ID " + entity.ObjectID + ")";

            UpdateStack();
            Editor.DisableDebugger += DisableDebugger;
        }