* Allows languages to weight the likelihood of certain syllables, refactors certain code related to pick_weight() (#71275)
## About The Pull Request
This PR does the following:
- Defines a new proc in __HELPERS/_lists.dm called
`pick_weight_recursive()`. This is the code from
`/obj/effect/spawner/random/` that allows for nested weighted lists,
moved to its own proc.
- Replaces explicit code in spawners/random.dm with calls to
`pick_weight_recursive()` where appropriate
- Deletes the redundant (and barely used) proc
`/obj/item/loot_table_maker/proc/pick_loot`, as this was equivalent to
`pick_weight_recursive()`
- Moves the global proc `fill_with_ones()` from spawners/random.dm to
__HELPERS/_lists.dm
- Replaces `pick()` in language syllable selection with
`pick_weight_recursive()`, allowing languages to define syllable weights
or use nested lists of syllables.
- Reformats Galactic Common to use nested lists of syllables, allowing
English and Chinese syllables to occur at equal frequency despite having
different numbers of each.
## Why It's Good For The Game
Allowing languages to define syllable weights and nested groups of
syllables is a relatively small change that greatly expands what you can
do with them. In addition to making Galactic Common look nicer in code,
this change also allows for the easy creation of languages with highly
uneven syllable distributions (including ultra-rare secret syllables,
perhaps) or the quick creation of pidgin languages that combine multiple
syllable sets.
Using a new proc simplifies spawner code by reducing repetition. Making
it global allows for other code to easily implement the same flexible
and elegant system of nested lists that spawners already use.
## Changelog
🆑
refactor: defines a new global proc, pick_weight_recursive()
code: languages can weight syllables, and galactic common's definition
is easier to look at
/🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Allows languages to weight the likelihood of certain syllables, refactors certain code related to pick_weight()
Co-authored-by: skylord-a52 <skylord-a52@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Brimdemons & Lobstrosities drop (slightly) useful organs (#70546)
Goliaths, Legions, Watchers, and (as of recently) Bileworms all drop
something vaguely useful when they die.
Brimdemons and Lobstrosities do not. This PR aims to fix that, so that
there's at least some vague benefit to hunting them.
In this case it takes the form of organs you get when you butcher them,
similar to the regenerative core from Legions.
As they're similar to the regenerative core, I modified the regenerative
core to extend from a new common "monster core" typepath which these two
new organs also extend.
Like the regenerative core, both of these items do something when used
and something slightly different if you go to the effort of having
someone implant them into your body. They also decay over time, and you
can use stabilising serum to prevent this from happening.
https://user-images.githubusercontent.com/7483112/195967746-55a7d04d-224e-412d-aedc-3a0ec754db3d.mp4
The Rush Gland from the Lobstrosity lets you do a little impression of
their charging attack, making you run very fast for a handful of seconds
and ignoring slowdown effects. Unlike a lobstrosity you aren't actually
built to do this so if you run into a mob you will fall over, and if you
are doing this on the space station running into any dense object will
also make you fall over (it shouldn't make you _too_ much of a pain for
security to catch).
The idea here is that you use this to save time running back and forth
from the mining base.
The Brimdust Sac from the Brimdemon covers you in exploding dust. The
next three times you take Brute damage some of the dust will explode,
dealing damage equal to an unupgraded PKA shot to anything near you (but
not you).
If you do this in a space station not only is the damage proportionally
lower (still matching the PKA), but it _does_ effect you and also it
sets you on fire. You can remove the buff by showering it off.
The idea here is that you use this for minor revenge damage on enemies
whose attacks you don't manage to dodge.
https://user-images.githubusercontent.com/7483112/195967811-0b362ba9-2da0-42ac-bd55-3809473cbc74.mp4
If you implant the Rush Gland then you can use it once every 3 minutes
without consuming it, and the buff lasts very slightly longer. It will
automatically trigger itself if your health gets low, which might be
good (helps you escape a rough situation) or bad (didn't want to use it
yet).
https://user-images.githubusercontent.com/7483112/195967888-f63f7cbd-60cd-4309-8004-203afc5b2153.mp4
If you implant the Brimdust Sac then you can use it once every 3 minutes
to shake off cloud of dust which gives the buff to everyone nearby, if
you want to kit out your miner squad. The dust cloud also makes you
cough if you stand in it, and it's opaque. If you catch fire with this
organ inside you and aren't in mining atmosphere then it will explode
inside of your abdomen, which should probably be avoided, resultingly it
is very risky to use this on the space station.
* Brimdemons & Lobstrosities drop (slightly) useful organs
* update modular
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Adds a QM statue, as all other heads have one. (#70744)
* Adds a QM statue, bringing it on par with every other head of staff.
* Adds a QM statue, as all other heads have one.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@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 structure spawners for electrified grilles, adds greps for some fulltile window spawners (#69528)
* adds structure spawner for electrified grilles
* sdmm key cleanup
* adds structure spawners for electrified grilles, adds greps for some fulltile window spawners
* should fix blueshift lints lets see
* should resolve most if not all of the others
* damn you skyrat map reset
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
* Random statue mapping spawner spawns its statues anchored (#69305)
About The Pull Request
The /obj/effect/spawner/random/decoration/statue spawner will spawn it's statues anchored, assuming they are structures.
Also refactored graffiti spawner since I was adding support in this area and saw it
Why It's Good For The Game
If you wanna use the spawner to place a statue in a public area, people will shove it around and stuff, which is lame.
So, by anchoring it when it spawns, mappers don't have to worry about people bumping their pre-placed statues around.
* Random statue mapping spawner spawns its statues anchored
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Food Expansion 4! The great salad update and more (#69355)
About The Pull Request
This is my fourth food expansion PR, adding and changing quite a few things.
This PR will:
Add 7 different types of salads
Add a new ingredient supply beacon box called 'Salads', which includes ingredients used for the salad recipes
Give cherry jelly its own container, and allow jelly to be ordered from the produce console
Make cherry jelly actually nourish you when consumed
Add paçoca, a Brazilian peanut candy requested by @ GuillaumePrata
Add mashed potatoes
Add shepherds pie
Add Cullen skink
* Food Expansion 4! The great salad update and more
Co-authored-by: MidoriWroth <kodyman@att.net>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Add chance for maintenance crate and closet spawners to be open (#68851)
* Add randomized open state for crate spawners
* Add chance for empty closets to spawn open
* Add chance for maintenance crate and closet spawners to be open
Co-authored-by: Tim <timothymtorres@gmail.com>
* Re-adds freeform/purge boards to all AI uploads, removes from spawners (#67915)
Re-adds the freeform boards to an open table in all the AI uploads, re-adds the purge boards to the harmful table in all uploads, and removes them from their associated spawners so that all stations have them as roundstart guaranteed spawns.
* Re-adds freeform/purge boards to all AI uploads, removes from spawners
Co-authored-by: Son-of-Space <63861499+Son-of-Space@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* This tail refactor turned into an organ refactor. Funny how that works.
* Firstly, fixing all the conflicts.
* Fixes all our maps (hopefully)
* Actually, this should fix pod people hair :)
* Almost everything is working, just two major things to fix
* Fixed a certain kind of external organ
* Cleaning up some more stuff
* Turned tail_cat into tail because why the fuck are they separate?
* Moved all the tails into tails.dmi because that was just dumb to have like 3 in a different file
* Adds relevant_layers to organs to help with rendering
* Makes stored_feature_id also check mutant_bodyparts
* Fixes the icon_state names of ALL the tails (pain)
* Fixes wagging, gotta refactor most mutant bodyparts later on
* I Love Added Failures
* Fixed some organs that slipped through my searches
* This could possibly fix the CI for this?
* It doesn't look like it did fix it
* This will make it pass, even if it's ugly as sin.
* Fixed Felinids having a weird ghost tail
* Fixes instances of snouts and tails not being properly colored
Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Adds steam vents to maintenance, adds some flavor to maintenance. (#66915)
* Steam Vent Challenge (Do not meme)
* Fixes icebox, I think
* Changes to how smoke behaves appears to have removed the need for the opacity setting on the vent. Sounds.
* Mapmerge sama please
* Adds signal system, crafting recipe, and some basic crafting organization.
* Potential fix
* Apply suggestions from code review
Co-authored-by: Seth Scherer <supernovaa41@ gmx.com>
* makes changes thanks anturk
Co-authored-by: Seth Scherer <supernovaa41@ gmx.com>
* Adds steam vents to maintenance, adds some flavor to maintenance.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Seth Scherer <supernovaa41@ gmx.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Reduces the chance of spawning a pants altar (#66904)
* reduces the chance of spawning a pants altar
* Reduces the chance of spawning a pants altar
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Adds an ancient altar to maintenance. (#66666)
Adds an ancient cult altar to the depths of maintenance.
It can create products woven by the ancient cultists.
* Adds an ancient altar to maintenance.
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* AI Lawset DLC - Ten Commandments (#66134)
* Add 10 commandments AI lawset
* Add silicon bible quote
* Remove backslash syntax bloat
* Change 10 commandment lawset to be explicit
* Add ten commandments lawset to config
* AI Lawset DLC - Ten Commandments
Co-authored-by: Tim <timothymtorres@gmail.com>
* Add randomized lawsets to AI upload (#66077)
This removes all the current boards and lawsets in the AI upload for all maps and replaces them with:
x1 reset board on the regular table
x1 asimov lawset on the regular table
x3 randomized harmless lawsets (marked green, no barriers, human-friendly lawset)
x3 randomized neutral lawsets (marked blue, windoor barrier, station-friendly lawset)
x3 randomized harmful lawsets (marked red, brigdoor barrier, antag-friendly lawset)
Additionally, I reorganized the AI lawset code and removed an old malfunction lawset code that existed since r4407 but wasn't used anywhere.
* Add randomized lawsets to AI upload
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Improve ornament, barricade, grille, and girder random spawners (#65252)
* Improve ornament, barricade, grille, and girder random spawners
Co-authored-by: Tim <timothymtorres@gmail.com>