Skip to content

Commit

Permalink
Update cardinal.js v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bug1312 authored Dec 1, 2023
1 parent 46fd562 commit 8d476a3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions plugins/cardinal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
south: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFAQMAAAC3obSmAAAABlBMVEVHcEz///+flKJDAAAAAXRSTlMAQObYZgAAABJJREFUCNdjKGBwYChgEGAoAAAIigGhv1KChwAAAABJRU5ErkJggg",
west : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABlBMVEVHcEz///+flKJDAAAAAXRSTlMAQObYZgAAABhJREFUCNdjYGBgOHAAhM4gIWMGEGJgAACnnQmX+CnbdwAAAABJRU5ErkJggg"
},
buildGridCopy = buildGrid;
buildGridCopy = Canvas.buildGrid;

Plugin.register("cardinal", {
title: "Cardinal",
author: "Bug1312",
description: "Adds in all cardinal directions on the grid and renders them on-top of everything while facing the camera.",
about: "If you wish to change the color, use custom CSS to set the variable 'cardinal' to any color!",
icon: "border_outer",
version: "1.0.0",
version: "1.0.1",
variant: "both",
onload() {
window.buildGrid = function() {
Canvas.buildGrid = function() {
// Default grid
buildGridCopy();

Expand All @@ -30,10 +30,14 @@
addMark(images.south, [ 0.0, 9.5 ]);
addMark(images.west, [-9.5, 0.0 ]);
};
buildGrid();
window.buldGrid = Canvas.buildGrid;
Canvas.buildGrid();
},
onunload() { window.buildGrid = buildGridCopy },
onuninstall() { buildGrid() }
onunload() {
Canvas.buildGrid = buildGridCopy;
window.buldGrid = Canvas.buildGrid;
},
onuninstall() { Canvas.buildGrid() }
});

function addMark(src, pos) {
Expand Down

0 comments on commit 8d476a3

Please sign in to comment.