-
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
4 changed files
with
62 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,10 @@ | ||
# Copyright (c) 2018-present. This file is part of V-Sekai https://v-sekai.org/. | ||
# SaracenOne & K. S. Ernest (Fire) Lee & Lyuma & MMMaellon & Contributors | ||
# build_constants.gd | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Set by the build system, do not modify! | ||
|
||
const BUILD_LABEL = "DEVELOPER_BUILD" | ||
const BUILD_DATE_STR = "Build Date" | ||
const BUILD_UNIX_TIME = -1 |
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,7 @@ | ||
[plugin] | ||
name="VSK Version" | ||
description="Singleton for accessing information about the current build version." | ||
author="Saracen" | ||
version="1.0" | ||
installs=true | ||
script="vsk_version_plugin.gd" |
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,13 @@ | ||
# Copyright (c) 2018-present. This file is part of V-Sekai https://v-sekai.org/. | ||
# SaracenOne & K. S. Ernest (Fire) Lee & Lyuma & MMMaellon & Contributors | ||
# vsk_version.gd | ||
# SPDX-License-Identifier: MIT | ||
|
||
@tool | ||
extends Node | ||
|
||
const build_constants_const = preload("build_constants.gd") | ||
|
||
|
||
static func get_build_label() -> String: | ||
return build_constants_const.BUILD_DATE_STR + "\n" + build_constants_const.BUILD_LABEL |
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,32 @@ | ||
# Copyright (c) 2018-present. This file is part of V-Sekai https://v-sekai.org/. | ||
# SaracenOne & K. S. Ernest (Fire) Lee & Lyuma & MMMaellon & Contributors | ||
# vsk_version_plugin.gd | ||
# SPDX-License-Identifier: MIT | ||
|
||
@tool | ||
extends EditorPlugin | ||
|
||
var editor_interface: EditorInterface = null | ||
|
||
|
||
func _init(): | ||
print("Initialising VSKVersion plugin") | ||
|
||
|
||
func _notification(p_notification: int): | ||
match p_notification: | ||
NOTIFICATION_PREDELETE: | ||
print("Destroying VSKVersion plugin") | ||
|
||
|
||
func _get_plugin_name() -> String: | ||
return "VSKVersion" | ||
|
||
|
||
func _enter_tree() -> void: | ||
editor_interface = get_editor_interface() | ||
add_autoload_singleton("VSKVersion", "res://addons/vsk_version/vsk_version.gd") | ||
|
||
|
||
func _exit_tree() -> void: | ||
remove_autoload_singleton("VSKVersion") |