Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.15.1 update #311

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ on:
branches:
- main

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pop-a-loon",
"version": "1.15.0",
"version": "1.15.1",
"description": "The new rising trend (literally) that changes the browser game completely.",
"private": true,
"scripts": {
Expand Down
11 changes: 6 additions & 5 deletions src/content/spawn-balloon.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import browser from 'webextension-polyfill';
import * as balloons from '@/balloons';
import log from '@/managers/log';
import storage from '@/managers/storage';
import {
getBalloonContainer,
importStylesheet,
isFullScreenVideoPlaying,
weightedRandom,
} from '@/utils';
import log from '@/managers/log';
import storage from '@/managers/storage';

(async () => {
// Prevent running in popup
Expand All @@ -30,9 +30,10 @@ import storage from '@/managers/storage';

const balloonClasses = Object.values(balloons);
// Make a list from the spawn_chance from each balloon class
const spawnChances = balloonClasses.map(
(BalloonType) => BalloonType.spawn_chance
);
const spawnChances =
process.env.NODE_ENV === 'development'
? new Array(balloonClasses.length).fill(1)
: balloonClasses.map((BalloonType) => BalloonType.spawn_chance);

// Create a new balloon and make it rise
const Balloon = weightedRandom(balloonClasses, spawnChances, {
Expand Down
Loading