* optimizes some internals of signal and component code (#59154)
* optimizes some internals of signal and component code
* comment and a better var name
* gets rid of DF_SIGNAL_ENABLED and all referencing code because its dumb
* gets rid of NONE | CallAsync(stuff)
* fixes conflicts
* puts NONE back in
* optimizes some internals of signal and component code
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Implements Plant Biotype (#57108)
Implements a plant biotype for plant based mobs. Changes the wood golem mob to be an organic, humanoid, and plant biotype---because wood is an organic substance, not a mineral.
This additionally adds the ability for plantbgone/weedkiller to deal damage to plant biotypes.
Why It's Good For The Game
There's a curious lack of a defined plant biotype, despite plants sharing a unique number of traits. Ideally, this behavior can be more consistently implemented with something like biotypes. A minor example of this is utilized in this PR: weedkiller and plantbgone impacting plant-like mobs, which is what you'd expect.
Changelog
cl
add: Plant-like mobs are now impacted and take damage from plant-b-gone and weedkiller reagents
add: Plant-like mobs can be health scanned with a plant analyzer
add: Plant-like mobs are impacted by the floral gun in the same manner pod people are
/cl
* Implements Plant Biotype
Co-authored-by: Fox McCloud <Fox-McCloud@users.noreply.github.com>
* Removes the excited cleanup subprocess (#57381)
When I was in the process of developing my atmos fixes/optimizations, I focused heavily on maintaining the area
of excited groups, since growing delayed self_breakdown(), and lead to shitty behavior which I thought was the
result of my sleeping changes.
This was not the case, those who came before me knew better, as always.
Especially now, since I've unhooked breakdown from excited groups gaining new tiles, my concern was unfounded,
and actually lead to shitty behavior and wasted time.
I failed to recognize the value in random garbage_collect()s, they help prevent mass gas equalization over large
spaces, they make gas appear to move more consistently when in these large spaces, and they lessen the amount of
self_breakdown()s over large turf lists, which is very helpful for lowering the overall overtime of the
subsystem.
This fixes my mistake, and purges the excited cleanup subprocess from the air subsystem. It's free real estate
babyyyyyyyy.
* Removes the excited cleanup subprocess
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs (#57263)
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Moves /datum/var/signal_enabled to datum flags (#56372)
* Moves /datum/var/signal_enabled to datum flags
`signal_enabled` is a variable on /datum, so present almost every object
in the game. Folding it into the existing `datum_flags` variable will
save allocating a variable on every datum in the game.
- Clown weaponry was using the `signal_enabled` variable to turn their
attached slippery component on and off when the shield/sword was
toggled. They now just remove/add the component, rather than touching
deep datum internals.
* Moves /datum/var/signal_enabled to datum flags
Co-authored-by: coiax <yellowbounder@gmail.com>
* adds xenomorph holdable flag (#55814)
adds a flag that lets something be held by xenos
adds it to facehuggers
makes the xeno "can i hold this item" check check for flag instead of facehuggers
* adds xenomorph holdable flag
Co-authored-by: Fikou <piotrbryla@onet.pl>
* Refactor the procedural generation of lavaland and turf/closed/mineral (#54915)
This replaces lavaland's old diagonal tunnel gen which was really
horrendously jammed into asteroid floor code (?????) with Cellular
Automata which runs in rust (PR for that here:
https://github.com/tgstation/rust-g/pull/57 ). The new code is a bit
cleaner, but also looks better.
VID: https://streamable.com/a45ke2
Things to do:
- Make an icemoon version
- Fix the roundstart atmos adjacency issues
I asked AnturK if this was an acceptable PR for this month; he said it
was okay as long as I didn't add new areas, which I don't plan to do.
But if anyone thinks this PR breaks the spirit of the month I'll open
it again in december.
* Refactors the procedural generation of lavaland and turf/closed/mineral
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
* pass_flags handling refactor + rewrites a part of projectiles for the n-th time (#54924)
Yeah uhh this'll probably need testmerging even after it's done because yeah it's a bit big.
If y'all want me to atomize this into two PRs (pass flags vs projectiles) tell me please. Pass flags would have to go in first though, in that case, as new projectile hit handling will rely on pass_flags_self.
Pass flags:
Pass flags handling now uses an atom variable named pass_flags_self.
If any of these match a pass_flag on a thing trying to pass through, it's allowed through by default.
This makes overriding CanAllowThrough unnecessary for the majority of things. I've however not removed overrides for very.. weird cases, like plastic flaps which uses a prob(60) for letting PASSGLASS things through for god knows why.
LETPASSTHROW is now on pass_flags_self
Projectiles:
Not finalized yet, need to do something to make the system I have in mind have less unneeded overhead + snowflake
Basically, for piercing/phasing/otherwise projectiles that go through things instead of hitting the first dense object, I have them use pass_flags flags for two new variables, projectile_phasing and projectile_piercing. Anything with pass_flags_self in the former gets phased through entirely. Anything in the latter gets hit, and the projectile then goes through. on_hit will also register a piercing hit vs a normal hit (so things like missiles can only explode on a normal hit or otherwise, instead of exploding multiple times. Not needed as missiles qdel(src) right now but it's nice to have for the future).
I still need to decide what to do for hit handling proper, as Bump() is still preferred due to it not being as high-overhead as something like scanning on Moved(). I'm thinking I'll make Moved() only scan for cases where it needs to hit a non-dense object - a prone human the user clicked on, anything special like that. Don't know the exact specifics yet, which is why this is still WIP.
Projectiles now use check_pierce() to determine if it goes through something and hits it, doesn't hit it, or doesn't go through something at all (should delete self after hitting). Will likely make an on_pierce proc to be called post-piercing something so you can have !fun! things like projectiles that go down in damage after piercing something. This will likely deprecate the process_hit proc, or at least make it less awful.
scan_for_hit() is now used to attempt to hit something and will return whether the projectile got deleted or not. It will delete the projectile if the projectile does hit something and fails to pierce through it.
scan_moved_turf() (WIP) will be used for handling moving onto a turf.
permutated has been renamed to impacted. Ricocheting projectiles get it reset, allowing projectiles to pierce and potentially hit something again if it goes back around.
A new unit test has been added checking for projectiles with movement type of PHASING. This is because PHASING completely causes projectiles to break down as projectiles mainly sense collisions through Bump. The small boost in performance from using PHASING instead of having all pass flags active/overriding check_pierce is in my opinion not worth the extra snowflake in scan_moved_turf() I'd have to do to deal with having to check for hits manually rather than Bump()ing things.
Movement types
UNSTOPPABLE renamed to PHASING to better describe what it is, going through and crossing everything but not actually bumping.
Why It's Good For The Game
Better pass flags handling allows for less proc overrides, bitflag checks are far less expensive in general.
Fixes penetrating projectiles like sniper penetrators
This system also allows for better handling of piercing projectiles (see above) without too much snowflake code, as you'd only need to modify on_pierce() if you needed to do special handling like dampening damage per target pierced, and otherwise you could just use the standardized system and just set pass flags to what's needed. If you really need a projectile that pierces almost everything, override check_pierce(), which is still going to be easier than what was done before (even with snowflake handling of UNSTOPPABLE flag process_hit() was extremely ugly, now we don't rely on movement types at all.)
* pass_flags handling refactor + rewrites a part of projectiles for the n-th time
Co-authored-by: silicons <2003111+silicons@users.noreply.github.com>
* minor material_container args/vars refactor and Mk-honk shoes peeve. (#54863)
My original intention was just fixing an issue with the Mk-honk banana shoes but, considering I didn't want to add two new variables to a component with already lot of args and lengthy AddComponent() calls in term of text, I had to merge some TRUE/FALSE variable/args into the breakdown_flags bitfield (now named mat_container_flags) in the process.
* minor material_container args/vars refactor and Mk-honk shoes peeve.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Readds the tesla, reworks it a bit (#53072)
* Makes tesla movement nicer, fixes some atmos concerns, changes how energy is handled, and readds the tesla
* readds delam and desc
* I fucked it
* flags
* holy fuck
* Constricts the zaps that can generate power from a tesla coil
* *kick?
* Readds the tesla, reworks it a bit
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Mecha followup one (#53470)
fixes#53384fixes#53327
fixes a bug where mechs could move too fast
fixes cooldown being inconsistent
makes strafe behavior better
fixes lights being very small
fixes#50639fixes#47373fixes#43605
Moved some code to the correct spots and did the varedit bitfield thing
* Mecha followup one
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
* Merge pull request #52895 from MrMelbert/blindmanwalking
Prevents blinded people from using camera consoles perfectly fine
* Prevents blinded people from using camera consoles perfectly fine
Co-authored-by: nemvar <47324920+nemvar@users.noreply.github.com>
* Icon smooth refactor (#52864)
bitflag list construct added: an associative list of bitflags for cheap and quick element comparison between two lists using the same system.
canSmoothWith list turned into a bitflag list.
smoothing_groups list added to substitute the type path list.
smoothing procs turned into atom procs, refactored and optimized a bit.
smooth directions redefined in order to fit in 8 bits for a future smoothing system
some variable names changed, foreseeing a second smoothing system
SMOOTH_OBJ flag added, for things that need to scan turfs for smoothing. The old locate() optimization has the risk of returning false negatives by finding a child and returning null while there might be one of the wanted type as well, as it doesn't match the type exactly.
SMOOTH_TRUE and SMOOTH_MORE condensed into SMOOTH_CORNERS. The old behavior can be replicated using smoothing groups without loss.
Does very minor code cleanup.
Processing-wise didn't find a noticeable difference. The system loses on init a bit by setting the bitflag_lists, and by scanning whole turf contents for object smoothing (increasing accuracy), and gains by making less checks per target to smooth, through the same bitflag_lists.
Memory-wise there should be a small improvement, given that on the old system we had 63512 canSmoothWith lists (a few typelists, most unique), and on this new system canSmoothWith + smoothing_groups are both bitflag_lists from the same pool, totaling 46 in number.
Could be tested a bit to see if I missed any icons not properly smoothing.
* Icon smooth refactor
Co-authored-by: Rohesie <rohesie@gmail.com>
* Refactors area stuff (#52751)
-bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot
-Unused vars
-Fixed a var pretending to be a fake bool
-Probably more
* Refactors area stuff
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
About The Pull Request
It annoyed me that we have a perfectly good frag grenade item, and a perfectly good shrapnel component, but no crossover episode between the two. This remedies that, and does a lot, lot more.
dreamseeker_2020-03-30_05-01-13.png
dreamseeker_2020-03-30_05-01-26.png
Big points:
Adds new component: pellet_cloud, which can be used by ammo casings, guns, and landmines to spray shrapnel and display aggregate hit messages ("You're hit by 6 buckshot pellets!" vs "You're hit by the buckshot pellet in the X" x6). All gun ammo that shoot multiple pellets now use this component on firing.
Adds stingbangs, premium less-lethal grenades that shoot off lots of stinger pellets, to cargo. Frag grenades are also reworked to have smaller booms, but shoot off lots of shrapnel shards. You can jump on top of these grenades to absorb a portion of the shrapnel to save those around you! There's an achievement for dying this way, called "Look Out, Sir!"
Projectiles can now embed items/shrapnel. Adds .38 DumDum ammo to cargo that does less damage and has negative armor pen, but can embed in people. This is the only ammo that currently embeds.
Bullets can now ricochet off walls, structures, and machinery (harder surfaces are more likely to ricochet). Only standard .38 and Match Grade .38/.357/L6 ammo can ricochet, with Match Grade being much better at ricocheting. You can buy Match Grade .38 from cargo and Match Grade L6 ammo from the nuke uplink, while Match .357 is admin only.
Armor now protects you from harmful embeds, taking the better of the bullet/bomb armor on the affected limb. Armor penetration can modify this of course, and many blunt embeds like stingbangs and DumDum bullets are significantly worse if you have even 1 armor.
Other misc fixes/changes
Refactored the embed element a bunch and fixed it creating new elements for every instance rather than expected bespoke behavior. There are new /obj/item helpers for modifying and adding embedding.
Fixes#49989: Spears can no longer embed in turfs cause their sprite is annoying to me, it's generally harder for most things to embed in turfs
Fixes#49741: New carbon helpers for removing embedded objects
Fixes#46416: Handles embedded objects getting qdel'd or moved while embedded
Renamed the old shrapnel component for RPG loot to MIRV to avoid confusion
Repathed frag grenades from under minibombs to under base grenades, and added explosion vars to base grenades
Why It's Good For The Game
Fixes a bunch of janky design with embeds, adds lots of new avenues for projectile and grenade variety, ricochets and collateral damage are fun!
Changelog
🆑 Ryll/Shaps
add: Adds stingbangs to cargo (and one in the sec vendor premium), premium less-lethal grenades that shoot off a giant swarm of stingball pellets to help incapacitate swarms of people in tight quarters. You can jump on top of a live one to be a hero and absorb a bunch of shrapnel, same with frag grenades. There's even an achievement for dying to a grenade you jumped on!
add: Projectiles can now embed in people! Or at least grenade shrapnel and the new .38 DumDum ammo, now available in cargo, can. DumDum rounds excel against unarmored targets, but are pricey and do poorly against armored targets.
add: Bullets can now ricochet! Or at least, standard .38 and the new .38/L6 Match Grade ammo can. Match Grade ammo is finely tuned to ricochet easier and seek targets off bounces better, and can be purchased from cargo (for the .38) or nuke ops uplink (for the L6), but standard .38 ammo has a chance to ricochet as well.
tweak: Frag grenades now have smaller explosions but shoot off a bunch of devastating shrapnel, excellent for soft targets!
tweak: Shotguns and other multi-pellet guns now print aggregate messages, so you'll get one "You've been hit by 6 buckshot pellets!" rather than 6 "You've been hit by the buckshot pellet in the X!" messages. Bye bye lag!
balance: Armor can now protect against embedding weapons, taking the best of either the bullet or bomb armor for the limb in question away from the embed chance. Some weapons are better at piercing armor than others!
/🆑
* Cleans shit up, adds some upper limits on zap count, makes explosions less commen. Need to fix apc issue before
I test how it plays
* Mood, buffs and nerfs tesla
* Cherry-Picking
* eyyo
* back to basics
* aight
* broooooooooooooooooo
* adds else
* range
* fixes shit
* Sure
* Cleans shit up
* Fixes prob issue
* Gee I like this spooky guy
* I swear to god if prob picks just makes a list I am gonna blow a gasket
Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
* Goof I will find you and I will berate you
holy hell
Calm and peaceful ahhhhh
I swear goofs pc failing was the biggest tragedy in gaming
Fixes some flags
More touchups
Now to squash
Goofs PC failing was the biggest tragady in GAMING
* Fixing some misspellings before the bee gets me
* GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
* Full vehicle support
* Changes some flags around, "fixes" some bugs, makes being shocked less insane
* Makes spliting more reasonable, unfucks some shitty tesla code I copypasta'd into the sm, godspeed shitcode,
none noticed you.
* Removes my tesla_ignore_1 fix, another pr is up that should solve things, so we're just leaving it in for now,
gonna have to deal with merge conflicts when it gets merged, but that won't be too bad
* tfw
* Nothing to see here folks
* I'm a boomer
* Fixes cult space bases (again)
* h
* Fixes duplicate definition
* Lets cultists draw runes at the Lavaland cult altar ruin
* Adds CULT_PERMITTED_1 flag to check if cultists can summon/buld structures here
* h
About The Pull Request
title.
Also renames INORGANIC to MINERAL and removes it from simplemobs (never used for simplemobs) where it doesn't fit. Doesn't make sense to have both ORGANIC and INORGANIC as a flag.
Why It's Good For The Game
There's no reason to use a list for this.
Changelog
cl
code: Changed mob biotypes from lists to flags.
/cl
* adds hat throwing on people and borgs
* clothing flags, hats can knock off non-items, borg hat blacklist check
* prevents hats with items in them from being able to land on heads
* removes extra equip, hats can go on the hatless again, tinfoil fix
* if
* bit flag
About The Pull Request
This PR removes speech message and span hooks from dna, mutations, pierrot throat disease, species, tongues, masks, hats, held items, brain traumas and a carbon proc overload handling tonguelessness.
Tonguelessness is now handled by tongue removal registering for the speech signal and the hook being deregistered by having a tongue put in.
Also cleans up some /atom/movable/proc/get_spans() overloads that called the empty parent or overloaded the parent to do the exact same thing as the parent proc did.
Also cleans up calls to radio.talk_into() where the caller would often, as a result of copypasta, provide the proc with fresh copies of the proc's default values for proc args, and makes say_quote() better by giving it a default spans value so that none of the callers have to provide the same default one.
Why It's Good For The Game
Changelog
cl Naksu
code: Cleaned up saycode
/cl
* start with this
* oh man this looks so good
* hats are dead
* /obj/item/proc/speechModification is dead
* brain traumas and get_held_item_speechspans() are dead
* these should be static
* unfortunately we still need this
* /mob/living/carbon/treat_message(message) is kill
* clean up get_spans()
* dunk get_spans, modifies_speech for brain traumas, some superfluous static stuff
* move stuff around
* return values
* Refactors NODROP flag into TRAIT_NODROP
🆑 coiax
fix: Anti-drop implants can no longer be used to drop objects that they
were not responsible for sticking to a person's hand.
fix: Backfiring with a Barnyard spellbook will now play a spooky horse sound.
refactor: Refactors the way that "NODROP" items work to a new system,
there should be no change in functionality.
/🆑
Various items in the codebase were doing weird hoop jumps in order to
preserve the nodrop flag's state when it also wanted to change it, so I
moved it to a trait system.
I may have gone overboard with the type of unique trait sources, but
those can be changed later. My long term plan is make a general "CURSED"
nodrop origin, which means you can unlock cursed items by being hit with
a bolt of door opening or something. But that's for another PR, this has
no functionality changes, apart from some slightly modified descriptions
on cursed masks.
- Removed a bunch of redundant voice changing code for all the voice
changing animal masks, used two new clothing flags for this purpose.
- Also refactored a bit the animal masks, making new cursed subtypes that play
the sound when created.
* Drop location
cl Floyd / Qustinnus
tweak: You now have to be naked to get the nice shower moodlet, if you shower with clothes you get a bad moodie
add: Hygiene, you slowly become dirty over time, the more covered in blood you are the faster you will lose hygiene. When you are too dirty you will have a stink overlay. (Hygiene doesn't affect mood currently) It also spawns miasma slowly if you smell like shit.
add: adds NEET and neat traits. NEET's get 20 bucks social welfare extra and like being unhygienic, while neat people dislike being unhygienic and like being hygienic
/cl
This doesn't affect mood so plssss dont strawman in this PR about how I'm forcing you to shower or die or whatever
This PR is mostly visual and will allow for people to judge others for literaly being smelly as hell.
also NEET and neat traits which interact with being smelly. (neat likes hygiene, dislikes lack of it. NEETs like lack of hygiene and get some social welfare (20 bucks))