From 5eb98a43243a1db6782498fd183d22d840ac9811 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Mon, 17 Apr 2017 02:54:56 -0700 Subject: [PATCH 1/2] Update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 859af746b47..c4fc1472f7b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -146,6 +146,7 @@ Remember, this tradeoff makes sense in many cases but not all, you should think ### Prefer `Initialize` over `New` for atoms Our game controller is pretty good at handling long operations and lag. But, it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/tgstation/tgstation/blob/master/code/game/atoms.dm#L49 +While we normally encourge (and in some cases, even require) bringing out of date code up to date when you make unrelated changes near the out of date code, that is not the case for `New` -> `Initialize` conversions. These systems are generally more dependant on parent and children procs so unrelated random conversions of existing things can cause bugs that take months to figure out. ### No magic numbers or strings Make these #defines with a name that more clearly states what it's for. From 51a21943452aa0f912aef621c64ead682f8cc5aa Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Mon, 17 Apr 2017 03:01:43 -0700 Subject: [PATCH 2/2] >making prs at 3am --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c4fc1472f7b..403526d30b0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -146,7 +146,7 @@ Remember, this tradeoff makes sense in many cases but not all, you should think ### Prefer `Initialize` over `New` for atoms Our game controller is pretty good at handling long operations and lag. But, it can't control what happens when the map is loaded, which calls `New` for all atoms on the map. If you're creating a new atom, use the `Initialize` proc to do what you would normally do in `New`. This cuts down on the number of proc calls needed when the world is loaded. See here for details on `Initialize`: https://github.com/tgstation/tgstation/blob/master/code/game/atoms.dm#L49 -While we normally encourge (and in some cases, even require) bringing out of date code up to date when you make unrelated changes near the out of date code, that is not the case for `New` -> `Initialize` conversions. These systems are generally more dependant on parent and children procs so unrelated random conversions of existing things can cause bugs that take months to figure out. +While we normally encourage (and in some cases, even require) bringing out of date code up to date when you make unrelated changes near the out of date code, that is not the case for `New` -> `Initialize` conversions. These systems are generally more dependant on parent and children procs so unrelated random conversions of existing things can cause bugs that take months to figure out. ### No magic numbers or strings Make these #defines with a name that more clearly states what it's for.