Commit Graph

42 Commits

Author SHA1 Message Date
lessthanthree
62c6da56cb Maptext 2023: I can see clearly now (#76356)
## About The Pull Request

We needed to replace our maptext font. Closes
https://github.com/tgstation/tgstation/issues/73002

Replaced with a pair of new fonts, made some improvements and fixes
while we're at it.

- Two new maptext fonts: Grand9K and TinyUnicode
- These two scale cleanly with BYOND icon sizes, so no antialiasing of
already tiny fonts making it look bad when enlarged on screen
- Fixed size fonts now have metrics to be used properly on overlays
(such as status display) where a client (a requirement for MeasureText)
is not feasible
- VCR OSD Mono still here, usable as a variable size font with larger
text
- Synchronizes status display scrolling speed between lines
- Fixed special maptexts for yelling, clown, redtext, greentext


https://github.com/tgstation/tgstation/assets/83487515/7dbaf1d1-f1d5-46ff-8903-d95cab059ed8

## Why It's Good For The Game

Maptext looks like crap if you're one of the players who no longer have
the old font. Even if you do have Small Fonts, this looks better.

## Changelog

🆑 LT3
refactor: Refactored maptext (those floating words)
fix: Fixed special chat bubbles for yelling, clown, redtext, greentext
fix: Fixed alignment of status display text
code: Status displays now synchronize their message lines when scrolling
/🆑
2023-06-27 16:46:16 -06: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
fc0ba64228 Fix runtime with chat messages deleting when their clients do (#75445)
```
 - 
[2023-05-07 18:56:20.998] runtime error: Del'd before we finished fading, with 30 time left (code/datums/chatmessage.dm:81)
 - proc name:  stack trace (/proc/_stack_trace)
 -   source file: stack_trace.dm,4
 -   usr: Lloyd Moffardi (/mob/dead/observer)
 -   src: null
 -   usr.loc: the floor (113,141,4) (/turf/open/floor/iron)
 -   call stack:
 -  stack trace("Del\'d before we finished fadi...", "code/datums/chatmessage.dm", 81)
 - /datum/chatmessage (/datum/chatmessage): Destroy(0)
 - qdel(/datum/chatmessage (/datum/chatmessage), 0)
 - /datum/chatmessage (/datum/chatmessage): on parent qdel(Avylaar (/client), 1)
 - Avylaar (/client):  SendSignal("parent_qdeleting", /list (/list))
 - Avylaar (/client): Del()
```

In 85% of rounds.

This happens because when the client deletes, the chat message is
deleted with it. However, chat messages want to make sure they're not
being deleted mid-animation. These two requirements clash, because a
client can be deleted at any time during the animation. Moves the check
to only be done when the client isn't being destroyed.
2023-05-22 11:05:00 -06:00
LemonInTheDark
bd61c385f1 Removes all but the barebones timers for runechat (#74428)
## About The Pull Request

Instead of using timers to trigger the fadeout, we use animate() 
We start by queuing up all our alpha fades, then if we are shortened, we
calculate the alpha we should be at, set our alpha to that, then animate
from there to 0

This requires ANIMATION_PARALLEL on the pixel offsets to ensure they
don't reset the alpha animation, and it does mean that a second alpha
animate could reset the pixels, but that's a chance I'm willing to take.

The timer work here was almost all of the cost, this should reduce the
overhead of this proc signficantly, making runechat more fit for use
under high stress.

I have got it to end slightly early, but it's very minor and I've only
seen it once, so yaknow, good enough.

## Why It's Good For The Game

Speeeed

## Changelog
🆑
refactor: runechat should be a lot cheaper on the server. I've changed
how it functions, if it behaves weird yell at me please don't just
ignore it
/🆑
2023-04-04 15:42:55 -06:00
LemonInTheDark
fe7ebd67cf Properly accounts for byond tick fuckery in runechat code (#74388)
## About The Pull Request

Ok so like, the agreed upon assumption for "verb like code" (stuff that
triggers when a client sents a network packet to the server), is it runs
in verb time, that sliver of time between maptick and the start of the
next tick.
We thought MeasureText worked like this. It doesn't.

It will, occasionally, resume not during verb time but as a sleeping
proc, at the start of the next tick.
Before the MC has started working.
This appears to only happen when the tick is already overloaded.

Unfortunately, it doesn't invoke after all sleeping procs as we were
lead to believe, but just like, like any sleeping proc.

This means it fights with the mc for cpu time, and doesn't respect the
TICK_CHECK macro we use to ensure this situation doesn't happen.

SOOO lets use a var off the MC instead, tracking when it last fired.
We can use this in companion with TICK_CHECK to ensure verbs schedule
properly if they invoke before the MC runs.

Hopefully this should fix 0 cpu when running at highpop

Thanks to Kylerace and MrStonedOne for suffering together with me on
this, I hate this engine.
2023-03-31 22:11:20 -06:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

This took a while to do, but here's the gist:

Python file now regexes every file in `/code` except for those that have
some valid reason to be tacking on more global defines. Some of those
reasons are simply just that I don't have the time right now (doing what
you see in this PR took a few hours) to refactor and parse what should
belong and what should be thrown out. For the time being though, this PR
will at least _halt_ people making the mistake of not `#undef`ing any
files they `#define` "locally", or within the scope of a file.

Most people forget to do this and this leads to a lot of mess later on
due to how many variables can be unmanaged on the global level. I've
made this mistake, you've made this mistake, it's a common thing. Let's
automatically check for it so it can be fixed no-stress.

Scenarios this PR corrects:

* Forgetting to undef a define but undeffing others.
* Not undeffing any defines in your file.
* Earmarking a define as a "file local" define, but not defining it.
* Having a define be a "file local" define, but having it be used
elsewhere.
* Having a "local" define not even be in the file that it only shows up
in.
* Having a completely unused define*

(* I kept some of these because they seemed important... Others were
junked.)
## Why It's Good For The Game

If you wanna use it across multiple files, no reason to not make it a
global define (maybe there's a few reasons but let's assume that this is
the 95% case).

Let me know if you don't like how I re-arranged some of the defines and
how you'd rather see it be implemented, and I'd be happy to do that.
This was mostly just "eh does it need it or not" sorta stuff.

I used a pretty cool way to detect if we should use the standardized
GitHub "error" output, you can see the results of that here
https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792
## Changelog
Nothing that really concerns players.

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
Roryl-c
c3f6db0942 Fix RPG Titles Runechat Offset (#73443)
## About The Pull Request
Fixes the terribly unreadable situation with RPG titles overlapping with
offset runechat messages.
Also fixes some offset issues for larger mobs with this event enabled.
## Why It's Good For The Game

![image](https://user-images.githubusercontent.com/5150427/219092938-743ce676-1f1b-4e3a-baab-957a1279db39.png)
## Changelog
🆑
fix: fixed chat offsets with the RPG Titles event
/🆑
2023-02-16 19:36:18 -07:00
Tim
48e36ef2c7 Saycode refactor, unit tests, and fixes (#69799)
<!-- 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

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

Fixes #69798
Fixes #71621

When using hypnosis on a victim, the language should be accounted for
and whether the victim can properly hear it. Before the hearing code
would magically translate any message, this is no longer the case.

This also fixes the language barrier involving hearing for:
- Mind echo trauma
- Phobia trauma
- Hypnotic trigger trauma
- Split Personality brainwashing trauma
- Codeword hearing
- Hypnotize status effect
- Impure Inacusiate reagent

## Why It's Good For The Game

<!-- 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. -->

Better consistency, improved readability, and less bugs in the future.

## 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. -->

🆑
fix: Fix hypnosis, mind echo trauma, phobia trauma, hypnotic trigger
trauma, split personality brainwashing trauma, codeword hearing, and
impure inacusiate reagent all bypassing language and hearing checks. If
you try to give commands to a victim in a language they don't
understand, they will no longer magically understand the words.
fix: Fix sign language having accent modifications
refactor: Refactored saycode to be more robust, readable, and have more
unit tests.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 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. -->

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-09 20:28:17 +01:00
MrMelbert
7dde8a5e66 Adds 5 new Heretic spells. Rebalances some aspects of Heretics. Refactors some spells as well, and makes it so emote spells require free hands. (#71044)
## About The Pull Request

- Adds 5 new heretic spells!
- For Flesh: Flesh Surgery. This spell is a touch spell that can either
be used to heal your minions or extract organs from mobs.
- For Void: Cone of Cold. This is a simple spell - it shoots out a cone,
of cold, that freezes and damages people caught in it.
- For Ash: Volcano Blast. This spell functions like Tesla Blast, but
instead of electricity, it shoots out of a beam of fire that hurts to
walk over.
- For Blade: Realignment. Think of this like "Fleshmend but for stuns /
stamcrit". It rapidly regenerates stamina damage and reduces stuns,
while making you a pacifist. It can also be cast in rapid succession,
but this will increase the cooldown.
- For Rust: Rust Construction. Point at a rusted tile, and a wall will
be raised where it was instantly. This even damages people and throws
them aside - Or, if on a multi-z map, can lift up.

- Number of influences has increased.
  - 5 at 1 heretic
  - 9 at 2 
  - 12 at 3
  - 14 at 4
  - 15 at 5
  - 16 at 6, and so on

- Heretics are given a 5th sacrifice target, selected randomly. On
average an additional sacrifice is needed for their objectives.

- Being sacrificed grants you a permanent phobia of the supernatural.
Phobia of the supernatural has been expanded to cover heretic items and
mobs.

- The equation for offhand damage of blade heretics was tweaked. Actual
result unchanged, it's just more resilient to future changes now.

- Touch spells were refactored a bit, and overall expanded to be easier
to use

- Charged spells were added, and charged beam spells. Tesla blast uses
this.

- Cone spells were refactored to be easier to setup.

- Jaunting will now hide your runechat when it triggers, to make it less
easy to follow.

- Heretic Ghouls now take less stamina damage based on how low their
health pool is.

- Emote based spells now require hands to be unblocked to be cast, like
mime spells.
- Yes this gets rid of handcuffed invisible walls... Not 100% on this,
but I figured it's good for consistency? Open to discussion

## Why It's Good For The Game

A lotta feedback has passed through about heretic and it's time to
address some of it

- Problem: Not enough cool flash spells. Makes Focus not worth it. 
   - Solution: Adds some more spells to encourage focus use. 

- Problem: Sacrifice targets being too willing or not harmed enough
   - Solution: A permanent trauma. 

- Problem: Not enough ways to power up.
- Solution: Adding more influences around, though I think there should
be more variety in knowledge rituals as well.

- Problem: Ash Passage sucks
   - Solution: Makes it a smidge better to stay hidden with it.

- Problem: Heretic Ghouls get one hit by batons
- Solution: Stamina modifier should put them on par with unmodified
humans.

## Changelog

🆑 Melbert
add: Added five new heretic spells, one for each path. They come after
the Ritual of Knowledge.
add: Cone of Cold, for Void heretics. Shoots out a freezing chill in a
cone which deal damage and freezes.
add: Flesh Surgery for Flesh heretics. A touch spell which can either
heal minions or be used on mobs to extract organs without surgery.
add: Volcano Blast for Ash heretics. A beam spell, like Tesla Blast,
which fires out a beam of fire that bounces between people.
add: Realignment for Blade heretics. Fleshmend, but for stuns and
stamina damage. Makes you a pacifist, but rapidly regenerates stamina.
add: Rust Construction for Rust heretics. Places a wall of rust on the
target rusted flooring. Can even be used to ascend z-levels!
balance: Nerfed the cooldown of Cleave slightly, buffed the cooldown of
Lesser Cleave slightly.
balance: Slightly more influences will spawn on the station per heretic.
balance: Heretics require an additional sacrifice on average for
ascension, but are given a fifth sacrifice target (randomly selected).
balance: Being sacrificed by a heretic now gives you a permanent phobia
of spooky things, including heretic mobs and items.
balance: Heretic ghouls now take reduced stamina damage, depending on
how small their health pool is.
balance: Using Jaunts will conceal your runechat for their duration. 
balance: Spells which require emoting (Mime spells) require your hands
not be blocked to use.
refactor: Touch Spells were improved a bit. Added some new template
spells - Charged spells, and Charged beam spells.
fix: Fixes a runtime from losing heretic.
/🆑
2022-11-21 21:30:46 -08:00
ShizCalev
9dab26371c Throws a bunch of parenthesis around to ensure dear Aunt Sally is always properly excused. (#71281)
Similar vein to #37116

This is supposed to be standard, yet here we are.

SHOULDN'T change anything, but there's likely something out there that's
bound to behave different because of it.


These were done manually, regex to find things that MIGHT need to be
corrected;
`^#define.+\+((?!\)).)*$`
`^#define.+-((?!\)).)*$`
`^#define.+\*((?!\)).)*$`
`^#define.+\/((?!\)).)*$` (yeah that's a lot of stuff.)
`^#define.+%((?!\)).)*$`
`^#define.+SECONDS((?!\)).)*$`
`^#define.+MINUTES((?!\)).)*$`
2022-11-21 20:53:06 -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
LemonInTheDark
a625fc8038 Cleans up the fallout from plane cube (#70235)
* Cleans up the fallout from plane cube

Alright.
Makes cleaning bubbles respect planes
Adds support for updating overlays on move, fixing an issue with pointing at items
Adds better error messages for failing to provide args for mutable_appearance()
Fixes a bug where string overlays were not respecting insertion order

* Adds documentation for offset spokesman and offset_const

* Better stack trace

* Removes some redundant uses of cached MAs

At this scale, attempting to cache MAs like this has 0 impact on anything
And just makes things more messy then they need to be

* ensures fullscreen objects START offset, so things are always proper

* ensures chatmessages always have the right offset

* fixes compile

* whoops, the above lighting plane should actually be ABOVE the lighting plane

* fixes compile, also cleans up the fire overlay a tad

* Adds a unit test for plane masters that are shrunk by multiz being double shrunk

This is slightly hacky because of how I'm handing the plane master
group, but it's not THAT bad, and gives me some real good coverage

* Properly targets the seethrough plane at the game world plate. This fixes unit tests, and also just makes more sense

* whoops

* oh

* adds datum support for allocate(), cleans up a harddel from testing

* Makes camera chunks index at 1, and also makes them support non powers of two sizes, since that was unneeded

* fixes runtime in allocate
2022-10-20 09:00:02 +13:00
ShizCalev
66ce1fffe2 Fixes negative value being passed to runechat fade animation timer (#70531) 2022-10-19 00:49:58 -07:00
Kylerace
53c93c9025 Quickie runechat op (#69137)
reintroduces the intermittent queuing behavior found in #65791 since i can actually recover that part. now after MeasureText() puts us in the player input portion of the tick it will queue a callback for the next tick to resume chat message creation

generate_image() is a highly overtiming proc, now its less so
2022-10-18 02:12:31 +00:00
LemonInTheDark
23bfdec8f4 Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) (#69115)
About The Pull Request

I've reworked multiz. This was done because our current implementation of multiz flattens planes down into just the openspace plane. This breaks any effects we attach to plane masters (including lighting), but it also totally kills the SIDE_MAP map format, which we NEED for wallening (A major 3/4ths resprite of all wall and wall adjacent things, making them more then one tile high. Without sidemap we would be unable to display things both in from of and behind objects on map. Stupid.)

This required MASSIVE changes. Both to all uses of the plane var for reasons I'll discuss later, and to a ton of different systems that interact with rendering.

I'll do my best to keep this compact, but there's only so much I can do. Sorry brother.
Core idea

OK: first thing.
vis_contents as it works now squishes the planes of everything inside it down into the plane of the vis_loc.
This is bad. But how to do better?

It's trivially easy to make copies of our existing plane masters but offset, and relay them to the bottom of the plane above. Not a problem. The issue is how to get the actual atoms on the map to "land" on them properly.

We could use FLOAT_PLANE to offset planes based off how they're being seen, in theory this would allow us to create lens for how objects are viewed.
But that's not a stable thing to do, because properly "landing" a plane on a desired plane master would require taking into account every bit of how it's being seen, would inherently break this effect.

Ok so we need to manually edit planes based off "z layer" (IE: what layer of a z stack are you on).

That's the key conceit of this pr. Implementing the plane cube, and ensuring planes are always offset properly.
Everything else is just gravy.
About the Plane Cube

Each plane master (except ones that opt out) is copied down by some constant value equal to the max absolute change between the first and the last plane.
We do this based off the max z stack size detected by SSmapping. This is also where updates come from, and where all our updating logic will live.

As mentioned, plane masters can choose to opt out of being mirrored down. In this case, anything that interacts with them assuming that they'll be offset will instead just get back the valid plane value. This works for render targets too, since I had to work them into the system as well.

Plane masters can also be temporarily hidden from the client's screen. This is done as an attempt at optimization, and applies to anything used in niche cases, or planes only used if there's a z layer below you.
About Plane Master Groups

BYOND supports having different "maps" on screen at once (IE: groups of items/turfs/etc)
Plane masters cannot cover 2 maps at once, since their location is determined by their screen_loc.
So we need to maintain a mirror of each plane for every map we have open.

This was quite messy, so I've refactored it (and maps too) to be a bit more modular.

Rather then storing a list of plane masters, we store a list of plane master group datums.
Each datum is in charge of the plane masters for its particular map, both creating them, and managing them.

Like I mentioned, I also refactored map views. Adding a new mapview is now as simple as newing a /atom/movable/screen/map_view, calling generate_view with the appropriate map id, setting things you want to display in its vis_contents, and then calling display_to on it, passing in the mob to show ourselves to.

Much better then the hardcoded pattern we used to use. So much duplicated code man.

Oh and plane master controllers, that system we have that allows for applying filters to sets of plane masters? I've made it use lookups on plane master groups now, rather then hanging references to all impacted planes. This makes logic easier, and prevents the need to manage references and update the controllers.

image

In addition, I've added a debug ui for plane masters.
It allows you to view all of your own plane masters and short descriptions of what they do, alongside tools for editing them and their relays.

It ALSO supports editing someone elses plane masters, AND it supports (in a very fragile and incomplete manner) viewing literally through someone else's eyes, including their plane masters. This is very useful, because it means you can debug "hey my X is yorked" issues yourself, on live.

In order to accomplish this I have needed to add setters for an ungodly amount of visual impacting vars. Sight flags, eye, see_invis, see_in_dark, etc.

It also comes with an info dump about the ui, and plane masters/relays in general.

Sort of on that note. I've documented everything I know that's niche/useful about our visual effects and rendering system. My hope is this will serve to bring people up to speed on what can be done more quickly, alongside making my sin here less horrible.
See https://github.com/LemonInTheDark/tgstation/blob/multiz-hell/.github/guides/VISUALS.md.
"Landing" planes

Ok so I've explained the backend, but how do we actually land planes properly?
Most of the time this is really simple. When a plane var is set, we need to provide some spokesperson for the appearance's z level. We can use this to derive their z layer, and thus what offset to use.

This is just a lot of gruntwork, but it's occasionally more complex.
Sometimes we need to cache a list of z layer -> effect, and then use that.
Also a LOT of updating on z move. So much z move shit.

Oh. and in order to make byond darkness work properly, I needed to add SEE_BLACKNESS to all sight flags.
This draws darkness to plane 0, which means I'm able to relay it around and draw it on different z layers as is possible. fun darkness ripple effects incoming someday

I also need to update mob overlays on move.
I do this by realiizing their appearances, mutating their plane, and then readding the overlay in the correct order.

The cost of this is currently 3N. I'm convinced this could be improved, but I've not got to it yet.
It can also occasionally cause overlays to corrupt. This is fixed by laying a protective ward of overlays.Copy in the sand, but that spell makes the compiler confused, so I'll have to bully lummy about fixing it at some point.
Behavior changes

We've had to give up on the already broken gateway "see through" effect. Won't work without managing gateway plane masters or something stupid. Not worth it.
So instead we display the other side as a ui element. It's worse, but not that bad.

Because vis_contents no longer flattens planes (most of the time), some uses of it now have interesting behavior.
The main thing that comes to mind is alert popups that display mobs. They can impact the lighting plane.
I don't really care, but it should be fixable, I think, given elbow grease.

Ah and I've cleaned up layers and plane defines to make them a bit easier to read/reason about, at least I think.
Why It's Good For The Game
<visual candy>

Fixes #65800
Fixes #68461
Changelog

cl
refactor: Refactored... well a lot really. Map views, anything to do with planes, multiz, a shit ton of rendering stuff. Basically if you see anything off visually report it
admin: VV a mob, and hit View/Edit Planes in the dropdown to steal their view, and modify it as you like. You can do the same to yourself using the Edit/Debug Planes verb
/cl
2022-09-27 20:11:04 +13:00
LemonInTheDark
59285861dd Refactors admin PMs to be hopefully more resilient (#68344)
* Begins refactoring admin pms, with a focus on runtime safety and ease of understanding

There's more I want to do here, mostly with spans and cleaning up sone
logic flow to be easier to understand

The primary thrust of it is making explicit any assumptions we make about values
This is important because this is sensitive code, and runtimes are not acceptable, since they both leak information and could lead to dropped ahelps, which is almost worse.

I'm also splitting the proc up into subsections, in an attempt to make it easier to reason about and work with
As a side effect of this, some operations need to be done more then once to avoid potential debugger escalation.

Related to this, I'm also no longer directly passing around client references through the procs. I instead pass the result of a pretty basic proc into each, to avoid issues with sleeping and such.

Oh, and I fixed a bug that made it impossible to reply to remote ahelp
responses. I hate this place.

* Converts all uses of the linkify span to a macro. One of these doesn't have a closing span, not sure if that's a bug or a feature

* Cleans up more logic embedded inside data, since this is critical code

Changes the backup for replying to someone who logs out, instead of
using the first person to send something to the ticket as our backup, we
use the recipient's ckey.

* some cleanup

* Converts a few more things over to the pattern

Reorganizes and deocuments sends_adminpm_message to be less hard to
track/read

* Cleans up a hanging proc that needed filtering

* Does a passthrough over tgs, makes stealthmin keys actually unique

* cleanup, screed at the top of the file

* cleanup, comments, etc

* Thanks trash, I can in fact not spell

* ok yeah I really can't spell

* updated comment to explain how code works

* messsage -> message spellcheck

* Nullchecking prevention

if for whatever reason someone in the future adds code that lummox says can sneakily allow for Logout() to execute between this and the last time client was checked, this could potentially runtime without nullchecking

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-08-01 20:58:15 -07:00
Aziz Chynaliev
811abc15f9 Refactor: make SSrunechat to be subsystem of SStimer (#64366) 2022-02-11 12:22:43 -08:00
ghost sheep
f03dd6b8a2 Fix runechat height-offset only reading your own offset value (#64507)
#63848 reads owner and not target
2022-01-29 15:05:47 +00:00
MrMelbert
29b6d829cf Fixes balloon alerts sourced on turfs (heavy rain edition) (#64472)
Balloon alerts sourced from turfs will now properly only show on one turf.
get_atom_on_turf() will now CRASH() if passed a turf instead of an atom/movable. I look through all uses and made sure any place that may send a turf won't, but it SHOULD be fine.
2022-01-29 02:37:00 -08:00
ghost sheep
3c0f7f2a5c chatmessage.dm offset adjustment (#63848)
changes the pixel_y and pixel_x of a 'message' to maptext_width and maptext_height instead of bound_width and bound_height.
2022-01-07 03:32:37 -08:00
Ryll Ryll
6c6d8307b8 Ports text emphasis from TGMC (who ported it from Citadel) (#61543) 2021-09-19 03:11:34 -07:00
Mothblocks
5a4c87a9fc tgui Preferences Menu + total rewrite of the preferences backend (#61313)
About The Pull Request

Rewrites the entire preferences menu in tgui. Rewrites the entire backend to be built upon datumized preferences, rather than constant additions to the preferences base datum.

Splits game preferences into its own window.

Antagonists are now split into their individual rulesets. You can now be a roundstart heretic without signing up for latejoin heretic, as an example.

This iteration matches parity, and provides very little new functionality, but adding anything new will be much easier.

Fixes #60823
Fixes #28907
Fixes #44887
Fixes #59912
Fixes #58458
Fixes #59181
Major TODOs

Quirk icons, from @Fikou (with some slight adjustments from me)
Lore text, from @EOBGames (4/6, need moths and then ethereal lore from @AMonkeyThatCodes)
Heavy documentation on how one would add new preferences, species, jobs, etc

    A lot of specialized testing so that people's real data don't get corrupted

Changelog

cl Mothblocks, Floyd on lots of the design
refactor: The preferences menu has been completely rewritten in tgui.
refactor: The "Stop Sounds" verb has been moved to OOC.
/cl
2021-09-15 10:11:11 +12:00
Wayland-Smithy
0d1ef29662 Drastic Lag Mitigation Subsystem: SSlag_switch (#59717)
Requested by oranges and inspired by the upcoming event. A new subsyetem, non-processing (for now), aimed at providing some toggle switches that can be flipped as a last ditch effort to save some CPU cycles by sacrificing some non-critical mechanics. Below you can see each individual toggle.

Screenshot of the admin panel:
image
Surely there are more opportunities for toggles I missed, but adding new ones is not very difficult at all.
Why It's Good For The Game

Better performance during extreme pop, I hope.
Changelog

cl
code: Introduces the Lag Switch subsystem for when a smoother experience is worth trading a few bells and whistles for. Performance enhancement measures can be togged by admins with the Show Lag Switches admin verb or enabled automatically at a pop amount set via config.
config: Added a new config var: number/auto_lag_switch_pop
2021-07-08 11:02:52 +12:00
Mothblocks
a0ad3c7c03 Balloon alerts - Text for minor actions w/o other feedback (#59130)
Currently only applies to beakers changing amounts as a proof of concept of an action that we can't really provide any non-text feedback on, as opposed to something you could have different sounds for.

Inspired by SS14.
Why It's Good For The Game

In the right place, balloon alerts will let you keep your eyes on the game itself, rather than constantly looking at the chat. This is especially important when chat messages will collapse into each other. This is in most cases warranted, but can make other cases (such as changing beaker amounts) confusing.
Changelog

cl
qol: Changing a reagent container's transfer amount will now give you feedback in the form of text on the container itself.
/cl
2021-05-20 22:44:38 +12:00
Celotajs
991b5f074a Tidy HTML folder (#58761)
This PR aims to make the HTML folder a little more organized, as well as remove a few unused files.
Why It's Good For The Game

Doesn't change anything for the player, however makes the files more organized.
2021-05-11 09:35:57 +12:00
Rob Bailey
292b217911 Layer overhaul (#57915)
## About The Pull Request
Changes up some layer and plane defines for no particular reason lol

## Why It's Good For The Game
Planes actually override layers, and layers control ordering within planes. A lot of the usage of plane and layer was wholly unnecessary. This refactor helps future maintainability while also being needed staging for _future features._
2021-03-29 09:51:44 -04:00
Qustinnus
ef80ed1935 Addiction rework (#56923)
Co-authored-by: Krysonism <49783092+Krysonism@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-02-16 18:20:16 -08: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
Jared-Fogle
7d3fd4355f Everything that uses maptext now uses the class that makes it actually readable (#55420)
Adds a MAPTEXT macro that wraps the given text in the maptext class, the thing we use for Runechat to make it so you can actually read it. Everything that sets maptext now uses this.
2020-12-10 23:25:46 +00:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Jared-Fogle
5b9acbdbb5 Add language icon to runechat (#54318)
Runechat will now show what language you're speaking in where appropriate.
2020-10-25 03:11:17 -03:00
Azarak
0e27753c54 Adds a runechat plane to fix the issues related to the chat messages (#54522)
Previously your chat messages would be obstructed by the blackness of blocked turfs, aswell as dark lighting and some other effects. This fixes that
It still has backdrop ambient occlusion like it used to.
2020-10-22 13:13:48 -03:00
NightRed
14572df071 Runechat fixes spans in messages (#53809)
Prevents spans from showing up in runechat, this can happen from items like the recorder and how it stores messages.

Fixes #53799
2020-09-18 22:06:21 -04:00
nemvar
dc30c6e9a5 Merge pull request #52959 from bobbahbrown/runechat-changes
Adds Time-Based Layering to Runechat Messages + Refactoring
2020-08-21 11:40:56 +02:00
Jared-Fogle
45c14f6330 Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)
Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl
2020-08-20 09:11:28 +12:00
bobbahbrown
26a16979d2 looks good chief 2020-08-15 13:46:59 -03:00
LemonInTheDark
14f5d2bd3c Changes the object runechat applys to from the thing that said something to the thing sitting on the turf the thing that said something is in (#52738)
Changes the object runechat text is overlayed onto from the talker, to the closest thing to the turf the talker is in.
This means if someone is talking in a locker, you can see it. Ditto for radios in people's packs.
2020-08-11 20:07:39 -03:00
Bobbahbrown
6510fe4d6e Adds Runechat Subsystem - Deprecates Use of Timers for Runechat (#52425)
* first pass

* one wacky dot

* documentation

* we're the garbage man now

* doc update

* couple of bugs never hurt nobody
2020-07-25 15:57:07 +02:00
L
9ee2907a68 runechat emotes 2020-07-19 22:11:44 -03:00
LemonInTheDark
d3f9b70c0f Adds a message modification packet to saycode to allow for unordered parsing of operator chars, like ;, #, :, or % (#51790) 2020-07-18 18:18:23 +02:00
Bobbahbrown
af67cbf66e Fixes Null Reference + Qdel Issue in Runechat (#50830)
* runtimes bye bye

* rohesie wants it this way

* oranges fixies

* more rohesie suggestions

* cleanies

* on parent qdel moment
2020-05-02 21:23:20 -03:00
Bobbahbrown
6578479184 [READY] Runechat: 'Runescape-like' Chat Message Overlays (It's back!) (#50608)
* first-version

* let's do those recommendations first

* color moment

* reorganization, prefs

* certified layer moment

* virtual speakers BEGONNE

* remove naughty bits, better sizing

* gimme the message mode

* rename that pesky pref and hide chat bubbles

* exponential decay moment

* async moment

* fixes

* fixes

* the players have decided they don't want to hear themselves on radio

* Fix bug with holograms incorrectly rendering messages

* rohesie's suggestion

* Color tweaks

* hallucinating now shows message properly

* pref moment

* updates

* rohesie's suggestions

* fix moment number 5

* less smelly more epic

* unfix the fixes and refix them

* a conscious change

* return of the prefs
2020-04-25 15:48:10 -03:00