Commit Graph

15 Commits

Author SHA1 Message Date
tonty
f91de19b44 Implements [OPTIONAL] Swap Left/Right hand, changes [OPTIONAL] default keybinds to accomodate (#92659)
## About The Pull Request

- Adds **OPTIONAL** keybinds that lets you select a specific hand
- Alters **OPTIONAL** default keybinds as such:
  - Q: Swap to Right Hand (replacing Drop item)
  - E: Swap to Left Hand (replacing Quick equip)
  - R: Quick equip (replacing Toggle Throw Mode)
  - ShiftR: Quick equip belt
  - X: Drop item (replacing Swap hands)
  - Swap hands is Unbound

## Why It's Good For The Game

Swapping hands has always been somewhat awkward. Since it depends on the
currently selected hand, swapping your hands requires you to look away
from what you're doing and mentally process what you're holding and what
you have selected. In the heat of the moment (like a fight) it's really
easy to forget which hand you have selected and do something you did not
want to do (like accidentally hug your target instead of attack them).
This makes it so that, at the very least, you only need to check what
you're holding.

The **OPTIONAL** default keybinds **THAT ARE OPTIONAL YOU DON'T HAVE TO
USE THEM** were altered so that new players use this new feature,
hopefully alleviating some of the hiccups from learning hand swapping.
## Changelog

🆑
qol: Added [OPTIONAL] keybinds to for Swap Left/Right hands. Check your
keybinds. [NOT OPTIONAL]
/🆑
2025-08-25 22:00:25 -07:00
tonty
75e9e0c98b Fixes tutorial UI not working at all (#92672)
## About The Pull Request

The tutorial UIs setting their color forces them to have KEEP_TOGETHER
which breaks tutorial rendering, this fixes that
fixes #89866

## Changelog

🆑
fix: New player tutorials will no longer look extremely broken
/🆑
2025-08-22 18:26:19 -07:00
LemonInTheDark
2e5d3ad984 Adds In Game Rank Editing (Permissions Panel Cleanup) (#91873)
## About The Pull Request

Ok there's a lot here, sorry bout that.

- Cleaned up the permissions panel backend pretty signficantly
- Added some extra security measures to said code, mostly proc call
checks
- Properly implemented filtering code jordie wrote years and years ago
for permissions logs
- Cleaned up the permissions ui generally, more bars, nicer lookin
stuff, etc
- Fixed the Management panel's relationship with combined roles, and
renamed it to Housekeeping. Its display is expanded too.
- Added tracking to rank datums on where exactly they came from
- Added a new tab to the permissions panel which allows the modification
and deletion of ranks
- Beefed up rank modification to try and avoid accidential temp rank
additions to the db

I'm doing my best to avoid perms escalation issues, tho they are always
possible right.
Also, got mad at some query cleanup handling, did a pass on it. this
isn't nearly all of em, but it's some.

## Why It's Good For The Game

I realized there is no way to, in game, cleanly edit/create ranks, and
that the way the existing system worked was quite opaque.
I'm trying to fix that here. It does mean potentially opening up DB rank
deletion/modification to bad actors, but frankly I am not overly worried
about that. Admin modification has always been a vulnerability so like.

Here's a video with my changes (mostly, it's lightly outdated)
https://file.house/XqME7KWKk0ULj4ZUkJ5reg==.mp4

## Changelog
🆑
refactor: Fucked with admin rank setup very slightly, please yell at me
if anything is wrong.
admin: Updated the permissions panel to be a good bit more user
friendly, added rank management support to it.
server: I've added code that gives the game modification/deletion perms
for the rank table, be made aware.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2025-06-29 11:41:41 -06:00
Ghom
339616ae78 You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
## About The Pull Request
People can now pet held mothroaches and pugs if they want to, or use
items on them, hopefully without causing many issues. After all, it only
took about a couple dozen lines of code to make...

...Oh, did the 527 files changed or the 850~ lines added/removed perhaps
catch your eye? Made you wonder if I accidentally pushed the wrong
branch? or skewed something up big time? Well, nuh uh. I just happen to
be fed up with the melee attack chain still using stringized params
instead of an array/list. It was frankly revolting to see how I'd have
had to otherwise call `list2params` for what I'm trying to accomplish
here, and make this PR another tessera to the immense stupidity of our
attack chain procs calling `params2list` over and over and over instead
of just using that one call instance from `ClickOn` as an argument. It's
2025, honey, wake up!

I also tried to replace some of those single letter vars/args but there
are just way too many of them.

## Why It's Good For The Game
Improving old code. And I want to be able to pet mobroaches while
holding them too.

## Changelog

🆑
qol: You can now interact with held mobs in more ways beside wearing
them.
/🆑
2025-04-23 20:18:26 +00:00
MrMelbert
7e55bba4fb Hud elements and certain in-world objects will now change your cursor to indicate they are clickable (windows style) (#88470)
## About The Pull Request

Basically just goes through and adds `mouse_over_pointer =
MOUSE_HAND_POINTER` to a bunch of screen elements (player hud and lobby
menu)

Also adds it to very small wall mounted objects like buttons, fire
alarms, and light switches


https://github.com/user-attachments/assets/c501cd3d-8efd-4fd0-a486-a53f2102a2cb


https://github.com/user-attachments/assets/89f7cdcb-b40c-4ef3-b578-fee66ddf1ce2

## Why It's Good For The Game

- Makes interacting with screen elements a bit more tactile
- Makes it a bit easier to click on tiny buttons and such (being able to
know when you're actually hovering the thing)
- Maybe can be expanded to more world objects to indicate they are
clickable vs non-interactable?

## Changelog

🆑 Melbert
qol: Hovering over clickable screen elements will now update your mouse
cursor to indicate they're clickable
qol: Hovering over small wall mounts (light switches, buttons, fire
alarms) will now update to mouse cursor indicating you're hovering them
/🆑
2024-12-12 19:32:33 +01:00
MrMelbert
d3bc3e8cb4 Being drunk or having a broken arm hurts accuracy with ranged weapons. Also cleans up a fair bit of hand handling to be more readable (#87904)
## About The Pull Request

1. Having a broken arm will affect your accuracy when firing a weapon
with that arm, even potentially causing damage to you if it's a weapon
with recoil. This effect is not applied under the effects of a
painkiller.

2. The sister effect of this (punching someone with a broken arm) now
also has an interact with painkillers (it can no longer block your
attack).

3. Being drunk heavily affects ranged weapon accuracy, unless you're the
bartender

4. A lot of hand handling cleanup, using new macros to make it a lot
more readable at a glance

## Why It's Good For The Game

We have this system for modifying firearm accuracy but we don't really
use it commonly, and I feel like it slots in well with a lot of places

For broken arms, it adds some more depth to the wound system, in the
same way that trying to punch someone with a broken arm causes pain. (I
actually want to expand this to melee weapon accuracy and attacking with
melee weapons in general, but that's for a later time)

For drunkenness, it just adds to the drunk shenanigans. It also slightly
reduces the effectiveness of drinks as combat healing chemicals, such as
quadsec - makes it a bit more of a trade off.

## Changelog

🆑 Melbert
balance: Having a broken arm affects your accuracy with ranged weapons
fired with that arm. Utilizing a painkiller will nullify this effect,
however.
balance: Painkillers will prevent your punches from being cancelled due
to having a broken arm. You'll still take damage, though.
balance: Being drunk now affects your accuracy with ranged weapon. The
bartender is immune to this effect via their skillchip.
code: A lot of code involving left and right hand handling has been
cleaned up, easier to read. Report any oddities, like left and rights
being flipped
/🆑
2024-11-19 19:31:06 +01:00
tonty
3f0b4abb8d Replaces world.icon_size (and some magic numbers) with defines (#86819)
## About The Pull Request

All usages of world.icon_size in code have been replaced with new
`ICONSIZE_X`, `ICONSIZE_Y` and `ICONSIZE_ALL` defines depending on
context

Replaces some "32" magic numbers with the defines

A few bits of code have been modified to split up x/y math as well

## Why It's Good For The Game

Magic number bad, code more readable, code more flexible and I'm told
there's an access cost to doing world.icon_size so minor performance
gains

## Changelog

🆑 tonty
code: made some code relating to the world's icon size more readable
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-09-29 13:28:32 +00:00
TiviPlus
8a991b337c Adds a "Remind me later" button for tutorials (#83064)
## About The Pull Request

Dismisses the tutorial when the button is pushed

## Why It's Good For The Game

Some tutorials may pop up at inopportune moments and this lets players
deal with that, as well as when they bug out
## Changelog
🆑
qol: Added a "Remind me later" button for tutorials
/🆑

---------

Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2024-05-23 20:51:39 -04:00
TiviPlus
2efd770f4f Fix tutorials not reappearing in some cases (#83066)
## About The Pull Request
client deletion isn't the only way to leave a mob
## Changelog
🆑
fix: fixed clients being seen as stuck doing tutorials in some cases
when changing mobs
/🆑

Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2024-05-08 19:41:39 -06:00
TiviPlus
e889d699b8 Removes unused tutorial_instruction var (#83065)
Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2024-05-06 17:42:49 -07:00
Bloop
f34174414d Cleans up some extra args in Destroy() (#80642)
## About The Pull Request

After https://github.com/tgstation/tgstation/pull/80628, these shouldn't
be needed anymore right?

## Why It's Good For The Game

Cleans up some vestigial code

## Changelog
EDIT: Not player-facing.
2023-12-30 03:54:07 +01:00
John Willard
06ca7a4481 Hud screens now set hud owner in Initialize. (#76772)
## About The Pull Request

Adds an arg in huds' screens to add the hud owner in the Initialize,
instead of manually setting it every time we need to.
This is already done in ``New()`` for lobby screens, which I left intact
as lobby screens are used for new players, and are given out before
atoms are Initialized. Everything else, however, uses Initialize, so it
does not mess with any other args in their own Initializes (like the
Escape menu).
This also allows us to set the screens' HUDs as a private var, to ensure
this won't be messed with in the future.
Lastly I replaced instances of ``client`` with ``cannon_client`` to be
consistent with a lot of other parts of hud code.

## Why It's Good For The Game

Huds are easy to break when they do not have a hud owner, and for
something as important as that I believe it should be something you
opt-out of when you don't want it, rather than something you opt-into by
manually setting hud owner every time.
This cuts down on a lot of copy paste in hud code for humans, aliens,
etc.

## Changelog

🆑
refactor: Huds now have their hud owner set in Initialize
/🆑
2023-07-16 21:00:22 +02:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
Mothblocks
9d0cdfe909 Adds an Escape Menu (#72906) 2023-01-26 00:25:16 -08:00
Mothblocks
9740f104d0 Contextual tutorials for swapping hands and dropping items (#72292)
# Requires https://github.com/tgstation/tgstation/pull/72320

## About The Pull Request


https://user-images.githubusercontent.com/35135081/209700892-e54be6cf-d18c-4d12-acd1-e5eb46e9d82d.mp4


https://user-images.githubusercontent.com/35135081/209700911-751b8a0e-d770-49fa-a6eb-ce50aa0fa670.mp4

---

Adds a system for tutorials that:

- Are contextually given
- Are not given again after completion
- Can optionally not trigger for anyone who first played before a
certain date

Uses this system for a tutorial for switching hands/dropping items. This
tutorial is triggered when you try to click on an item with another
item, and `afterattack` return FALSE. In order for this to work as
smoothly as possible, I'm going to open a separate PR that cleans up the
`afterattack` on everything to either return TRUE/FALSE.

## Why It's Good For The Game

SS13 is an extremely confusing game, being able to do tutorials in a
non-intrusive way (like a separate tutorial mode) is nice.

The system in place is going to be perfectly usable for introducing
mechanics to both fresh players and experienced players alike (such as
for future content).

## Changelog
🆑
qol: New players will now get a contextual tutorial for how to switch
hands and drop items.
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-01-09 01:29:18 +01:00