Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog Generation | BandaStation #1012

Merged
merged 5 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
auto_changelog:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.head_ref != 'merge-upstream'
if: github.event.pull_request.merged == true
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ jobs:
- name: "Compile"
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python tools/ss13_genchangelog.py html/changelogs
python tools/ss13_genchangelog.py html/changelogs/bandastation
- name: Commit
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
git config --local user.name "tgstation-ci[bot]"
git config --local user.email "179393467+tgstation-ci[bot]@users.noreply.github.com"
git pull origin master
git add html/changelogs
git add html/changelogs/bandastation
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: Generate App Token
Expand Down
3 changes: 3 additions & 0 deletions html/changelogs/bandastation/archive/2025-01.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2025-01-18:
AyIong:
- bugfix: Лейтджоин ИИ, больше не будут смотреть на лобби арт и общаться IC
8 changes: 8 additions & 0 deletions modular_bandastation/changelog/_changelog.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/datum/modpack/changelog
name = "Чейнджлог"
desc = "Кастомизация чейнджлога BandaStation."
author = "Maxiemar"

/datum/modpack/changelog/initialize()
var/latest_changelog = file("[global.config.directory]/../html/changelogs/bandastation/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml")
GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently
4 changes: 4 additions & 0 deletions modular_bandastation/changelog/_changelog.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "_changelog.dm"

#include "code/changelog.dm"
#include "code/changelog_item.dm"
15 changes: 15 additions & 0 deletions modular_bandastation/changelog/code/changelog.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/changelog/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "ChangelogBandaStation")
ui.open()

/datum/changelog/ui_static_data()
var/list/data = list("dates" = list())
var/static/regex/yml_regex = regex(@"\.yml", "g")

for(var/archive_file in sort_list(flist("html/changelogs/bandastation/archive/")))
var/archive_date = yml_regex.Replace(archive_file, "")
data["dates"] = list(archive_date) + data["dates"]

return data
3 changes: 3 additions & 0 deletions modular_bandastation/changelog/code/changelog_item.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/datum/asset/changelog_item/New(date)
item_filename = SANITIZE_FILENAME("[date].yml")
SSassets.transport.register_asset(item_filename, file("html/changelogs/bandastation/archive/" + item_filename))
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "autohiss/_autohiss.dme"
#include "balance/_balance.dme"
#include "barsigns/_barsigns.dme"
#include "changelog/_changelog.dme"
#include "chat_badges/_chat_badges.dme"
#include "communication/_communication.dme"
#include "customization/_customization.dme"
Expand Down
Loading
Loading