Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Rhials/tgstation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhials committed Jul 7, 2024
2 parents b7e237a + 43aab36 commit 7d3572e
Show file tree
Hide file tree
Showing 3,210 changed files with 325,516 additions and 75,474 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions .github/guides/HARDDELETES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hard Deletes

> Garbage collection is pretty gothic when you think about it.
> Garbage collection is pretty gothic when you think about it.
>
>An object in code is like a ghost, clinging to its former life, and especially to the people it knew. It can only pass on and truly die when it has dealt with its unfinished business. And only when its been forgotten by everyone who ever knew it. If even one other object remembers it, it has a connection to the living world that lets it keep hanging on
>
Expand Down Expand Up @@ -52,7 +52,7 @@ This of course means they can store that location in memory in another object's
/proc/someshit(mem_location)
var/datum/some_obj = new()
some_obj.reference = mem_location
some_obj.reference = mem_location
```

But what happens when you get rid of the object we're passing around references to? If we just cleared it out from memory, everything that holds a reference to it would suddenly be pointing to nowhere, or worse, something totally different!
Expand Down Expand Up @@ -135,13 +135,13 @@ If that fails, search the object's typepath, and look and see if anything is hol
BYOND currently doesn't have the capability to give us information about where a hard delete is. Fortunately we can search for most all of then ourselves.
The procs to perform this search are hidden behind compile time defines, since they'd be way too risky to expose to admin button pressing

If you're having issues solving a harddel and want to perform this check yourself, go to `_compile_options.dm` and uncomment `TESTING`, `REFERENCE_TRACKING`, and `GC_FAILURE_HARD_LOOKUP`
If you're having issues solving a harddel and want to perform this check yourself, go to `_compile_options.dm` and uncomment `REFERENCE_TRACKING_STANDARD`.

You can read more about what each of these do in that file, but the long and short of it is if something would hard delete our code will search for the reference (This will look like your game crashing, just hold out) and print information about anything it finds to the runtime log, which you can find inside the round folder inside `/data/logs/year/month/day`
You can read more about what each of these do in that file, but the long and short of it is if something would hard delete our code will search for the reference (This will look like your game crashing, just hold out) and print information about anything it finds to [log_dir]/harddels.log, which you can find inside the round folder inside `/data/logs/year/month/day`

It'll tell you what object is holding the ref if it's in an object, or what pattern of list transversal was required to find the ref if it's hiding in a list of some sort
It'll tell you what object is holding the ref if it's in an object, or what pattern of list transversal was required to find the ref if it's hiding in a list of some sort, alongside the references remaining.

## Techniques For Fixing Hard Deletes
## Techniques For Fixing Hard Deletes

Once you've found the issue, it becomes a matter of making sure the ref is cleared as a part of Destroy(). I'm gonna walk you through a few patterns and discuss how you might go about fixing them

Expand Down
234 changes: 118 additions & 116 deletions .github/guides/VISUALS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/max_required_byond_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# (Requiring clients update to connect to the game server is not something we like to spring on them with no notice,
# especially for beta builds where the pager/updater won't let them update without additional configuration.)

514
515
36 changes: 18 additions & 18 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ on:
merge_group:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run_linters:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Run Linters
runs-on: ubuntu-22.04
concurrency:
group: run_linters-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- name: Restore SpacemanDMM cache
Expand Down Expand Up @@ -130,9 +134,8 @@ jobs:
name: Compile Maps
needs: [collect_data]
runs-on: ubuntu-22.04
concurrency:
group: compile_all_maps-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- name: Restore BYOND cache
Expand All @@ -155,13 +158,12 @@ jobs:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }}
max_required_byond_client: ${{ steps.max_required_byond_client.outputs.max_required_byond_client }}
concurrency:
group: find_all_maps-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- name: Find Maps
Expand All @@ -186,13 +188,12 @@ jobs:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Integration Tests
needs: [collect_data]

strategy:
fail-fast: false
matrix:
map: ${{ fromJSON(needs.collect_data.outputs.maps).paths }}
concurrency:
group: run_all_tests-${{ github.head_ref || github.run_id }}-${{ matrix.map }}
cancel-in-progress: true

uses: ./.github/workflows/run_integration_tests.yml
with:
map: ${{ matrix.map }}
Expand All @@ -206,9 +207,7 @@ jobs:
fail-fast: false
matrix:
setup: ${{ fromJSON(needs.collect_data.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_integration_tests.yml
with:
map: ${{ matrix.setup.map }}
Expand All @@ -221,13 +220,15 @@ jobs:
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]
name: Compare Screenshot Tests
timeout-minutes: 15
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -266,9 +267,8 @@ jobs:
name: Windows Build
needs: [collect_data]
runs-on: windows-latest
concurrency:
group: test_windows-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- name: Restore Yarn cache
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeowner_reviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
assign-users:

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ on:
max_required_byond_client:
required: true
type: string

jobs:
run_integration_tests:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
mysql:
image: mysql:latest
Expand Down Expand Up @@ -57,7 +59,7 @@ jobs:
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -WError -NWTG0001
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -Werror -ITG0001 -I"loop_checks"
- name: Run Tests
run: |
source $HOME/BYOND/byond/bin/byondsetup
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: "515.1633"
byond: "515.1637"
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/"
static_files:
# Config directory should be static
Expand Down
2 changes: 2 additions & 0 deletions RUN_SERVER.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0\tools\build\build.bat" --wait-on-error server %*
21 changes: 17 additions & 4 deletions SQL/database_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,32 @@ Any time you make a change to the schema files, remember to increment the databa

Make sure to also update `DB_MAJOR_VERSION` and `DB_MINOR_VERSION`, which can be found in `code/__DEFINES/subsystem.dm`.

The latest database version is 5.26; The query to update the schema revision table is:
The latest database version is 5.27; The query to update the schema revision table is:

```sql
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 26);
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 27);
```
or

```sql
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 26);
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 27);
```

In any query remember to add a prefix to the table names if you use one.

-----------------------------------------------------
Version 5.27, 26 April 2024, by zephyrtfa
Add the ip intel whitelist table
```sql
DROP TABLE IF EXISTS `ipintel_whitelist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ipintel_whitelist` (
`ckey` varchar(32) NOT NULL,
`admin_ckey` varchar(32) NOT NULL,
PRIMARY KEY (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
```
-----------------------------------------------------
Version 5.26, 03 December 2023, by distributivgesetz
Set the default value of cloneloss to 0, as it's obsolete and it won't be set by blackbox anymore.
Expand Down
14 changes: 14 additions & 0 deletions SQL/tgstation_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,20 @@ CREATE TABLE `ipintel` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ipintel_whitelist`
--

DROP TABLE IF EXISTS `ipintel_whitelist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ipintel_whitelist` (
`ckey` varchar(32) NOT NULL,
`admin_ckey` varchar(32) NOT NULL,
PRIMARY KEY (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `legacy_population`
--
Expand Down
13 changes: 13 additions & 0 deletions SQL/tgstation_schema_prefixed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,19 @@ CREATE TABLE `SS13_ipintel` (
KEY `idx_ipintel` (`ip`,`intel`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ipintel_whitelist`
--

DROP TABLE IF EXISTS `SS13_ipintel_whitelist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SS13_ipintel_whitelist` (
`ckey` varchar(32) NOT NULL,
`admin_ckey` varchar(32) NOT NULL,
PRIMARY KEY (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SS13_legacy_population`
Expand Down
1 change: 0 additions & 1 deletion _maps/RandomRuins/AnywhereRuins/golem_ship.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@
"Ro" = (
/obj/structure/table/wood,
/obj/item/bedsheet/rd/royal_cape{
layer = 3;
pixel_x = 5;
pixel_y = 9
},
Expand Down
6 changes: 3 additions & 3 deletions _maps/RandomRuins/IceRuins/icemoon_surface_smoking_room.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/obj/item/circuitboard/machine/space_heater,
/obj/item/stack/cable_coil/five,
/obj/structure/frame/machine,
/obj/item/stock_parts/cell/super,
/obj/item/stock_parts/power_store/cell/super,
/turf/open/floor/wood,
/area/ruin/smoking_room/house)
"d" = (
Expand Down Expand Up @@ -175,11 +175,11 @@
/area/ruin/smoking_room/room)
"E" = (
/obj/item/trash/shrimp_chips,
/obj/item/clothing/mask/cigarette/rollie/trippy{
/obj/item/cigarette/rollie/trippy{
pixel_x = 3;
pixel_y = -1
},
/obj/item/clothing/mask/cigarette/rollie/trippy{
/obj/item/cigarette/rollie/trippy{
pixel_x = 3;
pixel_y = 5
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
/obj/effect/decal/cleanable/dirt,
/obj/machinery/cell_charger,
/obj/item/stock_parts/cell,
/obj/item/stock_parts/power_store/cell,
/turf/open/floor/plating,
/area/ruin/plasma_facility/operations)
"bv" = (
Expand Down Expand Up @@ -166,7 +166,7 @@
pixel_x = -7;
pixel_y = 8
},
/obj/item/stock_parts/cell/high{
/obj/item/stock_parts/power_store/cell/high{
pixel_x = -18;
pixel_y = -3
},
Expand Down
Loading

0 comments on commit 7d3572e

Please sign in to comment.