diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT_DE.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT_DE.yml new file mode 100644 index 000000000..c2f343720 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT_DE.yml @@ -0,0 +1,93 @@ +name: Bug melden [DE] +description: Einen Bug melden. +labels: +- Bug +assignees: +- Tensuko +body: +- type: markdown + attributes: + value: 'Danke, dass du dir Zeit nimmst, diesen Bugreport auszufüllen. + + Lese dir bitte zuerst unsere [Wiki Seite](https://github.com/Courseplay/Courseplay_FS22/wiki) + durch, bevor du ein neues Issue erstellst! + + ' +- type: dropdown + id: mod-version + attributes: + label: Version + description: Welche CP Version verwendest du? + options: + - 7.4.0.0 + - 7.4.2.4 + - 7.5.0.0 + - 7.5.0.1 + default: 3 + validations: + required: true +- type: dropdown + id: game-version + attributes: + label: Spielversion + description: Welche Spielversion verwendest du? + options: + - 1.14.0.0 + default: 0 + validations: + required: true +- type: dropdown + id: spmp + attributes: + label: SP/MP + description: Hast du den Bug im SP oder MP? + options: + - SP (Singleplayer) + - MP (Multiplayer) + default: 0 + validations: + required: true +- type: textarea + id: what-happened + attributes: + label: Was ist passiert? + description: Bitte beschreibe so gut es geht, was passiert ist. + placeholder: Erzähle uns, was du gesehen hast! + validations: + required: true +- type: textarea + id: how-to + attributes: + label: Wie können wir diesen Fehler nachstellen? + description: Beschreibe bitte, wenn möglich, wie wir den Fehler reproduzieren + können. + placeholder: Beschreibe es so gut es geht. + validations: + required: true +- type: textarea + id: expect + attributes: + label: Was hätte passieren sollen? + description: Was hast du erwartet, was passieren sollte, als der Fehler auftrat. + placeholder: Beschreibe es so gut es geht. + validations: + required: true +- type: textarea + id: logs + attributes: + label: Bitte hänge deine log.txt an! + description: Ziehe die Datei in das Textfeld, um die log.txt hoch zu laden oder + verwende [Gist](https://gist.github.com/) oder [Pastebin](http://pastebin.com/). + placeholder: Bitte füge deine log.txt von file path ("C:\\Users\\\\Documents\\My + Games\\FarmingSimulator2022\\log.txt") an. + validations: + required: true +- type: textarea + id: screenshots + attributes: + label: Screenshots + description: Ziehe deine Screenshots in das Textfeld, um diese hoch zu laden. + placeholder: Wenn du Screenshots hast, die helfen dein Problem zu beschreiben, + füge sie hier ein. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT_EN.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT_EN.yml new file mode 100644 index 000000000..fe0d8eecb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT_EN.yml @@ -0,0 +1,93 @@ +name: Bug report [EN] +description: Reporting a bug. +labels: +- bug +assignees: +- Tensuko +body: +- type: markdown + attributes: + value: 'Thanks for taking the time to fill out this bug report! + + Please make sure to read our [Wiki Page](https://github.com/Courseplay/Courseplay_FS22/wiki) + before creating a new issue! + + ' +- type: dropdown + id: mod-version + attributes: + label: Version + description: Which CoursePlay version are you using? + options: + - 7.4.0.0 + - 7.4.2.4 + - 7.5.0.0 + - 7.5.0.1 + default: 3 + validations: + required: true +- type: dropdown + id: game-version + attributes: + label: Game Version + description: What version of the game are you playing? + options: + - 1.14.0.0 + default: 0 + validations: + required: true +- type: dropdown + id: spmp + attributes: + label: SP/MP + description: Did the bug happen in SP or MP? + options: + - SP (Singleplayer) + - MP (Multiplayer) + default: 0 + validations: + required: true +- type: textarea + id: what-happened + attributes: + label: What happened? + description: Please describe what happened. + placeholder: Tell us what you see! + validations: + required: true +- type: textarea + id: how-to + attributes: + label: How can we reproduce this? + description: If you can, please describe the steps to reproduce this bug. + placeholder: Describe as good as possible. + validations: + required: true +- type: textarea + id: expect + attributes: + label: What did you expect to happen? + description: What did you expect to happen when you tried that function and the + bug occurred. + placeholder: Describe as good as possible. + validations: + required: true +- type: textarea + id: logs + attributes: + label: Attach your log.txt! + description: Use drag and drop into the textbox to upload the log.txt into the + text field or use [Gist](https://gist.github.com/) or [Pastebin](http://pastebin.com/). + placeholder: Please add your log.txt from file path ("C:\\Users\\\\Documents\\My + Games\\FarmingSimulator2022\\log.txt"). + validations: + required: true +- type: textarea + id: screenshots + attributes: + label: Screenshots + description: Use drag and drop into the textbox to upload the screenshots. + placeholder: If you have any helpful screenshots to describe your situation, please + add them here. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/QUESTION_DE.yml b/.github/ISSUE_TEMPLATE/QUESTION_DE.yml new file mode 100644 index 000000000..981c5b612 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/QUESTION_DE.yml @@ -0,0 +1,73 @@ +name: Frage [DE] +description: Du hast eine Frage? Stell sie einfach! +labels: +- question +assignees: +- Tensuko +body: +- type: markdown + attributes: + value: 'Bitte benutze diese Vorlage, um deine Frage zu stellen! + + Lese dir bitte zuerst unsere [Wiki Seite](https://github.com/Courseplay/Courseplay_FS22/wiki) + durch, bevor du ein neues Issue erstellst! + + Unsere Hilfe aus dem Spiel, gibt es auch unter [Courseplay.dev]!(https://courseplay.github.io/Courseplay_FS22.github.io/), + dort kannst du bereits vieles zu Courseplay erfahren! + + ' +- type: dropdown + id: mod-version + attributes: + label: Version + description: Welche CP Version verwendest du? + options: + - 7.4.0.0 + - 7.4.2.4 + - 7.5.0.0 + - 7.5.0.1 + default: 3 + validations: + required: true +- type: dropdown + id: spmp + attributes: + label: SP/MP + description: Spielst du im SP oder MP? + options: + - SP (Singleplayer) + - MP (Multiplayer) + - egal + default: 0 + validations: + required: true +- type: dropdown + id: about + attributes: + label: Um was geht es bei deiner Frage? + description: Bitte wähle was passendes aus. + options: + - Kurserstellung + - Fahrzeug Einstellungen + - Globale CP Einstellungen + - weiteres später + default: 0 + validations: + required: true +- type: textarea + id: question + attributes: + label: Wie lautet deine Frage? + description: Frage + placeholder: Frage + validations: + required: true +- type: textarea + id: screenshots + attributes: + label: Screenshots + description: Ziehe deine Screenshots in das Textfeld, um diese hoch zu laden. + placeholder: Wenn du Screenshots hast, die helfen dein Frage zu beschreiben, füge + sie hier ein. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/QUESTION_EN.yml b/.github/ISSUE_TEMPLATE/QUESTION_EN.yml new file mode 100644 index 000000000..cb706c5f5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/QUESTION_EN.yml @@ -0,0 +1,72 @@ +name: Question [EN] +description: You got a question? Just ask! +labels: +- question +assignees: +- Tensuko +body: +- type: markdown + attributes: + value: 'Please use this template to ask your question! + + Please make sure to read our [Wiki Page](https://github.com/Courseplay/Courseplay_FS22/wiki) + before creating a new issue! + + Our help pages from the game can also be found at [Courseplay.dev]!(https://courseplay.github.io/Courseplay_FS22.github.io/), + there you can check out many informations before asking a qustion! + + ' +- type: dropdown + id: mod-version + attributes: + label: Version + description: Which CoursePlay version are you using? + options: + - 7.4.0.0 + - 7.4.2.4 + - 7.5.0.0 + - 7.5.0.1 + default: 3 + validations: + required: true +- type: dropdown + id: spmp + attributes: + label: SP/MP + description: Did the bug happen in SP or MP? + options: + - SP (Singleplayer) + - MP (Multiplayer) + default: 0 + validations: + required: true +- type: dropdown + id: about + attributes: + label: What is your question about? + description: Select a category. + options: + - Course creation + - Vehicle settings + - Global CP settings + - more later + default: 0 + validations: + required: true +- type: textarea + id: question + attributes: + label: What is your question? + description: Question + placeholder: Question + validations: + required: true +- type: textarea + id: screenshots + attributes: + label: Screenshots + description: Use drag and drop into the textbox to upload the screenshots. + placeholder: If you have any helpful screenshots to describe the situation, please + add them here. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/REQUEST_DE.yml b/.github/ISSUE_TEMPLATE/REQUEST_DE.yml new file mode 100644 index 000000000..a9f9cce41 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/REQUEST_DE.yml @@ -0,0 +1,73 @@ +name: Feature Idee/Anfrage [DE] +description: Eine Anfrage oder Idee für ein Feature. +labels: +- Suggestion +assignees: +- Tensuko +body: +- type: markdown + attributes: + value: 'Danke, dass du dir Zeit nimmst, diesen Report auszufüllen. + + Lese dir bitte zuerst unsere [Wiki Seite](https://github.com/Courseplay/Courseplay_FS22/wiki) + durch, bevor du ein neues Issue erstellst! + + ' +- type: dropdown + id: mod-version + attributes: + label: Version + description: Welche CP Version verwendest du? + options: + - 7.4.0.0 + - 7.4.2.4 + - 7.5.0.0 + - 7.5.0.1 + default: 3 + validations: + required: true +- type: dropdown + id: spmp + attributes: + label: SP/MP + description: Betrifft die Idee SP oder MP? + options: + - SP (Singleplayer) + - MP (Multiplayer) + default: 0 + validations: + required: true +- type: textarea + id: what-does + attributes: + label: Was kann mit deiner Idee gemacht werden? + description: Beschreibe bitte so gut es geht, was für ein Problem deine Idee löst + oder was sie verbessert. + placeholder: Beschreibe es so gut es geht. + validations: + required: true +- type: textarea + id: how-to + attributes: + label: Wie könntest du dir vorstellen, wie deine Idee in CP aussehen könnte. + description: Beschreibe bitte, wie es in CP passen könnte. + placeholder: Beschreibe es so gut es geht. + validations: + required: true +- type: textarea + id: alternative + attributes: + label: Gäbe es eine Alternative? + description: Würde es eine Alternative zu deiner Lösung geben? + placeholder: Beschreibe es so gut es geht. + validations: + required: true +- type: textarea + id: screenshots + attributes: + label: Screenshots + description: Ziehe deine Screenshots in das Textfeld, um diese hoch zu laden. + placeholder: Wenn du Screenshots hast, die helfen deine Idee besser zu verstehen, + füge sie bitte hier ein. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/REQUEST_EN.yml b/.github/ISSUE_TEMPLATE/REQUEST_EN.yml new file mode 100644 index 000000000..b337c0011 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/REQUEST_EN.yml @@ -0,0 +1,72 @@ +name: Feature Idea/Request [EN] +description: A feature request or Idea. +labels: +- Suggestion +assignees: +- Tensuko +body: +- type: markdown + attributes: + value: 'Thanks for taking the time to fill out this report! + + Please make sure to read our [Wiki Page](https://github.com/Courseplay/Courseplay_FS22/wiki) + before creating a new issue! + + ' +- type: dropdown + id: mod-version + attributes: + label: Version + description: Which CoursePlay version are you using? + options: + - 7.4.0.0 + - 7.4.2.4 + - 7.5.0.0 + - 7.5.0.1 + default: 3 + validations: + required: true +- type: dropdown + id: spmp + attributes: + label: SP/MP + description: Is your idea for SP oder MP? + options: + - SP (Singleplayer) + - MP (Multiplayer) + default: 0 + validations: + required: true +- type: textarea + id: what-does + attributes: + label: What can be done with your idea? + description: Please describe as good as possible the problem your idea solves. + placeholder: Describe as good as possible. + validations: + required: true +- type: textarea + id: how-to + attributes: + label: If applicable, how would the user interface look like for this enhancement? + description: Describe the solution you'd like. + placeholder: Describe as good as possible. + validations: + required: true +- type: textarea + id: alternative + attributes: + label: Is there an alternative? + description: Are there any alternatives you've considered? + placeholder: Describe as good as possible. + validations: + required: true +- type: textarea + id: screenshots + attributes: + label: Screenshots + description: Use drag and drop into the textbox to upload the screenshots. + placeholder: If you have any helpful screenshots to describe your idea, please + add them here. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/bug-report-multiplayer.md b/.github/ISSUE_TEMPLATE/bug-report-multiplayer.md deleted file mode 100644 index e8cc33af1..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report-multiplayer.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: Bug report multiplayer -about: Create a report to help us improve. -title: "[BUG_MP]" -labels: ["bug", "multiplayer"] -assignees: '' - ---- -**READ FIRST** -https://github.com/Courseplay/Courseplay_FS22/wiki - -**Steps to reproduce** -Steps to reproduce the behavior. - -**Actual behavior** -A clear and concise description of what happen. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Courseplay version** -Version used: - -**Client Log** -Please attach your personal log file with all debug channels active. -For help with the debug channels, -please check out the readme at the github front page. - -**Server Log** -Please attach a log from the server with all debug channels active, -if it's possible. - -**Player on the server** -Number of players on the server, as the bug appeared. - -**Dedicated server or local hosted server** -Dedicated server yes/no ? - -**Map** -Map played on. - -**Vehicles/ implements involved** -Which vehicle or implement? -Mod yes/no ? - -**Relevant script mods** -Mods like Autodrive or VCA and so on. - diff --git a/.github/ISSUE_TEMPLATE/bug-report-singleplayer.md b/.github/ISSUE_TEMPLATE/bug-report-singleplayer.md deleted file mode 100644 index e2adcbd37..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report-singleplayer.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: Bug report singleplayer -about: Create a report to help us improve. -title: "[BUG_SP]" -labels: bug -assignees: '' - ---- -**READ FIRST** -https://github.com/Courseplay/Courseplay_FS22/wiki - -**Steps to reproduce** -Steps to reproduce the behavior. - -**Actual behavior** -A clear and concise description of what happen. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Courseplay version** -Version used: - -**Log** -Please attach a log with all debug channels active. -For help with the debug channels, -please check out the readme at the github front page. - -**Map** -Map played on. - -**Vehicles/ implements involved** -Which vehicle or implement? -Mod yes/no ? - -**Relevant script mods** -Mods like Autodrive or VCA and so on. - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index ec4bb386b..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1 +0,0 @@ -blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 49ff51805..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[Feature]" -labels: enhancement -assignees: '' - ---- - -**What is the problem this feature/enhancement solves?** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index dce3fafa5..000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Question -about: Question related to courseplay. -title: "[Question]" -labels: question -assignees: Tensuko - ---- - - diff --git a/.github/scripts/update-templates/config.json b/.github/scripts/update-templates/config.json new file mode 100644 index 000000000..e8204ea67 --- /dev/null +++ b/.github/scripts/update-templates/config.json @@ -0,0 +1,14 @@ +{ + "game_versions" : [ + "1.14.0.0" + ], + "cp_versions" : [ + "7.4.2.4", + "7.5.0.0", + "7.5.0.1" + ], + "modhub_versions" : [ + "7.5.0.0", + "7.4.0.0" + ] +} \ No newline at end of file diff --git a/.github/scripts/update-templates/updateTemplates.py b/.github/scripts/update-templates/updateTemplates.py new file mode 100644 index 000000000..1fce4c5e3 --- /dev/null +++ b/.github/scripts/update-templates/updateTemplates.py @@ -0,0 +1,53 @@ +import yaml, os, pprint, json + +dir_path = '/.github/ISSUE_TEMPLATE/' +config_path = os.path.dirname(__file__) + "/config.json" + +# Gets the parent dict/list element for a given value. +def getDictWithValueRecursive(data, value : str) -> dict|list|None: + if type(data) == dict: + for k, d in data.items(): + if d == value: + return data + ret = getDictWithValueRecursive(d, value) + if ret: + return ret + elif type(data) == list: + for d in data: + if d == value: + return data + ret = getDictWithValueRecursive(d, value) + if ret: + return ret + +# Updates the possible cp and game versions +def updateTemplateFile(filname : str, config : dict) -> None: + data = None + with open(os.getcwd() + dir_path + filname, 'r') as file: + data = yaml.safe_load(file) + + item = getDictWithValueRecursive(data, "mod-version") + item["attributes"]["options"] = config["cp_versions"] + item["attributes"]["default"] = len(config["cp_versions"]) - 1 + item = getDictWithValueRecursive(data, "game-version") + if item: + item["attributes"]["options"] = config["game_versions"] + item["attributes"]["default"] = len(config["game_versions"]) - 1 + + with open(os.getcwd() + dir_path + filname, 'w') as file: + yaml.dump(data, file, indent=2, sort_keys=False, allow_unicode=True) + +def main(): + with open(config_path, "r") as file: + config = json.load(file) + for version in config["modhub_versions"]: + if not version in config["cp_versions"]: + config["cp_versions"].append(version) + + config["game_versions"].sort(key=lambda s: list(map(int, s.split('.')))) + config["cp_versions"].sort(key=lambda s: list(map(int, s.split('.')))) + for filename in os.listdir(os.getcwd() + dir_path): + updateTemplateFile(filename, config) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/.github/workflows/templates-update.yml b/.github/workflows/templates-update.yml new file mode 100644 index 000000000..1ad659e9c --- /dev/null +++ b/.github/workflows/templates-update.yml @@ -0,0 +1,41 @@ +name: Update-templates + +# Controls when the workflow will run +on: + release: + + push: + paths: + - "**/ISSUE_TEMPLATE/**" + - "**/update-templates/**" + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + +# The list of jobs this workflow executes +jobs: + # Updates the translations + update_templates: + name: Update templates + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: '3.11.8' # Version range or exact version of a Python version to use, using SemVer's version range syntax + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + - name: + run: | + python -m pip install pyyaml + python .github/scripts/update-templates/updateTemplates.py + + - name: Commit files + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Updated github templates \ No newline at end of file diff --git a/README.md b/README.md index 22d585a4d..53cc3ba82 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Courseplay Beta for Farming Simulator 2022 -[![Modhub release](https://img.shields.io/badge/Modhub%20Release-Modification-blue.svg)](https://www.farming-simulator.com/mod.php?mod_id=248390) +[![Modhub release](https://img.shields.io/badge/Modhub%20Release-Modification-blue.svg)](https://www.farming-simulator.com/mod.php?mod_id=248390title=fs2022) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Courseplay/Courseplay_FS22?include_prereleases&style=flat-square&label=Github+Release)](https://github.com/Courseplay/Courseplay_FS22/releases/latest) [![GitHub Pre-Releases (by Asset)](https://img.shields.io/github/downloads-pre/Courseplay/Courseplay_FS22/latest/FS22_Courseplay.zip?style=flat-square)](https://github.com/Courseplay/Courseplay_FS22/releases/latest/download/FS22_Courseplay.zip) [![GitHub issues](https://img.shields.io/github/issues/Courseplay/Courseplay_FS22?style=flat-square)](https://github.com/Courseplay/Courseplay_FS22/issues)