Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Imaginos16 committed Jul 14, 2024
2 parents 5fb2f66 + 042fa5d commit 118e222
Show file tree
Hide file tree
Showing 9,913 changed files with 1,330,141 additions and 648,604 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
49 changes: 33 additions & 16 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
/code/ze_genesis_call/ @Cyberboss
/tools/tgs_test/ @Cyberboss

# Cobby

/code/modules/reagents/ @ExcessiveUseOfCobblestone
/code/modules/research/designs/medical_designs.dm @ExcessiveUseOfCobblestone
/code/game/objects/items/storage/medkit.dm @ExcessiveUseOfCobblestone

# Fikou

Expand Down Expand Up @@ -58,6 +63,7 @@
/code/modules/client/preferences/ @Mothblocks
/code/modules/client/preferences_menu.dm @Mothblocks
/tgui/packages/tgui/interfaces/PreferencesMenu/ @Mothblocks
/tools/ezdb/ @Mothblocks
/tools/maplint/source/ @Mothblocks
/tools/pull_request_hooks/ @Mothblocks
/tools/screenshot-test-comparison/ @Mothblocks
Expand All @@ -69,12 +75,13 @@

# ninjanomnom

/code/__DEFINES/dcs/ @ninjanomnom
/code/controllers/subsystem/dcs.dm @ninjanomnom
/code/controllers/subsystem/shuttle.dm @ninjanomnom
/code/datums/components/ @ninjanomnom
/code/datums/elements/ @ninjanomnom
/code/modules/shuttle/ @ninjanomnom
/code/datums/signals.dm @ninjanomnom
/code/datums/components/_component.dm @ninjanomnom
/code/datums/elements/_element.dm @ninjanomnom
/code/datums/greyscale/_greyscale_config.dm @ninjanomnom
/code/datums/greyscale/json_reader.dm @ninjanomnom
/code/datums/greyscale/layer.dm @ninjanomnom

# Ryll-Ryll/Shaps

Expand Down Expand Up @@ -118,13 +125,14 @@

# tralezab
/code/__DEFINES/basic_mobs.dm @tralezab
/code/datums/ai @tralezab
/code/modules/mob/living/basic/ @tralezab
/code/datums/ai/ @tralezab
/code/modules/religion/ @tralezab

# Watermelon914

/code/modules/wiremod/ @Watermelon914
/code/modules/antagonists/traitor/ @Watermelon914
/code/controllers/subsystem/tts.dm @Watermelon914

# ZephyrTFA

Expand All @@ -134,19 +142,13 @@
/code/datums/armor/ @ZephyrTFA
/code/modules/admin/verbs/ @ZephyrTFA
/code/modules/logging/ @ZephyrTFA
/tools/ci/check_grep.sh @ZephyrTFA


# CONTRIBUTORS

# Cobby

/code/modules/reagents/ @ExcessiveUseOfCobblestone
/code/modules/research/designs/medical_designs.dm @ExcessiveUseOfCobblestone
/code/game/objects/items/storage/medkit.dm @ExcessiveUseOfCobblestone

# Jordie0608

/SQL/ @Jordie0608
/code/controllers/subsystem/dbcore.dm @Jordie0608
/tools/SQLAlertEmail/ @Jordie0608

Expand All @@ -159,7 +161,6 @@

# MrStonedOne

/SQL/database_changelog.txt @MrStonedOne
/code/__DEFINES/MC.dm @MrStonedOne
/code/controllers/admin.dm @MrStonedOne
/code/controllers/master.dm @MrStonedOne
Expand All @@ -183,25 +184,41 @@

# MULTIPLE OWNERS

/SQL/ @Jordie0608 @MrStonedOne

/_maps/ @EOBGames @Maurukas @MMMiracles @san7890 @ShizCalev
/icons/ @Imaginos16 @Krysonism @Twaticus

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

/code/__DEFINES/atmospherics/ @Ghilker @LemonInTheDark

/code/__HELPERS/logging/ @dragomagol @ZephyrTFA

/code/controllers/subsystem/air.dm @LemonInTheDark @MrStonedOne

/code/modules/atmospherics/ @Ghilker @LemonInTheDark

/code/modules/client/preferences.dm @Mothblocks @ZephyrTFA
/code/modules/client/preferences_savefile.dm @Mothblocks @ZephyrTFA

/code/modules/jobs/job_types/chief_medical_officer.dm @ExcessiveUseOfCobblestone @Ryll-Ryll
/code/modules/jobs/job_types/medical_doctor.dm @ExcessiveUseOfCobblestone @Ryll-Ryll
/code/modules/jobs/job_types/paramedic.dm @ExcessiveUseOfCobblestone @Ryll-Ryll

/code/modules/mob/living/basic/ @Jacquerel @san7890 @tralezab

/code/modules/surgery/ @ExcessiveUseOfCobblestone @Ryll-Ryll

/tools/build/ @MrStonedOne @stylemistake
/tools/tgs_scripts/ @Cyberboss @MrStonedOne

/tools/WebhookProcessor/ @BraveMole @TiviPlus

# Expensive files that touching basically always cause performance problems
## Init times
**/*_EXPENSIVE.dm @Mothblocks @LemonInTheDark

# SIC SEMPER TYRANNIS

/code/modules/hydroponics/grown/citrus.dm @optimumtact
13 changes: 9 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ These are the few directives we have for project maintainers.

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

Our team is entirely voluntary, as such we extend our thanks to maintainers, issue managers, and contributors alike for helping keep the project alive.

</details>

### Issue Managers
Expand All @@ -90,8 +88,14 @@ Things you **CAN'T** do:
* [Close PRs](https://imgur.com/w2RqpX8.png): Only maintainers are allowed to close PRs. Do not hit that button.
* Close issues purely for breaking a template if the same information is contained without it.

For more information reference the [Issue Manager Guide](.github/guides/ISSUE_MANAGER.md).

</details>

---

Our team is entirely voluntary, as such we extend our thanks to maintainers, issue managers, and contributors alike for helping keep the project alive.

## Development Guides

#### Writing readable code
Expand All @@ -105,13 +109,14 @@ Things you **CAN'T** do:

#### Misc

- [AI Datums](../code/datums/ai/making_your_ai.md)
- [AI Datums](../code/datums/ai/learn_ai.md)
- [Embedding TGUI Components in Chat](../tgui/docs/chat-embedded-components.md)
- [Hard Deletes](./guides/HARDDELETES.md)
- [MC Tab Guide](./guides/MC_tab.md)
- [Policy Configuration System](./guides/POLICYCONFIG.md)
- [Splitting up pull requests, aka atomization](./guides/ATOMIZATION.md)
- [Quickly setting up a development database with ezdb](./guides/EZDB.md)
- [Required Tests (Continuous Integration)](./guides/CI.md)
- [Splitting up pull requests, aka atomization](./guides/ATOMIZATION.md)
- [UI Development](../tgui/README.md)
- [Visual Effects and Systems](./guides/VISUALS.md)

Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Bug report
about: Create a report to help reproduce and fix the issue
---
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable -->

## Issue Summary

<!-- Briefly explain your issue in a few plain sentences, e.g. "X has Y issue" "When I do X, Y happens instead of Z" "X on Y map has Z issue". You may copy and paste the issue title here if it is suitable. -->

## Round ID:

<!--- **INCLUDE THE ROUND ID**
Expand Down
3 changes: 1 addition & 2 deletions .github/alternate_byond_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
# Format is version: map
# Example:
# 500.1337: runtimestation

515.1603: runtimestation
515.1627: runtimestation
1 change: 1 addition & 0 deletions .github/gbp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ reset_label = "GBP: Reset"
"Code Improvement" = 2
"Documentation" = 1
"Feature" = -6
"Good First PR" = 6
"Feedback" = 2
"Fix" = 3
"Grammar and Formatting" = 1
Expand Down
12 changes: 12 additions & 0 deletions .github/guides/EZDB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Quickly setting up a development database with ezdb
While you do not need a database to code for tgstation, it is a prerequisite to many important features, especially on the admin side. Thus, if you are working in any code that benefits from it, it can be helpful to have one handy.

**ezdb** is a tool for quickly setting up an isolated development database. It will manage downloading MariaDB, creating the database, setting it up, and updating it when the code evolves. It is not recommended for use in production servers, but is perfect for quick development.

To run ezdb, go to `tools/ezdb`, and double-click on ezdb.bat. This will set up the database on port 1338, but you can configure this with `--port`. When it is done, you should be able to launch tgstation as normal and have database access. This runs on the same Python bootstrapper as things like the map merge tool, which can sometimes be flaky.

If you wish to delete the ezdb database, delete the `db` folder as well as `config/ezdb.txt`.

To update ezdb, run the script again. This will both look for any updates in the database changelog, as well as update your schema revision.

Contact Mothblocks if you face any issues in this process.
18 changes: 9 additions & 9 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 Expand Up @@ -243,7 +243,7 @@ So then, we want to temporarily remember to clear a reference when it's deleted

This is where I might lose you, but we're gonna use signals

`qdel()`, the proc that sets off this whole deletion business, sends a signal called `COMSIG_PARENT_QDELETING`
`qdel()`, the proc that sets off this whole deletion business, sends a signal called `COMSIG_QDELETING`

We can listen for that signal, and if we hear it clear whatever reference we may have

Expand All @@ -255,10 +255,10 @@ Here's an example
/somemob/proc/set_target(new_target)
if(target)
UnregisterSignal(target, COMSIG_PARENT_QDELETING) //We need to make sure any old signals are cleared
UnregisterSignal(target, COMSIG_QDELETING) //We need to make sure any old signals are cleared
target = new_target
if(target)
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clear_target)) //Call clear_target if target is ever qdel()'d
RegisterSignal(target, COMSIG_QDELETING, PROC_REF(clear_target)) //Call clear_target if target is ever qdel()'d
/somemob/proc/clear_target(datum/source)
SIGNAL_HANDLER
Expand Down
91 changes: 91 additions & 0 deletions .github/guides/ISSUE_MANAGER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
## What is an Issue Manager

Issue Managers proactively manage issues for the repo by providing feedback, performing triage, and troubleshooting problems. They search through the codebase to link relevant code, issues, and PRs that help contributors identify and solve an issue.

## Triage An Issue

New issues should be properly diagnosed by using several methods and tools below:

#### Emergency Issues

When examining new issues you should immediately notify a maintainer if you see the following:

- **Security Exploit** [[1]](https://github.com/tgstation/tgstation/issues/51654) [[2]](https://github.com/tgstation/tgstation/issues/38407) [[3]](https://github.com/tgstation/tgstation/issues/9900) - Something that can be used to bypass bans, give a player admin powers, cheats or hacks
- **Server Crashing** [[1]](https://github.com/tgstation/tgstation/issues/29342) [[2]](https://github.com/tgstation/tgstation/issues/25890) [[3]](https://github.com/tgstation/tgstation/issues/17475) - Something that is causing the server to _consistently_ crash
- **Server Lagging** [[1]](https://github.com/tgstation/tgstation/issues/60193) [[2]](https://github.com/tgstation/tgstation/issues/51927) [[3]](https://github.com/tgstation/tgstation/issues/32762) - Something that is causing a _severe_ amount of lag during the game

#### Runtime Issue Reports
If an issue reports a runtime, it must have the actual runtime call stack provided by round logging or in-game debug menu (https://github.com/tgstation/tgstation/issues/70329#issuecomment-1279853883).
<details>
<summary>Example runtime call stack</summary>

```
[2022-10-15 16:12:38.902] runtime error: Cannot execute null.add().
- proc name: visibility (/datum/cameranet/proc/visibility)
- source file: cameranet.dm,88
- usr: AI (/mob/living/silicon/ai)
- src: Camera Net (/datum/cameranet)
- usr.loc: the floor (150,25,4) (/turf/open/floor/circuit)
- call stack:
- Camera Net (/datum/cameranet): visibility(/list (/list), null, /list (/list), 1)
- AI (/mob/living/silicon/ai): camera visibility(Inactive AI Eye (/mob/camera/ai_eye))
- Inactive AI Eye (/mob/camera/ai_eye): setLoc(the floor (150,25,4) (/turf/open/floor/circuit), 0)
- AI (/mob/living/silicon/ai): create eye()
- AI (/mob/living/silicon/ai): Initialize(0, null, TagGamerGame2 (/mob/dead/new_player))
- Atoms (/datum/controller/subsystem/atoms): InitAtom(AI (/mob/living/silicon/ai), 0, /list (/list))
- AI (/mob/living/silicon/ai): New(0, null, TagGamerGame2 (/mob/dead/new_player))
- AI (/mob/living/silicon/ai): New(the floor (150,25,4) (/turf/open/floor/circuit), null, TagGamerGame2 (/mob/dead/new_player))
- /datum/job/ai (/datum/job/ai): get spawn mob(TagGamerGame2 (/client), AI (/obj/effect/landmark/start/ai))
- TagGamerGame2 (/mob/dead/new_player): create character(AI (/obj/effect/landmark/start/ai))
- Ticker (/datum/controller/subsystem/ticker): create characters()
- Ticker (/datum/controller/subsystem/ticker): setup()
- Ticker (/datum/controller/subsystem/ticker): fire(0)
- Ticker (/datum/controller/subsystem/ticker): ignite(0)
```

</details>

#### Downstream Issues Taken Upstream
If an issue reports a bug encountered at a branch of the codebase or on a downstream server, it __MUST__ have a link to the branch or downstream codebase repo or it is eligible for closing (https://github.com/tgstation/tgstation/issues/70875#issuecomment-1295767891). Reproducing the issue on the compiled master of our codebase is also encouraged.

<details>
<summary>Image macro for your issue marking pleasure</summary>

![image](https://user-images.githubusercontent.com/39163353/198381160-f0aa7fc4-4f2d-486f-8b33-44a1965e2ad1.svg)

`![image](https://user-images.githubusercontent.com/39163353/198381160-f0aa7fc4-4f2d-486f-8b33-44a1965e2ad1.svg)`
</details>

#### Link Code Snippets

To help triangulate bugs, search the GitHub repo to locate relevant code and attach it to an issue. Do this by creating a [link to the code](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet). This saves the contributors time from having to identify the problem and will be appreciated.

#### Use Gitblame

GitHub also has a tool called `gitblame` that is useful in [tracking code](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#viewing-the-line-by-line-revision-history-for-a-file) to determine who and when someone made a change. This is ideally used to help solve old issues when there is uncertainty over which PR might have fixed it. It is also a good tool to use to link PRs that caused the issue.

#### Search For Keywords

When a new issue appears search for any keywords involved with the issue. This is important to prune for duplicates, match several issues to a test merge PR, or if you want to link multiple issues together since there is overlapping problems. (but not duplicate)

## Closing Issues

It is recommended to close issues in the following situations:

- **Feature Requests** [[1]](https://github.com/tgstation/tgstation/issues/55919) [[2]](https://github.com/tgstation/tgstation/issues/53342) [[3]](https://github.com/tgstation/tgstation/issues/45412) - The issue is a suggestion or request for a new feature to be added to the game.
- **Working as Intended** [[1]](https://github.com/tgstation/tgstation/issues/62619) [[2]](https://github.com/tgstation/tgstation/issues/61511) [[3]](https://github.com/tgstation/tgstation/issues/60942) - The issue is detailing a problem that is _specifically intended_ by the code and is not considered a bug.
- **Duplicates** [[1]](https://github.com/tgstation/tgstation/issues/62709) [[2]](https://github.com/tgstation/tgstation/issues/62364) [[3]](https://github.com/tgstation/tgstation/issues/61823) - The issue is detailing an identical problem from another issue. Do not automatically close the most recent issue. Instead compare both and close the one that provides the least information.
- **Removed Features** [[1]](https://github.com/tgstation/tgstation/issues/48255) [[2]](https://github.com/tgstation/tgstation/issues/47194) [[3]](https://github.com/tgstation/tgstation/issues/45653) - The issue is referring to something that was removed from the codebase and no longer exists.
- **Defective Issues** [[1]](https://github.com/tgstation/tgstation/issues/57366) [[2]](https://github.com/tgstation/tgstation/issues/48778) [[3]](https://github.com/tgstation/tgstation/issues/51520) - The issue is badly written and lacking information. Politely ask the person to add more information or rewrite the issue. If there is no response after a sufficient amount of time close the issue.
- **Irreproducible Issues** [[1]](https://github.com/tgstation/tgstation/issues/51493) [[2]](https://github.com/tgstation/tgstation/issues/22796) [[3]](https://github.com/tgstation/tgstation/issues/25610) - The issue is old, cannot be reproduced, and nobody has reported a duplicate issue recently. If you feel _confident_ that the issue has been fixed at some point, list your reasons or link possible PRs that could have fixed it.
- **Impossible to Fix Issues** [[1]](https://github.com/tgstation/tgstation/issues/524) [[2]](https://github.com/tgstation/tgstation/issues/2679) [[3]](https://github.com/tgstation/tgstation/issues/9637) - The issue is not possible to fix due to either vague details or a clearly defined problem.

## Reopening Issues

In special cases a closed issue should be reopened if:

- It has been updated with pertinent information (when before it was lacking info making it defective)
- The initial problem has reappeared (after it was presumably fixed in a PR)
- Someone feels that the issue was closed prematurely during discussion

If there is a dispute on whether an issue should remain closed, ask for a second opinion. Get clarification from another Issue Manager or Maintainer and respect their judgement as the final verdict.
Loading

0 comments on commit 118e222

Please sign in to comment.