Skip to content

Commit

Permalink
Merge branch 'master' into shiptouchup
Browse files Browse the repository at this point in the history
  • Loading branch information
Zevotech authored Mar 22, 2024
2 parents eabe0eb + 693b4c2 commit a238126
Show file tree
Hide file tree
Showing 704 changed files with 34,120 additions and 80,232 deletions.
662 changes: 355 additions & 307 deletions .github/CONTRIBUTING.md

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions .github/MC_tab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
The MC tab hold information on how the game is performing. Here's a crash course on what the most important of those numbers mean.

If you already know what these numbers mean and you want to see them update faster than the default refresh rate of once every 2 seconds, you can enable the admin pref to make the MC tab refresh every 4 deciseconds. Please don't do this unless you actually need that information at a faster refresh rate since updating every subsystems information is expensive.

# Main Entries:

* CPU: What percentage of a tick the game is using before starting the next tick. If this is above 100 it means we are over budget.

* TickCount: How many ticks should have elapsed since the start of the game if no ticks were ever delayed from starting.

* TickDrift: How many ticks since the game started that have been delayed. Essentially this is how many ticks the game is running behind. If this is increasing then the game is currently not able to keep up with demand.

* Internal Tick Usage: You might have heard of this referred to as "maptick". It's how much of the tick that an internal byond function called SendMaps() has taken recently. The higher this is the less time our code has to run. SendMaps() deals with sending players updates of their view of the game world so it has to run every tick but it's expensive so ideally this is optimized as much as possible. You can see a more detailed breakdown of the cost of SendMaps by looking at the profiler in the debug tab -> "Send Maps Profile".

# Master Controller Entry:

* TickRate: How many Byond ticks go between each master controller iteration. By default this is 1 meaning the MC runs once every byond tick. But certain configurations can increase this slightly.

* Iteration: How many times the MC has ran since starting.

* TickLimit: This SHOULD be what percentage of the tick the MC can use when it starts a run, however currently it just represents how much of the tick the MC can use by the time that SSstatpanels fires. Someone should fix that.

# Subsystem Entries:

Subsystems will typically have a base stat entry of the form:
[ ] Name 12ms|28%(2%)|3

The brackets hold a letter if the subsystem is in a state other than idle.

The first numbered entry is the cost of the subsystem, which is a running average of how many milliseconds the subsystem takes to complete a full run. This is increased every time the subsystem resumes an uncompleted run or starts a new run and decays when runs take less time. If this balloons to huge values then it means that the amount of work the subsystem needs to complete in a run is far greater than the amount of time it actually has to execute in whenever it is its turn to fire.

The second numbered entry is like cost, but in percentage of an ideal tick this subsystem takes to complete a run. They both represent the same data.

The third entry (2%) is how much time this subsystem spent executing beyond the time it was allocated by the MC. This is bad, it means that this subsystem doesn't yield when it's taking too much time and makes the job of the MC harder. The MC will attempt to account for this but it is better for all subsystems to be able to correctly yield when their turn is done.

The fourth entry represents how many times this subsystem fires before it completes a run.
39 changes: 33 additions & 6 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,59 @@ jobs:
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

- name: Setup BYOND cache
id: cache-byond
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
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: bash tools/ci/install_byond.sh

- name: Install runtime dependencies
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 libssl-dev:i386
sudo apt install -o APT::Immediate-configure=false libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Install auxmos
- name: Cache dependencies
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: actions/cache@v3
with:
path: ~/.byond/bin
key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: |
bash tools/ci/install_auxmos.sh
sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386
rustup target add i686-unknown-linux-gnu
- name: Build auxmos
if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: bash tools/ci/build_auxmos.sh

- name: Build rust-g
if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED
run: bash tools/ci/build_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:
Expand Down
45 changes: 30 additions & 15 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,26 @@ jobs:
with:
ref: master
- uses: actions/checkout@v3

- name: Restore SpacemanDMM cache
id: cache-spacemandmm
uses: actions/cache@v3
with:
path: ~/dreamchecker
key: ${{ runner.os }}-spacemandmm-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}
- name: Build SpacemanDMM
run: bash tools/ci/build_spaceman_dmm.sh dreamchecker

- name: Restore BYOND cache
id: cache-byond
uses: actions/cache@v3
with:
path: ~/SpacemanDMM
key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }}
path: ~/BYOND
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}
- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true'
run: bash tools/ci/install_byond.sh

- name: Restore Yarn cache
uses: actions/cache@v3
with:
Expand All @@ -33,14 +48,15 @@ jobs:
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Tools
run: |
pip3 install setuptools
bash tools/ci/install_node.sh
bash tools/ci/install_byond.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
cargo install ripgrep --features pcre2
tools/bootstrap/python -c ''
- name: Run Linters
run: |
tools/bootstrap/python -m tools.maplint.source --github
Expand All @@ -52,19 +68,17 @@ jobs:
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Lints
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
outputFile: output-annotations.txt
- uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Run Check Regex
run: |
tools/bootstrap/python -m ci.check_regex --log-changes-only --github-actions
- name: Annotate Regex Matches
if: always()
run: |
cat check_regex_output.txt
Expand All @@ -74,30 +88,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Python setup
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Setup cache
id: cache-byond
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-cache-${{ hashFiles('Dockerfile') }}
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}
- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true'
run: bash tools/ci/install_byond.sh

- name: Compile All Maps
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS -DFULL_INIT
run_all_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Integration Tests
strategy:
fail-fast: true
fail-fast: false
matrix:
arg: [
"BASIC_TESTS",
Expand Down Expand Up @@ -129,6 +140,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Restore Yarn cache
uses: actions/cache@v3
with:
Expand All @@ -138,14 +150,17 @@ jobs:
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Compile
run: pwsh tools/ci/build.ps1
env:
DM_EXE: "C:\\byond\\bin\\dm.exe"

- name: Create artifact
run: |
md deploy
bash tools/deploy.sh ./deploy
- name: Deploy artifact
uses: actions/upload-artifact@v3
with:
Expand Down
49 changes: 37 additions & 12 deletions .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,61 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Setup cache

- name: Setup BYOND cache
id: cache-byond
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-cache-${{ hashFiles('Dockerfile') }}
key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install BYOND
if: steps.cache-byond.outputs.cache-hit != 'true'
run: bash tools/ci/install_byond.sh

- name: Install runtime dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386
- name: Setup dependencies cache
id: cache-deps
uses: actions/cache@v3
with:
path: ~/.byond/bin
key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}

- name: Install build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386
rustup target add i686-unknown-linux-gnu
- name: Build auxmos
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash tools/ci/build_auxmos.sh

- name: Build rust-g
if: steps.cache-deps.outputs.cache-hit != 'true'
run: bash tools/ci/build_rust_g.sh

- name: Setup database
run: |
sudo systemctl start mysql
mysql -u root -proot -e 'CREATE DATABASE tg_ci;'
mysql -u root -proot tg_ci < SQL/tgstation_schema.sql
mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;'
mysql -u root -proot tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql
- name: Install rust-g
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Install auxmos
run: |
bash tools/ci/install_auxmos.sh
- name: Configure version
if: ${{ inputs.major }}
run: |
echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV
echo "BYOND_MINOR=${{ inputs.minor }}" >> $GITHUB_ENV
- name: Compile Tests
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -D${{ inputs.arg }}
- name: Run Tests
Expand Down
2 changes: 1 addition & 1 deletion .tgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: 1
# The BYOND version to use (kept in sync with dependencies.sh by the "TGS Test Suite" CI job)
# Must be interpreted as a string, keep quoted
byond: "514.1588"
byond: "515.1633"
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/"
static_files:
# Config directory should be static
Expand Down
Empty file added 2024-02-11 19
Empty file.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM beestation/byond:514.1583 as base
FROM beestation/byond:515.1616 as base

# Install the tools needed to compile our rust dependencies
FROM base as rust-build
Expand Down
6 changes: 3 additions & 3 deletions _maps/RandomRuins/BeachRuins/beach_crashed_engineer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
/turf/open/floor/plating,
/area/ruin/unpowered)
"kH" = (
/obj/item/book/manual/wiki/engineering_construction,
/obj/item/book/manual/wiki/construction,
/turf/open/floor/plating/beach/sand{
light_range = 2
},
Expand Down Expand Up @@ -453,7 +453,7 @@
/turf/open/floor/plasteel/tech,
/area/ruin/unpowered)
"sB" = (
/obj/item/book/manual/wiki/engineering_guide,
/obj/item/book/manual/wiki/engineering,
/turf/open/floor/plating/beach/sand{
light_range = 2
},
Expand Down Expand Up @@ -858,7 +858,7 @@
/area/overmap_encounter/planetoid/beachplanet/explored)
"Kl" = (
/obj/effect/radiation,
/obj/item/book/manual/wiki/engineering_singulo_tesla,
/obj/item/book/manual/wiki/engineering,
/turf/open/water/beach/deep,
/area/overmap_encounter/planetoid/beachplanet/explored)
"Ko" = (
Expand Down
4 changes: 2 additions & 2 deletions _maps/RandomRuins/BeachRuins/beach_ocean_town.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3308,7 +3308,7 @@
/area/overmap_encounter/planetoid/beachplanet/explored)
"MY" = (
/obj/structure/table,
/obj/item/book/manual/wiki/barman_recipes,
/obj/item/book/manual/wiki/drinks,
/turf/open/floor/wood{
light_range = 2
},
Expand All @@ -3321,7 +3321,7 @@
/area/overmap_encounter/planetoid/beachplanet/explored)
"Ni" = (
/obj/structure/table/wood,
/obj/item/book/manual/wiki/medical_cloning,
/obj/item/book/manual/wiki/medicine,
/obj/machinery/light/small/directional/west,
/turf/open/floor/wood,
/area/ruin/beach/oceantown)
Expand Down
4 changes: 2 additions & 2 deletions _maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,8 @@
pixel_x = -7;
pixel_y = 2
},
/obj/item/clothing/under/rank/command/minutemen,
/obj/item/clothing/head/helmet/bulletproof/minutemen,
/obj/item/clothing/under/clip/officer,
/obj/item/clothing/head/helmet/bulletproof/x11/clip,
/obj/effect/decal/cleanable/blood/old,
/turf/open/floor/wood,
/area/ruin/beach/treasure_cove)
Expand Down
4 changes: 2 additions & 2 deletions _maps/RandomRuins/IceRuins/icemoon_surface_engioutpost.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@
/obj/effect/turf_decal/industrial/warning{
dir = 8
},
/obj/item/book/manual/wiki/engineering_singulo_tesla,
/obj/item/book/manual/wiki/engineering,
/turf/open/floor/plasteel/icemoon,
/area/ruin)
"bE" = (
Expand Down Expand Up @@ -828,7 +828,7 @@
/turf/open/floor/plasteel/icemoon,
/area/ruin)
"cc" = (
/obj/item/book/manual/wiki/atmospherics,
/obj/item/book/manual/wiki/engineering,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{
dir = 4
},
Expand Down
Loading

0 comments on commit a238126

Please sign in to comment.