Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

А11 #38

Merged
merged 104 commits into from
Jan 20, 2024
Merged

А11 #38

merged 104 commits into from
Jan 20, 2024

Conversation

depoz0
Copy link
Owner

@depoz0 depoz0 commented Jan 20, 2024

А11

lessthnthree and others added 30 commits January 14, 2024 11:34
## About The Pull Request

Fixes a piece of wall/missing power cable/sign on Tramstation missed in
tgstation#80713

## Changelog

:cl: LT3
fix: Fixed missing power cable outside Tramstation medbay
/:cl:
## About The Pull Request

Got this from reading tgstation#80915

The actual name of the element is not reported anywhere in the stack
trace, and while you might be able to figure it out from context clues
based on the procs invoked in the stack trace... this isn't guaranteed
and just makes it harder to diagnose these weird sporadic runtimes.
## Why It's Good For The Game

easier to figure out a problem when you have as much useful information
as possible
## Changelog
irrelevant
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
using .focus() on section doesn't behave in the way that you'd want it,
this means it would steal focus any time someone moves their mouse away
from an input and touches a scrollable section. We had events.ts for
this purpose, so this should accurately represent how the old section
worked.

I also moved the component reference documentation into the onhover
effects of section
![Screenshot 2024-01-13
095237](https://github.com/tgstation/tgstation/assets/42397676/a3d80a35-a1db-416e-a26e-2667cb4031f3)

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Prevents a really annoying bug where you'd have to hover over inputs to
keep typing
Better documentation
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:
fix: Sections will be more polite by not stealing focus from Input boxes
in TGUI
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
As requested by @Mothblocks I implemented react-popper instead.

Perks:
1. Seemingly handles the positioning bug that I wrestled with in tgstation#80883.
2. Performance seems just as good.
3. Should fix issue presented in
[NovaSector#434](NovaSector/NovaSector#434)

Cons: 
1. Tiny amount more code

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Bug fixes
Mothblocks asked for it
Fixes tgstation#80929
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:
fix: Poppers (like the prefs menu options) shouldn't be hidden beneath
the character preview anymore.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
## About The Pull Request

- Don't apply `connect_range` if we don't have a trauma. We early return
anyways, might as well save the effort.
- Fixes a few messages being unspanned. Changes a few messages to use
hypnophrase span rather than warning span, so it sticks out more.
- Fixes faulty assumption that only carbons are examining. 
- Fixes the chat messages for examine_effects happening before the
examine block, not after, by adding a short timer in examine before they
are invoked.

## Changelog

:cl: Melbert
fix: Fixes some eldritch painting messages having no chat span
fix: Fixes eldritch painting messages triggering before the examine,
making it hard to see
fix: Fix beauty eldritch painting doing nothing to heretics who examine
it
/:cl:
tgstation#80800)

## About The Pull Request
In a previous PR (tgstation#79661), I
noted that a lot of moodlets tended to have their timeouts break because
it was passing their names and whatnot as a parameter, that gets fed
into the timeout modifier parameter, causing the timeout multiplier to
break, because BYOND type-agnosticism means that it can multiply a
number (timeout_mod) by text (a name or some other object), resulting in
0 - which makes a moodlet permanent. This is probably not intended.

This fixes that in two ways:
- Adding a `1` to potentially applicable moodlets (searched for with a
regex of `.add_mood_event(.*, .*,)`) just to make sure the timeout
doesn't get multiplied out weirdly.
- Making the add_mood_event thing CRASH() if the timeout_mod is bad.

If someone else wants to come up with a solution better than this,
please do.

## Why It's Good For The Game
Maybe having your arm permanently fall asleep after getting it
reattached sucks, moodlet-wise. (Being stuck with permanent
positive/negative moodlets is probably not intended.)

## Changelog

:cl:
fix: Moodlets with parameters/effects e.g. limb reattachment moodlets
should probably disappear more appropriately.
/:cl:

---------

Co-authored-by: Hatterhat <[email protected]>
## About The Pull Request

Refactors underlying autolathe code, mostly about how it prints items
Items are now printed sequentially
Items now have their custom materials set to the the materials actually
used to create them
Items are now printed based on their design construction time instead of
a default 3.2 seconds per item always
Closes tgstation#80755

## Changelog
:cl:
fix: Autolathes no longer allow you to duplicate materials at higher
levels of stock parts
qol: Autolathes now show name instead of typepath when selecting a
custom material
qol: Autolathe now print out items one by one instead of waiting for all
of them to print at once
/:cl:
…n#80710)

## About The Pull Request

Using a Lawyer badge in hand will now point to it, giving the thought
bubble over your head, rather than sending a message to your chat.

I thought the lawyer badge would show its icon in chat when using it,
but it doesn't seem like that was the case. I thought this would be a
better change though, since it doesn't rely on chat.

## Why It's Good For The Game

Moves the lawyer badge away from a thing that spams your chat and makes
it more visible as an action being done by a player.

## Changelog

:cl:
qol: Using a Lawyer badge in your hand now shows a thought bubble with
the badge, rather than giving a lousy message in your chat.
/:cl:
## About The Pull Request
While debugging tgstation#80857, it became immediately apparent why it was never
converted over to TypeScript: It's massive. 1203 lines in one file,
making it our largest UI! I stated in the aforementioned PR my general
guideline: 500 lines before something needs to be separated. This does
so.
## Why It's Good For The Game
- Separates a titanic UI component for easier maintainability
- Typescript conversion
## Changelog
N/A nothing player facing
…rf, obj/machinery hits mob, item without "thrower" hits mob, mob gets hit by non-carbon mob. (tgstation#80909)

## About The Pull Request
Adds few (3) log registers and (2) visible messages for interactions
like; mob hits solid turf (wall for instance), mob gets hit by
obj/machinery and log register for mob gets hit by item without "living
thrower"
Edit: adds additional logregister and chat message when mob hit by non
carbon mob
## Why It's Good For The Game
Fixes tgstation#76085 
And on top of that, PR is supposed to make situations where players are
being hurt or moved by objects without direct interactions with the
second player (if he does exist) a bit more trackable for player and log
divers.
## Changelog
:cl:
qol: Players are now able to see in chat when they are being hit by
obj/machinery, got crushed into dense turf or get hit by thrown non
carbon mob.
admin: Scenarios like mob hits dense turf, obj/machinery hits mob, item
without "living thrower" hitting mob, mob gets hit by thrown non carbon
mob now appear in logs.
/:cl:

---------

Co-authored-by: Ghom <[email protected]>
## About The Pull Request
bileworms will no longer infintely try to eat what they already ate

## Why It's Good For The Game
fixes tgstation#80948

## Changelog
:cl:
fix: fix bileworm ai going insane after eating someone
/:cl:
…tation#80957)

🆑
fix: Radiation shelters (wherever they are) will protect against nebula
storms
/🆑

Oversight when I originally added the nebula. Didn't realize these were
a thing
…station#80950)

Fixes tgstation#80926, fixes tgstation#80372

The tongue, eyes, ears and brain vars were also being updated and
cleared elsewhere, runtiming whenever a regular head got dismembered and
then emptied, which would eventually cause a harddel due to improper
clean-up

I've fixed the errant proc and just removed those vars because I don't
like having duplicate references for no reason (they should always
already be in contents)

Not player facing
…te (tgstation#80890)

## About The Pull Request
Hub shows if game is restarting (game is finished), starting (game is
initializing), time to start (inits done)

Also the time, is more accurate to the actual roundstart time
previously it would show "Time 00:00" and when you joined it was
actually still in lobby
now "Time 00:00" will mean that the round has started and gone in game

Hopefully this is ok as it's not really a feature, it's just improved
feedback to the player

@MrStonedOne 
## Why It's Good For The Game
Time is more accurate to station time, also is handy to know if server
is restarting or just starting and in lobby
## Changelog
:cl:
code: Hub status shows if server is restarting, starting, time to start.
The "Time" is more accurate and based on roundstart now
/:cl:
…s over radio (tgstation#80092)

## About The Pull Request

Alternative title: "Baby's third pr: surprise say code refactor"

While testing sign language I worked out that if the first message sent
after toggling sign language involves speaking directly into a radio, it
proceeds to use the wrong verb. After several hours of digging through
say and telecomms code, I worked out the cause:
the `verb_say` on humans is primarily updated to match tongue data
during the verb _selection_ method `say_mod()` in `human_say.dm`, and as
a consequence this meant the verb wasn't updated to the correct one
until far after it had been copied to a virtualspeaker, leading to the
incorrect verb being used for the radio message.

This pr fixes this by refactoring this verb updating behaviour to be in
a new method `update_verbs()`, which we then call _before_ attempting to
call `radio()` to avoid wrongful copying and thus fixing the bug.

There's theoretically also cases where the previous behaviour would use
the wrong verb if one lost or gained a tongue between radio messages, or
the wrong verb from those picked from a list for some simple/basic
animals, but those are significantly less common.

To note, I gave the new `update_verbs()` method the same arguments as
the `say_mod()` method it got split out of, but having gone through all
instances of it being used for this I don't feel it actually *needs*
those arguments. So I'm unsure whether it should keep them or not.
Opened as a draft for now for sanity's sake, and also cause, y'know, it
touches say code.
## Why It's Good For The Game

It was _really_ annoying.
## Changelog
:cl:
fix: Signers no longer use the wrong verb when speaking directly into a
radio for the first message after toggling sign language.
refactor: Moved the updating of verb variables into a new method which
is called earlier in living's say, which should avoid this happening for
other things which updated their verbs the same way.
/:cl:

---------

Co-authored-by: Ghom <[email protected]>
comfyorange and others added 29 commits January 19, 2024 11:09
## About The Pull Request
fixes a runtime when trying to unregister the move signal from the ghost

## Why It's Good For The Game
fix a runtime when loading ghosts to a mulebot

## Changelog
:cl:
fix: fix a runtime when loading ghosts to a mulebot
/:cl:
## About The Pull Request

Changes the monkey's ai_movement from dumb movement to basic_avoidance,
allowing them to walk around tables and corners that they always
otherwise got stuck in.


https://github.com/tgstation/tgstation/assets/26240645/e1b46790-b950-4030-a9ae-4cf10913166c
Original monkey behavior


https://github.com/tgstation/tgstation/assets/26240645/e08a4094-8c81-41f6-8960-61338d38fff9
New monkey behavior

## Why It's Good For The Game

Monkeys can properly fight you without nearly constantly getting stuck
behind anything with collision.
## Changelog
:cl:
fix: Monkeys don't get stuck on obstacles as often.
/:cl:
## About The Pull Request

Nukies were using ``get_machines_by_type`` in ``assign_nuke`` to get the
nuke and set its code, which doesn't work for clown ops because they use
a subtype. This fixes it by replacing it with
``get_machines_by_type_and_subtypes`` instead.
while I was messing with clown op code I also made it a little bit less
copy paste


![image](https://github.com/tgstation/tgstation/assets/53777086/2db9e859-8d53-4704-a110-7f8a5f33ee0f)

## Why It's Good For The Game

Clown ops now get a code to their nuke rather than it staying as
'ADMIN', pretty cool!

Closes tgstation#78306

## Changelog

:cl: Momo8289, Pepsilawn, Sinsinins, JohnFulpWillard
fix: Clown ops now get a code set for their nuke.
/:cl:
## About The Pull Request
fixes megafauna AI getting stuck attacking legion corpses

## Why It's Good For The Game
fixes tgstation#79757


## Changelog
:cl:
fix: fixes megafauna AI getting stuck attacking some corpses
/:cl:
## About The Pull Request

Looks like a refactor forgot to retain the living_say verb for
whispering in italics when they moved it to the radio file


![image](https://github.com/tgstation/tgstation/assets/22140677/bd490568-ce30-42f3-bb9f-17ae345c6cb0)

This just fixes that so whispering once again formats

![image](https://github.com/tgstation/tgstation/assets/22140677/a5dde3f2-5a18-4f8d-837d-e158a597eddb)



## Why It's Good For The Game
## Changelog
:cl:
fix: fixes whispering formatting
/:cl:
## About The Pull Request

Fixes tgstation#81009.

Trash bags did not have a `worn_icon_state` set, which means that it
tried to use an invalid state when worn while not empty. This is now
fixed.
## Why It's Good For The Game

Missing sprites bad.
## Changelog
:cl:
fix: Filled trash bags show up properly when worn.
/:cl:
…getting their amulettes (tgstation#80981)

## About The Pull Request
Lunatics now have an objective and it properly displays. 
Lunatics now get a moonlight amulette on the ground if their hand are
full.
## Why It's Good For The Game
Lunatics had no idea who their master was except for their flavor text.
This made it kinda confusing. This was worsened when they didnt have the
identifying amulette.
## Changelog
:cl:
fix: Lunatics spawned from moon ascension now actually have an objective
to assist their ringleader
fix: Lunatics now get a moonlight amulette on the ground if they have
full hands
/:cl:

---------

Co-authored-by: Ghom <[email protected]>
## About The Pull Request

Fix items layering above heretic runes by making it use pixel_z rather
than pixel_y.


![image](https://github.com/tgstation/tgstation/assets/51863163/302d60df-cf4e-4a0d-b00e-7d6e42fb741a)

## Changelog

:cl: Melbert
fix: Items and mobs no longer hide behind big runes (heretic, cult,
wizard)
/:cl:
## About The Pull Request

Fixes emitter prototype button being unreachable because it makes you
immobile upon buckling to it, but requires you to be mobile to use.
Fixes emitter prototype's open icon state being invisible
Fixes emitters reverting icon state despite having an open panel

## Why It's Good For The Game

Prototype emitters being broken and invisible was brought to my
attention in discord, I found the last bug accidentally so fixed that
one too.
I can't find any issue report on these, but these bugs do exist trust me
bro I promise.

## Changelog

:cl:
fix: Prototype emitters now work.
fix: Prototype emitters don't go invisible if screwdriver'd open.
fix: Emitters no longer show up as their panel being closed when it is
open.
/:cl:
)

## About The Pull Request

Pass `dismembered = TRUE` when calling `drop_limb` from `dismember`. 

At a glance I don't think anything actually checked `dismembered`,
making this do (practically) nothing,
however I was writing some code that actually relied on checking this
only to find it was always passed as `null`.

I also audited some signal usages of dismember / drop limb to make sure
they're correct.

## Changelog

I don't think this will affect anything at current.
…tion#80845)

## About The Pull Request

Yello!
This one is reasonably quick, tho I did some fixes too

This is the big one, fixes the buildmode tool sometimes locking disabled
for the whole round.
We do this by replacing the static var on buildmode with global var and
a global proc
This keeps a harddel on the buildmode datum from permalocking is_running
to TRUE

Also makes flipping the var BACK if something breaks significantly
easier for admins, so that's nice

Alright, smaller things now

Fixes lists of numbers failing to encoded improperly This was fixed on
shiptest, we failed to actually port their most recent revision
Fixes the shuttle flag not actually working because it used istype
instead of ispath
Changes obj_blacklist to a typecache for optimization's sake
Renames/moves some vars around to prevent weird double typing things
Removes a checktick in key gen, it's just costing more time then it
would save in overtime
Properly handles lists. We were only doing var encoding one layer deep,
need to do it alll the way down

Alright, now the optimizations

This proc is fucking HOT, and it's for really dumb reasons

This is a text gen proc, and it makes the mistake of generating text and
concatinating it with MORE text.
This is HORRIFICALLY EXPENSIVE because byond caches strings (can only be
one of each) and string churn fucks up that caching system something
fierce
Moving from strings to lists of strings we join at the end takes us from
like idk 100 seconds to save bare metastation to like 1.5
This is applied basically everywhere for obvious reasons

While I'm here, storing keys in a flat list and then using find to find
them, then using that index to lookup into another flat list is a bit
silly. Let's just make it an assoc list. Faster lookup, cleaner.

Oh also rather then iterating over all the vars on an object, let's
iterate over just the ones we care about yeah?

Let's see... no sense genning a key we'll never use, and having suffixes
be often non existent is silly just embrace the slight mess.

That's it I think, this takes us from 100 seconds to save metastation to
2.5 seconds to save ALL of metastation (I removed the vars limiter so I
could make sure var saving didn't fuck me up)

## Why It's Good For The Game

Cleans up some issues that we failed to port the fixes for, MASSIVELY
optimizes this (so it can finish in like 5/10 seconds and not 300!) and
ensures admins can always use the thing and don't risk dropping their
pet buildastation to the void.

Worth noting, this tool really should not be used for station mapping
outside an event context. It produces sorta buggy var edits, and WILL
fail to pull over context for shit. Please don't use it as such

Profiles (csv files I promise)

[Before](https://github.com/tgstation/tgstation/files/13853313/profiler.json)

[After](https://github.com/tgstation/tgstation/files/13853271/profiler.json)

I'd include my line by lines but I don't know how much you'd get out of
them. Here's an image tho


![image](https://github.com/tgstation/tgstation/assets/58055496/3f3148c5-8b1e-4bda-aa65-3983f9944a91)

## Changelog
:cl:
fix: The map saving tool will no longer lock up and prevent all further
action at random
fix: Map saving now takes on the order of seconds, not minutes
fix: Fixes an issue with lists that caused strongdmm to report saved
maps as broken
/:cl:
@depoz0 depoz0 merged commit 205c6ab into master Jan 20, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.