Added cp command

This commit is contained in:
Olivier Gagnon
2021-10-11 22:34:04 -04:00
parent 6a795a7c50
commit 65ee49fb92
5 changed files with 104 additions and 2 deletions

View File

@@ -2,13 +2,14 @@ import React from "react";
import { use } from "../ui/Context";
import { Exploit } from "./Exploit";
const getComputedStyle = window.getComputedStyle;
export function Unclickable(): React.ReactElement {
const player = use.Player();
function unclickable(event: React.MouseEvent<HTMLDivElement>): void {
if (!event.target || !(event.target instanceof Element)) return;
const display = window.getComputedStyle(event.target as Element).display;
const visibility = window.getComputedStyle(event.target as Element).visibility;
const display = getComputedStyle(event.target as Element).display;
const visibility = getComputedStyle(event.target as Element).visibility;
if (display === "none" && visibility === "hidden" && event.isTrusted) player.giveExploit(Exploit.Unclickable);
}