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/WebPermissions.cs

    r244 r251  
    9999                        if (!string.IsNullOrEmpty (_module)) {
    100100                                lock (this) {
    101                                         knownModules.Add (_module, new WebModulePermission (_module, 0));
     101                    if (!IsKnownModule( _module)) {
     102                                            knownModules.Add (_module, new WebModulePermission (_module, 0));
     103                    }
    102104                                }
    103105                        }
     
    269271
    270272                        using (StreamWriter sw = new StreamWriter(GetFullPath ())) {
    271                                 sw.WriteLine ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    272                                 sw.WriteLine ("<webpermissions>");
    273                                 sw.WriteLine ("    <admintokens>");
    274                                 sw.WriteLine ("        <!-- <token name=\"adminuser1\" token=\"supersecrettoken\" permission_level=\"0\" /> -->");
    275                                 foreach (AdminToken at in admintokens.Values) {
    276                                         sw.WriteLine (string.Format ("        <token name=\"{0}\" token=\"{1}\" permission_level=\"{2}\" />", at.name, at.token, at.permissionLevel));
    277                                 }
    278                                 sw.WriteLine ("    </admintokens>");
    279                                 sw.WriteLine ();
    280                                 sw.WriteLine ("    <permissions>");
    281                                 sw.WriteLine ("        <!-- <permission module=\"webapi.executeconsolecommand\" permission_level=\"0\" /> -->");
    282                                 sw.WriteLine ("        <!-- <permission module=\"webapi.getplayersonline\" permission_level=\"1\" /> -->");
    283                                 sw.WriteLine ("        <!-- <permission module=\"web.map\" permission_level=\"1000\" /> -->");
    284                                 foreach (WebModulePermission wap in modules.Values) {
    285                                         sw.WriteLine (string.Format ("        <permission module=\"{0}\" permission_level=\"{1}\" />", wap.module, wap.permissionLevel));
    286                                 }
    287                                 sw.WriteLine ("    </permissions>");
    288                                 sw.WriteLine ();
    289                                 sw.WriteLine ("</webpermissions>");
    290                        
     273                sw.WriteLine ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
     274                sw.WriteLine ("<webpermissions>");
     275                sw.WriteLine  ();
     276                sw.WriteLine (" <admintokens>");
     277                sw.WriteLine ("         <!-- <token name=\"adminuser1\" token=\"supersecrettoken\" permission_level=\"0\" /> -->");
     278                foreach (AdminToken at in admintokens.Values) {
     279                    sw.WriteLine (string.Format ("              <token name=\"{0}\" token=\"{1}\" permission_level=\"{2}\" />", at.name, at.token, at.permissionLevel));
     280                }
     281                sw.WriteLine (" </admintokens>");
     282                sw.WriteLine ();
     283                sw.WriteLine (" <permissions>");
     284                foreach (WebModulePermission wap in modules.Values) {
     285                    sw.WriteLine (string.Format ("              <permission module=\"{0}\" permission_level=\"{1}\" />", wap.module, wap.permissionLevel));
     286                }
     287                sw.WriteLine ("         <!-- <permission module=\"web.map\" permission_level=\"1000\" /> -->");
     288                sw.WriteLine ();
     289                sw.WriteLine ("         <!-- <permission module=\"webapi.getlog\" permission_level=\"0\" /> -->");
     290                sw.WriteLine ("         <!-- <permission module=\"webapi.executeconsolecommand\" permission_level=\"0\" /> -->");
     291                sw.WriteLine ();
     292                sw.WriteLine ("         <!-- <permission module=\"webapi.getstats\" permission_level=\"1000\" /> -->");
     293                sw.WriteLine ("         <!-- <permission module=\"webapi.getplayersonline\" permission_level=\"1000\" /> -->");
     294                sw.WriteLine ();
     295                sw.WriteLine ("         <!-- <permission module=\"webapi.getplayerslocation\" permission_level=\"1000\" /> -->");
     296                sw.WriteLine ("         <!-- <permission module=\"webapi.viewallplayers\" permission_level=\"1\" /> -->");
     297                sw.WriteLine ();
     298                sw.WriteLine ("         <!-- <permission module=\"webapi.getlandclaims\" permission_level=\"1000\" /> -->");
     299                sw.WriteLine ("         <!-- <permission module=\"webapi.viewallclaims\" permission_level=\"1\" /> -->");
     300                sw.WriteLine ();
     301                sw.WriteLine ("         <!-- <permission module=\"webapi.getplayerinventory\" permission_level=\"1\" /> -->");
     302                sw.WriteLine ();
     303                sw.WriteLine ("         <!-- <permission module=\"webapi.gethostilelocation\" permission_level=\"1\" /> -->");
     304                sw.WriteLine ("         <!-- <permission module=\"webapi.getanimalslocation\" permission_level=\"1\" /> -->");
     305                sw.WriteLine (" </permissions>");
     306                sw.WriteLine ();
     307                sw.WriteLine ("</webpermissions>");
     308
    291309                                sw.Flush ();
    292310                                sw.Close ();
Note: See TracChangeset for help on using the changeset viewer.