some new features + json adjustments

This commit is contained in:
IM23a-spirgif
2024-11-07 13:20:09 +01:00
parent 9287c98635
commit 540b4e00b6
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -9,7 +9,7 @@ let headshotBaseApplied = false;
// Function to fetch operatives data from JSON // Function to fetch operatives data from JSON
function fetchOperativesData() { function fetchOperativesData() {
fetch('static/json/operative.json') fetch('/static/json/operative.json')
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
populateOperatives(data.operatives); // Populate the operative dropdown once data is loaded populateOperatives(data.operatives); // Populate the operative dropdown once data is loaded
@@ -132,6 +132,7 @@ function populateWeapons() {
selectedWeapon = weapons.find(weapon => weapon.id === selectedWeaponId); selectedWeapon = weapons.find(weapon => weapon.id === selectedWeaponId);
if (selectedWeapon) { if (selectedWeapon) {
updateWeaponStats(selectedWeapon); // Update stats on valid selection updateWeaponStats(selectedWeapon); // Update stats on valid selection
applyModifiers();
} }
}); });
} }
+1 -1
View File
@@ -2,7 +2,7 @@
{ {
"id": 1, "id": 1,
"name": "G18", "name": "G18",
"damage": 32, "damage": 34,
"damage_multiplier": 1, "damage_multiplier": 1,
"rpm": 550, "rpm": 550,
"mag_size": 18, "mag_size": 18,