Commit Graph

111 Commits

Author SHA1 Message Date
SkyratBot
f8f2abb11f [MIRROR] Refactor, improve, and rename canUseTopic to be can_perform_action [MDB IGNORE] (#19391)
* Refactor, improve, and rename canUseTopic to be can_perform_action

* updoot

* https://github.com/tgstation/tgstation/pull/72876

https://github.com/tgstation/tgstation/pull/72876

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-10 04:19:25 +00:00
SkyratBot
b116ec2789 [MIRROR] TGUI replaces Radial menu for Plumbing RCD [MDB IGNORE] (#17840)
* TGUI replaces Radial menu for Plumbing RCD (#71569)

**About the pull request**
Radial menu's replaced with TGUI window for all plumbing RCD's

https://user-images.githubusercontent.com/110812394/204481973-8f6d62c0-9288-4165-bce7-ee8bfec95bee.mp4

**Why it's good for the game**

**1. Faster Navigation**
- Old System: It had 3 radial menus'
   ->To select type of device to build
   ->To select the colour of fluid ducts
   ->To select the layer of devices
3 menus for one system makes navigation between them annoying for e.g.:
to create a red fluid duct of layer 5 you have to open all these 3 menus
& cycling through the radial menu by clicking the next button is time
consuming when you have a large number of items
- New System: with just one window open it's as simple as 3 clicks and
your done just like the RPD

**2. Always available**
- Old System: When you select an option inside a radial menu the menu
closes so you have to reopen it again to change a setting
- New System: open the window drag it to the side and it will always be
there for you

**3. Just easier for our eyes**
- Old System: Moving my eyes in a circle across the menu only to find
out i have to click Next and circle my eyes again honestly makes my head
spin
- New System: The menu options are small enough to be viewed all at once
& helps me see what I need more easily

**4. Consistency**
Both the RPD & plumbing all have similar concepts i.e., pipes, devices,
layers & colours it only makes sense they should have similar
interfaces. Also categorizing the items into tabs can help with
explaining what each item does

**Conclusion**
Just because the radial menu looks attractive shouldn't mean it must be
used everywhere, it only makes sense to use it when the number of
options of an item is small enough to be displayed on the screen all at
once for e.g., modules in a Mod suit. If the user has to click the next
button to cycle through the item's, it defeats the purpose of the radial
menu and makes the user work more to find his settings

**Side Note :** removed unused code in RapidPipeDispenser.js

**ChangeLog**

🆑
add: plumbing constructor TGUI, just like Rapid Pipe Dispensers
del: plumbing constructor radials
code: categories for each item
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@ hotmail.com>

* TGUI replaces Radial menu for Plumbing RCD

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@ hotmail.com>
2022-12-01 10:31:31 -05:00
SkyratBot
a70a6a8055 [MIRROR] Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED [MDB IGNORE] (#17670)
* Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED

* modular RegisterSignals

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-28 14:51:08 -05:00
SkyratBot
4debe47b59 [MIRROR] Plumbing Reagent UI changes & fixes[Take 3] [MDB IGNORE] (#17679)
* Plumbing Reagent UI changes & fixes (#71410)

**About the pull request**
3rd attempt cause the 1st
[PR](https://github.com/tgstation/tgstation/pull/71032) had way too many
problems and the 2nd
[PR](https://github.com/tgstation/tgstation/pull/71101) had merge
conflicts and became stale so fuck it delete those branches & try again.

1)For Plumbing the
- Chemical Reaction Chamber
- Chemical Filter
- As a side effect for Modifying Chemical Filter the BloodFilter also
now

Picks reagents from an input-list with a search bar attached at the
bottom

2)Fixes bug which prevented the user from entering new
values[temperature,acidic ph & alkaline ph] into the
ChemReactionChamber. They would be stuck at their defaults 300k,5,9
respectively even if you tried to enter new values it would reject those
new values. That's fixed now

https://user-images.githubusercontent.com/110812394/203076880-eb801c76-68ec-4470-8648-9239270fbcbc.mp4

**Why its good for the game**
1. Removes the need to type long reagent names manually by hand which is
error prone and time consuming
2. Allows you to change the ph & temp values for various reactions which
would have not been possible if not for this

**ChangeLog**
🆑

qol: Entering reagent names is much faster with zero errors

fix: You can enter new temp & ph values

/🆑

Co-authored-by: Time-Green <timkoster1@ hotmail.com>

* Plumbing Reagent UI changes & fixes[Take 3]

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@ hotmail.com>
2022-11-22 08:22:25 -08:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
1ce77983df [MIRROR] canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE [MDB IGNORE] (#16586)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE

* etes

* eyes

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-10-02 15:54:46 +01:00
SkyratBot
8f033ead91 [MIRROR] Completely refactors hallucinations, and also adds a few [MDB IGNORE] (#16348)
* Completely refactors hallucinations, and also adds a few

* delete 5 old hallucination types that should have been removed

* Fixed old leftover tips conflicts

* Fixes all the leftover conflicts and otherwise broken code

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-09-25 19:43:45 -04:00
SkyratBot
3cbfb20f16 [MIRROR] Adds a Service Plumbing Constructor [MDB IGNORE] (#16255)
* Adds a Service Plumbing Constructor

* Update chem_dispenser.dm

* Update code/modules/reagents/chemistry/machinery/chem_dispenser.dm

Co-authored-by: pizzie11 <arandom11111@gmail.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-09-17 13:01:11 -07:00
sqnztb
d162fdfba8 Fixes hypovials not respecting chem press guidelines (#16156)
* vials have to play by the rules too

* documentation, amirite
2022-09-11 20:27:51 -07:00
SkyratBot
7579176eed [MIRROR] Adds lazyloading to the asset subsystems [MDB IGNORE] (#15960)
* Adds lazyloading to the asset subsystems (#69454)

* Adds lazyloading to the asset subsystems

This currently applies only to spritesheets because of how monumentally
expensive they are.
If an asset is requested it will immediately be fully loaded, but
otherwise we slowly load them in with a separate subsystem.

This allows us to not hold up initialize with hair stuff. Saves roughly
33% (16 seconds with LOW_MEMORY_MODE) of initialize on my machine

My target is something closer to the 9 second init that had back in
2019, this is a good first step. Lets see how much more we can do yeah
lads?

Co-authored-by: san7890 <the@ san7890.com>

* Adds lazyloading to the asset subsystems

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
2022-09-02 19:49:04 -04:00
SkyratBot
a8c10d1659 [MIRROR] Converts a shitload of istypes to their more concise macros [MDB IGNORE] (#15702)
Converts a shitload of istypes to their more concise macros

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-27 16:23:44 -04:00
SkyratBot
88c85fe1f7 [MIRROR] [MDB IGNORE] Refactors drinks and fixes a lot of food problems [MDB IGNORE] (#15577)
* [MDB IGNORE] Refactors drinks and fixes a lot of food problems

* [MDB IGNORE] Refactors drinks and fixes a lot of food problems

* forgto 2 commit

* im slowly going insane

* why does find and replace not FIND everything

* hnghnnngh

* h

* l

* a

* a

* so close...

* delta fix

* I thought I committed this already, guess not

* this PR has been the bane of my fucking life

* orange juice

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2022-08-25 03:17:10 +01:00
SkyratBot
4369049809 [MIRROR] Massive plumbing layer/placement improvements [MDB IGNORE] (#14172)
* Massive plumbing layer/placement improvements (#66602)

* Massive duct improvements

* last minute fixes/additions to plumbing layer fixes

* letter, loop, and early return fixes

* early continues

* color comments

* reaction chamber colors

* rcd tweaks

* Update code/datums/components/plumbing/reaction_chamber.dm

* Update code/datums/components/plumbing/reaction_chamber.dm

* Update code/datums/components/plumbing/_plumbing.dm

* Update code/datums/components/plumbing/_plumbing.dm

* remove unused var, better duct restacking

Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com>

* Massive plumbing layer/placement improvements

Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: ShizCalev <ShizCalev@ users.noreply.github.com>
2022-06-07 17:43:09 -07:00
SkyratBot
4630e8d82c [MIRROR] Fix: Plumbing machinery handling and chemical press dispensing [MDB IGNORE] (#12980)
* Fix: Plumbing machinery handling and chemical press dispensing (#66039)

* Plumbing machinery fixes

* Using bitflag 'INTERACT_MACHINE_OFFLINE' instead of changing _machinery.dm

* Removed INTERACT_MACHINE_OFFLINE flag from limbgrower as it would have enabled powerless limbgrowing

* Fix: Plumbing machinery handling and chemical press dispensing

Co-authored-by: LordVollkorn <66637090+LordVollkorn@users.noreply.github.com>
2022-04-22 00:03:13 +01:00
SkyratBot
729132a4e0 [MIRROR] Rebalanced Power consumption, increase for machines [MDB IGNORE] (#12930)
* Rebalanced Power consumption, increase for machines

* wew

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-20 17:07:14 +01:00
Zonespace
1118b4175a Adds a bunch of PRs that the Mirror bot missed (#12535)
* aaAAA

* fix-maps
2022-04-06 17:50:47 +01:00
SkyratBot
02d97ef416 [MIRROR] Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB [MDB IGNORE] (#11700)
* Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB  (#64939)

* Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB

Co-authored-by: Tim <timothymtorres@gmail.com>
2022-02-24 06:50:41 -05:00
SkyratBot
b2cc74a77e [MIRROR] Fixes layering issues brought by the FoV PR. [MDB IGNORE] (#11411)
* Fixes layering issues brought by the FoV PR.

* Update code/__DEFINES/layers.dm

* Update code/modules/mob/living/living_defines.dm

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-02-10 02:51:52 +00:00
SkyratBot
e568b6f771 [MIRROR] Fix bottlers runtiming every second if input turf is empty [MDB IGNORE] (#11358)
* Fix bottlers runtiming every second if input turf is empty (#64717)

Co-authored-by: Zonespace <41448081+Zonespace27@ users.noreply.github.com>

* Fix bottlers runtiming every second if input turf is empty

Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@ users.noreply.github.com>
2022-02-08 03:52:03 +00:00
SkyratBot
d682fbfbc8 [MIRROR] Rotation component refactor and improvements [MDB IGNORE] (#11304)
* Rotation component refactor and improvements

* Update code/modules/power/singularity/emitter.dm

* e

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-02-08 01:38:20 +00:00
SkyratBot
b45221cfa1 [MIRROR] Tgui input refresh [MDB IGNORE] (#11290)
* Tgui input refresh

* Update code/modules/mob/dead/observer/observer.dm

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-02-06 23:08:19 -05:00
SkyratBot
d665660c38 [MIRROR] Patch icon choosing in the chem dispenser and chem press [MDB IGNORE] (#10803)
* Patch icon choosing in the chem dispenser and chem press (#64137)

* patch style for chem master, chem press

* Patch icon choosing in the chem dispenser and chem press

Co-authored-by: Alex <sasichkamega@gmail.com>
2022-01-18 15:57:23 +00:00
SkyratBot
31c2c4385b [MIRROR] Gives a bunch of table sized and/or shaped things LETPASSTHROW [MDB IGNORE] (#10599)
* Gives a bunch of table sized and/or shaped things (#63964)

You can't reach over/around/through a whole bunch of objects that look small enough/low enough to imply that you can. This grants people the ability to do so.

Hydroponics trays look roughly table sized and shaped and you can't reach past them, which is irritating. Now you can, which is not.
Ditto for crates, the cooking grill, and the chaplain's altar.
Plumbing input/output/dev/null machines and chemical heaters take up maybe 1/4 of the turf and block attempts to reach past them. Being able to is less irritating.

* Gives a bunch of table sized and/or shaped things `LETPASSTHROW`

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2022-01-11 17:16:13 +00:00
SkyratBot
092e534e75 [MIRROR] TGUI list conversions + bug fixes [MDB IGNORE] (#10355)
* TGUI list conversions + bug fixes

* Fixing conflicts

* Maintaining a few modular files while we're at it...

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-01-03 22:53:58 +00:00
SkyratBot
647b408d01 [MIRROR] Fixes typos in span, other html elements [MDB IGNORE] (#10222)
* Fixes typos in span, other html elements (#63510)

Atomizes a much larger PR for another time...
There are typos in span and other html messages that causes them to not render correctly or at all.
Bug fixes
Converts those instances of span to use the macro

* Fixes typos in span, other html elements

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2021-12-23 17:18:43 +00:00
SkyratBot
d604846209 [MIRROR] TGUI list input conversions [MDB IGNORE] (#9996)
* TGUI list input conversions (#63315)

Co-authored-by: tralezab <40974010+tralezab@ users.noreply.github.com>
Co-authored-by: Sealed101 <75863639+Sealed101@ users.noreply.github.com>

* TGUI list input conversions

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: tralezab <40974010+tralezab@ users.noreply.github.com>
Co-authored-by: Sealed101 <75863639+Sealed101@ users.noreply.github.com>
2021-12-10 18:10:25 +00:00
SkyratBot
959f66bf47 [MIRROR] Fixed spelling of possession, Separate, and Cemetery [MDB IGNORE] (#9862)
* Fixed spelling of possession, separate, and cemetery (#63203)

Just fixes some spelling for gangs. I also fixed misspellings for "posession" to "possession". Fixed "seperate " to "Separate" Fixed "Cemetary" to "Cemetery"

* Fixed spelling of possession, Separate, and Cemetery

Co-authored-by: Doctor Pope <84367152+Dr-Pope@users.noreply.github.com>
2021-12-03 16:58:40 -05:00
SkyratBot
5e67f4098d [MIRROR] Adds some basic sanity to the plumbing bottler [MDB IGNORE] (#9480)
* Adds some basic sanity to the plumbing bottler (#62823)

* Adds some basic sanity to the plumbing bottler

* Update code/modules/plumbing/plumbers/bottler.dm

Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>

* Update code/modules/plumbing/plumbers/bottler.dm

Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>

Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>

* Adds some basic sanity to the plumbing bottler

Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>
2021-11-15 20:02:47 -05:00
SkyratBot
2c95e84b66 [MIRROR] Stops fluid ducts from duplicating when unwrenched [MDB IGNORE] (#9230)
* fluid ducts dont duplicate now (#62532)

* Stops fluid ducts from duplicating when unwrenched

Co-authored-by: AndAllThatJazz <robbro42@gmail.com>
2021-11-04 06:57:06 -04:00
SkyratBot
7954d664a8 [MIRROR] removes double spaces before symbols [MDB IGNORE] (#9117)
* removes double spaces before symbols (#62397)

This can apparently cause some bugs on occasions, so I thought I might as well try to kill them all.

* removes double spaces before symbols

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2021-10-29 04:14:00 +01:00
Pinta
7ebe7d90d3 [MOSTLY MODULAR] Fixes Hypovial Texture (#8745)
* refactoring

* somehow this fixes it
2021-10-10 23:49:14 -04:00
SkyratBot
7d722f6f9b [MIRROR] Fixes "grey" fluid ducts. (#8188)
* grey to omni (#61292)

Swaps the default color of fluid ducts from "grey" to "omni."

Fluid ducts also read from the global list of pipe_paint_colors but were not updated when grey was changed to omni in #61162 (fef3629d11)

* Fixes "grey" fluid ducts.

Co-authored-by: sqnztb <zephyrthebreeze@gmail.com>
2021-09-15 03:33:51 +01:00
SkyratBot
73010c500b [MIRROR] Fixes GetComponents() returning a list with a null entry when there's no component of a given type (#8094)
* Fixes GetComponents() returning a list with a null entry when there's no component of a given type (#61267)

Fixes GetComponents() returning a list with a null entry when there's no component of a given type

This can cause runtimes. The lists should only contains instances of a specific component type.

* Fixes GetComponents() returning a list with a null entry when there's no component of a given type

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2021-09-11 16:28:40 +01:00
Pinta
528dddb1c9 [MOSTLY NON-MODULAR] Hypovials can be printed from ChemMasters and pill presses. (#7601)
* Hypovials are printable via the chem-master

* Hypovials can now be made from factories

* There really isn't a reason for this to be in the autolathe any more.

* linters

fuck
2021-08-21 22:30:13 +01:00
SkyratBot
c1163dff19 [MIRROR] EVEN MORE HARDDEL FIXES (#7017)
* 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>
2021-07-20 12:59:41 +02:00
SkyratBot
665fe76566 [MIRROR] Modifies right click logic so that it is not the same priority as modifier keys. (#6498)
* 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>
2021-06-27 16:10:15 +01:00
SkyratBot
a14b1dadb5 [MIRROR] CanPass refactor (#6527)
* CanPass refactor (#59804)

* CanPass refactor

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-06-25 22:33:51 +01:00
SkyratBot
5326760cb3 [MIRROR] Makes turfs persist their signals, uses this to optimize connect_loc (#6465)
* 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>
2021-06-23 04:23:48 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
fc16238547 set_anchored() (#59532) (#6191)
Co-authored-by: Rohesie <rohesie@gmail.com>
2021-06-09 10:39:40 +12:00
SkyratBot
1b93d609ef [MIRROR] Stops reaction chambers from dropping beakers when deconstructed (#6133)
* Fix reaction chamber deconstruction from dropping beakers (#59486)

* Stops reaction chambers from dropping beakers when deconstructed

Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
2021-06-05 16:56:32 +12:00
SkyratBot
456f347dfa [MIRROR] USE SIGNAL_HANDLER REEEEEE (#5921)
* 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>
2021-05-25 03:42:11 +01:00
SkyratBot
d66b98b984 [MIRROR] Fix issue where Plumbing Reaction Chambers can get stuck filling (#5820)
* Fix issue where Plumbing Reaction Chambers can get stuck filling (#59131)

About The Pull Request

This Pull Requests aims to fix the issue #58993 by changing two parts of the logic I've seen the chambers get stuck on.

    Chamber gets stuck requesting a unit that is always rounded down to 0
    Chamber gets stuck requesting an insanely small number that gets eaten by float math

Part 1 Explanation
Take the example where a chamber is trying to request one unit of chemical from three synthesizers. A chamber will divide it's request amongst all suppliers who can satisfy it. In this case, 1 / 3 becomes asking each synthesizer for 0.33 (due to rounding). After one update, the chamber has 0.99 of the chemical, not 1. On the second update, it then requires 0.01 of the chemical and asks each chamber for 0.0033, which gets rounded down to 0. This means the chamber NEVER fills as it spends every update cycle doing the same logic and trying to transfer in parts of 0 in size.

This has been fixed by changing it from flat dividing the amount required by the number of suppliers to a more dynamic approach that looks at the target volume and how many requests it needs to make. This mean that instead of asking for 0.33 three times in the above example, it actually works out more to asking for 0.33 then 0.34 then 0.33. Meaning it gets the whole 1 it wanted in the first update, fixing the issue.

Part 2 Explanation
Even with the above fix, when working with the right numbers, floats do not add as expected. Take the above example. I lied. 1/3 as a float is NOT 0.33. 0.33 does not exist as a float, so the actual closest value is 0.32999998, which is what the code will use, even when rounding to 0.01. What this causes is, in some scenarios, chambers getting incredibly close to their target volume but never being able to actually reach it because currentVolume + missingAmount comes out as just currentVolume, due to the insanely small float that it's missing having no impact on the larger float when added together. Again, this is due to how floats work.

So to avoid a chamber getting stuck on 98.9999999998 when it needs 99, I'm adding the CHEMICAL_QUANTISATION_LEVEL constant (used elsewhere for similar issues) to the chamber's volume when checking if it has enough. This way, the chamber will exit the filling mode even though it was short by a tiny fraction. These discrepancies seem to get handled anyway in the actual reaction code so I haven't seen any changes/problems to my outputs. For all intents and purposes, 98.9999999998 is 99 in float arithmetic when rounding as we do.
Why It's Good For The Game

Fixes an incredibly annoying issue that plagues chemistry automation. Machines, in many scenarios, currently get stuck when they shouldn't. This means a chemist has to actively keep monitoring all their machines and then do some investigation when suddenly something stops. Eventually finding the problem chamber that is stuck on "Filling" and then plungering it. Not all Chemists know of this either and just assume it's something they have done or that it's just broken and unaware how to fix it.

Now a Chemist can move on to automating more or helping elsewhere rather than babysitting their setups.
Changelog

cl
fix: fixed issue where plumbing Reaction Chambers get stuck on "Filling"
/cl

* Fix issue where Plumbing Reaction Chambers can get stuck filling

Co-authored-by: mGuv <mguv.dev@gmail.com>
2021-05-20 22:56:45 +01:00
SkyratBot
1bcc61c85f [MIRROR] Fixes big roundstart ductnets breaking world init (#5577)
* Fixes big roundstart ductnets breaking world init (#58659)

closes: #58623 (Having two stationary plumbing tanks connected broke the map)

you can now map infinitely huge plumbing networks

Byond mistakes big chains of connecting ducts for an infinite loops, so when a lot of ducts (about 60) initialize at once and chain connect, byond kills the worldtick.

Plumbing already had an internal duct limit of about 800~ ducts, which has now finally been fixed aswell. The plumbing subsystem (SSfluids, I need to rename this shit) tells one duct to start connecting and uses the timer subsystem to call them one by one.

* Fixes big roundstart ductnets breaking world init

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2021-05-09 23:35:15 +01:00
SkyratBot
5880be0168 [MIRROR] (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#5524)
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc

* WHEW THAT WAS EASY

* Update ammo.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-07 22:39:27 +01:00
SkyratBot
e665a27f64 [MIRROR] Refactors Reaction Chamber Code (jesus christ it was so bad), Fixes bugs with it too (#5235)
* Refactors Reaction Chamber Code (jesus christ it was so bad), Fixes bugs with it too (#58709)

fixes #58574 (Adding a reagent to the reaction chamber increase the UI width beyond the size of the window)

Adds in a new reaction chamber panel, looks nice, ya did a good job

* Refactors Reaction Chamber Code (jesus christ it was so bad), Fixes bugs with it too

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2021-04-27 00:04:20 +01:00
SkyratBot
d7da41789b [MIRROR] Deletes recipient_reagents_holder on del (#4759)
* Deletes recipient_reagents_holder on del (#57767)

* Deletes recipient_reagents_holder on del

* Cleans up recipient refs when recipient dels

* no one saw that

* Makes plumbing listen to component signal for finishing

* Unregisters enable call

* Deletes recipient_reagents_holder on del

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2021-04-08 22:05:15 +01:00
SkyratBot
1fbe38a51a [MIRROR] [Ready] Fermichem part 2.3 Adds a new reagent: Eigenstasium (#4445)
* [Ready] Fermichem part 2.3 Adds a new reagent: Eigenstasium

* Update quirks.dm

* Update closets.dm

* aaaaaaa

* Update lizardpeople.dm

* Update mothmen.dm

* Update species.dm

* Update species.dm

Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-03-30 10:12:19 +02:00
SkyratBot
079db6428e [MIRROR] partially reverts reaction chamber (#4426)
* Partially revert reaction chamber (#57855)

* partially reverts reaction chamber

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2021-03-26 14:19:54 +00:00
SkyratBot
483b829c2d [MIRROR] Adds a plumbing layer manifold (#4367)
* Adds a plumbing layer manifold (#57494)

Adds a multilayer plumbing manifold, I also murdered the multilayer duct

You can now alt-click the plumbing RCD to change the layer it prints. I made a whole thing where right clicking changed the settings and you could use that to change machinery aswell. I even did that with the plunger, it was absolutely beautiful. Anyway that drained the life out of me because apparently there's no attack_obj_secondary and afterattack_secondary ALSO called attack_obj (left click). I just hate whoever made it with intensity

Plumbing now uses three layers. They should be easier to navigate. I tried to make layer connecting the same as cross-color connecting, but that would take more of my soul then there is to take

* Adds a plumbing layer manifold

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2021-03-24 19:30:36 +00:00