Add FSUseAis3Api debug setting to turn off AIS3
parent
7ebdeb97fb
commit
2de937d0bc
|
|
@ -23138,6 +23138,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSUseAis3Api</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Option to disable the use of the new AISv3 inventory API</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,10 @@ void AISCommand::httpFailure()
|
|||
//static
|
||||
bool AISCommand::isAPIAvailable()
|
||||
{
|
||||
if (gAgent.getRegion())
|
||||
// <FS:Ansariel> Add AIS3 debug setting
|
||||
//if (gAgent.getRegion())
|
||||
if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api"))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3");
|
||||
}
|
||||
|
|
@ -133,7 +136,10 @@ bool AISCommand::isAPIAvailable()
|
|||
//static
|
||||
bool AISCommand::getInvCap(std::string& cap)
|
||||
{
|
||||
if (gAgent.getRegion())
|
||||
// <FS:Ansariel> Add AIS3 debug setting
|
||||
//if (gAgent.getRegion())
|
||||
if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api"))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
cap = gAgent.getRegion()->getCapability("InventoryAPIv3");
|
||||
}
|
||||
|
|
@ -147,7 +153,10 @@ bool AISCommand::getInvCap(std::string& cap)
|
|||
//static
|
||||
bool AISCommand::getLibCap(std::string& cap)
|
||||
{
|
||||
if (gAgent.getRegion())
|
||||
// <FS:Ansariel> Add AIS3 debug setting
|
||||
//if (gAgent.getRegion())
|
||||
if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api"))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
cap = gAgent.getRegion()->getCapability("LibraryAPIv3");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue