Commit Graph

21 Commits

Author SHA1 Message Date
MrMelbert
92c9a72b8a List VV properly differentiates null vs 0 2025-05-09 23:51:21 -05:00
Watermelon914
6c017cf1e1 Refactors subsystems to use dependency-ordering to determine init order. Subsystems can now declare their own dependencies. (#90268)
## About The Pull Request
As the title says.
`init_order` is no more, subsystems ordering now depends on their
declared dependencies.
Subsystems can now declare which other subsystems need to init before
them using a list and the subsystem's typepath
I.e.
```dm
dependencies = list(
    /datum/controller/subsystem/atoms,
    /datum/controller/subsystem/mapping
)
```
The reverse can also be done, if a subsystem must initialize after your
own:
```dm
dependents = list(
    /datum/controller/subsystem/atoms
)
```
Cyclical dependencies are not allowed and will throw an error on
initialization if one is found.
There's also a debug tool to visualize the dependency graph, although
it's a bit basic:

![image](https://github.com/user-attachments/assets/80c854d9-c2a5-4f2f-92db-a031e9a8e257)

Subsystem load ordering can still be controlled using `init_stage`, some
subsystems use this in cases where they must initialize first or last
regardless of dependencies. An error will be thrown if a subsystem has
an `init_stage` before one of their dependencies.

## Why It's Good For The Game
Makes dealing with subsystem dependencies easier, and reduces the chance
of making a dependency error when needing to shift around subsystem
inits.

## Changelog
🆑
refactor: Refactored subsystem initialization
/🆑
2025-04-03 17:04:30 -04:00
LemonInTheDark
ded0ee6362 Bitflag Metainfo, Usable (Happy 90000th) (#90000)
## About The Pull Request

Makes wrapper procs to support working with bitflags as defined "things"
rather then EXCLUSIVELY numbers, mostly for getting random flags.

I've ~~also added a unit test to prevent bitfields from being double
defined~~ stolen some code form moth to make double definitions here a
compile error.

This does rely on people actually using the bitfield lists, essentially
upgrading them from breaking just admin debug to POTENTIALLY breaking
game logic (slightly). Would like input on this @tgstation/commit-access

## Why It's Good For The Game

More tools for feature coders to play with, more sane code
2025-03-19 19:54:03 +00:00
John Willard
2e4d70afe5 Updates href uses for 516 (#88699)
## About The Pull Request

Was just scrolling through the Paradise github since they seem to have
more work done for 516 to see if there's anything I can port over, found
this and thought why not.

Ports parts of https://github.com/ParadiseSS13/Paradise/pull/25105
Specifically, updaing all hrefs to use the internal ``byond://``, and
adding it to grep.

## Why It's Good For The Game

More work towards 516.

## Changelog

Nothing player-facing.
2024-12-24 11:42:20 -08:00
klorpa
e1bf793264 Spelling and Grammar Fixes (#86022)
## About The Pull Request
Fixes several errors to spelling, grammar, and punctuation.
## Why It's Good For The Game
## Changelog
🆑
spellcheck: fixed a few typos
/🆑
2024-08-23 21:49:46 +02:00
LemonInTheDark
78fc87315c Removes stupid listlike var access code (#84648)
## About The Pull Request

[Removes all other listlike var
accesses](4c5996b5c8)

Also fucking dumpsters an unused proc that allowed for arbitrary
variable modifcation. Bad juju

This is undefined behavior and errors in later 515 versions. also it's
stupid as hell
2024-07-06 01:49:17 +02:00
LemonInTheDark
21b6abfcd6 Redoes how appearance VV works because it scares me (#82851) 2024-04-24 16:23:54 -06:00
EvilDragonfiend
20e67664ed Allows vv investigate /appearance + better checking image (#82670) 2024-04-21 20:46:42 -06:00
Emmett Gaines
fdbddfb12b Fixes vv of things in lists (#79282)
I forgot name could be a number for list indexes, so this switches to
using `in` instead.


Also improves the error message a little bit so reported issues can at
least say *something* about the value throwing an error.

fixes #79280
fixes #79264
2023-10-26 21:45:58 -06:00
Emmett Gaines
007b7d3f43 Precalculates special list var names and avoids incorrect vv targets (#79154)
## About The Pull Request

This adds a global list to precalculate lists that need to be handled
special by vv instead of manually updating such a list. @LemonInTheDark
brought up a potential issue with handling all lists in the way special
lists are handled, that modifying a list in vv can in some cases result
in the wrong list being opened for editing. This makes only special
lists have the issue instead of blindly accessing all lists the same
way.
2023-10-24 17:43:46 +01:00
Emmett Gaines
1539de0167 VV Upgrades (#78948)
## About The Pull Request

* Makes special byond lists display properly
* Makes images get a preview in the header
* Makes filters display properly
* Make variable value display a bit more robust to errors
* Kills single char vars

## Changelog

🆑
admin: VV can now display the contents of special byond lists like
filters, or client.images
admin: VV on images now displays the image in the header
admin: VV can now display filters and includes their type
/🆑
2023-10-13 11:42:11 -06:00
Emmett Gaines
1053f00082 Fixes display of appearance type in VV (#78725)
## About The Pull Request

Appearance vars are awful to detect. They have a type var you can
access, for an appearance the value of this var is `/image`. However
`istype(appearance, /image) == 0`. This is good enough for
identification, you might think this just means detecting appearance
would be something like `if(thing.type == /image && !istype(thing,
/image))`, but there's a problem with this: `istype(appearance, /datum)
== 0`. For that matter it seems like all istypes that check if an
appearance is some type fail, so you can't know that it's safe to access
the `.type` var to do that earlier combined check.

Now we get into magic territory, `istype(new /image, appearance) == 1`.
I have no clue internally why this is the case but it seems to be unique
to appearances, and so can be used to identify them from a previously
unknown var. You have to rule out that the thing you're checking is a
path, it would pass the check if the value were `/image` then, but this
is simple enough.

I hate having to know all this, so now you know this too.

🆑 ninjanomnom
admin: Appearance vars in VV now display instead of being left blank
/🆑
2023-10-03 16:08:49 +02:00
LemonInTheDark
e8537d489e Adds NONE to empty bitflags in VV (#78355)
This has annoyed me forever. Let's do somethin about it.
2023-09-17 01:14:32 -05:00
LemonInTheDark
5b2cd2f34b Always contracts lists when VVing GLOB (#76091)
## About The Pull Request

This takes render times from like 20 seconds to maybe 2 Most of the time
appears to be clientside rn, so the best we could do further would be
reducing the amount of shit that actually needs to render

So like, removing the E C M buttons (or at least adding a toggle to
render them), that sort of thing

## Why It's Good For The Game

A glob vv you can actually use

![image](https://github.com/tgstation/tgstation/assets/58055496/d7c29c9a-aa45-4cad-9f38-7131140cab5b)

## Changelog
🆑
admin: VV for global vars will now load MUCH faster, in exchange lists
are now perma contracted in that particular pane
/🆑
2023-06-17 17:56:05 +02:00
distributivgesetz
589460244b Fixes weakref resolving in View Variables not working (#69375)
m
2022-08-25 01:24:44 -04:00
Seth Scherer
f1a363c825 Converts a shitload of istypes to their more concise macros (#69260)
* Converts a lot of istypes() to use their istype macro helpers.
2022-08-18 22:08:44 -04:00
AnturK
c244d6c69a Adds direct support for weakrefs to vv (#64521)
* Adds direct support for weakrefs to vv

* Update code/modules/admin/view_variables/get_variables.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

* Fine, have a readable name.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-02-02 00:34:43 -05:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
AnturK
b8722c6c83 Datums and lists used as keys in assoc lists are now linked in vv. (#51451)
* Datums and lists used as keys in assoc lists are now linked in vv.

* Ok, uniform interface for lists.
2020-06-10 00:26:30 +12:00
AnturK
de21384476 Fixes orbit offsets and adds matrix vv preview. (#51198)
* Adds matrix vv preview and moves vv css into separate file.

* Fixes orbit offsets.
2020-05-25 02:01:41 +08:00
kevinz000
c6d710d40e VV refactors 2 - Actually not indefinitely WIP (#45217)
About The Pull Request

The thing other than ruining maps that I was working on
Refactors VV to use a more standard way of doing topic dropdown options rather than a huge if/else chain
Marking datums is now a right click option
Moves a few files around too/few procs
Why It's Good For The Game

Makes it easier to add more VV dropdown options in the future, and moving href list keys to defines make misspelling them harder.
Changelog

cl
add: Oh yeah also added a "return value of proccall" option for VV var editing.
refactor: View Variables has been refactored. It should now be easier to make VV dropdown options.
/cl
2019-08-03 14:43:26 +12:00