-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build Geode Mod | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: Windows | ||
os: windows-latest | ||
|
||
#- name: macOS | ||
# os: macos-latest | ||
|
||
# - name: Android32 | ||
# os: ubuntu-latest | ||
# target: Android32 | ||
|
||
# - name: Android64 | ||
# os: ubuntu-latest | ||
# target: Android64 | ||
|
||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build the mod | ||
uses: geode-sdk/build-geode-mod@main | ||
with: | ||
cli: v3.0.0-beta.1 | ||
sdk: nightly | ||
combine: true | ||
target: ${{ matrix.config.target }} | ||
|
||
package: | ||
name: Package builds | ||
runs-on: ubuntu-latest | ||
needs: ['build'] | ||
|
||
steps: | ||
- uses: geode-sdk/build-geode-mod/combine@main | ||
id: build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Build Output | ||
path: ${{ steps.build.outputs.build-output }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Macos be like | ||
**/.DS_Store | ||
|
||
# Cache files for Sublime Text | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
|
||
# Ignore build folders | ||
**/build | ||
# Ignore platform specific build folders | ||
build-*/ | ||
|
||
# Workspace files are user-specific | ||
*.sublime-workspace | ||
|
||
# ILY vscode | ||
**/.vscode | ||
.idea/ | ||
|
||
# clangd | ||
.cache/ | ||
|
||
# Visual Studio | ||
.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_VISIBILITY_PRESET hidden) | ||
|
||
project(CopyLevelInfo VERSION 1.0.0) | ||
|
||
add_library(${PROJECT_NAME} SHARED | ||
src/main.cpp | ||
# Add any extra C++ source files here | ||
) | ||
|
||
if (NOT DEFINED ENV{GEODE_SDK}) | ||
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode") | ||
else() | ||
message(STATUS "Found Geode: $ENV{GEODE_SDK}") | ||
endif() | ||
|
||
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode) | ||
|
||
setup_geode_mod(${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# A message from the dev of Copy Level Info | ||
|
||
This mod is not meant to be publicly expanded on and only exists to purely make my life easier recording videos. | ||
|
||
## Code quality | ||
It's probably bad but I know jack shit about CPP, its amazing this even compiles let alone function as expected at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copy Level Info | ||
|
||
This mod allows the user to copy some basic information about a level to their clipboard at the click of a button. | ||
|
||
## What is copied to the clipboard | ||
The following information is copied to the clipboard with some extra stuff inserted here and there to keep things neat and tidy. | ||
|
||
- Level Author | ||
- Level Name | ||
- Level ID | ||
- Song Link | ||
|
||
## Formatting | ||
All the information listed above is formatted as follows: | ||
|
||
{Level Author} - {Level Name} (Geometry Dash) | ||
\============================================= | ||
Level ID: {Level ID} | ||
Song: {Song Link} | ||
|
||
Note: The divider constructed of the equals symbol (=) is dynamic, meaning that it is always the same length in terms of characters as the first line of text. | ||
If line one was 23 characters long, the divider will be a string of 23 equal symbols (=), if line one was 56 characters long, the divider would be 56 characters long. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# v1.0.0 | ||
* Initial release of the project and hopefully the last, CPP is really not a fun language. | ||
|
||
# v1.1.0 | ||
* Updated to GD v2.206 and Geode V3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"geode": "3.0.0-alpha.2", | ||
"gd": "2.206", | ||
"version": "v1.1.0", | ||
"id": "neonyaa.copy_level_info", | ||
"name": "Copy Level Info", | ||
"developer": "NeoNyaa", | ||
"description": "A simple mod which allows the user to copy the level name and ID to the clipboard.", | ||
"tags": [ | ||
"enhancement", | ||
"interface", | ||
"utility" | ||
], | ||
"resources": { | ||
"sprites": [ | ||
"resources/Copy.png" | ||
] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <Geode/Geode.hpp> | ||
#include <Geode/modify/InfoLayer.hpp> | ||
|
||
using namespace geode::prelude; | ||
|
||
class $modify(InfoLayer) { | ||
void onCopyLevelID(CCObject*) { | ||
/* | ||
Get the name of the author and the level name then string them together | ||
seperating them with " - " and append it with "(Geometry Dash)" lastly, | ||
store the result in a variable called "ytVideoTitle" for later use | ||
*/ | ||
std::string ytVideoTitle = fmt::format("{} - {} (Geometry Dash)", this->m_level->m_creatorName, this->m_level->m_levelName); | ||
|
||
/* | ||
Get the length of the "ytVideoTitle" variable and use the returned value to create | ||
a string of "=" symbols which is the same length as the "ytVideoTitle" variable | ||
*/ | ||
std::string ytVideoDivider = std::string(ytVideoTitle.length(), '='); | ||
|
||
// Get the ID of the level and store it in a variabled called "ytVideoDescLevelID" for later use | ||
std::string ytVideoDescLevelID = std::to_string(this->m_level->m_levelID.value()); | ||
|
||
// Get the ID of the level song and store it in a variabled called "ytVideoDescSongLink" for later use | ||
std::string ytVideoDescSongLink = std::to_string(this->m_level->m_songID); | ||
|
||
// Prepare and copy the formatted data above to the clipboard for easy pasting wherever the user wants | ||
clipboard::write(fmt::format("{}\n{}\nLevel ID: {}\nSong: https://www.newgrounds.com/audio/listen/{}\n", ytVideoTitle, ytVideoDivider, ytVideoDescLevelID, ytVideoDescSongLink)); | ||
|
||
// Notify the player to let them know that all the level information has been copied to their clipboard | ||
Notification::create(("Level info copied to clipboard!"), CCSprite::create("Copy.png"_spr), 3)->show(); | ||
} | ||
}; |