Skip to content

Commit

Permalink
Merge pull request #30 from LonoxX/dev
Browse files Browse the repository at this point in the history
fix: prettier format
  • Loading branch information
LonoxX authored Nov 11, 2024
2 parents 239227f + cf353f6 commit a6aeee3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

![R6Roulette](https://lonoxx.me/dist/img/Banner/R6Roulette.png)

_R6 Roulette_ is a project that randomly generates operators and their equipment for the game _Rainbow Six Siege_.
*R6 Roulette* is a project that randomly generates operators and their equipment for the game *Rainbow Six Siege*.

- Click the **Attacker** or **Defender** button to randomly select an operator.
- The selected operator will be displayed along with their primary and secondary weapons, attachments, and gadgets.

**Challenge System:**

- Check out challenges to make your game even more interesting.

**Challenge Request System:**

- Submit your own created challenges. These will be reviewed and added by the team if they meet the guidelines.

## Discord Bot & Android App

## Discord Bot & Android App
[Invite Discord Bot](https://pnnet.dev/r6discord). \
[Try Android App](https://pnnet.dev/r6android).

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.3",
"html-webpack-plugin": "^5.6.0",
"style-loader": "^4.0.0",
"webpack": "^5.96.1",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"devDependencies": {
Expand Down
14 changes: 10 additions & 4 deletions src/assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async function fetchData(endpoint) {
}
}


async function getRandomOperator(role) {
const data = await fetchData(`role/${role}`);
if (data) randomOperator(data);
Expand All @@ -58,15 +59,16 @@ function randomOperator(operators) {
R6badge.src = chosen.badge || "";
R6name.textContent = chosen.name || "N/A";

const primaryWeapon = randomItem(chosen.weapons.filter((weapon) => weapon.weapon_type === "primary"));
const secondaryWeapon = randomItem(chosen.weapons.filter((weapon) => weapon.weapon_type === "secondary"));
const primaryWeapon = randomItem(chosen.weapons.filter(weapon => weapon.weapon_type === "primary"));
const secondaryWeapon = randomItem(chosen.weapons.filter(weapon => weapon.weapon_type === "secondary"));
const gadget = randomItem(chosen.gadgets);

displayWeapon(primaryWeapon, operatorWeapons, operatorWeaponsImg, attachment, grip, scope);
displayWeapon(secondaryWeapon, operatorWeapons2, operatorWeapons2Img, attachment2, grip2, scope2);

operatorGadgets.textContent = gadget?.gadget_name || "N/A";
operatorGadgetsImg.src = gadget?.img || "";

}

function randomItem(items) {
Expand All @@ -85,6 +87,8 @@ function displayWeapon(weapon, weaponNameElem, weaponImgElem, attachmentElem, gr
scopeElem.textContent = randomItem(weapon.scopes) || "N/A";
}



R6attacker.addEventListener("click", () => getRandomOperator("attacker"));
R6defender.addEventListener("click", () => getRandomOperator("defender"));

Expand Down Expand Up @@ -155,6 +159,7 @@ function setupCloseButton(buttonId, boxId) {
});
}


function openchangelog() {
const element = document.getElementById("changelogbox");
element.style.display = "block";
Expand All @@ -170,16 +175,17 @@ function openprivacy() {
element.style.display = "block";
}


function showErrorModal() {
const modal = document.getElementById("error-modal");
modal.style.display = "block";

const closeModal = document.getElementById("close-modal");
closeModal.onclick = function () {
closeModal.onclick = function() {
modal.style.display = "none";
};

window.onclick = function (event) {
window.onclick = function(event) {
if (event.target === modal) {
modal.style.display = "none";
}
Expand Down
19 changes: 9 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="R6 Roulette - Random Rainbow Six: Siege operators, weapons, and equipment for an added challenge in the game." />
<meta
name="keywords"
content="R6 Roulette, Rainbow Six Siege, random operator generator, random loadout, operator randomizer, operator picker, random operators, FPS game, tactical shooter, team-based multiplayer, operator challenges, random attacker, random defender, R6 loadout randomizer, R6 strat roulette, Siege operator wheel, R6 randomizer, tactical challenges, gameplay variety, Rainbow Six Siege randomizer, R6 operator roulette"
/>
name="keywords"
content="R6 Roulette, Rainbow Six Siege, random operator generator, random loadout, operator randomizer, operator picker, random operators, FPS game, tactical shooter, team-based multiplayer, operator challenges, random attacker, random defender, R6 loadout randomizer, R6 strat roulette, Siege operator wheel, R6 randomizer, tactical challenges, gameplay variety, Rainbow Six Siege randomizer, R6 operator roulette"
/>

<meta name="author" content="LonoxX | Panda-Network" />
<meta name="robots" content="index, follow" />
Expand Down Expand Up @@ -38,13 +38,13 @@

<!-- Styls -->
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
<link href="https://cdn.r6roulette.de/fontawesome/releases/6.6.0/css/fontawesome.css" rel="stylesheet" />
<link href="https://cdn.r6roulette.de/fontawesome/releases/6.6.0/css/brands.css" rel="stylesheet" />
<link href="https://cdn.r6roulette.de/fontawesome/releases/6.6.0/css/solid.css" rel="stylesheet" />

<!-- Scripts -->
<script src="https://kit.fontawesome.com/39db239ed8.js" crossorigin="anonymous"></script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DL5K6TFENP"></script>
<meta name="google-adsense-account" content="ca-pub-2918480126105118" />
<meta name="google-adsense-account" content="ca-pub-2918480126105118">
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
Expand All @@ -61,7 +61,6 @@
<div class="operatorBox">
<img class="operator-img" alt="operator-img" />
<img class="operator-badge" alt="operator-badge" />
<img src="assets/img/backgound.png" loading="lazy" alt="Background">
<div class="operator-bottom">
<h1 class="operator-name"></h1>

Expand Down Expand Up @@ -217,10 +216,10 @@ <h4>Angaben gem&auml;&szlig; &sect; 5 TMG</h4>
</div>
</div>

<div id="error-modal" class="modal" style="display: none">
<div id="error-modal" class="modal" style="display:none;">
<div class="modal-content">
<span id="close-modal" class="close">&times;</span>
<h2 style="color: red">Service Currently Unavailable</h2>
<h2 style="color: red;">Service Currently Unavailable</h2>
<p>Please try again later.</p>
</div>
</div>
Expand Down

0 comments on commit a6aeee3

Please sign in to comment.