Commit Graph

30 Commits

Author SHA1 Message Date
Zephyr
7f8752be14 Admin Verb Datums MkIII | Now with functional command bar (#82511) 2024-04-12 12:27:09 -07:00
John Willard
17deef69d9 re-adds list of components for admins to remove (#82461)
## About The Pull Request

The list of components on a mob when admins try to remove one didn't
actually show them, now it does.

![image](https://github.com/tgstation/tgstation/assets/53777086/a6102c3a-df30-4e9c-b7fd-29a4d8ddaa89)

## Why It's Good For The Game

Messing with components/elements on mobs are such a pain, in this case
was broken entirely.

![admin-toolings](https://github.com/tgstation/tgstation/assets/53777086/3d190c66-34e4-4424-824b-37f95e88b003)

## Changelog

🆑
admin: Removing components button now lists components to remove
/🆑
2024-04-05 17:45:09 -06:00
Ghom
d1880d18fc Polishing the greyscale modify menu's lackluster support for non-atom targets. (#77322)
## About The Pull Request

So, I've been recently told that Skyrat uses the greyscale modify menu
for loadouts, and the new ui state kinda borked it. I honestly haven't
taken the possibility that the target could be anything but a subtype of
`/atom` (and still work) into account because much of the code assumes
the target is an atom. It's kinda crappy. Also I hadn't noticed we've an
`unlocked` variable, which makes `vv_mode` var superflous, so i'm going
to remove the latter.
2023-08-09 12:30:33 -05:00
Ghom
7945598305 [NO GBP] Actually fixing the greyscale_modify_menu. (#77208)
## About The Pull Request
EDIT: So, I've to admit and bow my head: #77165 fucked up because I
hadn't properly tested the code. However, this time around, I can assure
you it's been tested.

## Why It's Good For The Game
Fixing my mistakes. This will fix #77246 

## Changelog
N/A.
2023-08-01 14:39:46 -07:00
Ghom
3ee89a7aa7 Fixing the greyscale modify menu not sanitizing inputs. (#77165)
## About The Pull Request
exactly what it reads on the tin. Also the ui is now anchored to the
target and uses their state unless a specific one is set, so that it'll
correctly close or be unusable if the mob user is incapacitated or too
far.

## Why It's Good For The Game
this will fix #70444.

## Changelog

🆑
fix: Fixing some jank with the a greyscale modify menu, like inputs not
being sanitized.
/🆑
2023-07-28 21:03:57 -06:00
Zephyr
763112fb61 Refactors bardrone area based godmode into an element (#76619)
Let's this be used for more than just bardrones and for more than just
the exit shuttle in the future
2023-07-13 03:35:12 +00:00
LemonInTheDark
daf55e611c Cleans up/renames as private some internal var definitions, removes some fucked uses of internal list vars (#75769)
## About The Pull Request

[Improves the documentation of DCS lists, removes old list of callback
docs that no longer
apply](c3821d9f5f)

[Adds a second signal register to decal rotating, adds a trait to
objects under a tile. STOP DIRECTLY READING HIDDEN LISTS I SWEAR TO
GOD](6b3f97a76a)

[Removes direct reads of the timer list, they were redundant
mostly](14fcd9f8a6)

[Please stop directly reading/modifying the traits list to ensure your
dna rot follows the
brain](ec0e5237ec)

[Marks internal datum lists as well internal with
_](57c6577ff6)

[57c6577](57c6577ff6)

Does the same to _clear_signal_refs() in hopes of keeping people from
touching it

## Why It's Good For The Game

They pissed me off.

Users should not be touching these lists, especially in ways that make
assumptions about their structure and are thus prone to breaking if that
ever changes.
Most of these are close to zero cost changes, using a wrapper to solve
the problem, or just yeeting it

Two aren't, Decals with a direction have gained a second signal register
on init, and things that sit underfloor (cables/pipes) now get a trait
when inserted there.

This should have a minimal impact on memory/init time, bugging
@Mothblocks about it just in case
2023-06-05 22:25:09 -06:00
Mothblocks
d67555a0b5 the inevitable Revert "Refactors admin verbs from giant ass lists into datums" in case stuff breaks (#73206)
Reverts tgstation/tgstation#72407
2023-02-05 11:44:38 +13:00
Zephyr
7f25d7f17b Refactors admin verbs from giant ass lists into datums (#72407)
## About The Pull Request

See title.
## Why It's Good For The Game

Makes it easier for people to add new admin buttons, and also removes
the giant ass ugly lists that are an affront to my eyes.

Yes you are still able to call them manually via the verb bar

![image](https://user-images.githubusercontent.com/12817816/210163285-2ecb4b59-67b4-47d2-b324-77048ce852fe.png)

![image](https://user-images.githubusercontent.com/12817816/210163288-5a0ec98c-9589-4cab-8a6b-1ab5151aa040.png)
## Changelog
🆑
refactor: Admin verbs are now datums with a dedicated panel handler
admin: Admin verbs now come with a handy description when you hover over
them!
/🆑

---------

Signed-off-by: GitHub <noreply@github.com>
2023-02-03 16:32:37 -08:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
adamsong
dbbbf547ad Fixes checking if the client is a turf (#65166) 2022-02-27 23:45:10 -05:00
Jeremiah
9c6fdb567d TGUI list conversions + bug fixes (#63354)
About The Pull Request

    Converts more inputs to TGUI. Possibly all user-facing input lists in the game.
    Did any surrounding text/number inputs as well
    Added null choice support so users can press cancel.
    Added some misc TGUI input fixes
    Fixed custom vendors while I was there

I refactored a lot of code while just poking around.
Primarily, usage of .len in files where I was already working on lists.
Some code was just awful - look at guardian.dm and its non use of early returns
If there are any disputes, I can revert it just fine, those changes are not integral to the PR.
Why It's Good For The Game

Fixes #63629
Fixes #63307
Fixes custom vendors /again/
Text input is more performant.
Part of a long series of TGUI conversion to make the game more visually appealing
Changelog

cl
refactor: The majority of user facing input lists have been converted to TGUI.
refactor: Tgui text inputs now scale with entered input.
fix: Many inputs now properly accept cancelling out of the menu.
fix: Fixes an edge case where users could not press enter on number inputs.
fix: Custom vendor bluescreen.
fix: You can now press ENTER on text inputs without an entry to cancel.
/cl
2021-12-31 11:07:28 +13:00
Ryll Ryll
45eb682ee6 Adds Datum Tagging for admins (#62982) 2021-12-21 14:00:46 -08:00
Ghilker
95c8e00af7 cleanup _HELPERS/_lists.dm and all the necessary files (#61827)
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
2021-10-12 14:48:51 +01:00
Watermelon914
25f3e7eedd Added component manipulation on objects (#60771)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-08-21 02:44:22 -07:00
Thunder12345
aeec6932df Changes the input list in VV add component to tgui_input_list() (#60755)
* Changes the input list in VV add component to tgui_input_list

* fuck

Co-authored-by: Thunder12345 <stewart@critar.demon.co.uk>
2021-08-20 12:45:03 +03:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
Emmett Gaines
c448104b30 Adds greyscale color selection to vending machines (#58901)
Yes this is blatant bait to get more things converted.

While working on this I fixed item greyscale updates to include their held and worn states, the vending machine ui is now tsx instead of js, icons generated by gags are created with an error state by default, the greyscale color menu defaults to not show you the full debug preview, and the wording in the debug menu is a bit more in-character friendly.
Changelog

cl
add: Greyscale items using GAGS in vending machines can have their colors chosen before vending. Not many things are capable of this yet but expect more to come.
/cl
2021-05-20 22:39:14 +12:00
Emmett Gaines
1946abd0e5 Advanced Greyscale Sprite Generation (#58112)
* Nonfunctional greyscale code

* Functional greyscale sprites via filter

Probably going to set the icon instead later

* Switches to greyscale json config

* Adds the reference layer type and converts the other canister types

* Working previews

* Adds readme

* Fixes overlays and breaking

* Removes old canister sprites

* Removes an unused var

* Fixes tgui lints

* Removes a bunch of the old canister icon states

Yeah I need to fix relabeling as well

* Removes some debug sprites

* Sorts canister type list and breaks up base shader step

* Removes an unnecessary preview hack

* Makes prototype canister greyscale

* Properly sizes the ui

* Fills in the canister map sprite

* Adds some more warnings to layers

* Makes broken overlay more prominent

* Removes a preview var that isn't needed anymore

* Cleans up client ref in Destroy

* Cleans up the tgui window a bit

* Update GreyscaleModifyMenu.tsx

* Animates the canister falling over

* Removes a commented out line that's no longer needed

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-04-10 17:21:57 +03: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
LemonInTheDark
40cdb6d025 Enables 514 testing on master, Removes all reliance on extools outside of maptick (#56724)
* Uses 514's map_cpu var when it's available

* Uses auxtools for the debugger, to supply cross verison compatibility

* Nukes extools reference tracking, reinstates the old ref tracking system
2021-02-09 14:01:34 +08:00
AnturK
7dff0d66ad Fixes admin add component log (#52840) 2020-08-11 11:12:21 -03:00
Rohesie
93a37dfe88 Reference tracking (#52403)
* ref tracking

* legacy

* legacy procs

* fixes

* tweaks

* clarity comments

* wth
2020-07-28 11:56:27 +02:00
MCHSL
331365b422 Adds reference tracking (#51467)
About The Pull Request

Adds extools-powered reference tracking. Includes a couple procs that retrieve the back and forward references of a datum - Back references let you see what is referencing your object and potentially preventing it from garbage collecting, and forward ones show you what your object in turn references. Also made a cool GUI to inspect and follow these references.

The tracking adds some overhead to all variable sets and list operations. Init time is increased by ~15%. I haven't actually benched it so it might impact the actual game less.
Why It's Good For The Game

no lagging caused by hard dels scanning the entire planet (once coders fix them)
2020-06-25 11:26:59 +12:00
Rob Bailey
c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00
Emmett Gaines
9e34b3d6a1 Supports named arguments in AddComponent and AddElement (#49098)
AddComponent/AddElement now support named arguments. This requires passing around an argument list instead of using actual proc args which a bit gross but we can blame byond for forcing this.

InheritComponent uses mirrored init arguments instead of an argument list which means no more accessing it via index to get to the same arguments as in init.

As a small bonus I restructured dcs defines to be a bit more manageable. Mainly just splits them into separate files and gives them their own folder.
2020-02-17 17:57:52 +13:00
skoglol
938e66f62c Adds sorting to most input() lists (#47117)
* Adds sorting to most input() lists.

* Sorted some global lists, added more input sorting

* Should now use correct sort everywhere.

* compiles

* Last fixes.
2019-10-22 04:28:42 -07:00
nemvar
159d2ec79d Allows proper application of arguments to components via dropdown (#47112) 2019-10-19 01:15:18 +02:00
tralezab
6300b2a534 AT YOUR OWN RISK 2019-08-15 01:43:50 -07: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