Skip to content

Commit

Permalink
Fixing ManagedTypes File setting not working
Browse files Browse the repository at this point in the history
  • Loading branch information
DaemonF0rge committed Dec 23, 2021
1 parent df67a1d commit 1379e72
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Crypto/scripts/5_Mission/MissionServer.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ modded class MissionServer extends MissionBase {
override void OnMissionStart()
{
super.OnMissionStart();
string ModFile = "Crypto_types.xml";
string Path = "Crypto\\xmls\\";
CopyXmlFile(Path + ModFile, ModFile);
if (!m_Handler){
m_Handler = new CyptoMarketHandler("", new TStringArray);
}
Print("[Crypto] OnInit");
GetCryptoConfig();
if (GetCryptoConfig().ManagedTypesFile){
string ModFile = "Crypto_types.xml";
string Path = "Crypto\\xmls\\";
CopyXmlFile(Path + ModFile, ModFile);
}
SpawnCryptoTraders();
GetRPCManager().AddRPC( "Crypto", "RPCCryptoConfig", this, SingeplayerExecutionType.Both );
}
Expand Down
135 changes: 135 additions & 0 deletions xmls/Crypto_types.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<types>
<!-- Crypto Currency -->

<type name="Cryptocurrency_bitcoin">
<nominal>2</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>0</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier3"/>
<value name="Tier4"/>
</type>
<type name="Cryptocurrency_ethereum">
<nominal>8</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>3</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier3"/>
<value name="Tier4"/>
</type>
<type name="Cryptocurrency_litecoin">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier3"/>
<value name="Tier4"/>
</type>
<type name="Cryptocurrency_Sack_ripple">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
<type name="Cryptocurrency_Sack_cardano">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
<type name="Cryptocurrency_Sack_dogecoin">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
<type name="Cryptocurrency_Sack_shiba">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
<type name="Cryptocurrency_Sack_binance">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
<type name="Cryptocurrency_Sack_solana">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
<type name="Cryptocurrency_Sack_stellar">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>600</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="1" deloot="0"/>
<tag name="shelves"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
</types>

0 comments on commit 1379e72

Please sign in to comment.