* Makes ridable not work if you cant hold the offhand
Because amount_equipped is 0, and because not being able to insert the riding_offhand only break's, rather than returns FALSE to cancel, it goes on to fireman carry you're not supposed to be able to carry, leading to situations where people are fireman carrying others and is completely unable to drop them.
* adds a block buckle to slime's traits too
* refactor it back to a single organ but with different eye vars
* nOt In A LoOp
* forgot emissive overlay
* remove old obscured var
* quirk
* fine we do it like this, PAIN
* add applying_preference paramter to is_accessible and check for it when applying
* update dummy on quirk change
* client might not exist if we are applying the preference, because unit tests
* unique icon
* lazy webedit review
* revert is_accessible refactor
* mild stupid
* change the way heterochromia is applied
* better handling
* Apply suggestions from code review
* add apply to human behaviour
* hopefully fix that which the merge hooks broke
* Update code/datums/quirks/neutral.dm
* Web commit for shame
* Update code/datums/quirks/neutral.dm
* Update code/datums/quirks/neutral.dm
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
* Update basic.dm
Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
About The Pull Request
Fixes#63868. Actual one liner fix for this one here. If this pr dies feel free to atomize this one.
AND it turns out to not be tim's fault.
Fixes#63548. But i really shouldnt say fixed. The original implementation was causing the invincible plating bug. When tim's refactor got in it instead relies on the element state, which was broken from the get go, removing the invincible plating bug which was in a sense "intended" its all messy man I hate this code. Thats why im removing the plating thing. Let the turf handle the turf change themselves this complicates things.
Mapped in glass floors have openspace (now baseturf bottom) as their baseturfs, while built ones have plating under them. Which doesnt make sense to be honest. Why would things be visible if a plating is under the glass. They are also crowbarrable on top of this, which to be fair is my main reasoning behind the PR.
To solve this, I am instead making glass floors replace the plating instead of building over it. This is made to be generalizable for every tile in game, as long as their initial baseturf is the same and the tile wants it to happen.
do after of three seconds is completely arbitrary. If any maint want it changed let me know.
Why It's Good For The Game
First one solves a bug
Second one makes more sense
And er, icebox is currently using the glass floors in sec, they can be crowbarred very easily. This might be a good idea from a gameplay perspective.
Changelog
cl
del: Removed adding glass floors to plating
balance: Allows you to replace plating with glass floors instead. 3 second timer.
del: Removed deconstructing the glass floors. No replacement for this one, use a rcd.
fix: Fixed metastation glassfloor spawning a weird turf when crowbarred.
/cl
* Life() Optimization Part 1: Organ order
It turns out organ code is really quite dumb. Wastes a lot of time.
I'm going to be doing what I can to optimize it in this branch.
To start with:
If we can ensure organs are sorted according to organ_process_order inside
internal_organs_slot
We can do away with a needless get_organ_slot call in handle_organs, and
avoid needing to iterate over 30 entries, one per possible organ slot,
instead iterating just the ones we have
This saves roughly 5% of life
* Organ Optimization Part 2: base on_life()
Organ on_life, despite not looking it, is a remarkably hot proc. Called
something close to 9 times for each human on the map, it's worth taking
care to clean it up.
As things currently stand, we do two dumb things.
The first is manually checking for organ failure each iteration.
We do this because we allow organ damage to be modified outside of the
applyOrganDamage proc, which also calls check_failing_thresholds.
There's no reason to do this, so I've gone through and removed all
instances of it
The second is calling applyOrganDamage no matter what, to "heal" the
organ. Even if it isn't damaged.
The fix for this is simple, just an if check.
This saves roughly 10% of pre changes Life() cost
* Blood cleanup beta version
Blood code is slightly more sane, but it calls get_part_bleed_rate a
lot, and does other checks that are the same so long as the bleed rate
never changes. This is reasonably expensive
So, I'm going to make it event driven, and cache the bleed rate. But to
do that, I need to be able to react to limb ownership changes, and well,
there's a few that don't use the existing setter. This commit fixes that
* Blood cleanup beta 2.0
I'm starting on the work to make bleed rate cached
Adds NO_BLEED to the signal registration of set_owner
This lets us generically react to it
Makes changing your bleedstacks into a proc we can hook into
Fully implements it
* Blood optimization beta 3.0
Hooks into embedding/embed details updating, this ensures the embed
aspect of bleed rate is properly accounted for
* Blood optimization beta 4.0
Hooks wounds into refresh_bleed_rate, adds a setter for blood flow to
support this
I feel like there are places where this would be useful, but I'm not
totally sure
Kinda wanted to ask ryll
* Blood optimization, the final countdown
Fully caches bleed_rate. Because I can do this, we only need to call update_part_wound_overlay when bleed rate updates
This saves 15%! of human life tick. Get owned
* Optimizes body_temperature_alerts
It turns out that clearing alerts and sending signals every process is
wasteful. There's no reason to do it unless last process was a problem
one
The change for that is quite easy, literally just a new var on human.
Saves 2% of human life tick.
Very nice for the amount of time I put into it
BTW, I have a feeling that most of the overhead of bodytemp is caused by
human body temperature being higher then room temperature. Not sure
what to do about this though
* Does something similar to disgust
Basically, don't continusly send signals if you have no disgust
It's rare enough that this is all the caching we really need to do
Saves roughly 1% of life tick. Right on the edge of not worth it
* Some cleanup to how mob fires handle their lighting, adds a check to liver coder
* Cleans up update_gravity slightly
It's very close to outside a measurable deviation faster, but I honestly
just did it to make it easier to read
* Fuck you
* Very minor organ optimization
Instead of using internal_organs_slot for our organ iteration,
we use it to produce a sorted internal_organs list.
This is barely worth it, ends up being 0.7% of life saved.
I only did it because it makes a semi noticable impact on our current
numbers.
* Revert "Very minor organ optimization"
It turns out mutating internal_organs is important sometimes
The usefulness of this change is small enough that I don't want to spend
more time on it
So back it goes into the dirt
This reverts commit 622bd34adb8d8a3d5f2763ac659446ef3362e3cd.
* Properly returns false in IgniteMob
* Adds a parent call to setBleedStacks
I like it, it's a good idea
* Refactor slurring + cultslur to be a status effect
* Refactors stutter to be a status effect
* Adds a VV helper and a setter
- also adds heretic slurring text
* Adjustments to the heretic slurring
* classified VV key correctly
* "Normal" -> "Drunk" slurring
* social anxiety fix
* Adjusments and an accidentally reverted fix
* comment
* Fixes drunk file + two other minor issues
* merge skew time
* comments
* Generalizes this proc for the future.
* Missed stuff
* Numbers adjusted the wrong direction
* missed a single one
* incorrect numbers
* changes add/remove to "adjust"
Fixes#65472 (The movement_turf_changer element allows creatures to step onto open space and fill them in )
This adds an openspace check for the movement_turf_changer element so that whatever mob is using it will fall through openspace properly.
I don't know what a moonicorn is but it sounds cool.
Refactors fish into proper paths.
Removes aquarium behaviour intermediary datums.
Moves fish functionality out of aquarium content component.
Fixes flopping animation resetting on dropping.
Simplifies everything. There should be no player facing changes.
The animate signal is kinda weak method of solving the animate queue issue but it seemed least intrusive to me.
Open to any better ideas.
* Makes the heretic worm use the blood walk element
It was using a custom proc for this, but we have an element just for
this.
* Update code/modules/mob/living/simple_animal/heretic_monsters.dm
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* dont need this'
* adds an extra arg the to the element to keep direction
* moves da eement
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Adds the component to bump mining turfs and removes the code under Bumped() that handled it.
Cuts down on copypasted code if somebody wants to add bump clicking to something else in future.
About The Pull Request
Simply converts all instances of soundkeys that use get_sfx from strings into defines.
E.g. "sparks" is now SFX_SPARKS
Why It's Good For The Game
It makes life a lot easier when you're looking for a sound effect. You just type SFX_ and you get suggestions in VSC. Plus, it looks better.
image
Changelog
Not player facing.
Allows blobs to destroy mineral turfs when necessary, such as when spawning on Ice Box.
Without this they face a distinct disadvantage against crew that can destroy mineral turfs with plasma cutters like a hot knife through butter to get a better angle on their core.
The fact they can't already seems like an oversight left over from when they would never normally encounter them due to spawning on space stations.
The bubble alerts provide a lot of feedback that was previously missing and saves taking your eyes off the game to look at warning messages in the chat.
The screen tips save you having to read the help screed to at least know what two of the shortcuts are.
Making off-station blobs lighter makes it immediately obvious which blobs count towards victory.
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.
makes dropkey deactivate device modules
fixes speed potion being fucky
fixes doubled up balloon alerts
makes some cell code better i think
makes the gps module open the gps tgui for you, instead of putting a gps in your hand
the loader suit can now hold mailbags
Reworks the mining modsuit.
The suit is no longer cold-proof (this can be mitigated by using module space for thermal regulators)
The suit fits less modules than standard suits, but cant burn in lava.
In suit storage it can carry ore bags, resonators and kinetic crushers.
It features a storage, gps, ore bag, drill, clamp and by default comes with a plasma core, being recharged with plasma ore rather than by power cell.
Features two new modules:
Ash Accretion, it gathers dust from basalt (or snow) you walk on to create a layer of ash around the suit, acting as armor and a speed up that quickly drains when you walk on other terrain.
Sphere Transform, turns you into a fast moving ball that can travel past lava, you cannot use your hands when in this form, but you can launch aoe mining bombs to attack or mine
* Move element to component, start UI, move assets into their own directory
* Complete UI
* Stop when another surgery is started
* Set your real zone since I forgot you actually need to start the surgery too
* Bring this back since I was just removing it as part of a cleanup for asset cache, but I can't prove it's not used anymore
* Remove unnecessary constructor I was using for something else
* Fix signal override
This removes code/__DEFINES/misc.dm and moves all the defines to either:
another existing define file
new define file
local .dm file if the define was only used in one file
I also deleted defines that were not being used and added documentation to all of the ones that were moved out of misc.dm
Why was this needed? People were basically using the misc.dm file as a dumpster to toss all their defines into that was creating one giant mess. The defines have been organized into their proper groups and files now.
Fixes#63770 (Objects on Lower Z level appearing on top Z level when under glass tiles)
This fixes some MultiZ issues that were discovered after I made #62875 (566b9ee1d8). I never setup a new plane for the transparent turfs and because of this any objects, icons, or sprites that were offset from the boundary of the turf would make any bottom Z level stuff appear on the current Z level.
We want stuff to look normal.
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#63629Fixes#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
Fixes#62794 (Catwalk Tiles placed on the lower level of tram appear to be on the upper level)
Fixes#57654 (Open Space shading not always applied)
Fixes#53666 (When standing on a glass floor above a light on the Z level below you the light effect is rendered above the character. This makes light have ugly glows on the floors above. This also happens with grills and lattice.)
Transparent turfs, catwalks, and lighting overlays were badly broken with MultiZ issues. This fixes any transparent turf to appear and be on the same z-level if it has the turf_transparent element. Catwalks will appear and be on the same z-level as well. They were initially glitching to top z-levels causing people to walk over an illusion that caused them to fall to their deaths.
After I fixed these issues I noticed that lighting overlays were also glitching to top z-levels, which looked rather strange as there were lights in the middle of rooms and hallways with no supporting walls. Lights now appear under the transparent turfs properly.
The mapping icons for catwalks displayed the wrong icon_state so I fixed that too.
I made a big refactor for transparency and catwalks code that had to be done to get all of this to work properly.
You no longer have to be afraid of falling off of glass floors, catwalks, or transparent tiles. Also lighting overlays don't glitch through upper z-levels anymore for transparent tiles.
Atomizes a much larger PR for another time...
There are typos in span and other html messages that causes them to not render correctly or at all.
Bug fixes
Converts those instances of span to use the macro
I'm refactoring proximity monitors and fields, removing lots of bloat from both that's hardly even used. Proximity monitors no longer generate effect objects to track the surrounding area, should be less cpu expensive and easier to maintain (or phase out), read and use.
This PR also adds a couple components which may be needed for future stuff (for starters, the mirror reflection PR #62638 could use the connect_range comp)
Improving old old, ugly old code and adding some useful backend components. Tested and working.
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.
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
At the last Toolbox Tournament, @MrStonedOne pointed out some big performance consumers. Some are disablable through easy means, but others were not. This adds two easy ones to the mix.
About The Pull Request
Document: https://hackmd.io/@bazelart/HkY-SO9VF
Each department's request console is upgraded. Instead of making requests, they are only able to see crates related to their department that helps the department. They can order one for free (so not out of anyone's wallet) and it will arrive at cargo. Cargo gets the price of the ordered crate for bringing it to the department that ordered it (via an area check, of which the crate will remain locked until satisfied, emitter cracking aside).
Ordering a crate puts the console on a cooldown depending on the price of the crate ordered. The time ranges from 10 minutes at the lowest value, to capped at 20 minutes at 4x the default crate's price. the price in time follows a ease in out circular function, where the time increases slowly as the time goes up, but a lot in the middle. towards the higher end it slows down again.
Cargo will start with far less money, but this is countered by the new source of income.
Finish Mapping it
Finish tgui panel for department orders
Testmerge it for balance and feedback who cares
Maybe give multiple destination areas, just in case one area gets obliterated who cares!
Why It's Good For The Game
Cargo starts with a budget to spend on themselves, which lets them order their department rewards before doing anything. There is no inherent reward to delivering to other departments other than social expectations of filling the job, which means cargo will simply ignore deliveries and requests if there are more self-important things going on, since those deliveries both cost cargo and do not help cargo in any way
Changelog
cl
add: replaced the request consoles in each department with department order consoles, which order for free on a cooldown. cargo gets these orders and delivers the crates, which are locked until delivery. upon delivery, cargo gets paid the value of the crate, and can then sell the crate back on the shuttle.
balance: cargo doesn't start with a budget, other departments get what their budget was split up amongst them
/cl
Implements the Modernizing radiation design document ( https://hackmd.io/@tgstation/rJNIyeBHt ) and replaces the current radiation sources with the new system, as well as replacing/removing a bunch of old consumers of radiation that either had no reason to exist, or could be replaced by something else.
Diverges from the doc in that items radiation don't go up like explained. I was going to, but items get irradiated so easily that it just feels pretty lame. Items still get irradiated, but it's mostly just so that radiation sources look cooler (wow, lots of stuff around going green), and for things like the geiger counter.
Instead of the complicated radiation_wave system, radiation now just checks everything between the radiation source and the potential target, losing power along the way based on the radiation insulation of whats in between. If this reaches too low a point (specified by radiation_pulse consumers), then the radiation will not pass. Otherwise, will roll a chance to irradiate. Uranium structures allow a delay before irradiating, so stay away!