Add geode

This commit is contained in:
Lncvrt committed 2025-01-05 13:56:22 -07:00
1 parent ceba3130ab
commit 9c61b0a7fd
421 files changed
+30990

No files matched your search

@@ -0,0 +1 @@
{"spritesheets":{},"fonts":{}}
@@ -0,0 +1,9 @@
# Editor Level ID API
Assigns Level IDs to Editor levels and level lists that other mods can use to refer to them.
Please note, that these "Editor Level IDs" have nothing to do with the online level IDs used by the actual game.
## How does this work?
See [README.md](https://github.com/Cvolton/editor-ids-geode/blob/main/README.md) for documentation how this works, usage and other developer notes.
@@ -0,0 +1,9 @@
# Changelog
## <cg>v1.1.0</c> (2024-11-15)
* Updated for GD 2.2074
## <cg>v1.0.1</c> (2024-08-11)
* Fixed "Print debug messages in Geode Console" setting not being properly applied on game restart
## <cg>v1.0.0</c> (2024-07-03)
* Initial release
@@ -0,0 +1,72 @@
#pragma once
#include <Geode/binding/GJGameLevel.hpp>
#include <Geode/binding/GJLevelList.hpp>
#ifdef GEODE_IS_WINDOWS
#ifdef CVOLTON_EDITORIDS_EXPORTING
#define EDITORIDS_DLL __declspec(dllexport)
#else
#define EDITORIDS_DLL __declspec(dllimport)
#endif
#else
#define EDITORIDS_DLL __attribute__((visibility("default")))
#endif
namespace EditorIDs {
/**
* @brief Get the editor ID of a level or list.
*
* @param level The level to get the ID of.
*
* @return The ID of the level, or m_levelID if the level is not editor.
*/
EDITORIDS_DLL int getID(GJGameLevel* level);
/**
* @brief Get the editor ID of a level or list.
*
* @param list The list to get the ID of.
*
* @return The ID of the level, or m_levelID if the level is not editor.
*/
EDITORIDS_DLL int getID(GJLevelList* level);
/**
* @brief Get the editor ID of a level or list.
*
* @param level The level to get the ID of.
* @param autoAssign Whether to assign an ID if it has not been assigned automatically
*
* @return The ID of the level, or m_levelID if the level is not editor.
*/
EDITORIDS_DLL int getID(GJGameLevel* level, bool autoAssign);
/**
* @brief Get the editor ID of a level or list.
*
* @param level The level to get the ID of.
* @param autoAssign Whether to assign an ID if it has not been assigned automatically
*
* @return The ID of the level, or m_levelID if the level is not editor.
*/
EDITORIDS_DLL int getID(GJLevelList* level, bool autoAssign);
/**
* @brief Get a level by its editor ID.
*
* @param id The editor ID of the level.
*
* @return The level with the given ID, or nullptr if no level has that ID.
*/
EDITORIDS_DLL GJGameLevel* getLevelByID(int id);
/**
* @brief Get a list by its editor ID.
*
* @param id The editor ID of the list.
*
* @return The list with the given ID, or nullptr if no list has that ID.
*/
EDITORIDS_DLL GJLevelList* getListByID(int id);
}
@@ -0,0 +1,35 @@
#pragma once
#include "EditorIDs.hpp"
namespace EditorIDs {
namespace Management {
EDITORIDS_DLL void assignNewID(GJGameLevel* level);
EDITORIDS_DLL void verifyIDAssignment(GJGameLevel* level);
EDITORIDS_DLL void verifyIDAssignmentDelayed(GJGameLevel* level);
EDITORIDS_DLL void queueCheck();
EDITORIDS_DLL void tryTransferID(GJGameLevel* source, GJGameLevel* dest);
EDITORIDS_DLL void levelIsDeleting(GJGameLevel* level);
EDITORIDS_DLL void handleLevelDupes(cocos2d::CCArray* array);
EDITORIDS_DLL void reset();
EDITORIDS_DLL void tryRaiseMaxID(int id);
EDITORIDS_DLL int getMaxID();
}
namespace ListManagement {
EDITORIDS_DLL void assignNewID(GJLevelList* level);
EDITORIDS_DLL void verifyIDAssignment(GJLevelList* level);
EDITORIDS_DLL void verifyIDAssignmentDelayed(GJLevelList* level);
EDITORIDS_DLL void queueCheck();
EDITORIDS_DLL void tryTransferID(GJLevelList* source, GJLevelList* dest);
EDITORIDS_DLL void listIsDeleting(GJLevelList* level);
EDITORIDS_DLL void handleListDupes(cocos2d::CCArray* array);
EDITORIDS_DLL void reset();
EDITORIDS_DLL void tryRaiseMaxID(int id);
EDITORIDS_DLL int getMaxID();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

@@ -0,0 +1,37 @@
{
"geode": "4.0.0-beta.1",
"gd": {
"win": "2.2074",
"android": "2.2074",
"mac": "2.2074",
"ios": "2.2074"
},
"id": "cvolton.level-id-api",
"name": "Editor Level ID API",
"version": "v1.1.0",
"developer": "Cvolton",
"description": "Assigns Level IDs to Editor levels that other mods can use",
"early-load": true,
"links": {
"source": "https://github.com/Cvolton/level-id-api-geode"
},
"api": {
"include": [
"include/*.hpp"
]
},
"settings": {
"show-ids": {
"name": "Show IDs in search",
"description": "Whether the assigned IDs should be shown in the list cells for My Levels and My Lists",
"type": "bool",
"default": false
},
"debug-print": {
"name": "Print debug messages in Geode Console",
"description": "Whether debug messages should be printed in the Geode Console for further debugging assistance",
"type": "bool",
"default": false
}
}
}
@@ -0,0 +1 @@
13380582518015