Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e67df127f4 | ||
|
|
707f469917 | ||
|
|
a831471184 | ||
|
|
4a50d26111 | ||
|
|
79dbab8fcb |
@@ -4,7 +4,8 @@ Pulse is a clientside mod for Titanfall 2 letting you view killstats collected b
|
|||||||
|
|
||||||
Currently, features include:
|
Currently, features include:
|
||||||
- displaying kills in `Pilot Weapons`
|
- displaying kills in `Pilot Weapons`
|
||||||
- displaying kills and most used weapon (by kills) in `Overview`
|
- displaying kills in `Titans` tab
|
||||||
|
- mostly functional `Overview` tab
|
||||||
|
|
||||||
Want to know what we have planned for future updates? See [here.](https://github.com/ToneAPI/pulse/projects?query=is%3Aopen)
|
Want to know what we have planned for future updates? See [here.](https://github.com/ToneAPI/pulse/projects?query=is%3Aopen)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Name": "ToneAPI.pulse",
|
"Name": "ToneAPI.pulse",
|
||||||
"Description": "Displays Tone API kill data in the Stats tab.",
|
"Description": "Displays Tone API kill data in the Stats tab.",
|
||||||
"Version": "1.1.0-prerelease",
|
"Version": "1.1.0",
|
||||||
"LoadPriority": 1,
|
"LoadPriority": 1,
|
||||||
"Scripts": [
|
"Scripts": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void function GetStatsFromToneAPI_threaded(){
|
|||||||
print("[PULSE] Loaded, getting data...")
|
print("[PULSE] Loaded, getting data...")
|
||||||
HttpRequest getStats
|
HttpRequest getStats
|
||||||
getStats.method = HttpRequestMethod.GET
|
getStats.method = HttpRequestMethod.GET
|
||||||
getStats.url = "https://tone.sleepycat.date/v2_test/client/weapons"
|
getStats.url = "https://tone.sleepycat.date/v2/client/weapons"
|
||||||
getStats.queryParameters["player"] <- [NSGetLocalPlayerUID().tostring()]
|
getStats.queryParameters["player"] <- [NSGetLocalPlayerUID().tostring()]
|
||||||
void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response)
|
void functionref(HttpRequestResponse) onSuccess = void function(HttpRequestResponse response)
|
||||||
{
|
{
|
||||||
@@ -50,10 +50,6 @@ void function GetStatsFromToneAPI_threaded(){
|
|||||||
|
|
||||||
int function getWeaponKillsFromToneApi(string weaponRef){
|
int function getWeaponKillsFromToneApi(string weaponRef){
|
||||||
|
|
||||||
if(weaponRef.find("mp_weapon") != null){
|
|
||||||
weaponRef = weaponRef.slice(10)
|
|
||||||
}
|
|
||||||
|
|
||||||
if(weaponRef in globalToneAPIKillData){
|
if(weaponRef in globalToneAPIKillData){
|
||||||
print("[PULSE] Found matching weapon : " + weaponRef + " with " + globalToneAPIKillData[weaponRef] + " kills")
|
print("[PULSE] Found matching weapon : " + weaponRef + " with " + globalToneAPIKillData[weaponRef] + " kills")
|
||||||
return expect int(globalToneAPIKillData[weaponRef])
|
return expect int(globalToneAPIKillData[weaponRef])
|
||||||
@@ -63,10 +59,6 @@ int function getWeaponKillsFromToneApi(string weaponRef){
|
|||||||
|
|
||||||
int function getNemesisWeaponFromToneAPI(string weaponRef){
|
int function getNemesisWeaponFromToneAPI(string weaponRef){
|
||||||
|
|
||||||
if(weaponRef.find("mp_weapon") != null){
|
|
||||||
weaponRef = weaponRef.slice(10)
|
|
||||||
}
|
|
||||||
|
|
||||||
if(weaponRef in globalToneAPIDeathData){
|
if(weaponRef in globalToneAPIDeathData){
|
||||||
print("[PULSE] Found matching weapon : " + weaponRef + " with " + globalToneAPIDeathData[weaponRef] + " nemesis weapon kills")
|
print("[PULSE] Found matching weapon : " + weaponRef + " with " + globalToneAPIDeathData[weaponRef] + " nemesis weapon kills")
|
||||||
return expect int(globalToneAPIDeathData[weaponRef])
|
return expect int(globalToneAPIDeathData[weaponRef])
|
||||||
@@ -76,10 +68,6 @@ int function getNemesisWeaponFromToneAPI(string weaponRef){
|
|||||||
|
|
||||||
int function getDWEFromToneAPI(string weaponRef){
|
int function getDWEFromToneAPI(string weaponRef){
|
||||||
|
|
||||||
if(weaponRef.find("mp_weapon") != null){
|
|
||||||
weaponRef = weaponRef.slice(10)
|
|
||||||
}
|
|
||||||
|
|
||||||
if(weaponRef in globalToneAPIDWEData){
|
if(weaponRef in globalToneAPIDWEData){
|
||||||
print("[PULSE] Found matching weapon : " + weaponRef + " with " + globalToneAPIDeathData[weaponRef] + " deaths while equipped")
|
print("[PULSE] Found matching weapon : " + weaponRef + " with " + globalToneAPIDeathData[weaponRef] + " deaths while equipped")
|
||||||
return expect int(globalToneAPIDWEData[weaponRef])
|
return expect int(globalToneAPIDWEData[weaponRef])
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ function UpdateViewStatsOverviewMenu()
|
|||||||
Hud_Show( weaponImageElem )
|
Hud_Show( weaponImageElem )
|
||||||
Hud_SetText( weaponNameElem, nemesisWeapon.printName )
|
Hud_SetText( weaponNameElem, nemesisWeapon.printName )
|
||||||
Hud_Show( weaponNameElem )
|
Hud_Show( weaponNameElem )
|
||||||
Hud_SetText( weaponDescElem, "#STATS_MOST_KILLS_VALUE", nemesisWeapon.val )
|
Hud_SetText( weaponDescElem, nemesisWeapon.val + " DEATHS BY WEAPON" )
|
||||||
Hud_Show( weaponDescElem )
|
Hud_Show( weaponDescElem )
|
||||||
Hud_Hide( noDataElem )
|
Hud_Hide( noDataElem )
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -361,9 +361,11 @@ table<string, table> function GetOverviewWeaponData()
|
|||||||
kval = float(getWeaponKillsFromToneApi(weaponName))
|
kval = float(getWeaponKillsFromToneApi(weaponName))
|
||||||
dval = float(getDWEFromToneAPI(weaponName))
|
dval = float(getDWEFromToneAPI(weaponName))
|
||||||
if (kval / dval > kdval){
|
if (kval / dval > kdval){
|
||||||
kdval = float(getWeaponKillsFromToneApi(weaponName) / getDWEFromToneAPI(weaponName))
|
kdval = kval / dval
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int rnd= int(kdval*100)
|
||||||
|
kdval = float(rnd)/100
|
||||||
if ( kdval > Table[ "highest_kpm" ].val.tofloat() )
|
if ( kdval > Table[ "highest_kpm" ].val.tofloat() )
|
||||||
{
|
{
|
||||||
Table[ "highest_kpm" ].ref = weaponName
|
Table[ "highest_kpm" ].ref = weaponName
|
||||||
|
|||||||
Reference in New Issue
Block a user