* Makes some improvements to how AI can use JPS with movement loops (#72685)
## About The Pull Request
This PR makes some changes to how JPS is used in movement loops, as it
was causing a variety of issues:
- Fixed some code where JPS would fail because the path is still being
made. Instead, the movement loop will now wait.
- Reduced the subsystem wait for the pathfinder subsystem from 2 seconds
to 0.1 seconds. @ LemonInTheDark told me that this is better, I'll update
this with a better explanation once I squeeze it out of him :D
- Allows you to provide an initial path to the movement loop, in case
you pre-calculated one while making a plan.
## Why It's Good For The Game
Makes working with JPS a bit easier when making AI.
---------
Co-authored-by: Capybara <Capybara@ CapybaraMailingServices.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* Makes some improvements to how AI can use JPS with movement loops
---------
Co-authored-by: CapybaraExtravagante <110635252+CapybaraExtravagante@users.noreply.github.com>
Co-authored-by: Capybara <Capybara@ CapybaraMailingServices.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
* Adds nutriment factor to liquid gibs. (#73033)
## About The Pull Request
Over the years I've heard quite a few lizard players scratch their heads
in confusion due to the lack of gibs filling you up. I gave it a fairly
low value of 2 so people don't end up trying to power game it.
## Why It's Good For The Game
Adding an alternative use to gibs is always nice, at the moment it's
mostly just used for soap and cytology (Which barely anyone does.)
## Changelog
🆑
balance: Gibs now provide a small amount of nutriment.
/🆑
* Fixes the modular uses of liquid gibs
* Fixes an error that somehow slipped through.
---------
Co-authored-by: carshalash <carshalash@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Smoothing groups optimization, save 265ms with configs, more on production & w/ space ruins (#71989)
This one is fun.
On every /turf/Initialize and /atom/Initialize, we try to set
`smoothing_groups` and `canSmoothWith` to a cached list of bitfields. At
the type level, these are specified as lists of IDs, which are then
`Join`ed in Initialize, and retrieved from the cache (or built from
there).
The problem is that the cache only misses about 60 times, but the cache
hits more than a hundred thousand times. This means we eat the cost of
`Join` (which is very very slow, because strings + BYOND), as well as
the preliminary `length` checks, for every single atom.
Furthermore, as you might remember, if you have any list variable set on
a type, it'll create a hidden `(init)` proc to create the list. On
turfs, that costs us about 60ms.
This PR does a cool trick where we can completely eliminate the `Join`
*and* the lists at the cost of a little more work when building the
cache.
The trick is that we replace the current type definitions with this:
```patch
- smoothing_groups = list(SMOOTH_GROUP_TURF_OPEN, SMOOTH_GROUP_FLOOR_ASH)
- canSmoothWith = list(SMOOTH_GROUP_FLOOR_ASH, SMOOTH_GROUP_CLOSED_TURFS)
+ smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_FLOOR_ASH
+ canSmoothWith = SMOOTH_GROUP_FLOOR_ASH + SMOOTH_GROUP_CLOSED_TURFS
```
These defines, instead of being numbers, are now segments of a string,
delimited by commas.
For instance, if ASH used to be 13, and CLOSED_TURFS used to be 37, this
used to equal `list(13, 37)`. Now, it equals `"13,37,"`.
Then, when the cache misses, we take that string, and treat it as part
of a JSON list, and decode it from there. Meaning:
```java
// Starting value
"13,37,"
// We have a trailing comma, so add a dummy value
"13,37,0"
// Make it an array
"[13,37,0]"
// Decode
list(13, 37, 0)
// Chop off the dummy value
list(13, 37) // Done!
```
This on its own eliminates 265ms *without space ruins*, with the
combined savings of turf/Initialize, atom/Initialize, and the hidden
(init) procs that no longer exist.
Furthermore, there's some other fun stuff we gain from this approach
emergently.
We previously had a difference between `S_TURF` and `S_OBJ`. The idea is
that if you have any smoothing groups with `S_OBJ`, then you will gain
the `SMOOTH_OBJ` bitflag (though note to self, I need to check that the
cost of adding this is actually worth it). This is achieved by the fact
that `S_OBJ` simply takes the last turf, and adds onto that, meaning
that if the biggest value in the sorting groups is greater than that,
then we know we're going to be smoothing to objects.
This new method provides a limitation here. BYOND has no way of
converting a number to a string at compile time, meaning that we can't
evaluate `MAX_S_TURF + offset` into a string. Instead, in order to
preserve the nice UX, `S_OBJ` now instead opts to make the numbers
negative. This means that what used to be something like:
```dm
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WEEDS)
```
...which may have been represented as
```dm
smoothing_groups = list(15, MAX_S_TURF + 3)
```
...will now become, at compile time:
```dm
smoothing_groups = "15,-3,"
```
Except! Because we guarantee smoothing groups are sorted through unit
testing, this is actually going to look like:
```dm
smoothing_groups = "-3,15,"
```
Meaning that we can now check if we're smoothing with objects just by
checking if `smoothing_groups[1] == "-"`, as that's the only way that is
possible. Neat!
Furthermore, though much simpler, what used to be `if
(length(smoothing_groups))` (and canSmoothWith) on every single
atom/Initialize and turf/Initialize can now be `if (smoothing_groups)`,
since empty strings are falsy. `length` is about 15% slower than doing
nothing, so in procs as hot as this, this gives some nice gains just on
its own.
For developers, very little changes. Instead of using `list`, you now
use `+`. The order might change, as `S_OBJ` now needs to come first, but
unit tests will catch you if you mess up. Also, you will notice that all
`S_OBJ` have been increased by one. This is because we used to have
`S_TURF(0)` and `S_OBJ(0)`, but with this new trick, -0 == 0, and so
they conflicted and needed to be changed.
* Sorting how did I miss it
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
* Replace moveToNullspace in decal Destroy() to loc = null -- Saves 0.11s of init time (#71706)
This calls Exited(), Entered(), etc etc etc etc, and it is not necessary
for this. Was 119ms, now 9.
* Replace moveToNullspace in decal Destroy() to loc = null -- Saves 0.11s of init time
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Changes our map_format to SIDE_MAP (#70162)
## About The Pull Request
This does nothing currently, but will allow me to test for layering
issues on LIVE, rather then in just wallening.
Oh also I'm packaging in a fix to one of my macros that I wrote wrong,
as a joke
[removes SEE_BLACKNESS usage, because we actually cannot use it
effectively](c9a19dd7cc)
[c9a19dd](c9a19dd7cc)
Sidemap removes the ability to control it on a plane, so it basically
just means there's an uncontrollable black slate even if you have other
toggles set.
This just like, removes that, since it's silly
[fixes weird layering on solars and ai portraits. Pixel y was casuing
things to render below who
shouldn't](3885b9d9ed)
[3885b9d](3885b9d9ed)
[Fixes flicker
issues](2defc0ad20)
[2defc0a](2defc0ad20)
Offsetting the vis_contents'd objects down physically, and then up
visually resolves the confliciting that was going on between the text
and its display.
This resolves the existing reported flickering issues
[fixes plated food not appearing in
world](28a34c64f8)
[28a34c6](28a34c64f8)
pixel_y'd vis_contents strikes again. It's a tad hacky but we'll just
use pixel_z for this
[Adds wall and upper wall plane
masters](89fe2b4eb4)
[89fe2b4](89fe2b4eb4)
We use these + the floor and space planes to build a mask of all the
visible turfs.
Then we take that, stick it in a plane master, and mask the emissive
plane with it.
This solves the lighting fulldark screen object getting cut by emissives
Shifts some planes around to match this new layering. Also ensures we
only shift fullscreen objects if they don't object to it.
[compresses plane master
controllers](bd64cc196a)
[bd64cc1](bd64cc196a)
we don't use them for much rn, but we might in future so I'm keeping it
as a convienince thing
🆑
refactor: The logic of how we well, render things has changed. Make an
issue report if anything looks funky, particularly layers. PLEASE USE
YOUR EYES
/🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Changes our map_format to SIDE_MAP
* Modular!
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
* Reinforced plating for all your Multi-Z mapping needs (#71576)
## About The Pull Request
This PR adds reinforced plating and a corresponding baseturf_helper,
plating that cannot be deconstructed with the RCD and requires a few
steps to degrade to regular plating.
The plating is designed to serve the same purpose as R-Walls but for
verticality. It shares its heat resistance with reinforced floor and
hull, and in texting it can endure a single C4 blast but not X4 assuming
the floor placed on it is already removed.
It is currently is unused on the existing maps due to it being poor
practice to place secure locations that would justify reinforced floors
on the lower Z levels, however I have spoken to people working on maps
actively at the moment and they have express interest in being able to
use these floors.
The plating can be constructed by using 2 sheets of plasteel on standard
plating and is disassembled using wrench > welding tool > crowbar. The
first stage of deconstruction causes the bolts holding the
reinforcements in place to fall to the Z level below playing a sound and
leaving a cleanable decal, adding a audio-visual alert that someone is
about to come through your ceiling.
UPDATE: I've added a ceiling variant of the baseturf editor, this can be
placed on a lower Z level where it will modify the baseturfs of the Z
level above within the original area. This will make it significantly
easier to ensure that you only cover tiles you want reinforced when
protecting lower Z levels.
If anyone has any recommendations for sounds please tell me and I might
swap them out but I think the two I've chosen work well. Additionally if
anyone is able to make a better sprite for the screws or plates then
that'd be a great help but I think the current ones work well enough.
## Why It's Good For The Game
Currently Multi-Z maps have a very tight restriction on where secure
areas can be put, only allowing for them to be placed on the top Z
level, under more secure Z levels or in exterior satellites and coated
with hulls. This is due to standard plating and/or reinforced floors are
very easy to get through without warning if you bring the right tools.
This PR effectively adds R-Walls but for floors allowing mappers to
properly protect lower Z levels from vertical infiltration methods. This
also adds a visual and audible indictor to the deconstruction of
reinforced floor tiles to bring them more in line with the visuals of
deconstructing a wall.
## Changelog
🆑
add: You can now reinforce plating to protect your department from the
troublemakers upstairs. Station builders might find these useful to put
the stations most secure locations on the lower floors.
imageadd: added sprites for reinforced plating
code: RCD proofing has been variablized and can now be applied to any
floor type instead of just reinforced floors.
/🆑
* Reinforced plating for all your Multi-Z mapping needs
Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
* Adds coordinates to the chess and checkers holodeck modules (#70866)
## About The Pull Request
This PR aims to add coordinates on both edges of the preset chess and
checkers (sure, why not) templates used in the holodeck feature: top row
and right column on the inner border of the board; the bottom and left,
just outside it.
## Why It's Good For The Game
This ought to help the player take advantage of the algebraic notation
if they wish to. It also adds, like, an itsy bitsy of decor to both
modules (alas, the checkers module still uses mapedited carboard cutouts
which partially cover some of the letters and numbers, but changing them
is outside the scope of this PR).
## Changelog
🆑
add: Added two sets of coordinates to the checkers and chess modules for
the holodeck.
/🆑
* Adds coordinates to the chess and checkers holodeck modules
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Fix Flypeople food consumption (#71432)
## About The Pull Request
This PR fixes#70716 by having flypeople ingest vomited reagents into
their stomach instead of directly modifying nutrition. To accomplish
this, flypeople no longer vomit their entire stomach contents every life
tick, which also fixes them vomiting immediately on spawn. Instead they
vomit only after taking bites of food.
Since flypeople aren't currently metabolizing food the same way as other
species there's a huge discrepancy in nutrition gained from food. For
example, a human gets 37 nutrition from a slice of pizza and 270
nutrition from a whole margherita pizza, but a flyperson only gets 10
and 70 respectively, meaning they'd need to eat 4 entire margherita
pizzas and slurp up the vomit to go from total starvation to being
satiated again. With this change flypeople get ~190 nutrition from a
whole margherita pizza.
## Why It's Good For The Game
Makes it easier for flypeople to stay satiated without having to consume
mass amounts of food. Also makes it easier and more predictable to deal
with flyperson interactions with other reagents getting in their stomach
- for example, currently taking a happy pill causes flypeople to vomit
due to the sugar.
## Changelog
🆑
fix: Flypeople gain a comparable amount of nutrients from vomited food
to other species (~70%, up from ~30%)
fix: Flypeople no longer vomit after drinking fluids
fix: Flypeople no longer vomit all contents of their stomach on spawn
code: Stomachs can now react to foods entering them by overriding the
`after_eat` proc
/🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Fix Flypeople food consumption
Co-authored-by: Roryl-c <5150427+Roryl-c@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Fixes runtime with the infective component on gibs (#70706)
* Fixes runtime with the infective component. streak_diseases is a lazylist and is sometimes not instantiated.
* Lazynull
* Fixes runtime with the infective component on gibs
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Fixes oil igniting (#70594)
About The Pull Request
Fixes#70592
Why It's Good For The Game
The correct message is displayed when you ignite a patch of oil.
* Fixes oil igniting
Co-authored-by: RaveRadbury <3204033+RaveRadbury@users.noreply.github.com>
* fixes ant runtime (#69890)
* Checks for caltrop component's existence before seeing what it does.
* fixes ant runtime
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
* Save 2.2s minimum (with zero ruins, likely a good bit more in production) of atom init time (#69564)
Pre-sort smoothing_groups and canSmoothWith
Without any ruins, these sorts were taking more than 0.6s, and the bulk of the runtime cost of sortTim during init time.
This only happens on init and they are never changed apart from that, so pre-sorts everything and adds a unit test (in the form of #ifdef UNIT_TESTS, because you can't initial a list) to ensure that they are proper.
Keep visibilityChanged() to mapload only for turf/Initialize
Saves about 0.4s worst case scenario (e.g. with no ruins). Very expensive code (175k loop iterations) for 0 side effects.
Space areas now have the fullbright overlay, not the space turfs
Saves about 0.8s worst case scenario. Seems to work fine with starlight.
Remove is_station_level check for window spawners assigning RCD memory.
Saves about 0.3s worst case scenario. The logic for this isn't consistent since neither walls nor floors check this (for performance), plus some minor micro-opts to spawners.
Optimize is_station_level
Doubles in speed, used heavily in /turf/open/floor and in other initialization procs. Bit hard to tell exactly how much is saved, though.
* Save 2.2s minimum (with zero ruins, likely a good bit more in production) of atom init time
* Hopefully fixes the broken CI
* Okay now it shouldn't be failing CI anymore (hopefully)
* Fixes even more issues with smoothing_groups, this time hopefully for good
* Okay NOW it's going to pass CI, surely...
* Okay haha what if it passes this time? :)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
* Adds fire ants (#69365)
cl ShizCalev
add: Space ants will now turn into space fire ants when burned with fire.
/cl
* Adds fire ants
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
* Tilening V2 Part 2: KrysonWood Edition (#69088)
About The Pull Request
Hey there! Didn't expect me to be back so soon? Well, that's because I had yet another project on the backburner: A Sequel to Tilening V2!
Where we last left off, we redid a huge majority of the sprites related to iron floors, but another big culprit was left untouched: Wood Floors!
So, what did I do? I asked @ Krysonism for the wood tiles they've used for a majority of their Wallening mockups, and finalized their work! Behold:
image
image
image
image
As a result, I felt that as I was touching up those wood sprites, I should've addressed a few more tiles while on the way, which is when I decided upon retouching the titanium and plastitanium tiles as well!
image
image
image
image
image
Decals related to these two tile types were also changed!
Here's some highlights of it during a few test screenshots on localhost!
This PR also changes the appearance of plating, making it smoother as some people complained about the waffle pattern and I agree, it was excessive!
image
Finally, this PR very minorly adjusts a few tiles, such as the black and white tiles, diagonal, black and grey tiles, etc, as well as removing unused damaged icons, and replacing them with the better ones we have. Said unused/old icons will be dumped onto the spriting depot.
Why It's Good For The Game
A continuation of my work, as well as being the intended vision Kryson desired for the upcoming wallening project! There's still a lot to go, but its a good step in the right direction of visual progress!
Changelog
cl PositiveEntropy, Kryson
del: Removes old and unused titanium, plastitanium and plating damaged states.
imageadd: Resprites the wooden, titanium and plastitanium-related floors!
imageadd: Decals related to the resprited tiles have been adjusted accordingly.
imageadd: Updates the appearance of plating to be smoother!
/cl
* Tilening V2 Part 2: KrysonWood Edition
* Tilening V2 Part 2: KrysonWood Edition
Co-authored-by: Imaginos16 <77556824+Imaginos16@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Removes ComponentInitialize()
* Fixes a leftover merge conflict marker
* Fixes the oversight that came from the upstream merge skew
* Fixes all of the instances where we used ComponentInitialize() when we shouldn't've been
* Fixes CI being broken because of the HEV suits
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Pointing at something on yourself now shows the item (#68642)
Why It's Good For The Game
Further reducing reliance on reading the chat box. Previously it wasn't obvious someone pointing at themselves was pointing at something on them, and not just, them.
Changelog
cl
qol: Pointing at something on yourself now shows the item.
/cl
* Pointing at something on yourself now shows the item
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Completely removes `proc_holders` from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code.
* our changes
* yes
* 0
* Update blackmesa.dmm
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Adds dark variants of red, breen, blue and black turf decals. (#67578)
* Adds dark variants of red, breen, blue and black turf decals.
Co-authored-by: Jakksergal <minecraftbill@gmail.com>
* Fixes Wrong Area Pathing For Snowy Floors (#67117)
Hey there,
Apparently, these have been broken for God-knows-how-long. I decided to fix it today. Apparently, the "snowfloor" icon isn't even in decals.dmi... nor in snow.dmi... it's in _overlays.dmi_. Whatever. Someone should clean that up one day. I don't particularly care enough, I just want it fixed.
* Fixes Wrong Area Pathing For Snowy Floors
Co-authored-by: san7890 <the@san7890.com>
* Refactors the forensics component into a datum
* Refactors the forensics component into a datum
* Refactors the forensics component into a datum
Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Adds small, herringbone and diagonal tiles in black, white and grey! It also includes fancy new Terracotta tiles!
Co-authored-by: EOBGames <58124831+EOBGames@users.noreply.github.com>
* Adds Descriptive Names to Sandy Turf Decals (#66110)
It's kinda annoying that they're both called "plating" even though one is the decal and one is the base turf. Let's fix that by adding names.
* Adds Descriptive Names to Sandy Turf Decals
Co-authored-by: san7890 <34697715+san7890@users.noreply.github.com>
* Feex (#65612)
Splits reagent log string creation to a standard proc and a bespoke stupid proc that takes an external list instead of using its own reagents_list.
* Fix issue with reagent logging where it would sometimes fail to output reagents on reagent transfer.
* Update hyposprays_II.dm
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Decomposition now has mold first, then ants, instead of both. (#65409)
Someone made a suggestion to me that fixed a problem I've been trying to work around, and now that I've made it so people can set custom decompose times, that made this WAY EASIER.
When most foods decay, they will turn into the generic moldy food sprite you've become accustomed to, without the ants. After 30 seconds, that moldy food will get consumed by ants, leaving only the anthill.
Ants also no longer spawn on lavaland's basalt, by Fikou request.
* Decomposition now has mold first, then ants, instead of both.
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
* Makes Ants glow, puts a minimum on ant screaming and shoe permeability, and other ant-related things. (#64786)
I found out how emissives work and my first thought was "damn ants should glow that would look sick"
So now they do.
Also, having less than 5u ants in your body will make you not scream, so 0.0001u ants will no longer have that tiny chance of making someone scream for their life.
If an ant pile has a max damage value less than 1, then they won't be able to bite through your shoes. This is the same threshold as the second tier ant icon.
Makes the giant ant a hostile mob with the neutral faction, meaning they will attack anything not in the neutral faction.
* Makes Ants glow, puts a min on ant screaming & shoe permeability, & other ant-related things.
Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
* Adds plating sidings that match the new tiles (#65019)
Adds plating sidings that match the new tiles
* Adds plating sidings that match the new tiles
Co-authored-by: Mickyan <38563876+Mickyan@users.noreply.github.com>
* Makes extinguisher sprays look nicer (#64949)
Rather then sticking around till their 7 second delay, they dissipate
once they finish their movement. This dissipation comes with a fading
and such to make things look nicer.
I've applied the fading behavior to sprays too, since they could also
use the help.
I really hate how things look currently, makes me break out in hives
* Makes extinguisher sprays look nicer
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>