## About The Pull Request
Golems is apparently disabled on Icebox, but isn't disabled on Lavaland.
However, blacklisting ruins doesn't care for maps, and will blacklist
all, as if it were using all maps at once. This isn't a problem because
Lavaland and Icebox do not share common ruins, except for one: Golem
ship.
## Why It's Good For The Game
Config now works as it's supposed to, Golems should spawn on Lavaland
again (assuming it's enabled in config, I dont keep up to date with
that)
## Changelog
🆑
fix: Ruins blacklisted from icebox shouldn't also blacklist it from
lavaland, and vice versa.
/🆑
## About The Pull Request
SSmapping.anomaly_hard_limit_by_type was apparently missing the new
dimensional anomaly core
incredible innit?
Adds the dimensional anomaly core to the anomaly_hard_limit_by_type
## Why It's Good For The Game
Fixes#71147
## Changelog
🆑
fix: Raw dimensional cores can now be refined properly
/🆑
## About The Pull Request
A few roundend reports got lost from moving to dynamic and other prs.
This PRs re-allows them to occur. Namely: "Wizard Killed" (lost in
dynamic), "Blob nuked" (lost in dynamic), "Cult escaped" (lost in cult
rework), and "Nuke Ops Victory" (station destroyed via nuke) (lost from,
what I can see, an oversight / accidental swap of report values).
Additionally, small roundend report QOL for cult: Removes antag datums
from spirit realm ghosts after being dusted, so they do not show up on
the report. And in reverse, heads of staff who were dusted / destroyed
in revolution rounds are now also shown in roundend reports.
## Why It's Good For The Game
Some of these reports are dead, which is is a shame because I think
they're cool and fun.
## Changelog
🆑 Melbert
qol: Successfully fending off a blob now has a cross station news report
again. More pressing reports will take priority over it, though.
qol: Successfully killing a wizard (and all of their apprentices) now
has a cross station news report again.
qol: If more than half of a cultist team manages to escape on the
shuttle (rather than summoning Nar'sie), they will send a unique cross
station news report. This is still a loss, by the way. Summon Nar'sie!
qol: Nuclear Operatives successfully nuking the station now has its
unique cross station news report again, and no longer uses the generic
"The station was nuked" report.
qol: Nuking the station to stop a blob infection now has a unique cross
station news report again. Good luck convincing admins to allow this.
qol: Cult ghosts from "Spirit Realm" no longer persist on the cult's
team after being desummoned, meaning they will not show up on roundend
report.
qol: Heads of staff will now always show up on revolution roundend
report - even if their body was fully destroyed.
/🆑
## About The Pull Request
Adds a new station trait, the Cybernetic Revolution
It causes every crewmember to spawn with a cybernetic implant/organ (it
depends on their job).
For example. the bartender has an upgraded cybernetic liver, security
officers have extendable flashes, prisoners have flash shielded eyes.
For AIs, they get the surveillance upgrade.
The trait also lowers research costs for the cybernetic designs, triples
the price of EMP kits and EMP flashlights, doubles price of EMP bombs,
and allows traitors to buy autosurgeons, so they can implant themselves
with whatever they ripped out of the crew.
If you do not wish to partake, you can also take the Body Purist quirk,
which prevents you from getting a cybernetic, but everytime you have a
mechanical limb/organ from some other source, you will take a severe
mood penalty.
## Why It's Good For The Game
This could be a cool modifier to rounds once in a while, slightly
modifying the gameplay of all the crew.
Also our implant system is very barely used, so why not?

## Changelog
🆑
add: New Station Trait: Cybernetic Revolution
add: Body Purist Quirk
/🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
## About The Pull Request
This replaces needless GLOB.machines with more precise lists whenever
one existed, plus adding a new one for CTF machines.
## Why It's Good For The Game
GLOB.machines holds every single /obj/machinery in the game, so checking
the whole list for stuff is pretty big. This aims to cut that down by
using smaller lists whenever possible. I also gave CTF a new list
because it checked machines very often.
## Changelog
Nothing player facing.
Makes the code compatible with 515.1594+
Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword
And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.
@tgstation/commit-access Since the .proc/stuff is pretty big change.
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
## About The Pull Request
Migrates sound toggle prefs away from legacy toggles, and changes all
related preference checks to the modern form. Cleans up unnecessary
defines linked to the old prefs. Increments the minimum save file
version so a piece of old sound related code can be neatly removed. (The
minimum version hasn't changed in two years anyone who hasn't played in
at least that long probably doesn't even remember they had prefs saved)
Splits off jukebox music into its own preference distinct from
instruments. (This was actually the change that brought about this whole
PR the rest of the igration just made sense to do at the same time)
## Why It's Good For The Game
More granularity in sound preferences is good. It is quite reasonable
for players to want to hear normal volume and largely unobtrusive
instruments, without also being subjected to the aural torture of the
jukebox. As implementing this wothout creating an unwelcome extra legacy
toggle already required setting up a non-legacy sound toggle, it is most
reasonable to migrate the other sounds at the same time.
## Changelog
🆑
qol: Jukebox music can be controlled by a new seperate preference, and
is no longer linked to the instrument sound preference option.
refactor: Sound related toggle preferences have been migrated away from
the legacy system. Pre-existing preferences should be safely migrated
but players are advised to check.
/🆑
I went into this just planning on fixing some weird behaviour with
spider buttons and ended up touching a lot of files.
Specifically this is because some of the actions used by Giant Spiders
would print feedback messages in IsAvailable, which was bad because this
is called every time the button updates and so would (for example) print
a bunch of messages about eggs existing when you spawned as a
broodmother because the lay eggs button would be checking for that when
it was granted to you.
The feedback _is_ useful though so I've implemented a pattern used in
Spell where we just pass a flag describing whether we want to print it
or not, which is generally set to true in Trigger() or if the player
physically pressed the button.
A side effect of this is that any action with usability flags (such as
"not when handcuffed") will now tell you why it is failing if you click
it while it is unusable, which is nice.
The spider changes are largely to make sure that their buttons are
tinted at the correct time, they were previously tinted red as if
inactive at almost all times due to the icon not being updated when
relevant conditions changed.
This necessitated adding a new signal (two actually) sent when a
do_after begins and when it ends (for any reason, including premature
interruption).
I also fixed a quirk where the Wrap ability had a permanent 'active'
outline after using it once (the icon states were inverted).
I also fixed a bug where you could just lay infinite enriched eggs after
eating one guy, which is not how the game describes it as working.
I looked up the PR adding it
(https://github.com/tgstation/tgstation/pull/54451) and one egg per kill
seems to be how it is supposed to work.
And finally I changed a few nurse spider to_chats into balloon_messages,
on the principle that they're not information which needs to stick
around for more than a few seconds.
## About The Pull Request
Area contents isn't a real list, instead it involves filtering
everything in world
This is slow, and something we should have better support for.
So instead, lets manage a list of turfs inside our area. This is simple,
since we already move turfs by area contents anyway
This should speed up the uses I've found, and opens us up to using this
pattern more often, which should make dev work easier.
By nature this is a tad fragile, so I've added a unit test to double
check my work
Rather then instantly removing turfs from the contained_turfs list, we
enter them into a list of turfs to pull out, later.
Then we just use a getter for contained_turfs rather then a var read
This means we don't need to generate a lot of usage off removing turf by
turf from space, and can instead do it only when we need to
I've added a subsystem to manage this process as well, to ensure we
don't get any out of memory errors. It goes entry by entry, ensuring we
get no overtime.
This allows me to keep things like space clean, while keeping high
amounts of usage on a sepearate subsystem when convienient
As a part of this goal of keeping space's churn as low as possible, I've
setup code to ensure we do not add turfs to areas during a z level
increment adjacent mapload. this saves a LOT of time, but is a tad
messy
I've expanded where we use contained_turfs, including into some cases
that filter for objects in areas. need to see if this is sane or not.
Builds sortedAreas on demand, caching until we mark the cache as
violated
It's faster, and it also has the same behavior
I'm not posting speed changes cause frankly they're gonna be a bit
scattered and I'm scared to.
@Mothblocks if you'd like I can look into it. I think it'll pay for
itself just off `reg_in_areas_in_z` (I looked into it. it's really hard
to tell, sometimes it's a bit slower (0.7), sometimes it's 2 seconds
(0.5 if you use the old master figure) faster. life is pain.)
## Why It's Good For The Game
Less stupid, more flexible, more speed
Co-authored-by: san7890 <the@san7890.com>
## About The Pull Request
Posters are kind of insane and they require that the poster item have
either a poster_type defined in the type or that you pass the structure
version of the poster to /new() otherwise they don't work. The weird
thing is that the structure needs to be in the contents of the item too,
or it again won't work (it won't remove the poster from your hands when
placing it). I fixed it so all you need to do is pass the structure
version of the poster to /new() on the item and it will move the
structure to the contents of the item if needed. It's still a bit insane
but it's better than it was and it fixed the bug.
Also SSLibrary.printable_posters was grabbing the directional mapping
helper of the random poster and so when you printed it and placed it,
you'd get confusing results. I made a quick fix to stop that from
happening.
## Why It's Good For The Game
Bug fixes are generally good things.
Fixes#70382Fixes#66504
## Changelog
🆑 VexingRaven
fix: Fixed posters printed from the library console staying in your hand
when you place them
fix: Fixed Random Official Poster printed from the library console
always placing the west-facing variant no matter where you place it
/🆑
## About The Pull Request
A slight logging error resulted in a specific warning about pipenets
never being suppressed, instead continually printing the message that
states that further messages will be suppressed. This was caused by the
limit on pipenet warnings being decremented in the wrong place. This
oversight has been corrected.
## Why It's Good For The Game

This is really annoying to scroll through.
## Changelog
🆑
fix: Properly suppressed a message about suppressing messages.
/🆑
`area.contents` loops over everything in the world to collect its list,
every time.
We need to avoid it where possible. Lemon already working on a PR to
cache it. In the distant future we will lint this.
This was a useless consumer of it. It cost 0.1s to index contents twice
like this.
* Fixes halloween races.
- Fixes a race condition involve checking for holidays befores SSevents is instantiated. Now, holiday checking is done through a helper, which will ensure the holidays list is created and filled before checked.
* Moves spawners and decals to a different init/delete scheme
Rather then fully creating and then immediately deleting these things,
we instead do the bare minimum.
This is faster, if in theory more fragile. We should be safe since any
errors should be caught in compile since this is very close to a
"static" action. It does mean these atoms cannot use signals, etc.
* Potentially saves init time, mostly cleans up a silly pattern
We use sleeps and INVOKE_ASYNC to ensure that handing back turfs doesn't
block a space reservation, but this by nature consumes up to the
threshold and a bit more of whatever working block we were in.
This is silly. Should just be a subsystem, so I made it one, with
support for awaiting its finish if you want to
* Optimizes garbage/proc/Queue slightly
Queue takes about 1.6 seconds to process 26k items right now.
The MASSIVE majority of this time is spent on using \ref
This is because \ref returns a string, and that string requires being
inserted into the global cache of strings we store
What I'm doing is caching the result of ANY \ref on the datum it's
applied to. This ensures previous uses will never decay from the string
tree.
This saves about 0.2 seconds of init
* Converts mice and rats to basic mobs
* Update paths
* Fixes
* Tweaks
* .
* Use helpers
* Unit test
* Correct the targeting
* Fixes the unit test?
* Fixes the unit test
* Docs
* update the path script with pr id
* Faction check tweak
* Review
* AHH
About The Pull Request
Basically it was in the documentation of #70199 that this verb was meant for when a new job is added, or for downstreams that have more jobs than /tg/ does. So I tried to use it, and it runtimed because it didn't have one of our own jobs in the jobconfig.toml file already, thus completely defeating the point of the verb.
So I just scooted the variable declarations into the proper null-checked if block, and now it works just fine!
Also, I noticed that a job we had disabled via config wasn't getting properly disabled, turns out values of 0 in the config weren't being respected, and were getting reset to the codebase default. This behavior is now fixed, and shouldn't be an issue anymore, hopefully.
Why It's Good For The Game
Makes a useful verb, actually work for its intended usecase :)
Changelog
🆑 GoldenAlpharex
config: The Generate Job Configuration verb now works as expected when there's at least one job in-game that doesn't exist in the new jobconfig.toml file already.
fix: Any value that is set to 0 in jobconfig.toml will no longer default to the codebase's default, and will actually be considered as 0.
/🆑
Change admin message to stack trace
The admins don't know what to do with this error and I swear to god if I get another ping without a round id or server name I am going to literally explode
* Cleans up the fallout from plane cube
Alright.
Makes cleaning bubbles respect planes
Adds support for updating overlays on move, fixing an issue with pointing at items
Adds better error messages for failing to provide args for mutable_appearance()
Fixes a bug where string overlays were not respecting insertion order
* Adds documentation for offset spokesman and offset_const
* Better stack trace
* Removes some redundant uses of cached MAs
At this scale, attempting to cache MAs like this has 0 impact on anything
And just makes things more messy then they need to be
* ensures fullscreen objects START offset, so things are always proper
* ensures chatmessages always have the right offset
* fixes compile
* whoops, the above lighting plane should actually be ABOVE the lighting plane
* fixes compile, also cleans up the fire overlay a tad
* Adds a unit test for plane masters that are shrunk by multiz being double shrunk
This is slightly hacky because of how I'm handing the plane master
group, but it's not THAT bad, and gives me some real good coverage
* Properly targets the seethrough plane at the game world plate. This fixes unit tests, and also just makes more sense
* whoops
* oh
* adds datum support for allocate(), cleans up a harddel from testing
* Makes camera chunks index at 1, and also makes them support non powers of two sizes, since that was unneeded
* fixes runtime in allocate
Two things:
Stone stairs didn't actually line up, not a soul would have noticed because mappers probably aren't gonna use it for a while, but I fixed it anyways.
Second, you could still build mat datum stairs freely without the whole frame system, invalidating its existence, so I've fixed that too. You can still build mat datum stairs, you just need a stairs frame made of iron or wood first.
* PKP Mind Virus: Glorfing Cigs edition
If you glorf while smoking you'll get the cig stuck in your throat, leaving you unable to breath, speak, or eat. Based off the sort of cig you have a random delay before you vomit up the cig. (Pipes last forever don't philoso-larp kids). Other players can help you by using the help action on you while you're hurt, which leads to something imitating the himelich manuver, a broken chest, and a vomited up blockage. Other forms of vomiting will work too, if that's even applicable.
Oh I fixed a bug in vomit code. Because paralyzing you forces you to the ground, thus changing your dir, paralyzing vomits always went down. This is cringe, easy fix tho.
Ah and I added some extra functionality to sound loops too. You can set them to pick and take from the provided list, then refilling it once it's empty. This keeps some variety while preventing the risk of repeat sounds
Oh and I added some new signals. Some misc ones, for force say and a different kind of help then the existing one, which I renamed. One for breathing, which I used to clean up leroxin. I was planning to hook this but didn't need to in the end.
One for vomiting too. and eating. Also added a way to update looping timer delays. Forgot about that, I also added variable delay for sound loops, because I thought it sounded better here.
Features audio courtesy of our very own san7890, and the quake jump sound.
* Makes only station areas part of Statioj
* Makes only subtypes of /area/station be part of the station
* Removes Icemoon and Shuttles as a check for Anomaly placers as they aren't needed anymore, not being part of shuttles.
* Removes a ton of uses of NO_ALERTS where it is no longer needed.
* Removes bestF from Master Controller Crash Filtering
We removed bestF from datums back in #2701, but this still remained in the filter. Bit silly, let's get rid of this old cobweb.
I couldn't find anything suggesting that the master_controller could get a statclick variable, but that's actually a term we use in the modern day so I'm not going to bug it since it's benign. The other five are still BYOND-level variables.
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
reintroduces the intermittent queuing behavior found in #65791 since i can actually recover that part. now after MeasureText() puts us in the player input portion of the tick it will queue a callback for the next tick to resume chat message creation
generate_image() is a highly overtiming proc, now its less so
Adds a few new types of stairs, and makes stairs buildable within rounds.
Also removes the terminator sprite variation for stairs, because its basically unused and really not needed with plane cube multiz.
* bileworm health patch
- bileworms start off easier
- vileworms are how they are now + a little tougher
- fixes bileworms breaking proximity spawn rules
- adds gold to bileworm loot
* ssticker
* diagonals readded to attacks\, map fix
* d-delete this
* Update evolutionary_leap.dm
* DONE
About The Pull Request
I've reworked multiz. This was done because our current implementation of multiz flattens planes down into just the openspace plane. This breaks any effects we attach to plane masters (including lighting), but it also totally kills the SIDE_MAP map format, which we NEED for wallening (A major 3/4ths resprite of all wall and wall adjacent things, making them more then one tile high. Without sidemap we would be unable to display things both in from of and behind objects on map. Stupid.)
This required MASSIVE changes. Both to all uses of the plane var for reasons I'll discuss later, and to a ton of different systems that interact with rendering.
I'll do my best to keep this compact, but there's only so much I can do. Sorry brother.
Core idea
OK: first thing.
vis_contents as it works now squishes the planes of everything inside it down into the plane of the vis_loc.
This is bad. But how to do better?
It's trivially easy to make copies of our existing plane masters but offset, and relay them to the bottom of the plane above. Not a problem. The issue is how to get the actual atoms on the map to "land" on them properly.
We could use FLOAT_PLANE to offset planes based off how they're being seen, in theory this would allow us to create lens for how objects are viewed.
But that's not a stable thing to do, because properly "landing" a plane on a desired plane master would require taking into account every bit of how it's being seen, would inherently break this effect.
Ok so we need to manually edit planes based off "z layer" (IE: what layer of a z stack are you on).
That's the key conceit of this pr. Implementing the plane cube, and ensuring planes are always offset properly.
Everything else is just gravy.
About the Plane Cube
Each plane master (except ones that opt out) is copied down by some constant value equal to the max absolute change between the first and the last plane.
We do this based off the max z stack size detected by SSmapping. This is also where updates come from, and where all our updating logic will live.
As mentioned, plane masters can choose to opt out of being mirrored down. In this case, anything that interacts with them assuming that they'll be offset will instead just get back the valid plane value. This works for render targets too, since I had to work them into the system as well.
Plane masters can also be temporarily hidden from the client's screen. This is done as an attempt at optimization, and applies to anything used in niche cases, or planes only used if there's a z layer below you.
About Plane Master Groups
BYOND supports having different "maps" on screen at once (IE: groups of items/turfs/etc)
Plane masters cannot cover 2 maps at once, since their location is determined by their screen_loc.
So we need to maintain a mirror of each plane for every map we have open.
This was quite messy, so I've refactored it (and maps too) to be a bit more modular.
Rather then storing a list of plane masters, we store a list of plane master group datums.
Each datum is in charge of the plane masters for its particular map, both creating them, and managing them.
Like I mentioned, I also refactored map views. Adding a new mapview is now as simple as newing a /atom/movable/screen/map_view, calling generate_view with the appropriate map id, setting things you want to display in its vis_contents, and then calling display_to on it, passing in the mob to show ourselves to.
Much better then the hardcoded pattern we used to use. So much duplicated code man.
Oh and plane master controllers, that system we have that allows for applying filters to sets of plane masters? I've made it use lookups on plane master groups now, rather then hanging references to all impacted planes. This makes logic easier, and prevents the need to manage references and update the controllers.
image
In addition, I've added a debug ui for plane masters.
It allows you to view all of your own plane masters and short descriptions of what they do, alongside tools for editing them and their relays.
It ALSO supports editing someone elses plane masters, AND it supports (in a very fragile and incomplete manner) viewing literally through someone else's eyes, including their plane masters. This is very useful, because it means you can debug "hey my X is yorked" issues yourself, on live.
In order to accomplish this I have needed to add setters for an ungodly amount of visual impacting vars. Sight flags, eye, see_invis, see_in_dark, etc.
It also comes with an info dump about the ui, and plane masters/relays in general.
Sort of on that note. I've documented everything I know that's niche/useful about our visual effects and rendering system. My hope is this will serve to bring people up to speed on what can be done more quickly, alongside making my sin here less horrible.
See https://github.com/LemonInTheDark/tgstation/blob/multiz-hell/.github/guides/VISUALS.md.
"Landing" planes
Ok so I've explained the backend, but how do we actually land planes properly?
Most of the time this is really simple. When a plane var is set, we need to provide some spokesperson for the appearance's z level. We can use this to derive their z layer, and thus what offset to use.
This is just a lot of gruntwork, but it's occasionally more complex.
Sometimes we need to cache a list of z layer -> effect, and then use that.
Also a LOT of updating on z move. So much z move shit.
Oh. and in order to make byond darkness work properly, I needed to add SEE_BLACKNESS to all sight flags.
This draws darkness to plane 0, which means I'm able to relay it around and draw it on different z layers as is possible. fun darkness ripple effects incoming someday
I also need to update mob overlays on move.
I do this by realiizing their appearances, mutating their plane, and then readding the overlay in the correct order.
The cost of this is currently 3N. I'm convinced this could be improved, but I've not got to it yet.
It can also occasionally cause overlays to corrupt. This is fixed by laying a protective ward of overlays.Copy in the sand, but that spell makes the compiler confused, so I'll have to bully lummy about fixing it at some point.
Behavior changes
We've had to give up on the already broken gateway "see through" effect. Won't work without managing gateway plane masters or something stupid. Not worth it.
So instead we display the other side as a ui element. It's worse, but not that bad.
Because vis_contents no longer flattens planes (most of the time), some uses of it now have interesting behavior.
The main thing that comes to mind is alert popups that display mobs. They can impact the lighting plane.
I don't really care, but it should be fixable, I think, given elbow grease.
Ah and I've cleaned up layers and plane defines to make them a bit easier to read/reason about, at least I think.
Why It's Good For The Game
<visual candy>
Fixes#65800Fixes#68461
Changelog
cl
refactor: Refactored... well a lot really. Map views, anything to do with planes, multiz, a shit ton of rendering stuff. Basically if you see anything off visually report it
admin: VV a mob, and hit View/Edit Planes in the dropdown to steal their view, and modify it as you like. You can do the same to yourself using the Edit/Debug Planes verb
/cl
About The Pull Request
Micros lighting objects, and their creation
We save a good bit of time by not walking space turfs adjacent to new objects.
We also save some time with micros in the actual underlay update logic.
I swear dude we spend like 0.8 seconds of init applying the underlay. I want threaded maptick already
Micros lighting sources, and corner creation
A: Corners were being passed just A turf, and then expected to generatecorners based on that. This is pointless.
It is better to instead pass in the coords of the bottom left turf, and then build in a circle. This saves like 0.3 seconds
B: We use so many damn datum vars in corner application that we just do not need to.
This resolves that, since it pissed me off. It's pointless. Lets cache em instead
There's some misc datum var caching going on here too. Lemme see...
Oh and a bit of shortcutting for a for loop, since it was a tad expensive on its own.
Also I removed the turfs list, because it does fucking nothing. Why is this still here.
All my little optimizations save about 1 second of init I think
Not great, but not bad, and plus actual lighting work is faster now too
Why It's Good For The Game
Speed
* Removes overlay queuing, saves 6/7 seconds of initialize. Lightly modifies stat tracking macros
So we have this overlay queuing system right? It's build with the assumption
that the "add to overlay list" operation is real expensive, and is
thus useful to queue removals or additions.
It turns out that it just isn't, at least during init. In my testing the
operation of queuing took LONGER then the actual overlay add/remove did.
That's ignoring the cost of the subsystem's work.
I've also modified part of the stat tracking macro, since it took a good
bit of cpu time, and didn't seem to well, do anything. So far as I can
tell it always evaluates to 1
We make the assumption that a turf's heat capacity will never be 0. This is safe because we've got an override of /datum/gas_mixture for turfs that overrides 0 heat cap with 7000 (SPACE)
This is done to make cold actually flow through empty tiles, because we are hacks.
I forgot to include type in my gas mixture creation logic, so this was being dropped. FIXXXX
About The Pull Request
Currently there are a bunch of snowflake checks on the mining shuttle console's attack_hand proc, including a check for TRAIT_ILLITERATE which is hardcoded to specific destinations and is causing issues with the public lavaland shuttle in #69641. When I started looking at that issue I realized that this should all probably be done in ui_interact() instead, and also that checking specifically for TRAIT_ILLITERATE when there's a proc for this (can_read) makes little sense. So I moved it all to ui_interact and cleaned up the TRAIT_ILLITERATE check. I also moved some code related to getting the list of destinations of shuttle consoles into a proc which is shared between the ui_data proc and the can_read check.
Now any illiterate mob which isn't otherwise blocked from interacting (such as monkies, ash lizards, and humans with a quirk) which interact with the shuttle console will spend 10 seconds "randomly mashing buttons" before sending it to a random valid destination. This is (essentially) the current behavior for humans with illiteracy and was (per @timothymtorres ) the intended behavior for ash lizards when he added the illiteracy quirk to begin with in #66648. I'm just making it less snowflakey and I guess technically adding it to monkies too since they could also use the shuttle before that PR and it doesn't make sense to exclude them arbitrarily.
Why It's Good For The Game
Fixes#69641
Generally makes the code more standardized, attack_hand checks are legacy from before ui interact was unified into can_interact and ui_interact. Making the code apply to all shuttle consoles and randomly pick a valid destination makes the more maintainable and less prone to random issues than a hardcoded list.
Also makes the other existing checks more consistent, for example the labor shuttle will now also warn rev heads, block free golems, and let illiterates move them just like the mining and public lavaland shuttles do.
Changelog
cl VexingRaven
fix: The illiteracy quirk will no longer break the mining shuttle
refactor: Refactored some checks on the shuttle console to apply to all consoles
/cl
* 'optimizes' space transitions by like 0.06 seconds, makes them easier to read tho, so that's an upside
* ''''optimizes'''' parsed map loading
I'm honestly not sure how big a difference this makes, looked like small
percentage points if anything
It's a bit more internally concistent at least, which is nice. Also I
understand the system now.
I'd like to think it helped but I think this is kinda a "do you think
it's easier to read" sort of situation. if it did help it was by the
skin of its teeth
* Saves 0.6 seconds off loading meta and lavaland's map files
This is just a lot of micro stuff.
1: Bound checks don't need to be inside for loops, we can instead bound the iteration counts
2: TGM and DMM are parsed differently. in dmm a grid_set is one z level,
in tgm it's one collumn. Realizing this allows you to skip copytexts and
other such silly in the tgm implemenentation, saving a good bit of time
3: Min/max bounds do not need to be checked inside for loops, and can
instead be handled outside of them, because we know the order of x
and y iteration. This saves 0.2 seconds
I may or may not have made the code harder to read, if so let me know
and I'll check it over.
* Micro ops key caching significantly. Fixes macros bug
inserting \ into a dmm with no valid target would just less then loop
the string. Dumb
Anyway, optimizations. I save a LOT of time by not needing to call
find_next_delimiter_position for every entry and var set. (like maybe 0.5
seconds, not totally sure)
I save this by using splittext, which is significantly faster. this
would cause parsing issues if you could embed \n into dmms, but you
can't, so I'm safe.
Lemme see uh, lots of little things, stuff that's suboptimal or could be
done cheaper. Some "hey you and I both know a \" is 2 chars long sort of
stuff
I removed trim_text because the quote trimming was never actually used,
and the space trimming was slower then using the code in trim. I also
micro'd trim to save a bit of time. this saves another maybe 0.5.
Few other things, I think that's the main of it. Gives me the fuzzy
feelings
* Saves 50% of build_coordinate's time
Micro optimizing go brrrrr
I made turf_blacklist an assoc list rather then just a normal one, so
lookups are O(log n) instead of O(n). Also it's faster for the base case
of loading mostly space.
Instead of toggling the map loader right before and right after New()
calls, we toggle at the start of mapload, and disable then reenable if
we check tick. This saves like 0.3 seconds
Rather then tracking an area cache ourselves, and needing to pass it
around, we use a locally static list to reference the global list of
area -> type. This is much faster, if slightly fragile.
Rather then checking for a null turf at every line, we do it at the
start of the proc and not after. Faster this way, tho it can in theory
drop area vvs.
Avoids calling world.preloader_setup unless we actually have a unique
set of attributes. We use another static list to make this comparison
cheap. This saves another 0.3
Rather then checking for area paths in the turf logic, or vis versa, we
assume we are creating the type implied by the index we're reading off.
So only the last type entry will be loaded like a turf, etc.
This is slightly unsafe but saves a good bit of time, and will properly
error on fucked maps.
Also, rather then using a datum to hold preloader vars, we use 2 global
variables. This is faster.
This marks the end of my optimizations for direct maploading. I've
reduced the cost of loading a map by more then 50% now. Get owned.
* Adds a define for maploading tick check
* makes shuttles load again, removes some of the hard limits I had on the reader for profiling
* Macro ops cave generation
Cave generation was insanely more expensive then it had any right to be.
Maybe 0.5 seconds was saved off not doing a range(12) for EVERY SPAWNED
MOB.
0.14 was saved off using expanded weighted lists (A new idea of mine)
This is useful because I can take a weighted list, and condense it into
weight * path count. This is more memory heavy, and costs more to
create, but is so much faster then the proc.
I also added a naive implementation of gcd to make this a bit less bad.
It's not great, but it'll do for this usecase.
Oh and I changed some ChangeTurfs into New()s. I'm still not entirely
sure what the core difference between the two is, but it seems to work
fine.
I believe it's safe because the turf below us hasn't init'd yet, there's
nothing to take from them. It's like 3 seconds faster too so I'll be sad
when it turns out I'm being dumb
* Micros river spawning
This uses the same sort of concepts as the last change, mostly New being
preferable to ChangeTurf at this level of code.
This bit isn't nearly as detailed as the last few, I honestly got a bit
tired. It's still like 0.4 seconds saved tho
* Micros ruin loading
Turns out it saves time if you don't check area type for every tile on a
ruin. Not a whole ton faster, like 0.03, but faster.
Saves even more time (0.1) to not iterate all your ruin's turfs 3 times
to clear away lavaland mobs, when you're IN SPACE who wrote this.
Oh it also saves time to only pull your turf list once, rather then 3
times
About The Pull Request
See title. The vote subsystem needs to load after the persistence subsystem so that the blocked_maps list can be properly populated with data from the RecentMaps.json in the data folder.
This fixes the maps constantly being metastation
Why It's Good For The Game
Same map over and over again = bad
Different maps each time = good
Changelog
cl
fix: Fixed map vote including maps that have already been played twice in the last 3 rounds.
/cl