Commit Graph

1319 Commits

Author SHA1 Message Date
SkyratBot
7579176eed [MIRROR] Adds lazyloading to the asset subsystems [MDB IGNORE] (#15960)
* Adds lazyloading to the asset subsystems (#69454)

* Adds lazyloading to the asset subsystems

This currently applies only to spritesheets because of how monumentally
expensive they are.
If an asset is requested it will immediately be fully loaded, but
otherwise we slowly load them in with a separate subsystem.

This allows us to not hold up initialize with hair stuff. Saves roughly
33% (16 seconds with LOW_MEMORY_MODE) of initialize on my machine

My target is something closer to the 9 second init that had back in
2019, this is a good first step. Lets see how much more we can do yeah
lads?

Co-authored-by: san7890 <the@ san7890.com>

* Adds lazyloading to the asset subsystems

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2022-09-02 19:49:04 -04:00
SkyratBot
e7230e8b4a [MIRROR] Resolves is_banned_from headaches and lag (Speeds up roundstart significantly) [MDB IGNORE] (#16001)
* Resolves is_banned_from headaches and lag (Speeds up roundstart significantly) (#69376)

About The Pull Request

Just to be clear, when I refer to time here, I am not talking about cpu time. I'm talking about real time.
This doesn't significantly reduce the amount of work we do, it just removes a lot of the waiting around we need to do for db calls to finish.

Adds queuing support to sql bans, so if an ongoing ban retrieval query is active any successive ban retrieval attempts will wait for the active query to finish

This uses the number/blocking_query_timeout config option, I hope it's still valid

This system will allow us to precache ban info, in parallel (or in batches)
With this, we can avoid needing to setup all uses of is_banned_from to support parallelization or eat the cost of in-series database requests

Clients who join after initialize will now build a ban cache automatically

Those who join before init is done will be gathered by a batch query sent by a new subsystem, SSban_cache.

This means that any post initalize uses of is_banned_from are worst case by NATURE parallel (since the request is already sent, and we're just waiting for the response)

This saves a lot of headache for implementers (users) of the proc, and saves ~0.9 second from roundstart setup for each client (on /tg/station)

There's a lot of in series is_banned_from calls in there, and this nukes them. This should bring down roundstart join times significantly.

It's hard to say exactly how much, since some cases generate the ban cache at other times.
At base tho, we save about 0.9 seconds of real time per client off doing this stuff in parallel.
Why It's Good For The Game

    When I use percentages I'm speaking about cost per player

I don't like how slow roundstart feels, this kills about 66% of that. the rest is a lot of misc things. About 11% (it's actually 16%) is general mob placing which is hard to optimize. 22% is manifest generation, most of which is GetFlatIcons which REALLY do not need to be holding up the main thread of execution.

An additional 1 second is constant cost from a db query we make to tell the server we exist, which can be made async to avoid holding the proc chain.

That's it. I'm bullying someone into working on the manifest issue, so that should just leave 16% of mob placing, which is really not that bad compared to what we have now.
Changelog

cl
code: The time between the round starting and the game like, actually starting has been reduced by 66%
refactor: I've slightly changed how ban caches are generated, admins please let me know if anything goes fuckey
server: I'm using the blocking_query_timeout config. Make sure it's up to date and all.
/cl

* Resolves is_banned_from headaches and lag (Speeds up roundstart significantly)

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-09-01 22:11:40 -04:00
SkyratBot
4a9573b0fc [MIRROR] "What are you in for?" Prisoners can now select their capital offense. [MDB IGNORE] (#15918)
* "What are you in for?" Prisoners can now select their capital offense. (#69446)

New preference, like security department, but for prisoners. They can pick why they're in prison, and they'll get a record about it roundstart.
Classified and Other are for people who want to build their own background, that none of the options currently fit.

Current options:

    Abhorrent Criminal Negligence = Incompetently risked numerous lives.
    Attempted Development of Cloning = Attempted illegal research in the cloning sphere. Cloning, cloning construction, and cloning-related R&D was outlawed in 2560.
    Attempted Murder = Attempted to maliciously kill someone.
    Classified = Consult Legal.
    Corporate Espionage = Conducted espionage against Nanotrasen for commercial purposes.
    Counterfeiting = Engaged in widespread fraud.
    Enemy of the Corporation = Acted as or knowingly aided an enemy of Nanotrasen.
    Grand Sabotage = Engaged in malicious destructive actions seriously threatening Nanotrasen employees and or infrastructure.
    Grand Theft = Stole items of high value or sensitive nature.
    Identity Theft of High-Ranking Figure = Impersonated a high-ranking figure.
    Murder = Maliciously killed someone.
    Mutiny = Attempted to overthrow/subvert Chain of Command.
    Other = Consult Legal.
    Tampering of Artificial Intelligence = Uploaded malicious negligent or otherwise blacklisted directives to an Artificial Intelligence.
    Worship of Blacklisted Deities = Practiced worship of blacklisted deities.

* "What are you in for?" Prisoners can now select their capital offense.

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2022-08-29 19:08:39 -04:00
SkyratBot
1b7f17f107 [MIRROR] [IDB IGNORE] The Great Sweep: Moving dmis into subfolders (part 1) [MDB IGNORE] (#15801)
* [IDB IGNORE] The Great Sweep: Moving dmis into subfolders (part 1)

* Fixes all the conflicts and all of our modular files using core icon files with broken paths

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-08-28 15:11:04 -04:00
SkyratBot
a8c10d1659 [MIRROR] Converts a shitload of istypes to their more concise macros [MDB IGNORE] (#15702)
Converts a shitload of istypes to their more concise macros

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-27 16:23:44 -04:00
RimiNosha
0b65fd1b66 [NO GBP] Fix Languages Being Reset if You Load in Early (#15680)
* Account for the fact GLOB.language_datum_instances doesn't get populated until part way through the load process which I couldn't test because my dumb DD doesn't respond for like 2 minutes and getting to the 30s mark on the UI

* Account for the fact people do indeed use multiple characters, so it would be a good idea to fix languages on characters that are being switched to while avoiding saving more than is necessary to ensure the server isn't lagged to death should some smartass decide to switch between characters really fast to screw with the server

* Commit suggestion!

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Apply recommendations!

* Fix outdated languages being applied by default!

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-08-24 17:33:33 -04:00
SkyratBot
694f5eedda [MIRROR] It's 2 am and im having a manic episode so i fixed hair [MDB IGNORE] (#15687)
* It's 2 am and im having a manic episode so i fixed hair

* It's 2 am and im having a manic episode so i fixed hair

* removes `uses_mutcolor`

* Fixed the last bits that made this not compile.

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-19 23:41:36 -07:00
RimiNosha
86058af9b3 [NON-MODULAR] Actually Actually Fix Invisible Languages for Good! (#15647)
Actually actually fix invisible languages for good!
2022-08-15 19:43:37 -07:00
SkyratBot
48685b4356 [MIRROR] Replaces the mood component with a mood datum [MDB IGNORE] (#15549)
* Replaces the mood component with a mood datum

* Fixes merge conflicts and updates all of our mood events to use the new mood datums

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-12 14:58:14 -04:00
GoldenAlpharex
0226953c18 [FUCK] No more randomized humans (#15405)
No more randomized humans
2022-08-04 23:12:33 +00:00
RimiNosha
aec243d06c [MODULAR] Actually Fix Invisible Selected Languages (#15259)
* AAAAAAAAA

* Oops!

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-08-04 17:15:09 +01:00
SkyratBot
0139fea6d9 [MIRROR] Fixes click catcher failing to be reapplied onto the screen when show_hud is called [MDB IGNORE] (#15371)
* Fixes click catcher failing to be reapplied onto the screen when show_hud is called (#68853)

Done stuff

Co-authored-by: Watermelon914 <hidden@ hidden.com>

* Fixes click catcher failing to be reapplied onto the screen when show_hud is called

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <hidden@ hidden.com>
2022-08-04 15:48:56 +01:00
SkyratBot
d8da1153b7 [MIRROR] Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded [MDB IGNORE] (#15329)
* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded (#65589)

This pr goes through: /client/Click(), /client/Topic(), /mob/living/verb/resist(), /mob/verb/quick_equip(), /mob/verb/examinate(), and /mob/verb/mode() and makes them queue their functionality to a subsystem to execute in the next tick if the server is overloaded. To do this a new subsystem is made to handle most verbs called SSverb_manager, if the server is overloaded the verb queues itself in the subsystem and returns, then near the start of the next tick that verb is resumed with the provided callback. The verbs are called directly after SSinput, and the subsystem does not yield until its queue is completely finished.

The exception are clicks from player input since they are extremely important for the feeling of responsiveness. I considered not queuing them but theyre too expensive not to, suffering from a death of a thousand cuts performance wise from many many things in the process adding up. Instead clicks are executed at the very start of the next tick, as the first action that SSinput completes, before player movement is processed even.

A few months ago, before I died I was trying to figure out why games at midpop (40-50 people) had non zero and consistent time dilation without maptick being consistently above 28% (which is when the MC stops yielding for maptick if its overloaded). I found it out, started working on this pr, then promptly died. luckily im a bit less dead now

the current MC has a problem: the cost of verbs is completely and totally invisible to it, it cannot account for them. Why is this bad? because verbs are the last thing to execute in the tick, after the MC and SendMaps have finished executing.
tick diagram2
If the MC is overloaded and uses 100% of the time it allots itself this means that if SendMaps uses the amount its expected to take, verbs have at most 2% of the tick to execute in before they are overtiming and thus delaying the start of the next tick. This is bad, and im 99% sure this is the majority of our overtime.

Take Click() for example. Click isnt listed as a verb but since its called as a result of client commands its executed at the end of the tick like other verbs. in this random 80 pop sybil round profile i had saved on my computer sybil 80 pop (2).txt /client/Click() has an overtime of only 1.8 seconds, which isnt that bad. however it has a self cpu of 2.5 seconds meaning 1.8/2.5 = 72% of its time is overtiming, and it also is calling 80.2 seconds worth of total cpu, which means that more than 57.7 seconds of overtime is attributed to just /client/Click() executing at the very end of a tick. the reason why this isnt obvious is just because the verbs themselves typically dont have high enough self cpu to get high enough on the rankings of overtiming procs to be noticed, all of their overtime is distributed among a ton of procs they call in the chain.

Since i cant guarantee the MC resumes at the very start of the next tick due to other sleeping procs almost always resuming first: I time the duration between clicks being queued up for the next tick and when theyre actually executed. if it exceeds 20 milliseconds of added latency (less than one tenth the average human reaction time) clicks will execute immediately instead of queuing, this should make instances where a player can notice the added latency a vanishingly small minority of cases. still, this should be tm'd

* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-07-31 22:03:59 +00:00
SkyratBot
29229c6202 [MIRROR] Removes the Families gamemode [MDB IGNORE] (#14995)
* Removes the Families gamemode

* f

* Repathing! And new updates!

* some nights I stay up cashing in my bad luck

* Additional Fixes for the gang boys!~

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
2022-07-23 13:59:30 -04:00
Tom
a082f07669 [MODULARISATION AUDIT] Modularising some emissive bits (#15074)
* modularising emissives

* this is so me when i forgot to save changes to tgstation.dme!
2022-07-21 16:28:57 +01:00
SkyratBot
72bb9bc900 [MIRROR] Adds Preferences To Suppress Ghost Role Rolls [MDB IGNORE] (#14684)
* Adds Preferences To Suppress Ghost Role Rolls (#68102)

Hey there,

Ever since November of 2021, I've wanted something where I could simply not get any ghost roles while adminned. Some people also do not want to get any ghost rolls whatsoever when they play, for it is their personal preference. This PR seeks to resolve both of these issues with two new preferences.

The first preference will show up to everyone, Suppress All Ghost Rolls. It will return on the main proc that pops up the window, does the sound, all that. You will not hear a peep of a word out of your game. This is dangerous if you like playing as ghost roles, but if you abhor the thought of it... it's just for you.

The second preference is for admins. You can selectively suppress ghost roles while adminned. This is useful because when you're running an event or doing stuff where you need to offer multiple ghost roles (or you need to focus on a ticket and someone is spamming Xenobiology mob spawns), this is absolutely perfect for suppressing. Same return as the player option, but it checks to see if you are currently adminned via the client.holder variable. This is just because some admins (i'm some admins) don't want to turn in on just in case they forget to turn it off down the line because they actually play the game (lying).

There's probably a much cleaner way to do this code-wise, but I couldn't figure it out. Any help is appreciated. I tested it extensively on my local (even using a guest account), and everything seems to work rather nicely after about an hour of trial-and-error.
Why It's Good For The Game

Players who want to just alt-tab or maybe chill in deadchat (or have an extreme loathing of ghost roles) can just simply not get any of that. Admins who want to focus on tickets and not have windows pop up to interfere in good administrative work (and be the most annoying thing in the world) can also do that. Everyone is happy.
Changelog

cl
qol: There is now a new preference in Game Preferences, Suppress All Ghost Rolls. If you tick this preference, you will not get a singular window pop-up whenever a Ghost Role is available. Intended for the few who really do need it.
admin: Admins get another additional preference where Suppress All Ghost Roles only works while they are currently in an adminned state. They will still get ghost rolls normally when they are in a deadminned state.
/cl

* Adds Preferences To Suppress Ghost Role Rolls

Co-authored-by: san7890 <the@san7890.com>
2022-07-03 22:42:56 +01:00
SkyratBot
583a5e704a [MIRROR] Fullscreen, status bar hiding, chat input following the theme [MDB IGNORE] (#14555)
* Fullscreen, status bar hiding, chat input following the theme (#67987)

* Initial commit

* input is colored according to the theme

* removed unused setting

* Fullscreen, status bar hiding, chat input following the theme

Co-authored-by: Andrew <mt.forspam@gmail.com>
2022-06-27 02:15:25 +01:00
SkyratBot
7a653adfbb [MIRROR] TGUI Say: Upgrades chat input with modern features [MDB IGNORE] (#14375)
* TGUI Say: Upgrades chat input with modern features

* yes

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-06-17 02:12:42 +01:00
GoldenAlpharex
fdb3651095 Screenshot tests (#67679) (#14269)
Adds screenshot visual testing workflow and scripts.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-06-17 00:33:25 +01:00
SkyratBot
0a1f06a2d1 [MIRROR] This tail refactor turned into an organ refactor. Funny how that works. [MDB IGNORE] (#14017)
* This tail refactor turned into an organ refactor. Funny how that works.

* Firstly, fixing all the conflicts.

* Fixes all our maps (hopefully)

* Actually, this should fix pod people hair :)

* Almost everything is working, just two major things to fix

* Fixed a certain kind of external organ

* Cleaning up some more stuff

* Turned tail_cat into tail because why the fuck are they separate?

* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file

* Adds relevant_layers to organs to help with rendering

* Makes stored_feature_id also check mutant_bodyparts

* Fixes the icon_state names of ALL the tails (pain)

* Fixes wagging, gotta refactor most mutant bodyparts later on

* I Love Added Failures

* Fixed some organs that slipped through my searches

* This could possibly fix the CI for this?

* It doesn't look like it did fix it

* This will make it pass, even if it's ugly as sin.

* Fixed Felinids having a weird ghost tail

* Fixes instances of snouts and tails not being properly colored

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-06-11 23:20:16 -04:00
SkyratBot
d6595db199 [MIRROR] Fixes most eye color effects not working [MDB IGNORE] (#13939)
* Fixes most eye color effects not working (#67127)

* Fixes most eye color effects not working, adds eye refreshing to species' handle_body.

* Fixes most eye color effects not working

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2022-05-27 15:19:58 +01:00
SkyratBot
1d87e5270c [MIRROR] adds the "refresh TGUI" debug verb [MDB IGNORE] (#13933)
* adds the "refresh TGUI" debug verb (#67265)

About The Pull Request

adds the Refresh TGUI verb to the debug category OOC category, but it isn't locked behind any permissions. i'd put it in OOC, but.. eeeeeeh? there's not real much use for this verb other for debuggers. i put it in the OOC category
Why It's Good For The Game

debug purposes mostly

not player facing lole

* adds the "refresh TGUI" debug verb

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
2022-05-27 12:44:57 +01:00
SkyratBot
0cd6d5fc1b [MIRROR] Ports the player ticket panel from skyrat [MDB IGNORE] (#13765)
* Ports the player ticket panel from skyrat

* keeps admin ping and handle function

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-05-23 20:52:10 +01:00
SkyratBot
a079903ecb [MIRROR] refactors statpanel to use tgui API [MDB IGNORE] (#13646)
* refactors statpanel to use tgui API

* fix

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-05-20 15:02:16 +01:00
SkyratBot
cff12c987a [MIRROR] adds support for adminwho name links (using DB) [MDB IGNORE] (#13673)
* Add support for adminwho name links (using DB) (#66909)

I shamelessly farm GBP

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* adds support for adminwho name links (using DB)

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2022-05-20 14:48:01 +01:00
SkyratBot
1bc09326d0 [MIRROR] Splits eye color into two vars | Heterochromia Quirk [MDB IGNORE] (#13390)
* Splits eye color into two vars | Heterochromia Quirk

* yesyes

* eeee

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-05-09 01:00:12 +01:00
Useroth
cca7f8ee4c Some missed mirrors (#13415)
* Refactors firestacks into status effects (#66573)

This PR refactors firestacks into two status effects: fire_stacks, which behave like normal firestacks you have right now, and wet_stacks, which are your negative fire stacks right now. This allows for custom fires with custom behaviors and icons to be made.

Some fire related is moved away from species(what the fuck was it even doing there) into these as well.
Oh and I fixed the bug where monkeys on fire had a human fire overlay, why wasn't this fixed already, it's like ancient.

Also changed some related proc names to be snake_case like everything should be.

This allows for custom fire types with custom behaviours, like freezing freon fire or radioactive tritium fire. Removing vars from living and moving them to status effects for modularity is also good.
Nothing to argue about since there's nothing player-facing

* Hud Image Culling By Z Level: Theft edition (#65189)

* makes hud images only apply by z level

* makes some of the atom_hud procs have better names

* fixes warning with the hud_user list and adds better documentation

* better docs for hud_images

* removes TODOs

* docs for hud_list

* adds support for linked z levels so mobs can see lower ones

* fixes merge conflict and shittily makes only shocked airlocks get added

* adds support for setting images in the hud as active and inactive

* gets rid of unatomic spatial grid change

* maybe i should actually try COMPILING my changes

* fixes merge skew and makes it compile again

* fixes huds refusing to remove from users who changed z level

* improves z level and registration logic

* fixes antag huds not appearing

* Fixes antag huds not properly setting. We now use hud_list in init, so it needs to be set before the new call, not after. Not sure why the use of appearance key was split like this, but none else knows either so none can stop me

* Ensures that hiding a basic appearance also hides the atom's active list too

* Fixes antag huds going poof

Ensures that remove_atom_from_hud will return false if the passed atom
isn't managed by it

This fixes antag huds disappearing randomly, since they assumed that if
the parent call of remove_atom_from_hud returned true, we should delete
ourselves. This is a safe assumption for them to make, since they should
only ever have one atom.

Does kinda bork if we call remove_atom_from_hud in a way that is unsure
if the passed atom is actually in that list. We were forced into doing
this by how atom huds use the qdeleting signal.

* makes basic alternate_appearance's only update themselves when setting their hud image to active and makes them not add themselves to the global huds_by_category list

* fixes mistake with hud_users list being set non associatively (bad)

* as anything in bot path loops

* Fixes merge skew problems

* Makes bot paths non global

This way they can show themselves to only the bot that "owns" them, ya
feel me?

* Fixes huds not showing up sometimes, cleans up some code

Post Kapu's limb refactor, we were calling prepare_huds twice in a human
init call chain. What was happening was this:

call prepare_huds() // Human
I gained a new hud image
I set active hud icons to mirror it
call prepare_huds() // Living
I overwrote the new hud image
I attempted to set active hud icons, which failed because it assumes
this can never happen

*cries*

* Renames add_hud_to_atom to show_to

My hope is this will make understanding hud code a bit easier, by tying
the behavior to a "verb" more closely. Also renamed a few vars

* remove_hud_from_mob -> hide_from

* Nitpicks a few comments

* Whoops/fuck/shit/damn it all/hhhhhhhhhhhh

* Moves check down, improves stack trace a bit

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

* small touch-up

* this should do it

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: KylerAce <kylerlumpkin1@gmail.com>
2022-05-08 03:59:40 +01:00
SkyratBot
694a0740dc [MIRROR] Parallax but better: Smooth movement cleanup [MDB IGNORE] (#13414)
* Parallax but better: Smooth movement cleanup (#66567)

* Alright, so I'm optimizing parallax code so I can justify making it do a
bit more work

To that end, lets make the checks it does each process event based.
There's two. One is for a difference in view, which is an easy fix since
I added a view setter like a year back now.

The second is something planets do when you change your z level.
This gets more complicated, because we're "owned" by a client.
So the only real pattern we can use to hook into the client's mob's
movement is something like connect_loc_behalf.

So, I've made connect_mob_behalf. Fuck you.

This saves a proc call and some redundant logic

* Fixes random parallax stuttering

Ok so this is kinda a weird one but hear me out.

Parallax has this concept of "direction" that some areas use, mostly
the shuttle transit ones. Set when you move into a new area.
So of course it has a setter. If you pass it a direction that it doesn't
already have, it'll start up the movement animation, and disable normal
parallax for a bit to give it some time to get going.

This var is typically set to 0.

The problem is we were setting /area/space's direction to null in
shuttle movement code, because of a forgotten proc arg.

Null is of course different then 0, so this would trigger a halt in
parallax processing.

This causes a lot of strange stutters in parallax, mostly when you're
moving between nearspace and space. It looks really bad, and I'm a bit
suprised none noticed.

I've fixed it, and added a default arg to the setter to prevent this
class of issue in future. Things look a good bit nicer this way

* Adds animation back to parallax

Ok so like, I know this was removed and "none could tell" and whatever,
and in fairness this animation method is a bit crummy.

What we really want to do is eliminate "halts" and "jumps" in the
parallax moveemnt. So it should be smooth.

As it is on live now, this just isn't what happens, you get jumping
between offsets. Looks frankly, horrible. Especially on the station.

Just what I've done won't be enough however, because what we need to do
is match our parallax scroll speed with our current glide speed. I need
to figure out how to do this well, and I have a feeling it will involve
some system of managing glide sources.

Anyway for now the animation looks really nice for ghosts with default
(high) settings, since they share the same delay.

I've done some refactoring to how old animation code worked pre (4b04f9012d). Two major
changes tho.

First, instead of doing all the animate checks each time we loop over a
layer, we only do the layer dependant ones. This saves a good bit of
time.

Second, we animate movement on absolute layers too. They're staying in
the same position, but they still move on the screen, so we do the same
gental leaning. This has a very nice visual effect.

Oh and I cleaned up some of the code slightly.

* Parallax but better: Smooth movement cleanup

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-05-07 23:33:34 +01:00
SkyratBot
58b8cfa3cc Granular admin perms (#66368) (#13305)
* Granular admin perms

* Implement temporary user specific permissions menu

* Restore config

* Fix TESTING

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-05-04 10:29:55 +01:00
Ghom
d1143486fc [SEMI-MODULAR] Removes redundant genital toggles + splits up "Uses skintones" in mutiple prefs. (#12781)
* [SEMI-MODULAR] Removes redundant genital toggles + splits up "Uses skintones" in mutiple prefs.

* Tested and fixed, then tested again.

* linter, thank you.

* ops

* maintainer review and color prefs accessibility

* doc and defines

* wait no

* trailing newline
2022-04-26 02:03:27 +01:00
SkyratBot
b87c7279b0 [MIRROR] Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. [MDB IGNORE] (#13089)
* Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init. (#66473)

* Adds MC initialization stages. Earlier stages can fire while later ones init.
Removes TICK_LIMIT_MC_INIT config for barely doing anything to speed up init and being inconvenient to work with if fires and inits can happen at the same time.

* Adds MC initialization stages. Earlier stages can fire while later ones init. Fixes tgui chat reconnection banner showing during init.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2022-04-25 14:25:23 +01:00
magatsuchi
dc8adc2924 Modular Tablets: Converting PDAs to the NtOS System (SKYRAT VERSION) (#12920)
* hot-patch 1

* hot patch 2

* hot patch 3

* slight issue
2022-04-20 16:55:49 +01:00
Gandalf
ba7c15aee2 More fixes (#12702)
* wew

* Update preferences.dm

* Update logging.dm

* Update preferences.dm

* Update preferences.dm
2022-04-19 23:48:56 +01:00
SkyratBot
08ca58f0e3 [MIRROR] tgui-panel: Soft ping [MDB IGNORE] (#12904)
* tgui-panel: Soft ping

* ew

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-19 19:59:56 +01:00
GoldenAlpharex
4f19367b89 Fixing hemophages being literally unplayable (#12768) 2022-04-15 11:48:56 -07:00
GoldenAlpharex
fbf66a10d0 Fixed Veteran-Only species being selectable by non-Veterans (#12699) 2022-04-13 21:53:34 +01:00
SkyratBot
82528eb6d3 [MIRROR] Adds nightmare vision goggles to maintenance [MDB IGNORE] (#12683)
* Adds nightmare vision goggles to maintenance

* Update create_and_destroy.dm

* Update _glasses.dm

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-11 23:28:24 +01:00
SkyratBot
3916ea03de [MIRROR] Kapulimbs [MDB IGNORE] (#12497)
* Kapulimbs

* conflicts

* part one of fixes

* more fex

* ugh

* more fix

* eee

* e

* more fix

* Well it compiles, but we need to get digi legs working

* more fixes

* https://github.com/tgstation/tgstation/pull/65887

* https://github.com/tgstation/tgstation/pull/65904

* https://github.com/tgstation/tgstation/pull/65923

* more fix

* now uses dna specific icon overrides.

* species code no longer dictates what icon the limbs use

* digitigrade legs implemenation

* more fixes, species indexing, species bodyparts

* remaining mutant bois

* 0

* okay this work!

* IPC stuffs

* inv file uses

* optimisation and limb string rendering digitigrade stuff

* wew

* partial vox support

* bodymarkings are now stored on the bodypart

* limb key caching

* Update carbon_update_icons.dm

* Update carbon_update_icons.dm

* Moves our mutant variance to the new system and makes shoes squash.

* all legs do it

* https://github.com/tgstation/tgstation/pull/65918

* https://github.com/tgstation/tgstation/pull/65899

* https://github.com/tgstation/tgstation/pull/65990

* teshari bodytype

* them teshari's aren't humans

* bandaid for future proper teshari implementation

* Update vox_bodyparts.dm

* fixes chests and teshari implementation

* fixes

* fex

* Update mutant_zombie_bodyparts.dm

* oops

* Update synthetic_lizard_bodyparts.dm

* Update code/modules/mob/living/carbon/human/human_update_icons.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/human_update_icons.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/human_update_icons.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/modules/surgery/bodyparts/species_parts/ghoul_bodyparts.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/modules/surgery/bodyparts/species_parts/ghoul_bodyparts.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/modules/surgery/bodyparts/species_parts/ghoul_bodyparts.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/modules/surgery/bodyparts/species_parts/ghoul_bodyparts.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/species.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update scissors.dm

* wound stuff

* Update carbon_examine.dm

* more stuff

* Delete human_update_icons.dm

* begone thot

* https://github.com/tgstation/tgstation/pull/66065

* Update _external_organs.dm

Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-04-11 02:40:05 +01:00
Tastyfish
23e97de0e4 [NO GBP] revert revert [mirror] help (with fix) (#12527)
* Revert "Revert "[MIRROR] Moves help menu to end, fixes Hotkeys Help [MDB IGNORE] (#12425)" (#12479)"

This reverts commit 6d44a08156.

* capitalization fix for linux server
2022-04-05 06:21:42 +01:00
GoldenAlpharex
6d44a08156 Revert "[MIRROR] Moves help menu to end, fixes Hotkeys Help [MDB IGNORE] (#12425)" (#12479)
This reverts commit f85ee552da.
2022-04-04 11:20:36 +01:00
Zonespace
b995fbe31b Contractor Expansion 2 (#12311)
* weh!

* fuck you linter

* very important

* Update modular_skyrat/modules/contractor/code/datums/midround/event.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/modules/contractor/code/datums/midround/outfit.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* requested changes

* also this

* requested + cleanup

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-04-03 22:25:42 -04:00
SkyratBot
9c53a34072 [MIRROR] Removes some unused mob verbs + client vars [MDB IGNORE] (#12438)
* Removes some unused mob verbs + client vars (#65732)

* Removes an unused var from /client
`inprefs` isn't used anywhere, i checked to when it was added (~5 years
ago) and it wasn't even really used then. I think it used to be used to
track topic calls / slowdown some href issues but it isn't any more.
Byebye!!

* Removes some unused mob verbs + client var
`canface` and `east/west/north/southface` used to be used to set
direction but these are no longer used and are thus taking up
unnecessary space

* Removes some unused mob verbs + client vars

* Update pixel_shift.dm

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-01 01:52:26 +01:00
SkyratBot
f85ee552da [MIRROR] Moves help menu to end, fixes Hotkeys Help [MDB IGNORE] (#12425)
* Moves help menu to end, fixes Hotkeys Help

* Update tgui.dm

Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-01 01:40:24 +01:00
SkyratBot
cec72761ac [MIRROR] Action button refactor/rework: Enhanced Dragging [MDB IGNORE] (#12423)
* Action button refactor/rework: Enhanced Dragging

* PHEW

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-01 01:38:57 +01:00
SkyratBot
0fbcc3ae40 [MIRROR] fixes pod hair tgui bug [MDB IGNORE] (#12338)
* fixes pod hair tgui bug (#65695)

* fixes pod hair tgui bug

Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
2022-03-28 13:57:49 -04:00
SkyratBot
dba71eefb8 [MIRROR] Fixes assistants going to medium priority when other job is selected [MDB IGNORE] (#12270)
* Fixes assistants going to medium priority when other job is selected (#65645)

* Fixes assistants going to medium priority when other job is selected

Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-03-25 07:29:11 -07:00
SkyratBot
dd05433dde [MIRROR] [READY] Podperson hair (sprites by Shiets!) [MDB IGNORE] (#12235)
* [READY] Podperson hair (sprites by Shiets!)

* wew lad

* how'd i miss that?

Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
2022-03-23 22:45:00 -07:00
SkyratBot
fd91b9929b [MIRROR] Log filters better, including the message [MDB IGNORE] (#12233)
* Log filters better (#65539)

* Log filters better, including the message

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-03-22 20:47:13 -07:00
SkyratBot
36f7daf001 [MIRROR] De-hardcodes the species preference pages, deleting the species pages and generating them in constant data on the DM side instead [MDB IGNORE] (#11774)
* De-hardcodes the species preference pages, deleting the species pages and generating them in constant data on the DM side instead

* fc

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-03-13 21:24:04 +00:00
SkyratBot
e13638774a [MIRROR] Changes the default ghost lighting, makes it a preference [MDB IGNORE] (#12003)
* Changes the default ghost lighting, makes it a preference (#65352)

* Changes the default ghost lighting, makes it a preference

I think the way ghost lighting looks right now is really crummy.
It's dark enough you can see where the shadows should be, but it's just
bright enough for everything to look like dog poo

A lot of what makes the game look nice is the depth of the lighting
and if we just hide that for observers we're shooting ourselves in the
foot.

I'm also making it a game preference, so if someone wants to have bad
opinions they can easily.

* Changes the default ghost lighting, makes it a preference

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-03-11 12:23:26 -05:00