* Changes how weather sends sound to players, reduces sound loop overtime (#59284)
* Converts looping sounds from a list of play locations to just the one
* Updates all uses of looping sounds to match the new arg
* Adds an area based sound manager that hooks into looping sounds to drive the actual audio. I'll be using this to redo how weather effects handle sound
* Some structrual stuff to make everything else smoother
Timers now properly return the time left for client based timers
Weather sends global signals when it starts/stops
Looping sounds now use their timerid var for all their sound related timers, not just the main loop
* This is the painful part
Adds an area sound manager component, it handles the logic of moving into new areas potentially creating new
sound loops. We do some extra work to prevent stacking sound loops.
Adds an ash storm listener element that adds a tailored area sound manager to clients on the lavaland z level.
It's removed on logout.
Adds the ash_storm_sounds assoc list, a reference to this is passed into area sound managers, and it's modified
in a manner that doesn't break the reference in ash_storm (This is what I hate)
* Hooks ash storm listener into cliented mobs and possessed objects
* Documents the odd ref stuff, adds an ignore start var to looping sounds, fixes some errors and lint issues
* Applies kyler's review
banging
Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>
* Cleans up some var names, reduces the amount of looping we do in some areas
* Makes the code compile, redoes the movement listener to be more general
* fuck
* We don't need to detach on del if we're just removing signals on detach
* Should? work
* if(direct) memes
Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>
* Changes how weather sends sound to players, reduces sound loop overtime
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@ gmail.com>
* Refactors species stomach code, makes ethereal charge inherent to their stomach (#59801)
A stomach would literally just ask the species datum how to be hungry and made a bunch of exceptions for ethereals. I mostly just moved code around so that hunger is handled by a persons stomach, thus shrinking the species.dm bloat.
This also makes it so ethereal's charge mechanic is unique to their stomache, instead of this really weird inbetween where just nothing happens and you kinda starve to death. You can stick an ethereal stomach in a human and this will replace their hunger mechanic with the charge mechanic and lets them absorb power from APCs and everything. You can also give ethereals a normal stomach and they'll use the normal hunger mechanics
* Refactors species stomach code, makes ethereal charge inherent to their stomach
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* Adds a kneecapping element and adds that very element to baseball bats.
* Update signals.dm
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Fix missing SIGNAL_HANDLER (#59826)
Adds SIGNAL_HANDLER to everywhere that didn't have it that was picked up by dm-lua, which is now ready enough to catch these.
* Fix missing SIGNAL_HANDLER
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Modifies right click logic so that it is not the same priority as modifier keys. (#59656)
Strips out the existing right click code - Due to the myriad of ways right clicking has been implemented, dedicated signals and procs for right clicking without modifiers are fundamentally incompatible with our system of primary and secondary attacks.
Adds additional signals to attacking code. These signals allow atoms to cancel the attack chain early on secondary attacks, or override the standard procs and not send signals to prevent any undesired behaviour from signal handlers.
Items that used RightClick procs have been converted to attack_hand_secondary.
The slaughter demon, having its own set of snowflake code as poor OOP principles have been applied in UnarmedAttack() procs with lacking calls to parent procs and arbitrary redefinition of behaviour, checks for a right click in its own UnarmedAttack() and performs a bodyslam off that.
Storage components now hijack the secondary attackby stage via signals to handle their opening and closing shortcuts on right click. When you right click a storage component equipped item with an object in your active hand, the object has an opportunity to perform its logic in pre secondary attack code and cancel the attack chain. If it does not cancel the attack chain in pre-attack, then the storage component takes over for attackby and, if possible, opens the relevant inventory and ends the attack chain.
The forensic scanner is a proof-of-concept of this working in action. With its scan logic moved from afterattack code to pre attack code for right clicking, right clicking with the scanner will now perform a scan where previously one was impossible. Left clicking still does what it always does - Scans at the very end of the attack chain.
The logic still isn't perfect - For example, you still can't attack containers in melee even in combat mode (you'll either open them or put your weapon into them regardless of which option you choose) - But this is a better setup overall which allows for items to at least override this behaviour in pre-attack if needed.
* Modifies right click logic so that it is not the same priority as modifier keys.
* a
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Adds the airlock shell, refactors USB code to be easier to use, implements USB cables for the binary valve and more. (#59728)
Adds the airlock shell. The circuit has full control over the airlock.
Refactors USB code to be easier to use for less experienced coders.
Implements USB cables for the binary valve to be able to open/close the valve.
Adds a private channel for radios that only lets circuits with the same owner's ID to interact with it.
* Adds the airlock shell, refactors USB code to be easier to use, implements USB cables for the binary valve and more.
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
* Added circuit component UI details, added multiplexer and allowed inserting components directly into shells. (#59635)
Adds the multiplexer circuit component - en.wikipedia.org/wiki/Multiplexer
Circuit components can now be directly inserted into shells rather than having to take the integrated circuit out.
Special information can be accessed from components now through the "Info" button besides the eject button on a component.
* Added circuit component UI details, added multiplexer and allowed inserting components directly into shells.
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
* Converts tippable behavior from cows and medibots to a component (tip over anything with adminbus) (#59705)
This PR converts cow-tipping and medibot-tipping into a component, /datum/component/tippable. Cows and medibots now use the tippable component to control their tipping behaviors.
This PR also goes through a few atom_attack_hand signals and makes them all send the same arguments.
* Converts tippable behavior from cows and medibots to a component (tip over anything with adminbus)
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* Makes turfs persist signals
* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear
* Converts all uses of connect_loc over to the new patterns
* Adds some comments, actually makes turfs persist signals
* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work
* bro fuck documentation
* Changes from a var to a proc, prevents admemems and idiots
* Extra detail on why we do the copy post qdel
* Makes turfs persist their signals, uses this to optimize connect_loc
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Adds set_density()
Fixes one instance of a duplicate density assignment on an object.
Comments two hacky usages of density which will have to forgo using the setter for now.
Lets us append code to the event of density changing.
Pretty sure this is leading up to some multitile object thing -Lemon
Co-authored-by: Rohesie <rohesie@gmail.com>
* Correctly pluralize multiple projectiles (#59702)
When something gets hit by multiple projectiles whose names end in "s", an extra "s" gets added to pluralize them. Sadly \s doesn't add the es, so I've made a proc with the other conjugation methods and used it for projectiles.
* Correctly pluralize multiple projectiles
Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com>
* Improves H.A.U.L. gauntlets and /datum/component/strong_pull code, fixing a couple of little issues in the process (#59550)
Does a bit of a logic re-write on the cargo gauntlets and their strong_pull component.
Cargo gauntlets themselves have been converted to use signals for equipping and unequipping.
Their component reference has been changed to a weakref so if the component is ever Destroy()ed for any reason outside of the gauntlets it doesn't hard del.
The strong_pull component now registers signals with parent in RegisterWithParent() instead of Init() and removing the strong grip is no longer a SIGNAL_HANDLER proc. It is now called by the signal handler for no longer pulling things and in Destroy(). This stops instances where pulling things and removing the gloves didn't remove the pull effect appropriately.
* Improves H.A.U.L. gauntlets and /datum/component/strong_pull code, fixing a couple of little issues in the process
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Fixes integrated circuits not being able to have more components added to them (#59724)
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Fixes integrated circuits not being able to have more components added to them
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Auto doc'd much of grown botany food and plant traits and renamed a buncha variables and parameters to match modern contribution guidelines.
* Cleaned up a good bit of plant gene code left over from the prior refactor and modernized some of it.
All plant effects that were once unique to a plant are now un-graftable, un-mutatable, un-shearable plant traits - called IMMUTABLE traits.
The ultimate goal of this PR was to make all of the hidden, arcane traits that are spread through botany's various plants and add a way to figure out they exist in game. Take omega-weed, for example, which has a maximum volume of 420 units.
What does this mean for the enterprising botanist?
In most cases, all the plants should act the same way. None of the immutable traits are graftable from any of the plants, they cannot be sheared off of the plant, and they cannot be mutated randomly from strange seeds or high instability mutations.
Though, in refactoring these traits, two things have been fixed: Novaflower's on hit and Deathnettle's on hit now proc again. If you aren't aware, Novaflowers apply firestacks and Deathnettles paralyze on hit. They've been in an unreachable code segment for a few years now and i'm not sure if they should be "fixed" or not, since I think they don't need any buffs.
A few other things have changed:
* Liquid Contents can no longer be applied to plants with Hypodermic Prickles, and visa-versa. They already didn't work together, but this means you need to go through an extra step to make LC-deathnettles.
* Killer Tomatos no longer have liquid contents. Didn't really make sense, anyways.
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* USB Cables -- Connect circuits to computers/machines (#59345)
* Initial commit
* Sprites, finishing work
* More ways to detach from circuitboards
* Clear TODOs, give bots a button
* Fix qdel loop
* Designs
* It's the bots that have them
* Grammar fix
* Feedback for connecting to circuit directly
* Add USB cable design to basic circuitry
* Better naming
* Feedback
* Fix for new code
* COMSIG_CIRCUIT_ADD_COMPONENT_MANUALLY
* span procs
* USB Cables -- Connect circuits to computers/machines
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Fixes slip mood debuff (#59586)
This PR fixes a case where slip mood debuff was not triggering at all due to the simple fact that the mood component was not listening for the mob slip signal, so the relevant on_slip proc was never called and therefore mood debuff was never given.
Fixes#59570
* Fixes slip mood debuff
Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
* Add component and element templates
* Convert compoinent and element templates to markdown files
* Change element example in template to stateless
* Replace element example with gong moving sound
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
* Revert "Adds two clown-spection scanners that print clowncrypted reports (#59306) (#6176)"
This reverts commit 91e1aa4fe4.
* Revert "Two Person Mecha for Robotics: The Only Real Solution To An Imminent Geometer Summoning 💪 (#59249) (#6177)"
This reverts commit cf2c1ca19d.
Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Alright, update the changelog and body of the PR, and comment here when that's done.
This should be ready for merge then.
Co-authored-by: interestingusernam3 <51925758+interestingusernam3@users.noreply.github.com>
* Makes obj_integrity only updated through procs (#59474)
Having things updating integrity directly is just going to cause more problems down the line as more elements and components depend on being notified of integrity changes. It's an easy mistake to make so making it private should deal with the problem.
get_integrity() might be useful in the future but is mainly a side effect of making obj_integrity private as that also disallows reads.
* Makes obj_integrity private and only updated through procs
* Mirror!
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
* Unregistering with a list of lists will fail, but not loudly, which causes some really painful errors. Let's make a stack trace for it, and fix the one case I know of (#59434)
* Complains about annomalus unregisters, hopefully this helps downline
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Fixes cigarettes making you so lame that they spill the spaghetti from your pockets (and also keep falling off) (#59352)
Wack
Fixes#59342
Changelog
🆑
fix: Smoking no longer spills spaghetti from your pockets
fix: Lit cigarettes no longer keep falling off
spellcheck: Removed extra "the" from item knockdown messages
/🆑
* Fixes cigarettes making you so lame that they spill the spaghetti from your pockets (and also keep falling off)
Co-authored-by: Mickyan <38563876+Mickyan@users.noreply.github.com>
* Fixes human burgers not naming after the meat donor (#59286)
- Adds custom materials to result of grilling
- Adds custom materials to result of atom processing
- Adds source name and job to mob_meat material if available
- Makes processed atoms have same pixel offsets as their source but randomise with each subsequent one
* Fixes human burgers not naming after the donor
Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com>
* Fixes runtimes related to forensic components on deleted things. (#59315)
* Fixes runtimes related to forensic components on deleted things.
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
* Fixes an issue in how processing is done for gas leaks (#59322)
Couple issues fixed that were found in testing along side the stationary canister rework. Not sure how I missed this but I should have done thorough testing again after changing the processing list used after I had finished an earlier round of testing.
I don't think it will have any visible effects? Just runtime and hard dels.
How did I miss this
* Fixes an issue in how processing is done for gas leaks
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* [READY]Updates knockoff component and adds it to prescription glasses (#59006)
* [READY]Updates knockoff component and adds it to prescription glasses
Co-authored-by: Mickyan <38563876+Mickyan@users.noreply.github.com>
* Makes canister leaking and blowing up use a component and element respectively (#59075)
I want to use this behavior on some other things so into a component and element it goes. Gas leaking is handled by a component so it can process whereas the object breaking and causing an explosion is handled by an element. Some minor changes were made so canisters were more consistent in leaking.
* Makes canister leaking and blowing up use a component and element respectively
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* use SIGNAL_HANDLER REEEEEE (#59242)
makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did
* USE SIGNAL_HANDLER REEEEEE
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Fixes being unable to feed chickens to get eggs (#59267)
Fixes being unable to feed chickens for eggs.
`eggs_left` is always less than `max_eggs_held` 'cause you can't give them food to increase the amount of eggs 'cause `eggs_left` is less than `max_eggs_held` 'cause you can't give them food to increase the amount of eggs 'cause...
* Fixes being unable to feed chickens to get eggs
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* 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>
* makes LoadComponent() a macro like AddComponent() is so it supports named arguments
* Update miscellaneous.dm
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>