Greasy Fork is available in English.

Ammo-Bar Mod | Shell Shockers | flygOn LiTe

Adds an ammo bar to the Shell Shockers game UI

Tästä skriptistä on versioita, joissa koodia päivitettiin. Näytä kaikki versiot.

  • v1.4 8.5.2023
  • v1.3 4.5.2023

    Removed

    Removed the bathroomCheck() function as it is no longer necessary after implementing handlePauseChange().

  • v1.2 4.5.2023

    Fixed

    Correctly update ammoTotal when switching weapons while the game is paused. The previous implementation using setInterval was replaced with a MutationObserver to watch for changes in the vueData.isPaused property. The handlePauseChange() function was added to handle the mutation event and call the setAmmoAmount() function when the game is paused.
    Fixed the issue with the ammo bar not animating its width when the ammo changes. This was caused by the ammoTotal being undefined. With the fix in updating ammoTotal, the ammo bar now animates correctly as the ammo changes.

  • v1.1 4.5.2023

    Added

    Wrapped the entire script in a userscript structure, with the necessary metadata and a self-invoking function to encapsulate the code.
    Implemented injectScriptAndStyles function to inject the main script and CSS styles into the page, eliminating the need for external files.
    Added waitForDOMElements function to ensure the necessary DOM elements are available before injecting the script and styles, preventing errors caused by accessing elements before they are loaded.
    Created a separate function attachEventListener to wrap the original event listener attachment, which checks if the #equip_equippedslots element is available before attaching the listener.

    Changed

    Modified the script to use the waitForDOMElements function to wait for the required elements before running the main script, ensuring the elements are available in the DOM when needed.

    Fixed

    Resolved errors related to accessing DOM elements before they were loaded by implementing the waitForDOMElements function and adjusting the script execution order.

  • v1 18.10.2022