Skip to content

Commit

Permalink
Merge branch 'master' into theorigin
Browse files Browse the repository at this point in the history
  • Loading branch information
RustingWithYou committed Apr 11, 2024
2 parents b487eb4 + bebc706 commit cd4d0b0
Show file tree
Hide file tree
Showing 165 changed files with 35,603 additions and 75,641 deletions.
75 changes: 46 additions & 29 deletions .github/workflows/update_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,53 @@
name: "Build Changelog"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
branches:
- master
paths:
- 'html/changelogs/**'

jobs:
update-changelog:
concurrency: changelog
compile:
name: "Compile changelogs"
runs-on: ubuntu-22.04
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_TOKEN_AURORA }}

- name: Update Changelogs
run: |
tools/bootstrap/python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs
- name: Commit Changelogs
run: |
git pull origin master
git config --local user.email "[email protected]"
git config --local user.name "AuroraBuildBot"
git add --force html/*
git commit -m "Automatic Changelog compile [ci skip]" -a || true
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN_AURORA }}
- name: "Check for BOT_TOKEN_AURORA secret and pass true to output if it exists to be checked by later steps"
id: value_holder
env:
ENABLER_SECRET: ${{ secrets.BOT_TOKEN_AURORA }}
run: |
unset SECRET_EXISTS
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
- name: "Setup python"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: "Install deps"
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml
sudo apt-get install dos2unix
- name: "Checkout"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/checkout@v4
with:
fetch-depth: 25
persist-credentials: false
- name: "Compile"
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
tools/bootstrap/python tools/GenerateChangelog/ss13_genchangelog.py html/changelogs
- name: Commit
if: steps.value_holder.outputs.ACTIONS_ENABLED
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"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN_AURORA || secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@
#include "code\__HELPERS\sorting\__main.dm"
#include "code\__HELPERS\sorting\cmp.dm"
#include "code\__HELPERS\sorting\TimSort.dm"
#include "code\_globalvars\configuration.dm"
#include "code\_globalvars\edible.dm"
#include "code\_globalvars\logging.dm"
#include "code\_globalvars\tgui.dm"
#include "code\_onclick\adjacent.dm"
#include "code\_onclick\ai.dm"
#include "code\_onclick\click.dm"
Expand Down Expand Up @@ -414,6 +416,7 @@
#include "code\datums\tgs_event_handler.dm"
#include "code\datums\tgui_module.dm"
#include "code\datums\weakrefs.dm"
#include "code\datums\changelog\changelog.dm"
#include "code\datums\components\_component.dm"
#include "code\datums\components\connect_mob_behalf.dm"
#include "code\datums\components\local_network.dm"
Expand Down Expand Up @@ -2362,6 +2365,7 @@
#include "code\modules\maps\planet_types\lore\burzsia.dm"
#include "code\modules\maps\planet_types\lore\konyang.dm"
#include "code\modules\maps\planet_types\lore\srandmarr.dm"
#include "code\modules\maps\planet_types\lore\tauceti.dm"
#include "code\modules\martial_arts\gunkata.dm"
#include "code\modules\martial_arts\martial.dm"
#include "code\modules\martial_arts\plasma_fist.dm"
Expand Down
3 changes: 0 additions & 3 deletions code/__DEFINES/global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ GLOBAL_PROTECT(href_logfile)
GLOBAL_VAR_INIT(game_version, "Aurorastation")
GLOBAL_PROTECT(game_version)

GLOBAL_VAR_INIT(changelog_hash, "")
GLOBAL_PROTECT(changelog_hash)

GLOBAL_VAR_INIT(game_year, (text2num(time2text(world.realtime, "YYYY")) + 442))

GLOBAL_VAR_INIT(round_progressing, 1)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/configuration.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GLOBAL_VAR_INIT(changelog_hash, "")
1 change: 1 addition & 0 deletions code/_globalvars/tgui.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GLOBAL_DATUM(changelog_tgui, /datum/changelog)
32 changes: 32 additions & 0 deletions code/datums/changelog/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
5 changes: 5 additions & 0 deletions code/game/objects/items/weapons/storage/pill_bottle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
desc = "Contains pills used to treat minor injuries and bleeding."
starts_with = list(/obj/item/reagent_containers/pill/bicaridine = 7)

/obj/item/storage/pill_bottle/dexalin
name = "bottle of 15u Dexalin pills"
desc = "Contains pills used to treat minor cases of oxygen deprivation."
starts_with = list(/obj/item/reagent_containers/pill/dexalin = 7)

/obj/item/storage/pill_bottle/dexalin_plus
name = "bottle of 15u Dexalin Plus pills"
desc = "Contains pills used to treat extreme cases of oxygen deprivation."
Expand Down
6 changes: 4 additions & 2 deletions code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ GLOBAL_PROTECT(config)
GLOB.diary_date_string = time2text(world.realtime, "YYYY/MM/DD")
GLOB.href_logfile = file("data/logs/[GLOB.diary_date_string] hrefs.htm")
GLOB.diary = "data/logs/[GLOB.diary_date_string]_[GLOB.round_id].log"

var/latest_changelog = file("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

log_startup()
// Used for telling if the changelog has changed recently.
GLOB.changelog_hash = md5('html/changelog.html')
load_motd()

if(GLOB.config.logsettings["log_runtime"])
Expand Down
19 changes: 19 additions & 0 deletions code/modules/asset_cache/asset_cache.dm
Original file line number Diff line number Diff line change
Expand Up @@ -738,3 +738,22 @@ var/list/asset_datums = list()
/// (Generated names do not include file extention.)
/proc/generate_asset_name(file)
return "asset.[md5(fcopy_rsc(file))]"


/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))
3 changes: 2 additions & 1 deletion code/modules/background/space_sectors/tauceti.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
the Sol Alliance over the loss of such a wealthy system, while NanoTrasen continues to have a heavy hand in all levels of Tau Ceti."
cargo_price_coef = list("nt" = 0.8, "hpi" = 0.8, "zhu" = 0.8, "een" = 1, "get" = 0.8, "arz" = 1, "blm" = 1,
"iac" = 1, "zsc" = 1, "vfc" = 1, "bis" = 0,8, "xmg" = 0.8, "npi" = 0.8)
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/barren)
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/lava/caprice, /obj/effect/overmap/visitable/sector/exoplanet/desert/luthien, /obj/effect/overmap/visitable/sector/exoplanet/barren/valkyrie,
/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson, /obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/chandras, /obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/dumas)
starlight_color = "#9cd0fd"
starlight_power = 5
starlight_range = 2
Expand Down
135 changes: 135 additions & 0 deletions code/modules/maps/planet_types/lore/tauceti.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// --------------------------------- Caprice

/obj/effect/overmap/visitable/sector/exoplanet/lava/caprice
name = "Caprice"
desc = "A scorching-hot volcanic planet close to Tau Ceti."
charted = "Charted 2147CE, Sol Alliance Department of Colonization."
icon_state = "globe1"
color = "#cf1020"
generated_name = FALSE
ring_chance = 0

/obj/effect/overmap/visitable/sector/exoplanet/lava/caprice/update_icon()
return

/obj/effect/overmap/visitable/sector/exoplanet/lava/caprice/generate_ground_survey_result()
ground_survey_result = "<br>Natural caverns and artificial tunnels"

/obj/effect/overmap/visitable/sector/exoplanet/lava/caprice/generate_atmosphere()
..()
if(atmosphere)
atmosphere.remove_ratio(1)
atmosphere.adjust_gas(GAS_NITROGEN, MOLES_O2STANDARD)
atmosphere.temperature = T0C + 400
atmosphere.update_values()

// --------------------------------- Luthien

/obj/effect/overmap/visitable/sector/exoplanet/desert/luthien
name = "Luthien"
desc = "A desert planet with a thin, unbreathable atmosphere of primarily nitrogen."
charted = "Charted 2147CE, Sol Alliance Department of Colonization."
icon_state = "globe1"
rock_colors = list("#e49135")
color = "#e49135"
generated_name = FALSE
ring_chance = 0

/obj/effect/overmap/visitable/sector/exoplanet/lava/luthien/update_icon()
return

/obj/effect/overmap/visitable/sector/exoplanet/desert/luthien/generate_habitability()
return HABITABILITY_BAD

/obj/effect/overmap/visitable/sector/exoplanet/desert/luthien/generate_ground_survey_result()
ground_survey_result = "<br>Sandy soil with organic fungal contamination"

/obj/effect/overmap/visitable/sector/exoplanet/desert/luthien/generate_atmosphere()
..()
if(atmosphere)
atmosphere.remove_ratio(1)
atmosphere.adjust_gas(GAS_NITROGEN, MOLES_O2STANDARD)
atmosphere.update_values()

// --------------------------------- Valkyrie

/obj/effect/overmap/visitable/sector/exoplanet/barren/valkyrie
name = "Valkyrie"
desc = "The moon of Tau Ceti, the third planet to be settled in the system."
charted = "Natural satellite of Tau Ceti, charted 2147CE, Sol Alliance Department of Colonization."
icon_state = "globe1"
rock_colors = list("#4a3f41")
color = "#4a3f41"
generated_name = FALSE
ring_chance = 0

/obj/effect/overmap/visitable/sector/exoplanet/barren/valkyrie/update_icon()
return

/obj/effect/overmap/visitable/sector/exoplanet/barren/valkyrie/generate_ground_survey_result()
ground_survey_result = "<br>Soil with presence of nitrogen deposits"

// --------------------------------- New Gibson

/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson
name = "New Gibson"
desc = "An ice world just outside the outer edge of the habitable zone."
charted = "Charted 2147CE, Sol Alliance Department of Colonization."
icon_state = "globe1"
generated_name = FALSE
ring_chance = 0

/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson/update_icon()
return

/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson/generate_habitability()
return HABITABILITY_BAD

/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson/generate_ground_survey_result()
ground_survey_result = "<br>Mineral-rich soil with presence of artificial structures"

/obj/effect/overmap/visitable/sector/exoplanet/snow/new_gibson/generate_atmosphere()
..()
if(atmosphere)
atmosphere.remove_ratio(1)
atmosphere.adjust_gas(GAS_NITROGEN, MOLES_O2STANDARD)
atmosphere.temperature = T0C - 200
atmosphere.update_values()

// --------------------------------- Chandras

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/chandras
name = "Chandras"
desc = "An an icy body in a distant orbit of Tau Ceti."
charted = "Charted 2147CE, Sol Alliance Department of Colonization."
icon_state = "globe1"
color = "#b2abbf"
rock_colors = list("#b2abbf")
generated_name = FALSE
ring_chance = 0

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/chandras/update_icon()
return

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/chandras/generate_habitability()
return HABITABILITY_BAD

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/ice/chandras/generate_ground_survey_result()
ground_survey_result = "<br>Soil with presence of nitrogen and ice deposits"

// --------------------------------- Dumas

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/dumas
name = "Dumas"
desc = "An extremely small rocky body that orbits within the far reaches of Tau Ceti."
charted = "Charted 2147CE, Sol Alliance Department of Colonization."
icon_state = "asteroid"
generated_name = FALSE
ring_chance = 0
place_near_main = null

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/dumas/update_icon()
return

/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid/dumas/generate_ground_survey_result()
ground_survey_result = "<br>No notable deposits underground"
10 changes: 4 additions & 6 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -528,16 +528,14 @@
/client/verb/changes()
set name = "Changelog"
set category = "OOC"
var/datum/asset/changelog = get_asset_datum(/datum/asset/simple/changelog)
changelog.send(src)
if(!GLOB.changelog_tgui)
GLOB.changelog_tgui = new /datum/changelog()

var/datum/browser/changelog_win = new(mob, "changes", "Changelog", 675, 650)
changelog_win.set_content(file2text('html/changelog.html'))
changelog_win.open()
GLOB.changelog_tgui.ui_interact(mob)
if(prefs.lastchangelog != GLOB.changelog_hash)
prefs.lastchangelog = GLOB.changelog_hash
prefs.save_preferences()
winset(src, "rpane.changelog", "background-color=none;font-style=;")
winset(src, "infowindow.changelog", "font-style=;")

/mob/verb/observe()
set name = "Observe"
Expand Down
Loading

0 comments on commit cd4d0b0

Please sign in to comment.