Skip to content

Commit

Permalink
Merge branch 'master' into fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VentelR authored Oct 18, 2024
2 parents 524fa83 + da1b441 commit 34ec536
Show file tree
Hide file tree
Showing 5,890 changed files with 133,114 additions and 52,950 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@
/_maps/ @EOBGames @Maurukas @MMMiracles @san7890 @ShizCalev

/icons/ @Imaginos16 @Krysonism @Twaticus @Wallemations
/icons/ass/ @Ghilker @tralezab

/code/__DEFINES/atmospherics/ @Ghilker @LemonInTheDark

Expand Down
65 changes: 65 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Bug Report
description: Create a report to help reproduce and fix the issue.
body:
- type: markdown
attributes:
value: |
# **Please read the following guidelines. Follow all instructions or else your issue is subject to closure.**
## If you use the "Report Issue" button in the top-right corner of the game, it will automatically fill in some of the information below.
If you are reporting an issue found in another branch or codebase, you _must_ link the branch or codebase repo in your issue report or it will be closed.
For branches, If you have not pushed your code up, please either reproduce it on master or push your code up before making an issue report.
For other codebases, if you do not have a public code repository you will be refused help unless you can completely reproduce the issue on our master branch.
- type: input
id: reporting-version
attributes:
label: "Client Version:"
description: |
The BYOND version you are using to report this issue. You can find this information in the bottom left corner of the "About BYOND" window in the BYOND client.
It is strongly recommended that you include this, especially for concerns on the visual aspects of the game.
placeholder: "xxx.xxxx"
validations:
required: false
- type: textarea
id: issue-summary
attributes:
label: "Issue Summary:"
description: |
Briefly explain your issue in a few plain sentences. You may copy and paste the issue title here if it is suitable.
placeholder: |
"When I do X, Y happens instead of Z."
"X on Y map has Z issue."
validations:
required: true
- type: input
id: round-id
attributes:
label: "Round ID:"
description: |
If you discovered this issue from playing tgstation hosted servers, the Round ID can be found in the Status panel or retrieved from https://statbus.space/
The Round ID lets us look up valuable information and logs for the round the bug happened. Leave this blank if there is no round ID.
placeholder: "XXXXXX"
validations:
required: false
- type: textarea
id: test-merges
attributes:
label: "Test Merge Information:"
description: |
If you're certain the issue is to be caused by a test merge [OOC Tab -> Show Server Revision], report it in the pull request's comment section rather than on the tracker.
If you're unsure you can refer to the issue number by prefixing said number with #. The issue number can be found beside the title after submission of this form.
validations:
required: false
- type: textarea
id: reproduction
attributes:
label: "Reproduction Steps:"
description: |
Describe the steps to reproduce the issue in detail. Include any relevant information, such as the map, round type, and any other factors that may be relevant.
If it is a runtime-related error, please include the runtime here as that is pertient information. Issues are not for oddities introduced by admin varedits, ensure these occur in normal circumstances.
placeholder: |
1. Go to the X location
2. Do Y action
3. Observe Z result
validations:
required: true
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ balance: rebalanced something
fix: fixed a few things
sound: added/modified/removed audio or sound effects
image: added/modified/removed some icons or images
map: added/modified/removed map content
spellcheck: fixed a few typos
code: changed some code
refactor: refactored some code
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: master
schedule:
interval: daily
labels:
- GitHub
open-pull-requests-limit: 10
1 change: 1 addition & 0 deletions .github/gbp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ reset_label = "GBP: Reset"
"Sound" = 3
"Sprites" = 3
"Unit Tests" = 6
"Wallening Revert Recovery" = 10
2 changes: 1 addition & 1 deletion .github/guides/RUNNING_A_SERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BYOND installed. You can get it from https://www.byond.com/download. Once you've
that, extract the game files to wherever you want to keep them. This is a
sourcecode-only release, so the next step is to compile the server files.

Double-click `BUILD.bat` in the root directory of the source code. This'll take
Double-click `BUILD.cmd` in the root directory of the source code. This'll take
a little while, and if everything's done right you'll get a message like this:

```
Expand Down
24 changes: 24 additions & 0 deletions .github/guides/STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,30 @@ The following is a list of procs, and their safe replacements.
* Move away from something, taking turf density into account `walk_away()` -> `SSmove_manager.move_away()`
* Move to a random place nearby. NOT random walk `walk_rand()` -> `SSmove_manager.move_rand()` is random walk, `SSmove_manager.move_to_rand()` is walk to a random place

### Avoid pointer use

BYOND has a variable type called pointers, which allow you to reference a variable rather then its value. As an example of how this works:

```
var/pointed_at = "text"
var/value = pointed_at // copies the VALUE of pointed at
var/reference = &pointed_at // points at pointed_at itself
// so we can retain a reference even if pointed_at changes
pointed_at = "text AGAIN"
world << (*reference) // Deref to get the value, outputs "text AGAIN"
// or modify the var remotely
*reference = "text a THIRD TIME"
world << pointed_at // outputs "text a THIRD TIME"
```

The problem with this is twofold.
- First: if you use a pointer to reference a var on a datum, it is essentially as if you held an invisible reference to that datum. This risks hard deletes in very unclear ways that cannot be tested for.
- Second: People don't like, understand how pointers work? They mix them up with classical C pointers, when they're more like `std::shared_ptr`. This leads to code that just doesn't work properly, or is hard to follow without first getting your mind around it. It also risks hiding what code does in dumb ways because pointers don't have unique types.

For these reasons and with the hope of avoiding pointers entering general use, be very careful using them, if you use them at all.

### BYOND hellspawn

What follows is documentation of inconsistent or strange behavior found in our engine, BYOND.
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/auto_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v1
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
env:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_ID: ${{ secrets.APP_ID }}

- name: Run auto changelog
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { processAutoChangelog } = await import('${{ github.workspace }}/tools/pull_request_hooks/autoChangelog.js')
await processAutoChangelog({ github, context })
github-token: ${{ secrets.COMFY_ORANGE_PAT || secrets.GITHUB_TOKEN }}
github-token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
49 changes: 28 additions & 21 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ concurrency:
cancel-in-progress: true

jobs:
run_linters:
start_gate:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Start Gate
runs-on: ubuntu-latest
steps:
- name: Mandatory Empty Step
run: exit 0

run_linters:
name: Run Linters
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand Down Expand Up @@ -71,7 +79,7 @@ jobs:
path: tools/icon_cutter/cache
key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }}
- name: Install OpenDream
uses: robinraju/release-downloader@v1.9
uses: robinraju/release-downloader@v1.11
with:
repository: "OpenDreamProject/OpenDream"
tag: "latest"
Expand Down Expand Up @@ -134,9 +142,8 @@ jobs:
run: tools/build/build --ci lint tgui-test

compile_all_maps:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Compile Maps
needs: [collect_data]
needs: collect_data
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand All @@ -159,8 +166,8 @@ jobs:
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

collect_data:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
Expand Down Expand Up @@ -189,9 +196,8 @@ jobs:
echo "max_required_byond_client=$(grep -Ev '^[[:blank:]]{0,}#{1,}|^[[:blank:]]{0,}$' .github/max_required_byond_client.txt | tail -n1)" >> $GITHUB_OUTPUT
run_all_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Integration Tests
needs: [collect_data]
needs: collect_data

strategy:
fail-fast: false
Expand All @@ -204,9 +210,9 @@ jobs:
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}

run_alternate_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' )
if: needs.collect_data.outputs.alternate_tests != '[]'
name: Alternate Tests
needs: [collect_data]
needs: collect_data
strategy:
fail-fast: false
matrix:
Expand All @@ -219,18 +225,9 @@ jobs:
minor: ${{ matrix.setup.minor }}
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}

check_alternate_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' )
name: Check Alternate Tests
needs: [run_alternate_tests]
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- run: echo Alternate tests passed.

compare_screenshots:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && (always() && (!failure() && !cancelled())) )
needs: [run_all_tests, run_alternate_tests]
if: needs.collect_data.outputs.alternate_tests == '[]' || needs.run_alternate_tests.result == 'success'
needs: [ collect_data, run_all_tests, run_alternate_tests ]
name: Compare Screenshot Tests
timeout-minutes: 15
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -267,7 +264,6 @@ jobs:
path: artifacts/screenshot_comparisons

test_windows:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Windows Build
needs: [collect_data]
runs-on: windows-latest
Expand All @@ -291,3 +287,14 @@ jobs:
with:
dmb-location: tgstation.dmb
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

completion_gate: # Serves as a non-moving target for branch rulesets
if: always() && !cancelled()
name: Completion Gate
needs: [ test_windows, compare_screenshots, compile_all_maps, run_linters ]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
27 changes: 23 additions & 4 deletions .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
Expand All @@ -18,37 +20,54 @@ jobs:
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
uses: actions/setup-python@v5
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: |
python tools/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 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 commit -m "Automatic changelog compile [ci skip]" -a || true
- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v1
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
env:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_ID: ${{ secrets.APP_ID }}

- name: "Push"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.COMFY_ORANGE_PAT || secrets.GITHUB_TOKEN }}
github_token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 34ec536

Please sign in to comment.