Commit Graph

13 Commits

Author SHA1 Message Date
SkyratBot
f92318b04f [MIRROR] Fixes vv of things in lists [MDB IGNORE] (#24611)
* 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

* Fixes vv of things in lists

---------

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2023-10-27 03:56:35 -04:00
SkyratBot
aa44dfee39 [MIRROR] Precalculates special list var names and avoids incorrect vv targets [MDB IGNORE] (#24553)
* 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.

* Precalculates special list var names and avoids incorrect vv targets

---------

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2023-10-24 14:40:58 -04:00
SkyratBot
450212c846 [MIRROR] VV Upgrades [MDB IGNORE] (#24319)
* 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
/🆑

* VV Upgrades

---------

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2023-10-13 15:12:08 -04:00
SkyratBot
e39a44e462 [MIRROR] Fixes display of appearance type in VV [MDB IGNORE] (#24092)
* 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
/🆑

* Fixes display of appearance type in VV

---------

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
2023-10-03 15:13:32 -04:00
SkyratBot
ce76a871bf [MIRROR] Adds NONE to empty bitflags in VV [MDB IGNORE] (#23751)
* Adds NONE to empty bitflags in VV (#78355)

This has annoyed me forever. Let's do somethin about it.

* Adds NONE to empty bitflags in VV

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-09-17 15:33:07 -04:00
SkyratBot
b01b52d9dc [MIRROR] Always contracts lists when VVing GLOB [MDB IGNORE] (#21898)
* 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
/🆑

* Always contracts lists when VVing GLOB

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-06-18 14:01:29 +01:00
SkyratBot
a8c10d1659 [MIRROR] Converts a shitload of istypes to their more concise macros [MDB IGNORE] (#15702)
Converts a shitload of istypes to their more concise macros

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-27 16:23:44 -04:00
SkyratBot
fc89469491 [MIRROR] Fixes weakref resolving in View Variables not working [MDB IGNORE] (#15820)
* Fixes weakref resolving in View Variables not working (#69375)

m

* Fixes weakref resolving in View Variables not working

Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
2022-08-25 14:48:44 +01:00
SkyratBot
579f6e384b [MIRROR] Adds direct support for weakrefs to vv [MDB IGNORE] (#11227)
* 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>

* Adds direct support for weakrefs to vv

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-02-02 16:59:16 +00:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00: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