Beispiel #1
0
 protected bool CanDoEntityAction(IDynamicEntity owner, out IToolImpact impact)
 {
     if (!owner.EntityState.IsEntityPicked)
     {
         impact = new ToolImpact
         {
             Message = "Pick an entity"
         };
         return(false);
     }
     return(CanDo(owner, out impact));
 }
Beispiel #2
0
 protected bool CanDoBlockOrEntityAction(IDynamicEntity owner, out IToolImpact impact)
 {
     impact = null;
     if (!owner.EntityState.IsBlockPicked && !owner.EntityState.IsEntityPicked)
     {
         impact = new ToolImpact
         {
             Message = "Pick an entity or a block"
         };
         return(false);
     }
     return(CanDo(owner, out impact));
 }
Beispiel #3
0
        protected bool CanDo(IDynamicEntity owner, out IToolImpact impact)
        {
            impact = null;
            if (owner.IsReadOnly)
            {
                impact = new ToolImpact
                {
                    Message = "You don't have the access to modify the world. Ask admins for access."
                };
                return(false);
            }

            return(true);
        }
Beispiel #4
0
 protected bool Equals(ToolImpact other)
 {
     return(Success.Equals(other.Success) && string.Equals(Message, other.Message) && SrcBlueprintId == other.SrcBlueprintId);
 }