Ignore:
Timestamp:
Oct 28, 2015, 7:51:20 PM (9 years ago)
Author:
peter.souza
Message:

Enemies (zombies and hostile animal entities) are now shown on the map as Hostiles and require permission level 'webapi.gethostilelocation' for web viewers to see.

Animals (non-hostile entities) are now shown on the map as Animals and require permission level 'webapi.getanimalslocation' for web viewers to see.

Permission level for 'webapi.viewallclaims' is now required for a viewer to see all claims, otherwise the permission level for 'webapi.getlandclaims' will only show viewer-owned claims. A viewer requires both 'webapi.getlandclaims' and 'webapi.viewallclaims' to be set for all claims to show (you can't just set 'webapi.viewallclaims').
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317405&viewfull=1#post317405

Permission level for 'webapi.viewallplayers' is now required for a viewer to see all players, otherwise the permission level for 'webapi.getplayerslocation' will only show the player for the currently-authenticated viewer. A viewer requires both 'webapi.getplayerslocation' and 'webapi.viewallplayers' to be set for all players to show (you can't just set 'webapi.viewallplayers').
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317405&viewfull=1#post317405

Banned players are now hidden from the web map.
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=320702&viewfull=1#post320702

Items using 'CustomIcon' and 'CustomIconTint' are now supported (although the exact tinting may not be perfectly the same as the game).
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317117&viewfull=1#post317117
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317679&viewfull=1#post317679

Map marker icons for players, hostiles, and animals have been updated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs

    r250 r251  
    1313                private Dictionary<String, WebAPI> apis = new Dictionary<string, WebAPI> ();
    1414
    15                 public ApiHandler (string staticPart, string moduleName = null) : base(moduleName) {
     15                public ApiHandler (string staticPart, string moduleName = null) : base (moduleName) {
    1616                        this.staticPart = staticPart;
    1717
    1818                        foreach (Type t in Assembly.GetExecutingAssembly ().GetTypes ()) {
    1919                                if (!t.IsAbstract && t.IsSubclassOf (typeof(WebAPI))) {
    20                                         ConstructorInfo ctor = t.GetConstructor (new Type[0]);
     20                                        ConstructorInfo ctor = t.GetConstructor (new Type [0]);
    2121                                        if (ctor != null) {
    22                                                 WebAPI apiInstance = (WebAPI)ctor.Invoke (new object[0]);
     22                                                WebAPI apiInstance = (WebAPI)ctor.Invoke (new object [0]);
    2323                                                addApi (t.Name.ToLower (), apiInstance);
    2424                                        }
    2525                                }
    2626                        }
     27
     28            // Add dummy types
     29            Type dummy_t = typeof (API.Null);
     30            ConstructorInfo dummy_ctor = dummy_t.GetConstructor (new Type [0]);
     31            if (dummy_ctor != null) {
     32                WebAPI dummy_apiInstance = (WebAPI)dummy_ctor.Invoke (new object[0]);
     33
     34                // Permissions that don't map to a real API
     35                addApi("viewallclaims", dummy_apiInstance);
     36                addApi("viewallplayers", dummy_apiInstance);
     37            }
    2738                }
    2839
Note: See TracChangeset for help on using the changeset viewer.