commit d46efa575312c67bbcebf733eb87bceb1131c57d Author: Abheek Dhawan Date: Sat Feb 5 22:07:15 2022 -0600 Initial commit diff --git a/content/scripts/game/components/inventoryComponent.ws b/content/scripts/game/components/inventoryComponent.ws new file mode 100644 index 0000000..42c6935 Binary files /dev/null and b/content/scripts/game/components/inventoryComponent.ws differ diff --git a/content/scripts/local/achievementStatTrak/achievement_stats.ws b/content/scripts/local/achievementStatTrak/achievement_stats.ws new file mode 100644 index 0000000..bdbd8c3 --- /dev/null +++ b/content/scripts/local/achievementStatTrak/achievement_stats.ws @@ -0,0 +1,45 @@ +// TODO: Multiple functions: one returns array of stuff, another formats, and one final exec function + +// Function to get the stats in a formatted string +function getAchievementStats() : string +{ + // Integer to be later used in the for loop + var i : int; + + // Array to store the achievement stats + var stats : array; + + // String where all the achievements go + var achievementString : string; + + // Set achievement string empty to be later added on to + achievementString = ""; + + // Add all stats to the array + stats.PushBack(ES_CharmedNPCKills); + stats.PushBack(ES_AardFallKills); + stats.PushBack(ES_EnvironmentKills); + stats.PushBack(ES_CounterattackChain); + stats.PushBack(ES_DragonsDreamTriggers); + stats.PushBack(ES_KnownPotionRecipes); + stats.PushBack(ES_KnownBombRecipes); + stats.PushBack(ES_ReadBooks); + stats.PushBack(ES_HeadShotKills); + stats.PushBack(ES_BleedingBurnedPoisoned); + stats.PushBack(ES_DestroyedNests); + stats.PushBack(ES_FundamentalsFirstKills); + stats.PushBack(ES_FinesseKills); + stats.PushBack(ES_SelfArrowKills); + stats.PushBack(ES_ActivePotions); + stats.PushBack(ES_KilledCows); + stats.PushBack(ES_SlideTime); + + // Loop through each stat to create a final string that goes in the Gwent book + for (i = 0; i < stats.Size(); i += 1) + { + achievementString += StatisticEnumToName(stats[i]) + ": " + "" + theGame.GetGamerProfile().GetStatValue(stats[i]) + "" + "
"; + } + + // Return the final string + return achievementString; +} \ No newline at end of file