* EVEN MORE HARDDEL FIXES (#60228)
Fixes a ton of harddels, sourced from #59996
I think this brings us down to like, ~100 per round from ~200, with only like 20 of those being proper hell failures. I've seen harddel profiles below 1 second of total cost. Feeling good.
See you on the other side
Makes the cryopod control computer into a weakref, never trust bee code
Converts brig door timer internal lists to weakrefs
Fixes a harddel caused by qdeling a motion sensitive camera after it had left its source area, jesus christ why didn't we do this already holy shit
Converts the radio implant ref held by the antenna mutation to weakrefs because it isn't reliably cleaned up, makes the radio implant actually qdel its fucking radio
Removes the target var from the throwing datum, it does literally nothing and just exists to cause harddels, mostly for the singularity
Fixes a cable harddel sourced from things that try to enter blueprints after smoothing, but before roundstart. IE, shuttles. Removes shuttles from the blueprints
Fixes emmisive blockers being added post qdel
Removes some manual ghosting from cryopods, I initially did this for harddel reasons, but I figured out a better fix for that. I'm now doing it because it's got this really strange logic for like "re-entering the game" that doesn't actually link to what the ghostize proc does. We should remove this at some point
Fixes robot hud objects harddeling due to hanging refs
Fixes buildmode related hanging refs, I'm coming for you admin team
Fixes a few instances of trying to add the forensics component post qdel, hhhhhhhhhhh
Fixes some split personality harddels/weirdness
Replaces a use of disconnect_duct with an init qdel hint, I suspect there's more issues with duct harddels, I've seen some odd logs about ahhh the area_contents list, but we can worry about that later
Makes teleporter targets into weakrefs, properly types them as /atom
Makes frequency devices into weakrefs
Makes cameras remove themselves from camera nets on Destroy
Makes tgui ui datums implement destroy, this means if I ever see one hang a ref to user or whatever, I know there's an error with calling close() properly. I've seen this harddel once, but not after this change so I assume there was some error with close(). IDK maybe this is a papering over? Would have to ask @ stylemistake
I've seen logs of beartraps being in world post del, putting a return there just in case. The same is true of nerf darts, but I haven't really looked into that yet
Makes a shoe's ref to untying alerts a weakref, yes this is needed.
Moves clearing client_in_contents to the Login of the new mob. This prevents doing things like ghosting someone before a mob qdel causing harddels
Fixes a harddel set sourced from adding a status effect to a qdeleted thing. Is this an error? I'm honestly not sure.
Converts bsa code to weakrefs
Converts the partner var of heat exchangers to weakrefs
Converts camera assemblies to weakrefs
Fixes some dumb behavior with ammo casings and assuming you'll be on a turf post Destroy parent call
Fixes? merger related harddels, you were never cleared from your own members list, so origin objects would end up making a new list, creating harddels. Potential input from @ ninjanomnom about the logic
Chasms store a static list of "falling atoms", which only exists for chasms that go somewhere else. This list wasn't being cleared of qdeleted objects, which is what happens when you fall in most chasms. Fixes this, and converts the list to weakrefs.
Fixes some runtimes in both sheet code, and the weather listener element. This is here because runtime spam made testing more of a pain, didn't think it needed its own pr
Fixes colorful reagent harddels sourced from reagents that were qdel'd before roundstart. I'm only like 50% sure this actually got it, but the issue may have been solved by #60174, so eh
Turns the nuke op antag datum's ref to the war button into a weakref
Fixes some holopad code that was not nulling refs all the time
Converts camera bugs to weakrefs, this was the result of the bug being "reworked" like 6 years back without taking the existing ref clearing into account. Whole item needs a redo, but this'll do for now.
Ensures that the both pulling and pullee refs are cleared on Destroy
The crew monitor held all users in a non clearing list, makes that list a weakref because I hate everything
Oh and I removed all sources of gas_mixture qdeletion, I'm kinda unsure on this since it's not technically supported, but any harddels from it might? indicate something going wrong with like, gas passing logic. I'd like @ MrStonedOne's thoughts, since I trust him to call me an idiot if I'm wrong.
<!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. -->
## Why it's not good for the game
I crashed sybil like 10 times to get this data, I'm gonna put it to good use. Don't think you're safe sybilites, I'm coming for you.
* EVEN MORE HARDDEL FIXES
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Fixes duffelbag curse and curse of hunger code in general (#60290)
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Fixes duffelbag curse and curse of hunger code in general.
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Changes overlay lighting vis contents objs -> underlays (#60239)
Previously what it would do is create up to three objects; a cone, a lighting image and a holder
Then whenever the lighting image was placed into the holders vis contents and the holder would be teleported several times when the parent would to turn or move, and the cone would be spun when the parent spun
Instead of doing that it now just translates a single overlay every time that something is updated
* Mirror!
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
* Allows charging batteries of integrated circuits with inducers and allows scanning ids on unregistered circuits through shells. (#60227)
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Allows charging batteries of integrated circuits with inducers and allows scanning ids on unregistered circuits through shells.
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
* Circuit submodules (#60109)
Adds the module component that is basically a subroutine. Allows you to compact your logic into a bunch of functions.
* Circuit submodules
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
* Fixes a roundstart uplink implanting runtime (#60242)
There's no guarantee there will be a user making the implanting, such as it's the case of roundstart equipping.
* Fixes a roundstart uplink implanting runtime
Co-authored-by: Rohesie <rohesie@gmail.com>
* fixes hyperspace connect_loc_behalf bug (#60231)
turns out my move_stacks var doesnt work asynchronously since this bug made things with connect_loc_behalf runtime on every movement unless you somehow moved it back to the transit turf and off without it doing the runtime special.
(The sleep and hell the whole bit of code in space/Entered was unneeded, since it just happens normally as a part of move. Life is pain) -Lemon
also does misc code improvements i found while investigating ANOTHER c_l_b bug with stacks i found while testing this one, which i did NOT manage to fix unfortunately
* fixes hyperspace connect_loc_behalf bug
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Makes mutant bodyparts and mutcolors into editable genetic traits (plus a whole shitload of otherwise out of scope code improvements because I just HAD to touch old code)
* Mirror
* genetically-editable mutant bodyparts and colors - skyrat edition
Co-authored-by: Funce <funce.973@gmail.com>
* fix buckling to a vehicle not setting your initial sprite position correctly (#59999)
* fix buckling to a vehicle not setting your initial sprite position correctly
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
* wisps no longer fall in chasms (#60004)
Co-authored-by: coiax <yellowbounder@ gmail.com>
* wisps no longer fall in chasms
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: coiax <yellowbounder@ gmail.com>
* introduce advanced sucking functionality to custodians (+ bonus GAGging) (#59925)
* base sucking functionality
* functional upgrade and upgrade refactor
* minor tweak here
* finish overhaul of upgrades, add gags-ified upgrades
* add documentation (you love to see it)
* update sucking sound
* do some of the requested cleanup, fix key going into trash bag, add right click func
* introduce advanced sucking functionality to custodians (+ bonus GAGging)
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
* Fix ion carbine parts kit's name and other similar grammar issues (#59947)
* Fix ion carbine parts kit's name and other similar grammar issues
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
* Fixed being able to insert infinitely many components into a shell. Fixes being able to view the shell's circuit in a locked shell. (#59962)
* Fixed being able to insert infinitely many components into a shell. Fixes being able to view the shell's circuit in a locked shell.
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
* Fixed carps being untameable and fixes tameable code not properly removing itself from something (#59955)
Fixes#59897
* Fixed carps being untameable and fixes tameable code not properly removing itself from something
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
* Reverts Entered() passing dir instead of old loc (#59910)
* Reverts Entered() passing dir instead of old loc
Co-authored-by: Rohesie <rohesie@gmail.com>
* Change uplink implants to inherit the uplink flags of the uplink they were bought from (#59735)
Uplinks implants bought from uplinks inherit the uplink flags of the uplink they were bought from.
This fixes an undocumented bug where by purchasing an uplink implant, nuke ops would be able to get things they normally can't.
Co-authored-by: tralezab <40974010+tralezab@ users.noreply.github.com>
Co-authored-by: Jordan Brown <Cyberboss@ users.noreply.github.com>
* Uplink implants now inherit the uplink flags of the uplink they were bought from
Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
Co-authored-by: tralezab <40974010+tralezab@ users.noreply.github.com>
Co-authored-by: Jordan Brown <Cyberboss@ users.noreply.github.com>
* Fix forensic component inheritance inserting null entries into lists and causing to_chat errors. (#59873)
Fixing the following runtime:
[17:13:04] Runtime in to_chat.dm,88: Empty or null string in to_chat proc call.
proc name: to chat (/proc/to_chat)
usr: Cowboy_penis_monster/(Zackary Mason)
usr.loc: (Telecomms Control Room (105,89,2))
src: null
call stack:
to chat(Zackary Mason (/mob/living/carbon/human), "", null, "", 0, 1, 1, 0)
the forensic scanner (/obj/item/detective_scanner): add log("", 1)
the forensic scanner (/obj/item/detective_scanner): scan(Control Room (/obj/machinery/door/airlock/command/glass), Zackary Mason (/mob/living/carbon/human))
Forensic scanner attempting to add "" to the logs, which eventually gets output to_chat.
Tracked error down to forensic component lazylists and the fun of trying to OR two lazylists together.
* Fix forensic component inheritance inserting null entries into lists and causing to_chat errors.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* 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>