Commit Graph

12 Commits

Author SHA1 Message Date
Aylong 7a817300fd Improve and extend fieldset_block and examine_block (#88678)
## About The Pull Request
Maked `fieldset_block` and `examine_block` more stylish and neat, also
`fieldset_block` no longer has a centred title.
Renamed `examine_block` to `boxed_message` and adds
`custom_boxed_message` which can be colored.

- AdminPMs, admin tickets and vote results has been wrapped into
`fieldset_block` for comfort and visibility
- Health Analyzer results painted to blue
- Vote notice and tips of the round wrapped to purple
`custom_boxed_message`
- Tooltip text border color, now uses text color, not just white

## Why It's Good For The Game
Demonstration in both themes

<details><summary>Dark</summary>


![image](https://github.com/user-attachments/assets/7175379b-b053-4fb7-bd25-65c744a21c56)

![image](https://github.com/user-attachments/assets/1728e72b-0110-4b81-9d61-8779f5fdc3a0)

![image](https://github.com/user-attachments/assets/5e6f9604-35b8-4840-b6b4-35a68f49a997)

</details>

<details><summary>Light</summary>


![image](https://github.com/user-attachments/assets/6a3d693b-e0dc-4a4b-b4d7-2ded54ce0d67)

![image](https://github.com/user-attachments/assets/c4f5e089-180f-4d13-806a-fa64f01740a3)

![image](https://github.com/user-attachments/assets/a46d52c4-ad37-4637-8cae-c4b00139efc1)

</details>

## Changelog

🆑
qol: AdminPMs, admin tickets, vote results and started vote notification
are now much more visible in the chat.
qol: Boxed messages in chat (like examine), has been restyled.
/🆑
2024-12-24 11:32:38 -08:00
Ben10Omintrix 91baa94ac5 event based incapicated and able_to_run (#86031)
## About The Pull Request
this is a revival of #82635 . i got permission from potato to reopen
this, he did almost all the work. i only just solved the conflicts and
fixed all the bugs that were preventing the original from being merged
(but it should be TMed first)

## Why It's Good For The Game
slightly improves the performance of basic mob AI

## Changelog
🆑
LemonInTheDark
refactor: able_to_run and incapacitated have been refactored to be event
based
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: ZephyrTFA <matthew@tfaluc.com>
2024-09-04 10:02:49 -04:00
John Willard 1880003270 Reworks silicon/ai access checking & fixes some ui_act's (#84964)
## About The Pull Request

Currently to check for Silicon access, we do:
``if is silicon or is admin ghost or has unlimited silicon privileges or
has machine remote in hand``
What has unlimited silicon privileges? Bots, Drones, and admin ghosts.
To check for AI access, it just checks for AI instead of silicon, and
doesnt check for unlimited silicon privileges.

This was kinda silly, so I thought I should make this a little easier to
understand.
Now all silicon/ai traits come from ``AI_ACCESS_TRAIT`` or
``SILICON_ACCESS_TRAIT``. I made a single exception to keep Admin ghost,
since now instead of being a var on the client, we moved it to using the
same trait but giving it to the client instead, but since we have to
keep parity with previous functionality (admins can spawn in and not
have this on, it only works while as a ghost), I kept previous checks as
well.

No more type checks, removes a silly var on the mob level and another on
the client.

Now while I was doing this, I found a lot of tgui's ``ui_act`` still
uses ``usr`` and the wrong args, so I fixed those wherever I saw them,
and used a mass replace for the args.

Other changes:

- machinery's ``ui_act`` from
https://github.com/tgstation/tgstation/pull/81250 had ``isAI`` replaced
with ``HAS_AI_ACCESS``, this has been reverted. Machine wands and admin
ghosts no longer get kicked off things not on cameras. This was my
fault, I overlooked this when adding Human AI.
- Human AI's wand gives AI control as long as it's in your hand, you can
swap to your offhand. I hope this doesn't end up going horribly,
otherwise I'll revert this part. It should let human AIs not have their
UI closed on them when swapping to eat food or use their door wand or
whatnot.
- Bots previously had special checks to scan reagents and be
unobservant, I replaced this with giving them the trait. I also fixed an
instance of unobservant not being used, so now statues don't affect the
basic creature, whatever that is.

## Why It's Good For The Game

This is an easier to understand way of handling silicon access and makes
these mobs more consistent between eachother.
Other than what I've mentioned above, this should have no impact on
gameplay itself.

## Changelog

🆑
fix: Statues don't count as eyes to creatures.
fix: Human AIs and Admin ghosts no longer get kicked off of machines
that aren't on cameranets.
/🆑
2024-08-19 10:43:45 +00:00
Bloop 01fea947d5 Attempting to fix search_object hard dels (#85394)
## About The Pull Request


![image](https://github.com/user-attachments/assets/b4cd5369-06c4-4e01-98f4-343030e28199)

These were coming up often, had a hunch that the callback may have been
hanging their refs. It seems to be true from my testing, they should be
passing GLOBAL_PROC as the `object` arg, not `src`, since qdel is not a
`search_object` proc. (Thanks Melbert for noticing that detail!)

Also just tidies up the code a bit, adding checks to prevent redundant
qdel calls and preventing a potential race condition with qdeleted
atoms.

## Why It's Good For The Game

Hard dels here in particular have potential to cause significant lag and
issues.

## Changelog

Not player-facing really
2024-07-31 18:18:28 +02:00
Jeremiah 0ae2caa696 Reverts lootpanel change (#84624)
## About The Pull Request
#84513 made it so that every time an item is moved in/out it causes the
lootpanel to delete its turf and does a full repopulation of contents.
This goes against the design of the lootpanel and does so in a messy
manner. If we wanted to change the design of the lootpanel to be fully
interactive, that wouldn't be the way to do it.

The idea behind lootpanel was simple and performance-minded:
- You search a tile for contents
- The list is only subtracted from
- Each subtraction causes a manual update of the UI
- Users can search a tile again to see new items
## Why It's Good For The Game
## Changelog
🆑
fix: Reverts the fully interactive lootpanel, please just refresh it if
you want to see new contents
/🆑
2024-07-03 22:37:15 +02:00
Joshua Kidder d0a99685f7 Little fix to lootpanels so they update consistently (#84513)
## About The Pull Request

I made some changes to the lootpanel code (all that stuff you see if you
alt click a tile) so they consistently update when stuff is moved in or
out of them.
## Why It's Good For The Game

Predictable behavior for UI elements for manipulation is good.
## Changelog
🆑 Bisar
qol: Loot panels should update more predictably and informatively now.
code: Lootpanels have more consistent logic on when they automatically
update.
/🆑
2024-07-02 02:16:46 +02:00
Jeremiah ed3cc2b285 [no gbp] can no longer cheese blindness with lootpanel range (#83401)
## About The Pull Request
`in viewers` does not take into account blindness so you can open the
lootpanel at range as a blind person to see item names, icons etc

This limits their alt click range to 1 tile away and removes the
names/tooltips from the items in the ui
## Why It's Good For The Game
Realism and since this is a blindness nerf (as if they need one) I won't
be mad this gets closed
## Changelog
🆑
fix: You can no longer open the loot panel at range as a blind person
and cheese item names
/🆑
2024-05-24 03:16:17 -04:00
Joshua Kidder c3622c3e16 Enables right click, alt click, ctrl click for alt-click item window (#83179)
## About The Pull Request

This fix enables most of the clicks that have been disabled in the alt
click menu up to this point. However, I did have to cut out the pointing
thing it would do for right clicking. The only thing you aren't able to
do with the new alt-click menu at this point is dragging items onto each
other, pointing, and the shift-click context menu. Maybe we'll leave
that for another PR, because I think I'd have to rewrite core components
of TGUI for that?
## Why It's Good For The Game

Lets you perform almost all of the alternative and right click functions
on things you have alt-clicked the tiles for. I believe this outweighs
the benefits of pointing at stuff on a tile instead.
## Changelog

The alt-click item panel now lets you perform most of the alternative
click options.
🆑 Bisar
qol: Most of the alternate click modes (right click, control clicking,
shift clicking, etc) have been enabled in the alt-click item menu.
fix: You will no longer point at things you right-click in the alt-click
item menu.
/🆑
2024-05-11 23:21:54 -07:00
Jeremiah 17c799fdeb Lootpanel: Requires 515.1635+ (#83084)
## About The Pull Request
Per request of MSO, drops the fallback icon generation for clients under
515.1635. Lootpanel warns about this anyways and you had ample time.


![image](https://github.com/tgstation/tgstation/assets/42397676/b7064b28-13b9-4cd1-ad99-33f3e665209b)

Saves some time from SSlooting.
## Why It's Good For The Game
Pushes players to use a better client
Saves some server cost from older clients
## Changelog
🆑
fix: Lootpanel now requires 515.1635 to generate most icons. TG support
for 514 ended May 1. Update your client to fix the icons.
/🆑
2024-05-07 05:05:33 -04:00
Jeremiah 8e3f635b98 Alt click refactor (#82656)
## About The Pull Request
Rewrites how alt click works. 
Based heavily on #82625. What a cool concept, it flows nicely with
#82533.

Fixes #81242 
(tm bugs fixed)
Fixes #82668

<details><summary>More info for devs</summary>

Handy regex used for alt click s&r:
`AltClick\((.*).*\)(\n\t.*\.\.\(\))?`
`click_alt($1)` (yes I am aware this only copies the first arg. there
are no other args!)

### Obj reskins
No reason for obj reskin to check on every single alt click for every
object. It applies to only a few items.
- Moved to obj/item
- Made into signal
- Added screentips

### Ventcrawling
Every single atmospherics machine checked for ventcrawling capability on
alt click despite only 3 objects needing that functionality. This has
been moved down to those individual items.
</details>

## Why It's Good For The Game
For players: 
- Alt clicking should work more logically, not causing double actions
like eject disk and open item window
- Added context menus for reskinnable items
- Removed adjacency restriction on loot panel

For devs:
- Makes alt click interactions easier to work with, no more click chain
nonsense and redundant guard clauses.
- OOP hell reduced
- Pascal Case reduced
- Glorious snake case

## Changelog
🆑
add: The lootpanel now works at range.
add: Screentips for reskinnable items.
fix: Alt click interactions have been refactored, which may lead to
unintentional changes to gameplay. Report any issues, please.
/🆑
2024-04-16 17:48:03 -06:00
Jeremiah 0b00e3437e [no gbp] Loot panel subsystem initializes now (#82680)
## About The Pull Request
Confusing error message at loading screen


![image](https://github.com/tgstation/tgstation/assets/42397676/850e5f97-f319-4f4d-b49a-ff90bb527aa8)
## Why It's Good For The Game
Less confusing
## Changelog
🆑
fix: CentCom dispatched a team of interns to fix the loot panel's
loading message. It should now load properly. It did before too, but now
the message is fixed.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-16 17:12:43 -06:00
Jeremiah d554ab7766 RPG Loot: Revisited & READY (#82533)
## About The Pull Request
Revival of #72881

A new alt click window with a tarkov-y loading spinner. Replaces the
object item window in stat panel.

## Videos
<details>
<summary>vids</summary>

toggleable grouping:

![syAA5zf6RK](https://github.com/tgstation/tgstation/assets/42397676/c89b372d-29f6-4ebe-895d-f73bbdc41c19)

now lists the floor as first obj:

![abc](https://github.com/tgstation/tgstation/assets/42397676/cd8dc962-2ac7-41bf-a5d3-b9e926116b06)

in action:

![dreamseeker_IkrPKt2QZt](https://github.com/tgstation/tgstation/assets/42397676/1f990aa0-60f0-47e7-9d93-b63e35d05273)

</details>

## features:
- search by name
- 515 image generator is much faster than alt click menu
- opening a gargantuan amount of items shouldnt freeze your screen
- groups similar items together in stacks by default, toggleable
- shows tile as first item
- <kbd>Shift</kbd> and <kbd>Ctrl</kbd> compatible with LMB
🖱️
- RMB points points at items (sry i could not get MMB working)
- key <kbd>Esc</kbd> to exit the window.


For devs:
- A new image generation tech.
- An error refetch mechanic to the Image component
- It does not "smart track" the items being added to the pile, just
reopen or refresh. This was a design decision.

## Why It's Good For The Game
Honestly I just dislike the stat panel

Fixes #53824

Fixes 

![image](https://github.com/tgstation/tgstation/assets/42397676/0e50faab-7d4d-4bf7-8c5b-4ac28547bfbd)

## Changelog
🆑
add: Added a loot window for alt-clicking tiles.
del: Removed the item browser from the stat panel.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2024-04-14 17:35:03 -04:00