Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
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
8 changes: 3 additions & 5 deletions .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@ jobs:
fetch-depth: 25
- name: "Compile"
run: |
python tools/ss13_genchangelog.py html/changelog.html html/changelogs
- name: "Convert Lineendings"
run: |
unix2dos html/changelogs/.all_changelog.yml
python tools/ss13_genchangelog.py html/changelogs
- name: Commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "Changelogs"
git pull origin master
git add html/changelogs
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: "Push"
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.JAMIE }}
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#Ignore byond config folder.
/cfg/**/*

#Ignore changelog entries
/html/changelogs/**/*
/html/changelog.html

#Ignore compiled files and other files generated during compilation.
*.mdme
*.dmb
Expand Down
3 changes: 3 additions & 0 deletions code/_globalvars/tgui.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GLOBAL_DATUM(crew_manifest_tgui, /datum/crew_manifest)
GLOBAL_DATUM(changelog_tgui, /datum/changelog)
GLOBAL_DATUM(hotkeys_tgui, /datum/hotkeys_help)
32 changes: 32 additions & 0 deletions code/datums/changelog.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/datum/changelog
var/static/list/changelog_items = list()

/datum/changelog/ui_state()
return GLOB.always_state

/datum/changelog/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "Changelog")
ui.open()

/datum/changelog/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
if(action == "get_month")
var/datum/asset/changelog_item/changelog_item = changelog_items[params["date"]]
if (!changelog_item)
changelog_item = new /datum/asset/changelog_item(params["date"])
changelog_items[params["date"]] = changelog_item
return ui.send_asset(changelog_item)

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

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

return data
3 changes: 2 additions & 1 deletion code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ GLOBAL_VAR(restart_counter)
start_log(GLOB.world_job_debug_log)
start_log(GLOB.tgui_log)

GLOB.changelog_hash = md5('html/changelog.html') //for telling if the changelog has changed recently
var/latest_changelog = file("[global.config.directory]/../html/changelogs/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
if(fexists(GLOB.config_error_log))
fcopy(GLOB.config_error_log, "[GLOB.log_directory]/config_error.log")
fdel(GLOB.config_error_log)
Expand Down
20 changes: 20 additions & 0 deletions code/modules/asset_cache/asset_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -538,4 +538,24 @@ GLOBAL_LIST_EMPTY(asset_datums)
SHOULD_CALL_PARENT(FALSE)
CRASH("generate() not implemented for [type]!")


/datum/asset/changelog_item
_abstract = /datum/asset/changelog_item
var/item_filename

/datum/asset/changelog_item/New(date)
item_filename = SANITIZE_FILENAME("[date].yml")
SSassets.transport.register_asset(item_filename, file("html/changelogs/archive/" + item_filename))

/datum/asset/changelog_item/send(client)
if (!item_filename)
return
. = SSassets.transport.send_assets(client, item_filename)

/datum/asset/changelog_item/get_url_mappings()
if (!item_filename)
return
. = list("[item_filename]" = SSassets.transport.get_asset_url(item_filename))


#undef ASSET_CROSS_ROUND_CACHE_DIRECTORY
26 changes: 0 additions & 26 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,6 @@
/datum/asset/simple/irv
)

/datum/asset/simple/namespaced/changelog
assets = list(
"88x31.png" = 'html/88x31.png',
"bug-minus.png" = 'html/bug-minus.png',
"cross-circle.png" = 'html/cross-circle.png',
"hard-hat-exclamation.png" = 'html/hard-hat-exclamation.png',
"image-minus.png" = 'html/image-minus.png',
"image-plus.png" = 'html/image-plus.png',
"music-minus.png" = 'html/music-minus.png',
"music-plus.png" = 'html/music-plus.png',
"tick-circle.png" = 'html/tick-circle.png',
"wrench-screwdriver.png" = 'html/wrench-screwdriver.png',
"spell-check.png" = 'html/spell-check.png',
"burn-exclamation.png" = 'html/burn-exclamation.png',
"chevron.png" = 'html/chevron.png',
"chevron-expand.png" = 'html/chevron-expand.png',
"scales.png" = 'html/scales.png',
"coding.png" = 'html/coding.png',
"ban.png" = 'html/ban.png',
"chrome-wrench.png" = 'html/chrome-wrench.png',
"mapping.png" = 'html/mapping.png',
"changelog.css" = 'html/changelog.css'
)
parents = list("changelog.html" = 'html/changelog.html')


/datum/asset/simple/scanlines
assets = list(
"scanlines.png" = 'html/scanlines.png'
Expand Down
Loading
Loading