Ignore:
Timestamp:
May 18, 2023, 3:09:12 PM (18 months ago)
Author:
alloc
Message:

Added Bloodmoon API
Removed WebUiUpdates API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/WebServer/src/WebAPI/APIs/ServerStats.cs

    r426 r436  
    1212                private static readonly byte[] jsonKeyAnimals = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("animals");
    1313               
    14                 private static readonly byte[] jsonKeyDays = JsonWriter.GetEncodedPropertyNameWithBeginObject ("days");
    15                 private static readonly byte[] jsonKeyHours = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("hours");
    16                 private static readonly byte[] jsonKeyMinutes = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("minutes");
    1714
    1815                protected override void HandleRestGet (RequestContext _context) {
     
    2017                       
    2118                        writer.WriteRaw (jsonKeyGameTime);
    22 
    2319                        (int days, int hours, int minutes) = GameUtils.WorldTimeToElements (GameManager.Instance.World.worldTime);
    24                        
    25                         writer.WriteRaw (jsonKeyDays);
    26                         writer.WriteInt32 (days);
    27                        
    28                         writer.WriteRaw (jsonKeyHours);
    29                         writer.WriteInt32 (hours);
    30                        
    31                         writer.WriteRaw (jsonKeyMinutes);
    32                         writer.WriteInt32 (minutes);
    33                        
    34                         writer.WriteEndObject ();
     20                        JsonCommons.WriteGameTimeObject (ref writer, days, hours, minutes);
    3521
    3622                        writer.WriteRaw (jsonKeyPlayers);
Note: See TracChangeset for help on using the changeset viewer.