示例#1
0
        protected Resource(MtaResource resource)
        {
            resources.Add(resource, this);
            MtaResource = resource;

            GameServer.OnStart += (Elements.ResourceRootElement source, Game.Events.OnStartEventArgs eventArgs) =>
            {
                if (eventArgs.Resource.MtaResource != this.MtaResource)
                {
                    return;
                }
                OnStart?.Invoke();
            };

            GameServer.OnPreStart += (Elements.ResourceRootElement source, Game.Events.OnPreStartEventArgs eventArgs) =>
            {
                if (eventArgs.Resource.MtaResource != this.MtaResource)
                {
                    return;
                }
                OnPreStart?.Invoke();
            };

            GameServer.OnStop += (Elements.ResourceRootElement source, Game.Events.OnStopEventArgs eventArgs) =>
            {
                if (eventArgs.Resource.MtaResource != this.MtaResource)
                {
                    return;
                }
                OnStop?.Invoke();
            };
        }
示例#2
0
 internal OnScreenShotEventArgs(MtaResource resource, dynamic status, dynamic imageData, dynamic timeStamp, dynamic tag)
 {
     Resource  = Resource.Get(resource);
     Status    = (StatusCode)status;
     ImageData = (string)imageData;
     TimeStamp = (int)timeStamp;
     Tag       = (string)tag;
 }
示例#3
0
 internal static Resource Get(MtaResource resource)
 {
     if (resource == null)
     {
         return(null);
     }
     if (!resources.ContainsKey(resource))
     {
         return(new Resource(resource));
     }
     return(resources[resource]);
 }
示例#4
0
 internal OnStopEventArgs(MtaResource resource)
 {
     Resource = Resource.Get(resource);
 }
示例#5
0
 public static bool UpdateResourceACLRequest(MtaResource theResource, string rightName, bool access, string byWho)
 {
     throw new NotImplementedException();
 }
示例#6
0
 public static MtaResource CopyResource(MtaResource theResource, string newResourceName, string organizationalDir)
 {
     throw new NotImplementedException();
 }
示例#7
0
 public static bool StartResource(MtaResource resourceToStart, bool persistent, bool startIncludedResources, bool loadServerConfigs, bool loadMaps, bool loadServerScripts, bool loadHTML, bool loadClientConfigs, bool loadClientScripts, bool loadFiles)
 {
     throw new NotImplementedException();
 }
示例#8
0
 public static bool StopResource(MtaResource theResource)
 {
     throw new NotImplementedException();
 }
示例#9
0
 public static int GetResourceLastStartTime(MtaResource theResource)
 {
     throw new NotImplementedException();
 }
示例#10
0
 public static bool SetResourceInfo(MtaResource theResource, string attribute, string value)
 {
     throw new NotImplementedException();
 }
示例#11
0
 internal OnPreStartEventArgs(MtaResource resource)
 {
     Resource = Resource.Get(resource);
 }
示例#12
0
 public static bool RefreshResources(bool refreshAll, MtaResource targetResource)
 {
     throw new NotImplementedException();
 }
示例#13
0
 public static string GetResourceOrganizationalPath(MtaResource theResource)
 {
     throw new NotImplementedException();
 }
示例#14
0
 public static bool IsResourceArchived(MtaResource resourceElement)
 {
     throw new NotImplementedException();
 }
示例#15
0
 public static int GetResourceLoadTime(MtaResource res)
 {
     throw new NotImplementedException();
 }
示例#16
0
 public static MtaElement GetResourceMapRootElement(MtaResource theResource, string mapName)
 {
     throw new NotImplementedException();
 }
示例#17
0
 public static string GetResourceLoadFailureReason(MtaResource theResource)
 {
     throw new NotImplementedException();
 }
示例#18
0
 internal Resource(MtaResource resource)
 {
     resources.Add(resource, this);
     MtaResource = resource;
 }
示例#19
0
 public static bool RestartResource(MtaResource theResource, bool persistent, bool configs, bool maps, bool scripts, bool html, bool clientConfigs, bool clientScripts, bool clientFiles)
 {
     throw new NotImplementedException();
 }
示例#20
0
 public static bool RemoveResourceFile(MtaResource theResource, string fileName)
 {
     throw new NotImplementedException();
 }
示例#21
0
 public static dynamic GetResourceACLRequests(MtaResource theResource)
 {
     throw new NotImplementedException();
 }