From e91222b504397a42b2261968f162f9e2c0b871a0 Mon Sep 17 00:00:00 2001 From: Mick Vermeulen Date: Wed, 8 Dec 2021 18:04:21 +0100 Subject: [PATCH 01/11] Update CONTRIBUTING.md to include commit guidelines Added commit guidelines to CONTRIBUTING.md to aid people in writing proper commits. --- CONTRIBUTING.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0030f49..64fcbc9f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,12 +36,89 @@ In general, we follow the "fork-and-pull" Git workflow - Open a PR in our repository. PRs should include (when applicable): +- A descriptive title that covers the **entire** content of the pull request - Description - Motivation and Context - Type of Changes - How Has This Been Tested? - Screenshots +## Commits + +Commits to this project should be concise, descriptive and to the point. Writing proper commits helps define a clear project history and makes it easier to browse the source and pinpoint issues. Although this might seem trivial, a pull request with improperly formatted commits will not be accepted. An overview of good commit practices can be found in [this](https://cbea.ms/git-commit/) article. In a nutshell, a good commit has: + +#### one conceptual change with a subject line that reflects it + +The subject line of the commit is what you specify when doing `git commit -m ""`. When making commit, make sure that you create it for one conceptual change. E.g. do not use a commit to dump all the changes you have locally, but split your changes into commits that conceptually make sense and use the subject line to refelct that. Some examples: + +**Bad:** +Commit message: `Document MovementAIComponent and add Avant Gardens Mech Scripts and fix Entity.cpp bug causing infinite loops` +Changed files: +- MovementAIComponent.cpp +- AgMechScript.cpp +- Entity.cpp + +**Good:** + +Commit message: `Document MovementAIComponent` +Changed files: +- MovementAIComponent.cpp + +Commit message: `Add Avant Gardens Mech Scripts` +Changed files: +- AgMechScript.cpp + +Commit message: `Fix Entity.cpp bug causing infinite loops` +Changed files: +- Entity.cpp + +Not only does this logically make more sense, it'll make it easier to revert a conceptual change once something wrong with it. If you commit using the bad example but your bugfix turned out to introduce an even worse bug, all your changes have to be reverted, even though your other changes might not be broken. Splitting your commits into conceptually unique commits makes it easier to find and revert issues. + +#### an imperative subject line + +In the subject line it's also important to have an imperative writing style that covers the contents of your commit so that it easily reflects what it'll do when applied. We pick an imperative writing style so that all commits have equal tonality. An easy check for this is placing `When applied, this commit will ...` in front of your commit message and checking if that makes sense. Some examples: + +**Bad:** +``` +Nice commit :) -> "When applied, this commit will nice commit :)" +``` + +**Bad:** +``` +fixed bug -> "When applied, this commit will fixed bug" +``` + +**Good:** +``` +Fix Entity.cpp bug causing infinite loop -> "When applied, this commit will fix Entity.cpp bug causing infinite loop" +``` + +**Good:** +``` +Add Avant Gardens mech scripts -> "When applied, this commit will add Avant Gardens mech scripts" +``` + +#### a subject line and a body + +A good commit has a subject line that summarizes the change and a body that further describes the context required to understand the change. In this body you don't have to explain *what* the change was, as the code should reflect that, but *why* a change was made. Some examples: + +**Bad:** +``` +Add Avant Gardens mech scripts + +Added the Avant Gardens mech scripts by creaing a new file called +AgMechScripts.cpp and then adding the proper event handlers to that +to send events to the client regarding changes of the mech. +``` + +**Good:** +``` +Add Avant Gardens mech scripts + +Added the Avant Gardens mech scripts as they were previously not +added, which produced InvalidScript errors. +``` + ## Development Resources Check out a compiled list of development resources and tools [here](https://lu-dev.net/). From f22bf2466343037ea06a4504961127ed9b584e62 Mon Sep 17 00:00:00 2001 From: Mick Vermeulen Date: Wed, 8 Dec 2021 20:00:00 +0100 Subject: [PATCH 02/11] Update BaseEnemyMech script to change the default faction As part of the base enemy mech script its faction should be updated to 4 to make sure it's seen as an enemy by the client. The AgDarklingMech script has been deleted as its functionality was essentially that of BaseEnemyMech and thus no longer necessary. --- dScripts/AgDarklingMech.cpp | 9 --------- dScripts/AgDarklingMech.h | 6 ------ dScripts/AmDarklingMech.cpp | 5 +---- dScripts/BaseEnemyMech.cpp | 8 ++++++++ dScripts/BaseEnemyMech.h | 1 + dScripts/CppScripts.cpp | 3 +-- dScripts/VeMech.cpp | 1 + 7 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 dScripts/AgDarklingMech.cpp delete mode 100644 dScripts/AgDarklingMech.h diff --git a/dScripts/AgDarklingMech.cpp b/dScripts/AgDarklingMech.cpp deleted file mode 100644 index 335eabe4..00000000 --- a/dScripts/AgDarklingMech.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "AgDarklingMech.h" -#include "DestroyableComponent.h" - -void AgDarklingMech::OnStartup(Entity *self) { - auto* destroyableComponent = self->GetComponent(); - if (destroyableComponent != nullptr) { - destroyableComponent->SetFaction(4); - } -} diff --git a/dScripts/AgDarklingMech.h b/dScripts/AgDarklingMech.h deleted file mode 100644 index 2d92f2f6..00000000 --- a/dScripts/AgDarklingMech.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once -#include "BaseEnemyMech.h" - -class AgDarklingMech : public BaseEnemyMech { - void OnStartup(Entity* self) override; -}; diff --git a/dScripts/AmDarklingMech.cpp b/dScripts/AmDarklingMech.cpp index dd95883b..59eb6b45 100644 --- a/dScripts/AmDarklingMech.cpp +++ b/dScripts/AmDarklingMech.cpp @@ -3,9 +3,6 @@ void AmDarklingMech::OnStartup(Entity* self) { - auto* destroyableComponent = self->GetComponent(); - - destroyableComponent->SetFaction(4); - + BaseEnemyMech::OnStartup(self); qbTurretLOT = 13171; } diff --git a/dScripts/BaseEnemyMech.cpp b/dScripts/BaseEnemyMech.cpp index 37678857..eb95095a 100644 --- a/dScripts/BaseEnemyMech.cpp +++ b/dScripts/BaseEnemyMech.cpp @@ -7,6 +7,14 @@ #include "EntityManager.h" #include "dpWorld.h" #include "GeneralUtils.h" +#include "DestroyableComponent.h" + +void BaseEnemyMech::OnStartup(Entity* self) { + auto* destroyableComponent = self->GetComponent(); + if (destroyableComponent != nullptr) { + destroyableComponent->SetFaction(4); + } +} void BaseEnemyMech::OnDie(Entity* self, Entity* killer) { ControllablePhysicsComponent* controlPhys = static_cast(self->GetComponent(COMPONENT_TYPE_CONTROLLABLE_PHYSICS)); diff --git a/dScripts/BaseEnemyMech.h b/dScripts/BaseEnemyMech.h index f9f0b025..a8955061 100644 --- a/dScripts/BaseEnemyMech.h +++ b/dScripts/BaseEnemyMech.h @@ -4,6 +4,7 @@ class BaseEnemyMech : public CppScripts::Script { public: + void OnStartup(Entity* self) override; void OnDie(Entity* self, Entity* killer) override; protected: LOT qbTurretLOT = 6254; diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index 99702805..ed59c5ba 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -51,7 +51,6 @@ #include "NpcCowboyServer.h" #include "ZoneAgMedProperty.h" #include "AgStromlingProperty.h" -#include "AgDarklingMech.h" #include "AgDarkSpiderling.h" #include "PropertyFXDamage.h" #include "AgPropguards.h" @@ -377,7 +376,7 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr else if (scriptName == "scripts\\ai\\AG\\L_AG_STROMBIE_PROPERTY.lua") script = new AgStromlingProperty(); else if (scriptName == "scripts\\ai\\AG\\L_AG_DARKLING_MECH.lua") - script = new AgDarklingMech(); + script = new BaseEnemyMech(); else if (scriptName == "scripts\\ai\\AG\\L_AG_DARK_SPIDERLING.lua") script = new AgDarkSpiderling(); else if (scriptName == "scripts\\ai\\PROPERTY\\L_PROP_GUARDS.lua") diff --git a/dScripts/VeMech.cpp b/dScripts/VeMech.cpp index e26b34b0..87f2e88f 100644 --- a/dScripts/VeMech.cpp +++ b/dScripts/VeMech.cpp @@ -1,5 +1,6 @@ #include "VeMech.h" void VeMech::OnStartup(Entity *self) { + BaseEnemyMech::OnStartup(self); qbTurretLOT = 8432; } From 8c161271157e98e6bb0287d9aa5c190df49c4f19 Mon Sep 17 00:00:00 2001 From: Matthew Day Date: Wed, 8 Dec 2021 23:31:58 -0600 Subject: [PATCH 03/11] Fix spelling --- dChatServer/ChatPacketHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dChatServer/ChatPacketHandler.cpp b/dChatServer/ChatPacketHandler.cpp index 060c53d6..057a6568 100644 --- a/dChatServer/ChatPacketHandler.cpp +++ b/dChatServer/ChatPacketHandler.cpp @@ -460,7 +460,7 @@ void ChatPacketHandler::HandleTeamPromote(Packet* packet) std::string promotedPlayer = PacketUtils::ReadString(0x14, packet, true); - Game::logger->Log("ChatPacketHandler", "(%llu) promiting (%s) to team leader\n", playerID, promotedPlayer.c_str()); + Game::logger->Log("ChatPacketHandler", "(%llu) promoting (%s) to team leader\n", playerID, promotedPlayer.c_str()); auto* promoted = playerContainer.GetPlayerData(promotedPlayer); From 18d797150ea1390c31b8401e2e0d45fee8fb6571 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:10:29 -0700 Subject: [PATCH 04/11] PR comments --- .env.example | 4 ++-- docker-compose.yml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 22fff590..fdfe1c9b 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,7 @@ ACCOUNT_MANAGER_SECRET= # Should be the externally facing IP of your server host EXTERNAL_IP=localhost # Database values -MARIADB_USER=SECRET_VALUE_CHANGE_ME +MARIADB_USER=darkflame MARIADB_PASSWORD=SECRET_VALUE_CHANGE_ME MARIADB_ROOT_PASSWORD=SECRET_VALUE_CHANGE_ME -MARIADB_DATABASE=SECRET_VALUE_CHANGE_ME \ No newline at end of file +MARIADB_DATABASE=darkflame \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 519fcce3..c71c8c8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,8 +29,9 @@ services: - ./migrations/dlu:/docker-entrypoint-initdb.d networks: - darkflame - ports: - - 3306:3306 # (optional) ports only exposed so that DB management tools can connect + # You can expose these so that DB management tools can connect (WARNING: INSECURE) + # ports: + # - 3306:3306 darkflame: container_name: DarkflameServer From ecd717702d3cbd4fcae3963e84cbb9c990b2c454 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:20:10 -0700 Subject: [PATCH 05/11] Added client setup check to start_server.sh --- docker/setup.sh | 10 +++++----- docker/start_server.sh | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docker/setup.sh b/docker/setup.sh index 98a92515..7bff747d 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -55,7 +55,7 @@ update_ini_values if [[ ! -d "/client" ]]; then echo "Client not found." - echo "Did you forgot to mount the client into the \"/client\" directory?" + echo "Did you forget to mount the client into the \"/client\" directory?" exit 1 fi @@ -66,8 +66,8 @@ if [[ ! -f "/client/extracted" ]]; then touch /client/extracted else - echo "Client already extracted. Skip this step" - echo "If you want to force re-extract, just delete the file called \"extracted\" in the client directory" + echo "Client already extracted. Skip this step..." + echo "If you want to force a re-extract, just delete the file called \"extracted\" in the client directory" fi if [[ ! -f "/client/migrated" ]]; then @@ -77,6 +77,6 @@ if [[ ! -f "/client/migrated" ]]; then touch /client/migrated else - echo "Client db already migrated. Skip this step" - echo "If you want to force re-migrate, just delete the file called \"migrated\" in the client directory" + echo "Client db already migrated. Skip this step..." + echo "If you want to force a re-migrate, just delete the file called \"migrated\" in the client directory" fi diff --git a/docker/start_server.sh b/docker/start_server.sh index 9a2345c6..6dccad7e 100755 --- a/docker/start_server.sh +++ b/docker/start_server.sh @@ -37,7 +37,13 @@ else echo "Server already initialized" fi +# check to make sure the setup has completed +while [ ! -f "/client/extracted" ] || [ ! -f "/client/migrated" ]; do + echo "Client setup not finished. Waiting for setup container to complete..." + sleep 5 +done + # start the server -echo "Start MasterServer" +echo "Starting MasterServer" ./MasterServer tail -f /dev/null \ No newline at end of file From 3b90669d0323fe7d147b50018e23cda7ba396f22 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:34:14 -0700 Subject: [PATCH 06/11] Added a link to keygen for flask secret --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index fdfe1c9b..bbda7da6 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ BUILD_THREADS=1 # Updates NET_VERSION in CMakeVariables.txt BUILD_VERSION=171022 # make sure this is a long random string +# grab a "SHA 256-bit Key" from here: https://keygen.io/ ACCOUNT_MANAGER_SECRET= # Should be the externally facing IP of your server host EXTERNAL_IP=localhost From 56f860676d78051ac35f3884454a1c8c829f1d07 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:37:14 -0700 Subject: [PATCH 07/11] Added admin setup command to docs --- Docker.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Docker.md b/Docker.md index 0e6ae3d7..8bc12ada 100644 --- a/Docker.md +++ b/Docker.md @@ -14,8 +14,11 @@ 4. Run `docker-compose up --build setup` 5. Run `docker-compose up -d database` 6. Run `docker-compose up --build -d account-manager brickbuildfix` -7. Run `docker-compose up --build -d darkflame` -8. Now you can see the output of the server with `docker compose logs -f --tail 100` or `docker-compose logs -f --tail 100`. This can help you understand issues and there you can also see when the server finishes it's startup. +7. Run `docker-compose build darkflame` +8. Run `docker-compose exec darkflame /app/MasterServer -a` and setup your admin account +9. Run `docker-compose up -d darkflame` +10. Now you can see the output of the server with `docker compose logs -f --tail 100` or `docker-compose logs -f --tail 100`. This can help you understand issues and there you can also see when the server finishes it's startup. +11. You're ready to connect your client! ## Disable brickbuildfix From 50512cdef88b0cfb256e25a5fc4f4fd4690c39e7 Mon Sep 17 00:00:00 2001 From: Matthew Day Date: Thu, 9 Dec 2021 03:17:08 -0600 Subject: [PATCH 08/11] Fix spelling --- dGame/dComponents/InventoryComponent.cpp | 2 +- dGame/dComponents/RacingControlComponent.cpp | 4 ++-- dGame/dInventory/Inventory.cpp | 2 +- dScripts/BossSpiderQueenEnemyServer.cpp | 2 +- dScripts/ImgBrickConsoleQB.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index ffd40ed7..50ea26b1 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -296,7 +296,7 @@ void InventoryComponent::RemoveItem(const LOT lot, const uint32_t count, eInvent { if (count == 0) { - Game::logger->Log("InventoryComponent", "Attempted to remove 0 of item (%i) to the inventory!\n", lot); + Game::logger->Log("InventoryComponent", "Attempted to remove 0 of item (%i) from the inventory!\n", lot); return; } diff --git a/dGame/dComponents/RacingControlComponent.cpp b/dGame/dComponents/RacingControlComponent.cpp index a882f314..e7fd02c8 100644 --- a/dGame/dComponents/RacingControlComponent.cpp +++ b/dGame/dComponents/RacingControlComponent.cpp @@ -718,7 +718,7 @@ void RacingControlComponent::Update(float deltaTime) { m_Started = true; - Game::logger->Log("RacingControlComponent", "Starting rase\n"); + Game::logger->Log("RacingControlComponent", "Starting race\n"); EntityManager::Instance()->SerializeEntity(m_Parent); @@ -871,7 +871,7 @@ void RacingControlComponent::Update(float deltaTime) { } Game::logger->Log("RacingControlComponent", - "Rached point (%i)/(%i)\n", player.respawnIndex, + "Reached point (%i)/(%i)\n", player.respawnIndex, path->pathWaypoints.size()); break; diff --git a/dGame/dInventory/Inventory.cpp b/dGame/dInventory/Inventory.cpp index 75d4c586..b77be4b2 100644 --- a/dGame/dInventory/Inventory.cpp +++ b/dGame/dInventory/Inventory.cpp @@ -237,7 +237,7 @@ void Inventory::AddManagedItem(Item* item) if (slots.find(slot) != slots.end()) { - Game::logger->Log("Inventory", "Attempting to add an item with and already present slot (%i)!\n", slot); + Game::logger->Log("Inventory", "Attempting to add an item with an already present slot (%i)!\n", slot); return; } diff --git a/dScripts/BossSpiderQueenEnemyServer.cpp b/dScripts/BossSpiderQueenEnemyServer.cpp index 0b44f4ac..9896fd45 100644 --- a/dScripts/BossSpiderQueenEnemyServer.cpp +++ b/dScripts/BossSpiderQueenEnemyServer.cpp @@ -243,7 +243,7 @@ void BossSpiderQueenEnemyServer::SpiderWaveManager(Entity* self) { // Prep the selected spider egg //randomEgg:FireEvent{s}erID=self, args="prepEgg"} eggEntity->OnFireEventServerSide(self, "prepEgg"); - Game::logger->Log("SpiderQueen", "Preppign egg %llu\n", eggEntity->GetObjectID()); + Game::logger->Log("SpiderQueen", "Prepping egg %llu\n", eggEntity->GetObjectID()); // Add the prepped egg to our hatchList hatchList.push_back(eggEntity->GetObjectID()); diff --git a/dScripts/ImgBrickConsoleQB.cpp b/dScripts/ImgBrickConsoleQB.cpp index afa320c2..b24cb9bf 100644 --- a/dScripts/ImgBrickConsoleQB.cpp +++ b/dScripts/ImgBrickConsoleQB.cpp @@ -275,7 +275,7 @@ void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "reset") { - Game::logger->Log("ImgBrickConsoleQB", "Reseting...\n"); + Game::logger->Log("ImgBrickConsoleQB", "Resetting...\n"); auto* rebuildComponent = self->GetComponent(); From 9b085faf07cdcba240a08c2c65691596cc0d144b Mon Sep 17 00:00:00 2001 From: Mick Vermeulen Date: Wed, 8 Dec 2021 18:45:27 +0100 Subject: [PATCH 09/11] Add issue templates Added issue templates to aid with the structural submission of issues. --- .github/ISSUE_TEMPLATE/bug_report.yaml | 51 ++++++++++++++++++ .../documentation_improvement.yaml | 42 +++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yaml | 40 ++++++++++++++ .../ISSUE_TEMPLATE/installation_issue.yaml | 53 +++++++++++++++++++ .github/ISSUE_TEMPLATE/performance_issue.yaml | 33 ++++++++++++ 5 files changed, 219 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/documentation_improvement.yaml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml create mode 100644 .github/ISSUE_TEMPLATE/installation_issue.yaml create mode 100644 .github/ISSUE_TEMPLATE/performance_issue.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 00000000..3d0c5cc8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,51 @@ +name: Bug Report +description: Report incorrect behavior in DarkflameServer +title: "BUG: " +labels: ["bug", "triage"] + +body: + - type: checkboxes + id: checks + attributes: + options: + - label: > + I have checked that this issue has not already been reported. + required: true + - label: > + I have validated that this issue is not a syntax error of either MySQL or SQLite. + required: true + - label: > + I have pulled the latest version of the main branch of DarkflameServer and have confirmed that the issue exists there. + required: true + - type: textarea + id: problem + attributes: + label: Issue Description + description: > + Please provide a description of the issue. If this is an in-game bug, please also include pictures that showcase the issue. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Reproduction steps + description: > + Please provide a concise list of steps needed to reproduce this issue. + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: > + Please describe what you expected to happen instead of the issue. + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: > + Please include the environment you're running DarkflameServer on (for example: Windows, macOS, Ubuntu, WSL, etc). + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/documentation_improvement.yaml b/.github/ISSUE_TEMPLATE/documentation_improvement.yaml new file mode 100644 index 00000000..12d4cb4a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_improvement.yaml @@ -0,0 +1,42 @@ +name: Documentation Improvement +description: Report wrong or missing documentation +title: "DOC: " +labels: ["docs", "triage"] + +body: + - type: checkboxes + attributes: + options: + - label: > + I have checked that this issue has not already been reported. + required: true + - label: > + I have validated that the documentation is wrong or missing on the latest version of the main branch of DarkflameServer + required: true + - type: textarea + id: location + attributes: + label: Location of the documentation + description: > + Please provide the location of the documentation, e.g. "Entity.cpp" or the + URL of the documentation, e.g. + "https://github.com/DarkflameUniverse/DarkflameServer/blob/main/README.md" + placeholder: https://github.com/DarkflameUniverse/DarkflameServer/blob/main/README.md + validations: + required: true + - type: textarea + id: problem + attributes: + label: Documentation problem + description: > + Please provide a description of what documentation you believe needs to be fixed/improved + validations: + required: true + - type: textarea + id: suggested-fix + attributes: + label: Suggested fix for documentation + description: > + Please explain the suggested fix and **why** it's better than the existing documentation + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 00000000..2f0b839a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,40 @@ +name: Feature Request +description: Suggest an idea for DarkflameServer +title: "ENH: " +labels: ["enhancement", "triage"] + +body: + - type: textarea + id: problem + attributes: + label: Is your feature request related to a problem? + description: > + Please provide a description of what the problem is, e.g. "I wish I could use DarkflameServer to do [...]" + validations: + required: true + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: > + Please provide a description of the feature request, e.g. "`SlashCommandHandler.cpp` should get a new command `/unlimited-coins` that [...]", try to write a docstring for the desired feature + validations: + required: true + - type: textarea + id: implications + attributes: + label: Repository breaking implications + description: > + Please provide a description of how this feature will affect the DarkflameServer repository + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: > + Please provide a description of any alternative solutions or features you've considered + - type: textarea + id: example + attributes: + label: Additional context + description: > + Please add any other context, code examples, or references to existing implementations about the feature request here diff --git a/.github/ISSUE_TEMPLATE/installation_issue.yaml b/.github/ISSUE_TEMPLATE/installation_issue.yaml new file mode 100644 index 00000000..f5cfb566 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/installation_issue.yaml @@ -0,0 +1,53 @@ +name: Installation Issue +description: Report issues installing the DarkflameServer on your system +title: "BUILD: " +labels: ["build", "triage"] + +body: + - type: checkboxes + id: checks + attributes: + options: + - label: > + I have read the [installation guide](https://github.com/DarkflameUniverse/DarkflameServer/blob/main/README.md). + required: true + - type: dropdown + id: platform + attributes: + label: Platform + description: > + Please provide on which platform you've tried to install DarkflameServer + options: + - Windows + - WSL1 + - WSL2 + - macOS + - Ubuntu + - Other + validations: + required: true + - type: dropdown + id: architecture + attributes: + label: Architecture + description: > + Please provide on which architecture you've tried to install DarkflameServer + options: + - x86 + - ARM + validations: + required: true + - type: textarea + id: logs + attributes: + label: Error Logs + description: > + If possible, please copy and paste the error logs when attempting to install DarkflameServer. + value: > +
+ + + Replace this line with the error logs. + + +
diff --git a/.github/ISSUE_TEMPLATE/performance_issue.yaml b/.github/ISSUE_TEMPLATE/performance_issue.yaml new file mode 100644 index 00000000..f9fe4945 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/performance_issue.yaml @@ -0,0 +1,33 @@ +name: Performance Issue +description: Report slow performance or memory issues when running DarkflameServer +title: "PERF: " +labels: ["performance", "triage"] + +body: + - type: checkboxes + id: checks + attributes: + options: + - label: > + I have checked that this issue has not already been reported. + required: true + - label: > + I have pulled the latest version of the main branch of DarkflameServer and have confirmed that the issue exists there. + required: true + - type: textarea + id: example + attributes: + label: Reproducible Example + description: > + Please provide a minimal, example that quantifies slow runtime or memory issues. + Ideally include screenshots of CPU usage or memory usage. And if possible point + to the code that you may suspect to cause the issue. + validations: + required: true + - type: textarea + id: prior-performance + attributes: + label: Prior Performance + description: > + If applicable, please provide the prior version of DarkflameServer and output + of the same reproducible example where the performance issue did not exist. From 11ade055108bb3c8f52afaa5bda2ba09dc1bf505 Mon Sep 17 00:00:00 2001 From: Nils Bergmann Date: Thu, 9 Dec 2021 18:49:46 +0100 Subject: [PATCH 10/11] style: fix whitespace --- dMasterServer/MasterServer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dMasterServer/MasterServer.cpp b/dMasterServer/MasterServer.cpp index 1c73fd22..8f89d8c8 100644 --- a/dMasterServer/MasterServer.cpp +++ b/dMasterServer/MasterServer.cpp @@ -159,9 +159,9 @@ int main(int argc, char** argv) { auto master_server_ip = config.GetValue("master_ip"); - if (master_server_ip == "") { - master_server_ip = Game::server->GetIP(); - } + if (master_server_ip == "") { + master_server_ip = Game::server->GetIP(); + } //If we found a server, update it's IP and port to the current one. if (result->next()) { From d1e0a73f36e28181eb53dacc2c3676f304a175af Mon Sep 17 00:00:00 2001 From: Nils Bergmann Date: Thu, 9 Dec 2021 22:28:16 +0100 Subject: [PATCH 11/11] Simplify run steps --- Docker.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Docker.md b/Docker.md index 8bc12ada..b1069840 100644 --- a/Docker.md +++ b/Docker.md @@ -11,14 +11,10 @@ 1. Copy `.env.example` and save it as `.env` inside the root directory of this repository 2. Edit the `.env` file and add your path to your LEGO® Universe Client after `CLIENT_PATH=` 3. Update other values in the `.env` file as need (be sure to update passwords!) -4. Run `docker-compose up --build setup` -5. Run `docker-compose up -d database` -6. Run `docker-compose up --build -d account-manager brickbuildfix` -7. Run `docker-compose build darkflame` -8. Run `docker-compose exec darkflame /app/MasterServer -a` and setup your admin account -9. Run `docker-compose up -d darkflame` -10. Now you can see the output of the server with `docker compose logs -f --tail 100` or `docker-compose logs -f --tail 100`. This can help you understand issues and there you can also see when the server finishes it's startup. -11. You're ready to connect your client! +4. Run `docker compose up -d --build` +5. Run `docker compose exec darkflame /app/MasterServer -a` and setup your admin account +6. Now you can see the output of the server with `docker compose logs -f --tail 100` or `docker compose logs -f --tail 100`. This can help you understand issues and there you can also see when the server finishes it's startup. +7. You're ready to connect your client! ## Disable brickbuildfix