Ignore:
Timestamp:
Apr 10, 2023, 8:23:15 PM (19 months ago)
Author:
alloc
Message:
  • API "map" added, currently only supports GET with the ID "config"
  • API "player" added, currently only supports getting online players with some of the info not supported yet (playtime, last online, level)
  • Only logged in player's data is shown unless the user has the permission for "webapi.viewallplayers"
  • Internal refactoring
  • (Updated version to 21.0.258)
Location:
binary-improvements2/MapRendering/src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/MapRendering/src/MapRenderer.cs

    r423 r425  
    2525                private float renderTimeout = float.MaxValue;
    2626                private bool shutdown;
     27
     28
     29                public static bool Enabled => ConnectionManager.Instance.IsServer && GamePrefs.GetBool (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.EnableMapRendering)));
    2730
    2831                private MapRenderer () {
  • binary-improvements2/MapRendering/src/ModApi.cs

    r423 r425  
    1010
    1111                        Web.ServerInitialized += _web => {
    12                                 if (!GamePrefs.GetBool (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.EnableMapRendering)))) {
     12                                if (!MapRenderer.Enabled) {
    1313                                        return;
    1414                                }
     
    2424
    2525                private void GameStartDone () {
    26                         if (!ConnectionManager.Instance.IsServer) {
    27                                 return;
    28                         }
    29 
    30                         if (!GamePrefs.GetBool (EnumUtils.Parse<EnumGamePrefs> (nameof (EnumGamePrefs.EnableMapRendering)))) {
     26                        if (!MapRenderer.Enabled) {
    3127                                return;
    3228                        }
Note: See TracChangeset for help on using the changeset viewer.