Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Jul 29, 2024
1 parent 49800f5 commit 83a2d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutorials/modify-geode.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ There are some guidelines on what you are and are not allowed to do when modifyi
2. The mod must **always check for null** on every node they access. It should never assume the existence of a node, even if it's trivial
3. The mod must **safely handle all possible failure states**, such as missing sprites. This includes failure states of other logic it runs; if the mod makes a web request, it must not crash on unexpected behaviour!
4. If the mod finds any missing IDs, it must **undo any/all of its changes** and not make any more. The recommended way to do this is to first use `querySelector` to grab all the nodes in the scene it intends to modify beforehand, and then returning early if any of them are null
5. The mod must **give all of its own nodes IDs prefixed by its mod ID (*note) and check beforehand if its nodes have been added on all events**
5. The mod must **give all of its own nodes IDs prefixed by its mod ID (note) and check beforehand if its nodes have been added on all events**

These rules are in place because the Geode UI is a highly volatile place that **may change at any time**, and any mod causing the Geode UI itself to crash would make it impossible to disable without safe mode.

> (*note): Nodes nested inside other nodes don't need to be prefixed, as long as the topmost parent is prefixed. For example, `my-mod.id/container > button` is completely fair!
> (note): Nodes nested inside other nodes don't need to be prefixed, as long as the topmost parent is prefixed. For example, `my-mod.id/container > button` is completely fair!
## Example

Expand Down

0 comments on commit 83a2d7b

Please sign in to comment.