Commit Graph

1245 Commits

Author SHA1 Message Date
magatsuchi
14e92f8a09 fixes pod hair tgui bug (#65695) 2022-03-28 10:17:16 -07:00
Tastyfish
5a1fa40c6b Fixes assistants going to medium priority when other job is selected (#65645) 2022-03-25 21:16:50 +08:00
dragomagol
a364ce1e68 [READY] Podperson hair (sprites by Shiets!) (#65205)
Adds 10+ plant based hairstyles for podpeople to use in the form of an external organ.
2022-03-22 16:48:18 -05:00
Mothblocks
0d4f2c1e47 Log filters better (#65539) 2022-03-22 17:08:29 -04:00
LemonInTheDark
dc20fa1c8c 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.
2022-03-10 23:11:28 -08:00
GoldenAlpharex
b9f6f0f6ba Restores the Persistent Scars preference (#65358)
* Restores the Persistant Scars preference

I also had to remove some raw READ_FILE()s because that was now useless. I was thus able to remove the persistent_scars variable from the prefs, as it is now a standalone preference.

* I forgor...
2022-03-10 20:02:04 -05:00
LemonInTheDark
1616fb2dcc Fit Viewport cleanup (#65225)
* Fit Viewport cleanup

Changes how Fit Viewport works slightly.
From what I understand, the verb was created with the goal of
eliminating the pixel hunting required to get rid of letterboxing.

This works fine for stretch to fit, but ever since the command bar got
nuked it's ended up creating a lot of blackspace for targeted zoom
modes.

I've changed how it decides on its optimal width slightly, if the client
has a non stretch to fit zoom mode, we use it, the world icon size and
the clients view size to figure out the exact width we want.

The bars on the left and right have been bugging me forever. Want them
gone.

In light of this, I'm also making changing your zoom amount attempt to
fit the viewport, if you have the pref enabled.

Oh and I'm trying something with auto fit viewport stuff.
It currently waits a second between view change and fitting. The comment
implies this is to avoid winget strangeness from Login calls. When I
blamed it, I found a commit from antruk talking about client dropping,
and this being a potential fix.

Unfortunately none wrote down what dropping means, and anturk's
forgotten.

I'm making the assumption that it's related to attempting the related
winsets before an inital login is over.
I might be wrong about this, if I am we'll know what went wrong I
suppose.

* Whoops, this needs to be invoke async

* Ensures client safety, autodocs code, adds proper cleanup
2022-03-05 22:06:29 -06:00
TemporalOroboros
f04511b637 Makes deadchat control inputs bypass automute. (#65195)
* Makes deadchat control inputs bypass automute.

It's slightly annoying when you get muted because you spent a minute trying to get the supermatter to move down.
2022-03-01 20:45:15 -08:00
MrMelbert
7bb2f0b96c De-hardcodes the species preference pages, deleting the species pages and generating them in constant data on the DM side instead (#65140) 2022-02-26 19:04:34 -08:00
Kyle Spier-Swenson
258618ca24 Make the repeated messages spam filter give a clearer warning (#65029)
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2022-02-20 15:24:29 -08:00
Mothblocks
c79c7d51a7 Contextual screentips -- Screentips now show you what items/objects can do (#64502)
Adds the foundational system for contextual screentips, which will show you what you can do with objects/items, including through context, such as what you are holding.

Provides several helper elements for most use cases, and applies it to a handful of common objects in order to show the full breadth of the system.

Changes screentips preference from on/off to on/off/only with context. Players who originally had it on off will have it migrated to only with context, though can re-disable it.
2022-02-15 17:29:43 -06:00
oranges
3e16d51b6b Put a comment explaining the client parent_type line (#64629)
I also took the opportunity to sketch out the description of the client
object itself
2022-02-05 02:46:59 -05:00
Jeremiah
9822510a41 Changes the default role preference (#64610)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-02-03 14:57:31 -08:00
LemonInTheDark
d253a3b767 Ensures that COMSIG_PARENT_QDELETING is sent before client Destroy. (#64536)
I want to let logic rely on this, so I'ma just ensure it can
2022-01-30 01:22:18 -08:00
san7890
510ce05992 Re-organizes the files in the root of the icons/ folder into it's substituents #6441
About The Pull Request

Same vein (although a lot larger than) #64118

On the tin. This moves them into their own folders and the paths were updated in the code.
Why It's Good For The Game

It's not exactly good visuals for stuff that can be placed elsewhere to just be sitting in the root. Organization is nice.
Changelog

cl
fix: For those of you into code, some stuff with the icon pathing has been shuffled around so it's no longer in the roots of the icon/ folder. If you aren't into code, that's fine too.
/cl
2022-01-29 20:45:17 +13:00
Kylerace
10ba80973b makes most statpanel tabs update a tenth or so as often (>= 4 seconds instead of 4 deciseconds) because theyre wastful of cpu (#63991)
makes most updating stat panel tabs update once every 4 seconds instead of 4 deciseconds, but switching tabs instantly updates statpanel data for you. also makes examining a turf make flat icons for a maximum of 10 contents instead of 30 because its ridiculous to call getFuckingFlatIcon() wrappers that many times. also makes SSfluids not have SS_TICKER and updates its wait accordingly because theres no reason for it to be a ticker subsystem

the mc tab updates every 2 seconds unless someone has the pref enabled to refresh it quickly because SOME UNILLUMINATED LEMONS absolutely must watch overtime spikes in real time

statpanels can take between 1-3% of masters total processing time at very high pop, which is silly considering theres no need for someone to know any of the data updated accurate to less than half of a second. The only reason it needed to update so fast was because it looked awful when switching tabs, which will only be updated on the next fire. now switching tabs updates data instantly so theres no need to update the rest of the data quickly.

also makes each stat tab update into its own proc so we can tell how much each tab update costs
2022-01-23 00:46:46 -08:00
LemonInTheDark
815bb8ae40 Adds a movement looping system, replaces inbuild procs and spacedrift with it (#62567)
* Adds a subsystem to handle automated directional movement, replaces all instances of walk_towards with it. Makes meteors and immovable rods not drift in space, and makes immovable rods more destructive. Note, I've opted not to use byond's method of moving towards something, which is effectively Move(src, get_step(src, get_dir(src, target))) as it's cringe and doesn't make a smooth line. I've replaced it with a autoupdating rise over run setup, read the code for more details

* woop forgot the subsystem

* Documentation, contributing.md entry, and some cleanup

* Makes the moveloop datum more oop friendly, sets us up for a lot of conversions

* Converts the curseblob and walk_away() to the subsystem

* Changes the default for override from FALSE to TRUE

* converts walk() over, still need to add a replacement proc for it, but we didn't actually have anything that used the raw proc

* converts the rest of walk_to() over, nearing the end now

* cleans up some errors

* Fully documents everything, fills in some missing movement types, uses the power of oop to make things cleaner, and typepaths longer

* Finishes the contributing.md stuff

* Done

* Fefaults -> Defaults, can you tell I wrote this at 1AM?

* resolves bubblegum issues

* Roh's suggestions

Co-authored-by: Rohesie <rohesie@gmail.com>

* Cleanup

* Hey lemon, did you know that Destroy() lives on datums? ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

* Converts over the discrepencies created in my absense

* HAHA FUCK YOU I PAY MY DUES

* Whoops lost some stuff in the merge

* Converts the system from seconds to deciseconds to make dealing with the api more sane

* Some stuff I missed

* Makes movement an inheritable subsystem type, splits the moveloop file into two, one for the subsystem, and one for the datums

* Makes a subsystem that handles directing movers out to other subsystems. It's a bit bad right now, but it's a
good first step. I think I'll move the move loop datum to a lazy var on mobs instead of an assoc list, don't
like lists.

Also makes the movement procs global, I'll move em to the /movement subsystem at some point or something like
that

* Converts the existing uses of the procs over to the new format

* Adds support for subsystem precedence, so a type of A can override type B.
General cleanup, still kinda in debug mode but it's getting better

* I'll admit I'm not too familiar with this, but I think it will work

* Adds starting logic so movement types "pausing" makes any sense
Redoes how waiting is handled to make it based on world.time directly. I don't remember why. I think it's better
this way.

Adds a drifting movement type, moves space drift over to it.
Needs severe work before it's ready, too much info stored and modified on the moving object, see comment
Starts work on making drifting smooth

* Moves almost all space drifting vars over to signals on the movement datum
Properly implements glide size stuff for both the subsystem and the loops. Space drift will be smoother now.
It's not perfect, but it'll work just fine for now

Adds a way to override a client'd mob's glide size mid move, uses it to make entering a spacedrift look right
Adds a way to delay a client move outside of just move_delay, meant to be used for long periods, and setup such
that it doesn't make inputs persist

Adds flags to movement loops, alongside MOVELOOP_OVERRIDE_CLIENT_CONTROL, which blocks client movements while
the loop is firing, and for it's visual delay after

This means you can't exit a space drift until you hit the actual wall. This feels a lot better

Some general logic stuff, move() will return true/false if it succeeded or failed
Adds a stop_loop() proc that's called when a move loop is no longer active

Suck my nuts

* Moves precedence to the loop instead of the subsystem

* Moves drifting into a component, this lets me explictly block input after the move loop ends, so people can't
move the moment they functionally move onto a new tile
This is a bit underdeveloped currently, but that's a problem for another day

Cleans up some uses of move procs, fixes runtimes in metoer and curseblob code
Adds signals for stopping/starting a move loop, sending one for destroy is redundant.
Moves existing event signals from the movable being acted on to the loop itself, makes more sense this way
Makes the move handler return the created loop up the chain so we can register to it
Fixes a logic error in loop contesting code that lead to loops never actually being removed from subsystems
because they didn't know they should be.
Properly changes lifetime from a time to stop, to functionally an amount of moves to complete before stopping
Adds some new signals for pre/post loop process. This is to better tie into components.

I decided I didn't like the idea of tying all functionality to the loops themselves
The loop decides functionally how to move, components or just tied in signals can decide when/when not to move
and can modify properties of the loop

Making a new loop for things like atmos drift, something I'm interested in tackling in the future, seemed silly

* Moves movement procs directly to the subsystem for better namespacing or whatever

* Moves movement packets onto /atom/movable, no longer need the debugging
I've decided to not just put their contents fully onto atom movable, since it makes debugging on live much
harder, can't sdql for them anymore.

Fixes a runtime in meteor code, properly this time
Fixes a logic error in stop_looping
Makes move manager NO_INIT, because well, it doesn't init

* Commits human sin, makes Recover() work properly for movement subsystems

* Fixes immovable rod orbits not always working, they were returning too early in moved and fucking up the var we use to track move count, and thus not sending a signal properly

* Reworks the curseblob to use signals more, and to not use override

* Missed this in the movement ss commit

* Removes override, makes having a higher or equal precedence take its place

* Updates documentation

* Cleans up some unused defines

* Nukes the unused flags option

* Whoops forgot to qdel check

* Removes an unused var I had for client move prevention before I started using a component

* Let's do this properly

* Modernizes meteor code to better match how explosions actually work currently

* Some more cleanup

* Cleans up effect code a little bit
Nukes the effect system's sleep loop, we use movement loops instead
As a part of that, instead of 1 timer per effect spawned, we react to loop failure and make it 1 timer per
effect system
This should reduce the amoumt of slowdown we see after mass lighting break

It's not everything, we're still making a timer per spark effect, but it cuts things down significantly

* Updates explosions to not sleep

* Adds support for modifying a loops delay post process, makes extinguisher code suck less then it does currently, nukes some more sleeps and timer loops

* Converts water tank resin over to move loops rather then sleeps, minor behavior change mind, the cooldown starts on fire rather then on land, but I think that makes more sense anyway

* compile and runtime fix

* Fixes some runtimes, cleans up some code, ensures feature parity when it comes to logging

* Prevents resin foam from space drifting

* Adds support for flags back into the system, I need it for reasons

* Updates move_towards to fix some bugs and resolve some inconsistent behavior, implements a flag that makes a loop's first move start instantly

* Fixes extinguishers not actually transfering any reagents

* Converts sprays to the new system. This does actually minorly change behavior, in that I've changed the order of spray actions from step -> sleep -> wash to step -> wash -> sleep, but I'm not terribly torn up about it because frankly I think it feels better

* Converts grav catapults over to the new system

* Converts trays over to moveloops

* Converts robot streaking to move loops, the other two coming soon

* Compile you won't. Also fixes a behavior issue with oil streaks

* Does directional step_to properly, cleans up the other two streaking types

* Converts step_trigger over, not that it's actually used anywhere. Changes how stoping a move works, you need to explicitly qdel, other the step is just considered to be ignored. This will make life easier later

* Adds a jps movement loop. It's a bit bloaty, id is stupid, but it'll work just fine

* Makes the system support passing in a datum that's just used as extra context for the move. The hope is this makes signalizing things less of an absolute headache

* Begins the conversion of ai movement datums to movement loops

* These two are reasonably simple, only weird thing I'm doing is A: Not allowing target hotswapping, which I hope none is doing, and B: passing the controller into the move loop as extra context so things work properly

* JPS is a bit more complex, partially because the old implementation was a bit weird. 2 major things. 1: I'm dropping what I think was a redundant behavior minimum distance check from the premove bit of logic, since I'm pretty sure it didn't do anything. 2, instead of just stoping the step in an error state like being pulled, we count it against our max move total

* Audit

* Moves most forced movement to the framework, adds some components to make things nicer

* Implements a flag that makes the loop always operate, regardless of precedence and without impacting any other loops

* Moves movement subsystems into the right folder

* Hey potato what if you had two procs that did the same thing and one called the other? Wow it's useless

* Merges slipping and force movement

* Converys conveyors over to the system. It's a bit fragile, but I think it's totally worth it to save the sleep loop

* Precedence -> Priority, cleans up some logic errors, makes priority highest to lowest instead of lowest to highest, straight cleans some code up

* Makes poly and bubbles ignore spacedrift, now that precedence actually functions properly. I'm likely missing cases of this, will deal with it later

* Depression, thy name is linter

* Fixes linter, and hopefully fixes the runtimes in ci too

* Wew

* Sets sprays and extinguishers back to legacy, since people do actually seem to have noticed

* Spelling errors my beloved

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

* More detail, moves return descriptions

* Converts transit tubes to the system?

* Adds the glide size modifier. Not honestly sure that this should be default, considering how crummy it makes things look for normal walking, but it's useful as hell here

* Adds a force move in dir template, actual support for fast initial steps (wtf old me) and a helper proc for setting delay

* Cleans up displosal code a bit, I thought about adding it to the system but it would functionally be just 'disposal loops'. Maybe I'll make a template subtype? not sure how I want to handle stuff like this

* Cleans up mob movement a bit

* Let's use the controller's visual delay

* Makes the resin thrower nicer, cries

* Cleans up some comments, replaces an implicit world.icon_size with an explicit one, fixes up a typecheck

* typecache instead of double istype. Can't do much about the !atom/movable, list would be too big I feel

* hhh

* bro wtf

* Documents the why of SS_TICKER

* Puts SSmovement on SS_TICKER. Lets us support tick steps

* Cleans up the charge action. Makes it use moveloops

* Fixes CI? kinda worried that this just got dropped

* Converts disposal pipes to move loops. They stutter a bit more then usual as of now, hoping that's a me thing, if it's not I'ma look at uping the priority of the base subsystem

* Moves the move subsystems off background, puts some on ssticker

* Prevents some things that shouldn't move in space from moving in space

* Documents the general form and usage of the system

* Virgin one vs chad once

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

* Removes unneeded check

* Moves appropriate movement subsystems into SS_BACKGROUND. Removes redundant SS_KEEP_TIMINGs

I do want the behavior of SS_TICKER, which at this point is tick based waits, and ignoring overtime when
calculating next fire.
Since honestly, these subsystems should ignore overtime in regards to next fire, the cost of moving A may be
nothing compared to the cost of moving B.

* Makes the MODULUS macro use floor. I knew our coders would never let me down, glad this exists, thanks ninja
Fixes teleporting caused by shitty round() behavior, adds a "you hit your target" case to homing loops

* Converts blood splatters to move loops, that'll do it

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-01-16 14:58:41 -08:00
John Willard
f16b8ad173 Fixes the mess between ROLE_REV and ROLE_REV_HEAD (#64068)
* Fixes the mess between ROLE_REV and ROLE_REV_HEAD

* Update code/modules/client/preferences/migrations/tgui_prefs_migration.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

* Update revolution.dm

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-01-14 22:21:52 -05:00
LemonInTheDark
f8aad14ae8 Harddel Fix Pack #42 + Better Live Reftracking Support (#63877)
* Hard Del Fixes, Ref Tracking Changes
2022-01-12 22:46:13 +01:00
Jeremiah
3e5b3eb9d0 Grammar fix: adminhelp (#63778)
* Admin help info

* readds irc

* to
2022-01-10 16:53:20 -08:00
DragonTrance
5cbd2deb51 Various suicide_act() things (#63808) 2022-01-09 15:48:47 -08:00
Fikou
0e8e884f24 Adds Anomalock Modules! (#63836)
* Adds anomaly modsuit modules, various fixes for other modsuit modules
2022-01-06 20:40:28 -06:00
Fikou
24082a2b4f Adds Maintenance MOD Modules! (#63791) 2022-01-04 15:47:21 -08:00
Mothblocks
af8902331d Amortize the cost of creating preference assets by caching them per git revision on production, reducing best case init times by ~20 seconds (#63503)
Preference asset creation, which while consistently created in early assets, can be requested at any time before then and often is, currently takes about 15 to 25 seconds to produce. Because of extremely hard to reproduce BYOND icon bugs, most of this is done on the same tick.

Lowering the cost of initialization itself is very tricky. Some of it we can theoretically optimize, such as creating humans for antagonists, others we can't, such as the raw cost of icon blending.

Furthermore, adding new icons later down the line would just increase this initialization time even more.

Instead of optimizing the asset creation, which is an uphill battle, this instead chooses to amortize the cost by caching preference assets created per git revision. This means that preference assets will be created, with their long delay, only once whenever the code changes.

This is done on a config, defaulting to on so that production needs no changes, as the whole point of these being made at runtime at all is that it keeps assets/art styles consistent, and PRs making subtle bugs that break preference generation in some way is not uncommon. On development, your git revision will stay the same until you commit, no matter what code changes you make.
2022-01-01 04:36:30 +00:00
Jeremiah
9c6fdb567d TGUI list conversions + bug fixes (#63354)
About The Pull Request

    Converts more inputs to TGUI. Possibly all user-facing input lists in the game.
    Did any surrounding text/number inputs as well
    Added null choice support so users can press cancel.
    Added some misc TGUI input fixes
    Fixed custom vendors while I was there

I refactored a lot of code while just poking around.
Primarily, usage of .len in files where I was already working on lists.
Some code was just awful - look at guardian.dm and its non use of early returns
If there are any disputes, I can revert it just fine, those changes are not integral to the PR.
Why It's Good For The Game

Fixes #63629
Fixes #63307
Fixes custom vendors /again/
Text input is more performant.
Part of a long series of TGUI conversion to make the game more visually appealing
Changelog

cl
refactor: The majority of user facing input lists have been converted to TGUI.
refactor: Tgui text inputs now scale with entered input.
fix: Many inputs now properly accept cancelling out of the menu.
fix: Fixes an edge case where users could not press enter on number inputs.
fix: Custom vendor bluescreen.
fix: You can now press ENTER on text inputs without an entry to cancel.
/cl
2021-12-31 11:07:28 +13:00
Mothblocks
58cf5d5641 Move MouseEntered to a queue, such that only the most recently hovered atom will be processed (#63567)
bout The Pull Request

MouseEntered currently fires multiple (multiple) times per frame, presumably over every atom that was hovered in some timeframe (though it appears to be much worse than that).

This makes MouseEntered only add to a queue, while a per-tick subsystem ensures only the most recent MouseEntered gets the screentip work done on it, through a generic on_mouse_enter proc call.

Contextual screen tips are coming and are going to make the screen tip code more computationally expensive, so slimming it down is going to be a must.

Would like to hear from @LemonInTheDark if this makes any obvious difference in time dilation, since it of course won't be as easy as just checking MouseEntered overtime anymore.
2021-12-27 13:02:21 +13:00
Kylerace
6207f14e80 creates SSspeech_controller so the MC can control say() execution (#63118)
makes say_verb() not execute immediately and instead put itself in the queue of the subsystem meant to process it: SSspeech_controller so that it executes at the start of the next tick during the MC's run instead of outside of it.

i considered making this part of #61422 (d005d76f0b) but this is good regardless of how that one pans out and i already overstuffed that one.

tldr the REAL cause of get_hearers_in_view() overtime is an effect of how byond schedules verbs within the tick.

when the server is overloaded there isnt much time between when SendMaps finishes and when the next tick was supposed to start, but verbs still need to be executed. So verbs will eat into the time the next tick should have started and the MC cant compensate for it at all since it uses byonds internal tick scheduler instead of our external tick scheduler.
2021-12-24 21:37:37 -08:00
Fikou
7b38dd4ff7 MODsuits (#59109) 2021-12-24 12:00:24 -08:00
AndrewL97
619acc1624 Fix skin tone sorting and refactor color procs (#63554)
* Remove superfluous hash from hex2rgb call
Add stack_trace to hex2rgb to catch future nonsense
2021-12-22 21:07:53 -08:00
John Willard
a1013422f7 Moves the suicided var to where its supposed to be (#63470)
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2021-12-19 12:24:36 -08:00
Kylerace
d005d76f0b Fixes Massive Radio Overtime, Implements a Spatial Grid System for Faster Searching Over Areas (#61422)
a month or two ago i realized that on master the reason why get_hearers_in_view() overtimes so much (ie one of our highest overtiming procs at highpop) is because when you transmit a radio signal over the common channel, it can take ~20 MILLISECONDS, which isnt good when 1. player verbs and commands usually execute after SendMaps processes for that tick, meaning they can execute AFTER the tick was supposed to start if master is overloaded and theres a lot of maptick 2. each of our server ticks are only 50 ms, so i started on optimizing this.

the main optimization was SSspatial_grid which allows searching through 15x15 spatial_grid_cell datums (one set for each z level) far faster than iterating over movables in view() to look for what you want. now all hearing sensitive movables in the 5x5 areas associated with each spatial_grid_cell datum are stored in the datum (so are client mobs). when you search for one of the stored "types" (hearable or client mob) in a radius around a center, it just needs to

    iterate over the cell datums in range
    add the content type you want from the datums to a list
    subtract contents that arent in range, then contents not in line of sight
    return the list

from benchmarks, this makes short range searches like what is used with radio code (it goes over every radio connected to a radio channel that can hear the signal then calls get_hearers_in_view() to search in the radios canhear_range which is at most 3) about 3-10 times faster depending on workload. the line of sight algorithm scales well with range but not very well if it has to check LOS to > 100 objects, which seems incredibly rare for this workload, the largest range any radio in the game searches through is only 3 tiles

the second optimization is to enforce complex setter vars for radios that removes them from the global radio list if they couldnt actually receive any radio transmissions from a given frequency in the first place.

the third optimization i did was massively reduce the number of hearables on the station by making hologram projectors not hear if dont have an active call/anything that would make them need hearing. so one of hte most common non player hearables that require view iteration to find is crossed out.

also implements a variation of an idea oranges had on how to speed up get_hearers_in_view() now that ive realized that view() cant be replicated by a raycasting algorithm. it distributes pregenerated abstract /mob/oranges_ear instances to all hearables in range such that theres at max one per turf and then iterates through only those mobs to take advantage of type-specific view() optimizations and just adds up the references in each one to create the list of hearing atoms, then puts the oranges_ear mobs back into nullspace. this is about 2x as fast as the get_hearers_in_view() on master

holy FUCK its fast. like really fucking fast. the only costly part of the radio transmission pipeline i dont touch is mob/living/Hear() which takes ~100 microseconds on live but searching through every radio in the world with get_hearers_in_radio_ranges() -> get_hearers_in_view() is much faster, as well as the filtering radios step

the spatial grid searching proc is about 36 microseconds/call at 10 range and 16 microseconds at 3 range in the captains office (relatively many hearables in view), the new get_hearers_in_view() was 4.16 times faster than get_hearers_in_view_old() at 10 range and 4.59 times faster at 3 range

SSspatial_grid could be used for a lot more things other than just radio and say code, i just didnt implement it. for example since the cells are datums you could get all cells in a radius then register for new objects entering them then activate when a player enters your radius. this is something that would require either very expensive view() calls or iterating over every player in the global list and calling get_dist() on them which isnt that expensive but is still worse than it needs to be

on normal get_hearers_in_view cost the new version that uses /mob/oranges_ear instances is about 2x faster than the old version, especially since the number of hearing sensitive movables has been brought down dramatically.

with get_hearers_in_view_oranges_ear() being the benchmark proc that implements this system and get_hearers_in_view() being a slightly optimized version of the version we have on master, get_hearers_in_view_as() being a more optimized version of the one we have on master, and get_hearers_in_LOS() being the raycasting version currently only used for radios because it cant replicate view()'s behavior perfectly.
2021-12-16 19:49:27 -08:00
Azarak
19329cd74a Fixes objects with bad planes and FoV bugs (#63412) 2021-12-15 16:59:56 -08:00
Azarak
680ca7d3b9 Field of View and Blindness improvements [bounty + upstream push] (#63312)
About The Pull Request

I have received exemption from the freeze by Oranges.
This PR was originally done for Skyrat-tg, as a bounty. Oranges took interest and Skyrat people approved taking it upstream so I did. (original PR Skyrat-SS13/Skyrat-tg#9912 )
Features:
This PR adds "field of view" mechanics, which by default don't do anything.
Once you pick up and wear a gas mask you'll notice a cone behind you.
That cone will hide all mobs, projectiles and projectile effects.
HOWEVER... hidden things in the cone (or for people who are blind or nearsighted) will play a visual effect.

The fov cone shadow density can be adjusted

Technicalities:
Originally a component, but by Watermelon's advice I have made this a datumized behaviour instead. (semi-component) This way it is faster, less memory use etc. Once again a component
People have native fov, which can be enabled by a config, by default it's off. (or by an admin verb)
People have fov traits, which add the fov impairings to you, gas masks do that now. All clothes have a support for possibly applying them.
Moves all things that should be hidden onto a new plane which is just above GAME_PLANE, that was we can efficiently filter them out of clients views.
Being dead or extending your eye view (xenobio console) will disable the FOV mask.

This PR was brought to you by Skyrat paying me aswell as rotational mathematics


Why It's Good For The Game

Oranges approves so it's good.
Changelog

cl
add: Gas Masks now limit your field of view
add: Added field of view mechanics. It's darkness can be tweaked by a pref
add: Blind, nearsighted and fov-limited people will now see sounds as visual effects.
/cl
2021-12-14 15:52:52 +13:00
tralezab
8b4dd8df6c fugitives now poll for a fugitive role, instead of being based on traitors (#63339)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-12-12 21:50:05 -08:00
LemonInTheDark
9b605b9cc0 Speeds up the preference menu, significantly. Adds object pooling, other stuff too (#63225)
* Removes like 50% of the cost of using the ui, it turns out that the storage component is fucking moronic. Likely significantly reduces the overtime of typecacheof

* Reduces the cost of reloading the dummy by ~50%
Turns out just initializing and deleting organs was like half the cost of reloading a default dummy.
It occured to me (Mothblocks) that we don't actually care about any organs we can't see or that don't effect visuals. So almost all of our organ loading can just be skipped.

This saves a significant chunk of cpu time, items next!

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2021-12-08 16:20:03 -08:00
Jeremiah
c1e2d5ae8f TGUI input box framework (#63190)
About The Pull Request

Creates the framework for two new TGUI input boxes that can be toggled via game prefs.
This does not convert any actual inputs to TGUI
This does not convert any tgui_list_inputs into being toggleable
Example pictures

Input on a hand labeler. This has a MAX_LENGTH set, so it can be invalidated. Cancel always returns null. Enter button submits, if valid.
text input
(OUTDATED) Multiline input on newscaster. Newer version fills the window with a section, like the others
multiline
Sheets from a stack
number input
Why It's Good For The Game

1
So I did...

    Much sleeker input boxes
    Result should be a in place swap for most occurrences of input
    Renders casting as text/num/null obsolete but still doable
    Input validation from both sides handled
    Prefs toggle if you don't like the look

Changelog

cl
add: TGUI input boxes are on the way! You can find new preferences in the menu. They will be on by default.
/cl
2021-12-09 09:47:07 +13:00
Mothblocks
0989ce2d6f Remove job .tsx files from preferences menu, use compiled data instead (#63200)
Removes every job .tsx file, and moves their necessary data over to the job datums themselves. This lowers the burden of both adding and removing jobs, and allows for jobs to be removed without touching any internal code (I'm specifically doing this for events)
2021-12-06 03:56:46 +02:00
tralezab
1d8693c26f Ethereals no longer get the "he" pronoun accidentally (#63221)
Character preferences now disregards the gender value if the species you're playing as is sexless
fixes #61491 (Ethereals being "He" instead of "They")
2021-12-05 01:43:00 -08:00
Seris02
77ea00b5d7 makes the gradient color options not show if no gradient is selected (#63169) 2021-12-02 13:49:45 -08:00
Ghom
79c8b3a8ca Gradients can now be applied to facial hair too. (#62996)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-11-25 22:44:06 -08:00
Mothblocks
395fb02f77 Fix vampire clans applying to everyone (#63036) 2021-11-23 19:19:30 -08:00
John Willard
59b4ac982b de-hardcodes moth antennae preference icons (#62888)
It just makes the preferences actually appear for downstreams who have unique moth preferences.
2021-11-23 13:36:48 +00:00
tralezab
623290915c Replaces Batform with Vampire houses (#62516)
Permissions for species change

image
About The Pull Request

Goodbye batform

Hello, new preference called vampire status. Outcast vampires act just like normal, Inoculated vampires join their department under a unified "vampire house name" everyone shares.

image

image

image
Why It's Good For The Game

I've heard people complain about batform for years now, if vampires aren't gone by next halloween we can at least enjoy making them far less griefy (ruining a lot of the fun of halloween as just a dumb grief holiday) and more roleplay oriented. I don't even know why vampires got a griefy spell when they already have their main mechanic encourage randomly attacking people and stealing their blood to stay alive
Changelog

cl
del: Batform is gone!
add: ...Replaced by vampire houses as a preference. Join your department as a vampire ménage!
/cl
2021-11-23 16:29:23 +13:00
Ghom
a45ea1cb0b Hair gradient preference no longer shows for species that don't have hair (#62950) 2021-11-22 14:17:32 -08:00
Watermelon914
fb8d95a2f5 Allows players to send more visible adminhelps when no admins are on, which'll definitely alert admins (#62711)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-20 03:06:50 -08:00
Timberpoes
1152f4f15a Exempts non-deadminned admins from all the chat filters so they can break the server rules and get banned if they want to. (#62944)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-11-19 23:18:11 -08:00
Thunder12345
0ab5f14870 Allows any character to use the body type setting regardless of gender (#62733)
Co-authored-by: Thunder12345 <stewart@critar.demon.co.uk>
Co-authored-by: Jared-Fogle <35135081+Mothblocks@users.noreply.github.com>
2021-11-12 23:16:29 -08:00
Timberpoes
1950da9f70 Removes cryostasis pods from the game pending creation of a proper design document (#62731)
* Baleeted

* Unmap

* Nudge the cabinet out of the way of the door
2021-11-12 15:57:22 -08:00
Mothblocks
061f47d0ee Antag HUDs will now animate if you have multiple antagonists, and will no longer clear on deconversion (#62718)
About The Pull Request

This is for the admin combo HUD. Players shouldn't notice any difference (except at roundend).
2021-11-09T16-27-26.mp4

Removes the ability to set custom antag HUDs for custom admin teams for complexity, though if there's a large enough demand I can try to bring it back in another PR.

Fixes #59767

TM candidate only so that I can make sure antags aren't getting leaked to people who shouldn't see them.
Changelog

cl
fix: Antag HUDs will no longer clear on deconversion if the player was another antag.
qol: Antag HUDs (as seen by admins and at the round end) will now animate between all antagonists, rather than just choosing the most latest.
/cl
2021-11-12 10:53:45 +13:00
GoldenAlpharex
d407799f4a The word filter will now be less scared of double or trailing spaces (#62703)
It kept on tripping because the RegEx expression was malformed due to an absence of words in to_join_on_whitespace_splits, which caused it to filter out spaces that were at the beginning or at the end of a message, or if there was two spaces one by the other.

Also prevents people from sending a message that's only spaces in OOC, because that's a little silly.
2021-11-10 18:26:53 +00:00