Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into round-traits
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Aug 24, 2023
2 parents 9a60869 + 14815f9 commit c33e5d7
Show file tree
Hide file tree
Showing 1,531 changed files with 158,029 additions and 98,285 deletions.
39 changes: 11 additions & 28 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Meet the Team](#meet-the-team)
- [Head Maintainer and Project Manager](#head-maintainer-and-project-manager)
- [Head Maintainer and Maintainer Managers](#head-maintainer-and-maintainer-managers)
- [Maintainers](#maintainers)
- [Staff Tools and Major Rule changing PR’s](#staff-tools-and-major-rule-changing-prs)
- [Issue Managers](#issue-managers)
Expand All @@ -16,6 +16,7 @@
- [Writing understandable code](#writing-understandable-code)
- [Misc](#misc)
- [Pull Request Process](#pull-request-process)
- [A note on balance impacting PRs](#a-note-on-balance-impacting-prs)
- [Good Boy Points](#good-boy-points)
- [Porting features/sprites/sounds/tools from other codebases](#porting-featuresspritessoundstools-from-other-codebases)
- [Things you can work on](#things-you-can-work-on)
Expand Down Expand Up @@ -52,9 +53,9 @@ You can of course, as always, ask for help on the Discord channels or the forums

## Meet the Team

### Head Maintainer and Project Manager
### Head Maintainer and Maintainer Managers

The Head Maintainer and Project Manager are responsible for controlling, adding, and removing maintainers from the project. In addition to filling the role of a normal maintainer, they have sole authority on who becomes a maintainer, as well as who remains a maintainer and who does not.
The Head Maintainer and Maintainer Managers are responsible for controlling, adding, and removing maintainers from the project. In addition to filling the role of a normal maintainer, they have sole authority on who becomes a maintainer, as well as who remains a maintainer and who does not.

### Maintainers

Expand All @@ -73,10 +74,10 @@ These are the few directives we have for project maintainers.
- Try to get secondary maintainer approval before merging if you are able to.
- PRs with empty commits intended to generate a changelog.
- Do not merge PRs that contain content from the [banned content list](./CONTRIBUTING.md#banned-content).
- Do not merge PRs that contain balance changes without GA approval. Exceptions include:
- Any PR that has been un-reviewed by a GA for 7 days.
- Do not merge PRs that contain balance changes without Maintainer Manager approval. Exceptions include:
- Any PR that has been un-reviewed by a Maintainer Manager for 7 days.
- Do not remove the DNM label that another Maintainer has applied. Exceptions include:
- GAs removing a DNM label placed by a Maintainer for Balance/Design reasons
- Maintainer Managers removing a DNM label placed by a Maintainer for Balance/Design reasons

These are not steadfast rules as maintainers are expected to use their best judgement when operating.

Expand Down Expand Up @@ -158,31 +159,13 @@ There is no strict process when it comes to merging pull requests. Pull requests

* After leaving reviews on an open pull request, maintainers should convert it to a draft. Once you have addressed all their comments to the best of your ability, feel free to mark the pull as `Ready for Review` again.

### A note on balance review and PR denial
### A note on balance impacting PRs

Certain PRs, such as those which directly change number values (i.e. health, recoil, damage) or add large pieces of content to the game (i.e. a new gun, a new dropship weapon, or a new xeno structure) can have the potential to highly impact game balance or gameflow. As such, they are subject to another level of review known as "balance review".
Certain PRs, such as those which directly change number values (i.e. health, recoil, damage) or add large pieces of content to the game (i.e. a new gun, a new dropship weapon, or a new xeno structure) can have the potential to highly impact game balance or gameflow.

* Any gameplay architect may balance review PRs, after the PR has been open for 7 days without architect review any normal maintainer may balance review it.
* If a Maintainer Manager or Head Maintainer has not reviewed a pull request that impacts balance in 7 days, maintainers may review and merge the PR themselves.

* In the process of architect review, changes may be requested as normal, the PR may be approved, or the PR may be denied.

* It should go without saying that denied PRs may not be reopened or remade without changes and prior approval.

* We understand that having something you have worked on for quite some time being denied can be frustrating. Therefore, it is recommmended that you check with an architect or maintainer before beginning coding your PR if you have any doubts that your PR will be accepted. This will save everyone's time and energy.

## Good Boy Points

Each GitHub account has a score known as Good Boy Points, or GBP. This is a system we use to ensure that the codebase stays maintained and that contributors fix bugs as well as add features.

The GBP gain or loss for a PR depends on the type of changes the PR makes, represented by the tags assigned to the PR by the CM-SS13 github bot or maintainers. Generally speaking, fixing bugs, updating sprites, or improving maps increases your GBP score, while adding mechanics, or rebalancing things will cost you GBP.

The GBP change of a PR is the sum of greatest positive and lowest negative values it has. For example, a PR that has tags worth +10, +4, -1, -7, will net 3 GBP (10 - 7).

Negative GBP increases the likelihood of a maintainer closing your PR. With that chance being higher the lower your GBP is. Be sure to use the proper tags in the changelog to prevent unnecessary GBP loss. Maintainers reserve the right to change tags as they deem appropriate.

There is no benefit to having a higher positive GBP score, since GBP only comes into consideration when it is negative.

You can see each tag and their GBP values [Here](https://github.com/cmss13-devs/cmss13/blob/master/.github/gbp.toml).
* We understand that having something you have worked on for quite some time being denied can be frustrating. Therefore, it is recommended that you check with a maintainer before beginning to code your PR if you have any doubts that it will be accepted. This will save everyone's time and energy.

## Porting features/sprites/sounds/tools from other codebases

Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Put screenshots and videos here with an empty line between the screenshots and t

# Changelog

<!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. -->
<!-- If you add a name after the ':cl', that name will be used in the changelog. You must add your CKEY after the CL if your GitHub name doesn't match. Be sure to properly mark your PRs to prevent unnecessary GBP loss. Maintainers freely reserve the right to remove and add tags should they deem it appropriate. -->
<!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly label your changes in the changelog. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. -->
<!-- If you add a name after the ':cl', that name will be used in the changelog. You must add your CKEY after the CL if your GitHub name doesn't match. Maintainers freely reserve the right to remove and add tags should they deem it appropriate. -->

:cl:
add: Added something
Expand Down
9 changes: 9 additions & 0 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file contains extra tests to run for specific BYOND versions.
# This is useful for making sure we maintain compatibility with both older and newer versions,
# while still having our main tests run on a guaranteed pinned version.

# Format is version: map
# Example:
# 500.1337: runtimestation

515.1610: lv624
23 changes: 0 additions & 23 deletions .github/gbp.toml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/guides/STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ While we normally encourage (and in some cases, even require) bringing out of da
This is a simple one - as we will eventually move to 515, we will need to ditch this kind of callback. So please don't add any new ones. Make our lives easier.

### PROC_REF Macros
When referencing procs in RegisterSignal, Callback and other procs you should use PROC_REF,TYPE_PROC_REF and GLOBAL_PROC_REF macros.
When referencing procs in RegisterSignal, Callback and other procs you should use PROC_REF, TYPE_PROC_REF and GLOBAL_PROC_REF macros.
They ensure compilation fails if the reffered to procs change names or get removed.
The macro to be used depends on how the proc you're in relates to the proc you want to use:

Expand Down Expand Up @@ -168,6 +168,8 @@ This is a simple one - as we will eventually move to 515, we will need to ditch
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(funny)), 100))
```

Note that the same rules go for verbs too! We have VERB_REF() and TYPE_VERB_REF() as you need it in these same cases. GLOBAL_VERB_REF() isn't a thing however, as verbs are not global.

### Signal Handlers

All procs that are registered to listen for signals using `RegisterSignal()` must contain at the start of the proc `SIGNAL_HANDLER` eg;
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Autowiki
on:
schedule:
- cron: "5 4 * * *"
workflow_dispatch:
permissions:
contents: read

jobs:
autowiki:
runs-on: ubuntu-20.04
steps:
- name: "Check for AUTOWIKI_USERNAME"
id: secrets_set
env:
ENABLER_SECRET: ${{ secrets.AUTOWIKI_USERNAME }}
run: |
unset SECRET_EXISTS
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
- name: Checkout
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/checkout@v3
- name: Restore BYOND cache
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
- name: Install rust-g
if: steps.secrets_set.outputs.SECRETS_ENABLED
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
bash tools/ci/install_rust_g.sh
- name: Compile and generate Autowiki files
if: steps.secrets_set.outputs.SECRETS_ENABLED
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci autowiki
- name: Run Autowiki
if: steps.secrets_set.outputs.SECRETS_ENABLED
env:
USERNAME: ${{ secrets.AUTOWIKI_USERNAME }}
PASSWORD: ${{ secrets.AUTOWIKI_PASSWORD }}
run: |
cd tools/autowiki
npm install
cd ../..
node tools/autowiki/autowiki.js data/autowiki_edits.txt data/autowiki_files/
62 changes: 58 additions & 4 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
run_linters:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Run Linters
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
concurrency:
group: run_linters-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Compile Maps
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Restore BYOND cache
Expand All @@ -80,9 +80,10 @@ jobs:
find_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Find Maps to Test
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }}
concurrency:
group: find_all_maps-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -91,10 +92,16 @@ jobs:
- name: Find Maps
id: map_finder
run: |
echo "$(ls -mw0 maps/*.json)" > maps_output.txt
shopt -s extglob
echo "$(ls -mw0 maps/!(*override*).json)" > maps_output.txt
sed -i -e s+maps/+\"+g -e s+.json+\"+g maps_output.txt
echo "Maps: $(cat maps_output.txt)"
echo "maps={\"paths\":[$(cat maps_output.txt)]}" >> $GITHUB_OUTPUT
- name: Find Alternate Tests
id: alternate_test_finder
run: |
ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+): (?<map>.+)$")]' .github/alternate_byond_versions.txt)
echo "alternate_tests=$ALTERNATE_TESTS_JSON" >> $GITHUB_OUTPUT
run_all_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Unit Tests
Expand All @@ -109,3 +116,50 @@ jobs:
uses: ./.github/workflows/run_unit_tests.yml
with:
map: ${{ matrix.map }}

run_alternate_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]') && needs.find_all_maps.outputs.alternate_tests != '[]'"
name: Alternate Tests
needs: [find_all_maps]
strategy:
fail-fast: false
matrix:
setup: ${{ fromJSON(needs.find_all_maps.outputs.alternate_tests) }}
concurrency:
group: run_all_tests-${{ github.head_ref || github.run_id }}-${{ matrix.setup.major }}.${{ matrix.setup.minor }}-${{ matrix.setup.map }}
cancel-in-progress: true
uses: ./.github/workflows/run_unit_tests.yml
with:
map: ${{ matrix.setup.map }}
major: ${{ matrix.setup.major }}
minor: ${{ matrix.setup.minor }}

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

test_windows:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Windows Build
runs-on: windows-latest
concurrency:
group: test_windows-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Compile
run: pwsh tools/ci/build.ps1
env:
DM_EXE: "C:\\byond\\bin\\dm.exe"
2 changes: 1 addition & 1 deletion .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
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 Down
4 changes: 3 additions & 1 deletion .github/workflows/conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:
types: [ready_for_review, opened, synchronize, reopened]
jobs:
triage:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: eps1lon/[email protected]
with:
dirtyLabel: 'Merge Conflict'
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
repoToken: ${{ secrets.BOT_TOKEN_CM || secrets.GITHUB_TOKEN }}
42 changes: 0 additions & 42 deletions .github/workflows/gbp.yml

This file was deleted.

Loading

0 comments on commit c33e5d7

Please sign in to comment.