Skip to content

Commit

Permalink
Merge pull request johnathon-walnut#6 from SDarkra1/master
Browse files Browse the repository at this point in the history
Add even more attributes
  • Loading branch information
johnathon-walnut authored Oct 10, 2023
2 parents db0180d + 18cf156 commit 9f736ac
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jobs:
- name: Add MSBuild to PATH
uses: microsoft/[email protected]

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
Expand Down
44 changes: 41 additions & 3 deletions resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,13 @@
704: "Energy Orb",
};

const tierOptions = {
0: "None",
1: "Basic",
2: "Specialized",
3: "Professional"
}

const sheenOptions = {
0: "None",
1: "Team shine",
Expand All @@ -684,6 +691,17 @@
7: "Hot rod"
};

const effectOptions = {
0: "None",
1: "Cerebral Discharge",
2: "Fire Horns",
3: "Flames",
4: "Hypno-Beam",
5: "Incinerator",
6: "Singularity",
7: "Tornado"
}

const attributeInfo = {
834: { name: "paintkit_proto_def_index", label: "Paint kit skin", type: 3 },
866: { name: "custom_paintkit_seed_lo", label: "Paint kit seed (Low bytes)", type: 0 },
Expand All @@ -697,9 +715,14 @@
2027: { name: "is_australium_item", label: "Australium", type: 1 },
2022: { name: "loot_rarity", label: "Loot rarity", type: 1 },
542: { name: "item_style_override", label: "Item style override", type: 1 },
2025: { name: "killstreak_tier", label: "Killstreak tier", type: 3 },
2014: { name: "killstreak_idleeffect", label: "Killstreak sheen", type: 3 },
2013: { name: "killstreak_effect", label: "Killstreak effect", type: 3 },
1007: { name: "halloween_pumpkin_explosions", label: "Pumpkin Bombs", type: 1},
1008: { name: "halloween_green_flames", label: "Halloween Flames", type: 1},
1006: { name: "halloween_voice_modulation", label: "Voices from Below", type: 1},
364: { name: "add_jingle_to_footsteps", label: "Jingle all the way", type: 1},
295: { name: "set_custom_buildmenu", label:"Pipboy build menu", type: 1}
};
</script>
</head>
Expand Down Expand Up @@ -856,11 +879,21 @@ <h4>Weapon: <span id="weapon">None</span></h4>
$list.append(`<option value="${key}">${unusualOptions[key]}</option>`);
}
}
if (name == "killstreak_tier") {
for (let key in tierOptions) {
$list.append(`<option value="${key}">${tierOptions[key]}</option>`);
}
}
if (name == "killstreak_idleeffect") {
for (let key in sheenOptions) {
$list.append(`<option value="${key}">${sheenOptions[key]}</option>`);
}
}
if (name == "killstreak_effect") {
for (let key in effectOptions){
$list.append(`<option value="${key}">${effectOptions[key]}</option>`);
}
}

$list.change(function () {
updateAttribute(weaponIndex, name, $(this).val());
Expand Down Expand Up @@ -991,15 +1024,20 @@ <h4>Weapon: <span id="weapon">None</span></h4>
attributes.append(createAttributeButton("Unusual effect 2", "set_attached_particle_static", 370, 3));
attributes.append(createAttributeButton("Festivized", "is_festivized", 2053, 1));
attributes.append(createAttributeButton("Australium", "is_australium_item", 2027, 1));
attributes.append(createAttributeButton("Killstreak Tier", "killstreak_tier", 2025, 3)); // I assume that 1=basic, 2=specialized, and 3=professional, although it could be a bool
attributes.append(createAttributeButton("Item style override", "item_style_override", 542, 1));
attributes.append(createAttributeButton("Killstreak sheen", "killstreak_idleeffect", 2014, 3));
attributes.append(createAttributeButton("Pumpkin Bombs", "halloween_pumpkin_explosions", 1007, 1))
attributes.append(createAttributeButton("Halloween Flames", "halloween_green_flames", 1008, 1))
attributes.append(createAttributeButton("Killstreak effect", "killstreak_effect", 2013, 3));
attributes.append(createAttributeButton("Pumpkin Bombs", "halloween_pumpkin_explosions", 1007, 1));
attributes.append(createAttributeButton("Halloween Flames", "halloween_green_flames", 1008, 1));
attributes.append(createAttributeButton("Voices from Below", "halloween_voice_modulation", 1006, 1));
attributes.append(createAttributeButton("Jingle all the way", "add_jingle_to_footsteps", 364, 1));
attributes.append(createAttributeButton("Pip-Boy Build Menu", "set_custom_buildmenu", 295, 1));

// Not setTimeout idiot
setInterval(updateWeaponIndex, 1000);
});
</script>
</body>

</html>
</html>
10 changes: 10 additions & 0 deletions src/app/SkinChanger/SkinChanger.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ namespace attributes
constexpr uint16_t loot_rarity = 2022;
constexpr uint16_t item_style_override = 542;
constexpr uint16_t set_turn_to_gold = 150;
constexpr uint16_t killstreak_tier = 2025;
constexpr uint16_t killstreak_effect = 2013;
constexpr uint16_t killstreak_idleeffect = 2014;
constexpr uint16_t halloween_pumpkin_explosions = 1007;
constexpr uint16_t halloween_green_flames = 1008;
constexpr uint16_t halloween_voice_modulation = 1006;
constexpr uint16_t add_jingle_to_footsteps = 364;
constexpr uint16_t set_custom_buildmenu = 295;

#define HashCase(str) case FNV1A::HashConst(#str): return str

Expand All @@ -43,9 +48,14 @@ namespace attributes
HashCase(loot_rarity);
HashCase(item_style_override);
HashCase(set_turn_to_gold);
HashCase(killstreak_tier);
HashCase(killstreak_effect);
HashCase(killstreak_idleeffect);
HashCase(halloween_pumpkin_explosions);
HashCase(halloween_green_flames);
HashCase(halloween_voice_modulation);
HashCase(add_jingle_to_footsteps);
HashCase(set_custom_buildmenu);
default:
return 0;
}
Expand Down

0 comments on commit 9f736ac

Please sign in to comment.