Skip to content

Commit

Permalink
enable pantilt if the bg has it
Browse files Browse the repository at this point in the history
  • Loading branch information
stonedDiscord committed Aug 27, 2024
1 parent 962656c commit c4f8f6f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webAO/packets/handlers/handleBN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { AO_HOST } from "../../client/aoHost";
import { safeTags } from "../../encoding";
import { updateBackgroundPreview } from '../../dom/updateBackgroundPreview'
import { getIndexFromSelect } from '../../dom/getIndexFromSelect'
import { switchPanTilt } from '../../dom/switchPanTilt'
import transparentPng from '../../constants/transparentPng'
import tryUrls from "../../utils/tryUrls";

/**
Expand Down Expand Up @@ -45,6 +47,10 @@ export const handleBN = (args: string[]) => {
});
tryUrls(`${bgfolder}court`).then((resp) => {
(<HTMLImageElement>document.getElementById("client_court")).src = resp;
if (resp !== transparentPng) {
(<HTMLInputElement>document.getElementById("client_pantilt")).checked = true;
switchPanTilt()
}
});
tryUrls(`${bgfolder}defenseempty`).then((resp) => {
(<HTMLImageElement>document.getElementById("client_court_def")).src =
Expand Down

0 comments on commit c4f8f6f

Please sign in to comment.