You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 22, 2025. It is now read-only.
* Adds grep for mapload and var in Args
* vars in args
* some more
* stuff
* Update shuttle_creator.dm
* Update __techweb_helpers.dm
* fix
* Update discoball.dm
* Update check_grep.sh
* Update check_grep.sh
* Update check_grep.sh
* Update check_grep.sh
* I'll finish this later
* datum and lateinit maploads
* componentinit stuff
* mapload fixes
* why isnt CI catching these major issues
* MERGE CONFLICT FUCKED MY PR OVER
* Update check_grep.sh
* Update food.dm
Copy file name to clipboardExpand all lines: .github/guides/HARDDELETES.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ You can read more about how BYOND prioritizes these things [Here](https://www.pa
129
129
130
130
## Detecting Hard Deletes
131
131
132
-
For very simple hard deletes, simple inspection should be enough to find them. Look at what the object does during `Initialize()`, and see if it's doing anything it doesn't undo later.
132
+
For very simple hard deletes, simple inspection should be enough to find them. Look at what the object does during `Initialize(mapload)`, and see if it's doing anything it doesn't undo later.
133
133
If that fails, search the object's typepath, and look and see if anything is holding a reference to it without regard for the object deleting
134
134
135
135
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.
@@ -273,7 +273,7 @@ But if you can't do anything else for reasons of conversion ease, or hot code, t
273
273
274
274
First, do a quick check.
275
275
276
-
Are you doing anything to the object in `Initialize()` that you don't undo in `Destroy()`? I don't mean like, setting its name, but are you adding it to any lists, stuff like that
276
+
Are you doing anything to the object in `Initialize(mapload)` that you don't undo in `Destroy()`? I don't mean like, setting its name, but are you adding it to any lists, stuff like that
277
277
278
278
If this fails, you're just gonna have to read over this doc. You can skip the theory if you'd like, but it's all pretty important for having an understanding of this problem
Copy file name to clipboardExpand all lines: .github/guides/STANDARDS.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ Copying code from one place to another may be suitable for small, short-time pro
84
84
85
85
Instead you can use object orientation, or simply placing repeated code in a function, to obey this specification easily.
86
86
87
-
### Prefer `Initialize()` over `New()` for atoms
87
+
### Prefer `Initialize(mapload)` over `New()` for atoms
88
88
89
89
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/yogstation13/Yogstation/blob/df044da8608d94cbe1fe242264f749a92ca8283b/code/game/atoms.dm#L111
90
90
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 dependent on parent and children procs so unrelated random conversions of existing things can cause bugs that take months to figure out.
@@ -243,7 +243,7 @@ First, read the comments in [this BYOND thread](http://www.byond.com/forum/?post
243
243
244
244
There are two key points here:
245
245
246
-
1) Defining a list in the variable's definition calls a hidden proc - init. If you have to define a list at startup, do so in New() (or preferably Initialize()) and avoid the overhead of a second call (Init() and then New())
246
+
1) Defining a list in the variable's definition calls a hidden proc - init. If you have to define a list at startup, do so in New() (or preferably Initialize(mapload)) and avoid the overhead of a second call (Init() and then New())
247
247
248
248
2) It also consumes more memory to the point where the list is actually required, even if the object in question may never use it!
249
249
@@ -270,7 +270,7 @@ Bad:
270
270
271
271
Good:
272
272
```dm
273
-
/obj/machine/update_overlays(var/blah)
273
+
/obj/machine/update_overlays(blah)
274
274
var/static/on_overlay
275
275
var/static/off_overlay
276
276
var/static/broken_overlay
@@ -298,7 +298,7 @@ Associated lists that could instead be variables or statically defined number in
### When passing vars through New() or Initialize()'s arguments, use src.var
346
+
### When passing vars through New() or Initialize(mapload)'s arguments, use src.var
347
347
Using src.var + naming the arguments the same as the var is the most readable and intuitive way to pass arguments into a new instance's vars. The main benefit is that you do not need to give arguments odd names with prefixes and suffixes that are easily forgotten in `new()` when sending named args.
/turf/proc/reachableTurftestdensity(caller, var/turf/T, ID, simulated_only) //used for the sake of pathfinding while excluding turfs with dense objects
231
+
/turf/proc/reachableTurftestdensity(caller,turf/T, ID, simulated_only) //used for the sake of pathfinding while excluding turfs with dense objects
0 commit comments