mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-09 08:10:15 +01:00
8f4e4d17026243ed4adfa18fa0ed3932b6dffc4e
217 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0d4804cfca |
MOD Complexity rebalance (#76077)
## About The Pull Request Reduced the cost of a lot of MODules. Pathfinder 2 -> 1 Tether 3 -> 1 Temperature Regulator 2 -> 1 DNA lock 2 -> 1 Health analyzer 2 -> 1 Sonar 2 -> 1 Microwave beam 2 -> 1 Drill 2 -> 1 All visors (including NV and thermals) 2 -> 1 Circuit Adapter 2 -> 1 The Mining MODsuit has had its complexity increased to 15 and now starts with the eating apparatus module, with a total base complexity of 10/15 now. The Prototype MODsuit's active slowdown has been decreased from 1.5 (!) to 1. ## Why It's Good For The Game > Reduced the cost of a lot of MODules. There's lots of cute little MODules here, and they are all despite their 'small' cost far too expensive for them to ever be used. The small little cost adds up, when you consider that two 2-complexity modules cost FOUR, which is more than most good modules (that are 3), especially when storage modules take up 3 complexity already. Think about it like genetics, imagine if geladikinesis cost 40 instability. It'd be pointless and just make it not used. > Pathfinder 2 -> 1 Pathfinder is a little buggy, a bit janky, and still just a commodity, so this might let captains keep it for themselves more often when they're kitting out their MOD. > Tether 3 -> 1 Tether costing 3 complexity is ABSURD. That's as much as the actual ion jetpacks, and that's for something which you can replace completely with a fire extinguisher, not even including the tiny 4 tiles tethering range. > Temperature Regulator 2 -> 1 This is vital for spacewalking, I really don't know why it's this expensive. Hell it should be the norm, but whatevs. > DNA lock 2 -> 1 Nobody's ever going to use this if it can just be EMPed and broken... especially when it costs 2 complexity, which is the same cost as defibs, surgical processor, holster, criminal capture.. > Health analyzer 2 -> 1 This is just a health analyzer. A small item that you're paying for the privilege of being able to have it in your janksuit. It really shouldn't cost 2 complexity, nobody ever takes this. > Sonar 2 -> 1 I don't think there's much of a reason for sonar to be 2 complexity. You might think it's nuts, but sonar really isn't that useful as it's a windup with a screen-only range. Making it 1 might let it be seen ingame at some point. > Microwave beam 2 -> 1 Despite the cool name this just fries food. I don't think that should be expensive! > Drill 2 -> 1 The drill module is mostly redundant when by the time you get it, chances are you have a plasma cutter already which is usually better, if not as space-efficient. There's also the dumb issue with drilling into gibtonite which instantly blows it up. > All visors (including NV and thermals) 2 -> 1 Similarly to the health analyzer, chances are if you HAVE the module you don't actually *need* it as you're already.. that job. Additionally, and this is also part of the reason for the NV, thermal, and even the health analyzer modules, is that traitors/nukies now have to balance MOD economy alongside TC count, and I can't tell you just how frustrating it is to buy something and be told I don't have enough complexity to put it into the MODsuit. I already spent the damn TC! > Circuit Adapter 2 -> 1 This thing seems pretty useless. All it can really do is open and close your modsuit, which like, wow okay. No need for it to be expensive. > The Mining MODsuit has had its complexity increased to 15 and now starts with the eating apparatus module, with a total base complexity of 10/13 now. The complexity increase is because for some reason the MODsuit is already filled to the brim by default, which means that actually interacting with robotics in any way is thoroughly disincentivized as you'd need to take so many modules out to do so that it makes the purchase and interaction pointless. Now you CAN go and ask robotics for anything you need, though there isn't much a miner would want and value enough to trek across the station, for now. Also, it starts with the eating apparatus because it really looked like it should! The flavor text even talks about miners, it's strange for that to be there if miners won't use it. It'll also encourage it to actually be bought more by allowing you to eat through it. > The Prototype MODsuit's active slowdown has been decreased from 1.5 (!) to 1. 1.5 is a lot, A LOT, of slowdown. For such an incredibly rare mod, it completely kills the damn thing, even for the charlie station crew! You can't fight xenos with 1.5 slowdown! Having Kinesis isn't enough of a reason to cripple it so thoroughly and pointlessly. It's 0.4 now, which is a nice middleground between 'fast' suits like the medical and security ones, and the 'slow' ones like civilian, engineering, science. ## Changelog 🆑 balance: Reduced the complexity cost of a lot of MODules. balance: Pathfinder 2 -> 1 balance: Tether 3 -> 2 balance: Temperature Regulator 2 -> 1 balance: DNA lock 2 -> 1 balance: Health analyzer 2 -> 1 balance: Sonar 2 -> 1 balance: Microwave beam 2 -> 1 balance: Drill 2 -> 1 balance: All visors (including NV and thermals) 2 -> 1 balance: Circuit Adapter 2 -> 1 balance: The Mining MODsuit has had its complexity increased to 13 and now starts with the eating apparatus module, with a total base complexity of 10/13 now. balance: The Prototype MODsuit's active slowdown has been decreased from 1.5 (!) to 1. spellcheck: Fixed a type on the energy net module. /🆑 |
||
|
|
8a2e6f0eb8 |
Autolathe, protolathe, mech fab and comp printer now use defines for matter bins values. Also some production ui do. (#76020)
Changed hardcoded matter bins values to use defined `SHEET_MATERIAL_AMOUNT` for following stuff: autolathe, protolathe, mech fabricator and component printer. `Material Access Bar` and `MaterialIcon` used for protolathes, circuit printers and etc. now also use defined `SHEET_MATERIAL_AMOUNT`, via static ui data, to prevent same issues in future. Also changed some notes in /// parts just because why not. |
||
|
|
830d2e50b4 |
Fixes some stupid airlock sleeps (#75961)
## About The Pull Request [A common problem with explosions is an overabundance of sleeping](https://github.com/tgstation/tgstation/commit/6499077a09469ff401c224c0510bc184c663b118) In an attempt to solve this issue, let's not continue to sleep and do work in door closing if the door is already deleted (This is caused by firelocks activating due to other adjacent objects deleting, triggering an atmos update, and closing the firelocks before they get bombed. I don't have a elegant way of resolving that core problem, so let's just minimize the impact) [Nukes a stupid sleep loop in airlock code](https://github.com/tgstation/tgstation/commit/5b16360520526d6f5aa3b511049456b74f33f430) When an airlock was depowered, it would enter a sleep loop, decrementing its delay by 1 second every well, one second, so long as it had the right wires flipped This is very stupid Instead, let's use signals off wire changes and a combo of timer and remaining time var to do this with JUST a timer Most of the changes here are just swapping over wires to a setter to make signal registration work\ ## Why It's Good For The Game Less sleeping around explosions means less dropped ticks after a bomb goes off. Good just in general Also this excises dumb boomer code and adds some hooks for other devs to use (we should use wires more man) |
||
|
|
ae5a4f955d |
Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request Signals were initially only usable with component listeners, which while no longer the case has lead to outdated documentation, names, and a similar location in code. This pr pulls the two apart. Partially because mso thinks we should, but also because they really aren't directly linked anymore, and having them in this midstate just confuses people. [Renames comp_lookup to listen_lookup, since that's what it does](https://github.com/tgstation/tgstation/commit/102b79694fa8eb57ecf7b36032616a9e368ccced) [Moves signal procs over to their own file](https://github.com/tgstation/tgstation/commit/33d07d01fd336726b4f6f6f1b61bb0b3f11a00dc) [Renames the PREQDELETING and QDELETING comsigs to drop the parent bit since they can hook to more then just comps now](https://github.com/tgstation/tgstation/commit/335ea4ad081ec63c42cfa05856e582cca833af6e) [Does something similar to the attackby comsigs (PARENT -> ATOM)](https://github.com/tgstation/tgstation/commit/210e57051df63f88dac3dd83321236da825aae5e) [And finally passes over the examine signals](https://github.com/tgstation/tgstation/commit/65917658fb8a1e7d28ae23c9437a583d646f0302) ## Why It's Good For The Game Code makes more sense, things are better teased apart, s just good imo ## Changelog 🆑 refactor: Pulled apart the last vestiges of names/docs directly linking signals to components /🆑 |
||
|
|
9fd0b4e770 |
Fixes bypassing integrated circuit cooldowns with module components. (#75581)
## About The Pull Request See title. In order for this change to work, these components will not work if there is no shell, but this will change nothing user-facing because all player-facing circuits require shells to function in the first place anyways. ## Why It's Good For The Game Fixes a cooldown bypass bug. Closes #75580 ## Changelog 🆑 fix: Fixed bypassing component cooldowns with module components. /🆑 --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> |
||
|
|
569d8f5a72 |
Refactored the TTS subsystem to more properly handle message garbling. Added a volume preference for TTS. (#75559)
TTS subsystem refactor. --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com> |
||
|
|
ff5a2469e6 |
Makes the component menu in the integrated circuit interface more intuitive. (#75364)
## About The Pull Request Added a notice box to the component menu in the integrated circuit interface explaining how to link an integrated circuit to a component printer to allow for integrated circuit programming away from the component printer.  Last sentence in the above image has been removed. Integrated circuits will now update their static data once linked so closing and re-opening the UI is unnecessary. ## Why It's Good For The Game It wasn't clear anywhere in game that you could link integrated circuits to component printers. I've run into players being completely unaware of this feature, so this should help to make it more clear that players don't need to print out components manually from the component printer and slap them into an integrated circuit each time. ## Changelog 🆑 qol: Added a message to the component menu in the integrated circuit interface that explains how to link an integrated circuit to a component printer. /🆑 --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> |
||
|
|
154c9ebe82 |
Stock Part Resprite (#75149)
## About The Pull Request Resprites stock parts to bring them up to date, changes manipulators to servo motors as I couldn't make manipulators work well at this scale.  (Power cells sold separately) ## Why It's Good For The Game The old stock parts are dated, in some cased quite ugly, and in the case of manipulators a ball of assorted pixels. Incidentally removed a couple of single letter var names. ## Changelog 🆑 image: Stock parts have been resprited. code: Manipulators have been renamed to servo motors, all related types have been repathed to match. /🆑 |
||
|
|
f2fd69a49a |
Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you all here (through the automatic reviewer request system). So, mineral balance! Mineral balance is less a balance and more of a nervous white dude juggling spinning plates on a high-wire on his first day. The fact it hasn't failed after going on this long is a miracle in and of itself. This PR does not change mineral balance. What this does is moves over every individual cost, both in crafting recipes attached to an object over to a define based system. We have 3 defines: `sheet_material_amount=2000` . Stock standard mineral sheet. This being our central mineral unit, this is used for all costs 2000+. `half_sheet_material_amount=1000` . Same as above, but using iron rods as our inbetween for costs of 1000-1999. `small_material_amount=100` . This hits 1-999. This covers... a startlingly large amount of the codebase. It's feast or famine out here in terms of mineral costs as a result, items are either sheets upon sheets, or some fraction of small mats. Shout out to riot darts for being the worst material cost in the game. I will not elaborate. Regardless, this has no functional change, but it sets the groundwork for making future changes to material costs much, MUCH easier, and moves over to a single, standardized set of units to help enforce coding standards on new items, and will bring up lots of uncomfortable balance questions down the line. For now though, this serves as some rough boundaries on how items costs are related, and will make adjusting these values easier going forward. Except for foam darts. I did round up foam darts. Adjusting mineral balance on the macro scale will be as simple as changing the aforementioned mineral defines, where the alternative is a rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~ Items individual numbers have not been adjusted yet, but we can standardize how the conversation can be held and actually GET SOMEWHERE on material balance as opposed to throwing our hands up or ignoring it for another 10 years. |
||
|
|
ac5236a251 |
Refactors sheet crafting to better support directional construction (#74572)
## About The Pull Request https://github.com/tgstation/tgstation/blob/0426f7ddbaa91439c7278189101f5db9c7f2ed95/code/game/objects/items/stacks/stack.dm#L449 Ok, but can we not? This PR refactors sheet crafting to generalize all the cases that were previously locked behind grille/window type checks and such. In their stead there are bitflags that can be set to achieve certain behaviors. All the behavior from before should be preserved, but now it can be extended to other items. E.g. if you want a railing that can be crafted underneath directional windows, or an item that behaves like a grille does--it's just a matter of setting the right obj_flags for it now. This makes it very simple and painless to add new recipes that use directional crafting! It's all modular now. <details><summary>Details</summary> --- ### What I've done: -Eliminated all the type checks, instead it will now be handled by object flags and recipe vars, making for a much more configurable system. -Added two new obj_flags: `BLOCKS_CONSTRUCTION_DIR` and `IGNORE_DENSITY`. -Additionally, I renamed the existing flag `NO_BUILD` to `BLOCKS_CONSTRUCTION`. -Changes the proc `valid_window_location` to `valid_build_direction`, and makes it work for things other than windows. -Removed a deprecated `window_checks` var from the stack_recipe datum. -Added three more vars to the stack_recipe datum: `check_direction` and `check_density`, `is_fulltile` -Decoupled `on_solid_ground` from the object density check. Now you can set those separately, allowing you to make recipes that forbid/allow building things over other things while in space. --- ### What the new flags do: `BLOCKS_CONSTRUCTION` works as before---prevents objects from being built on the object. I felt that the previous name was not descriptive enough, you should know exactly what it does just from looking at the name. _example: dna scanner_ `BLOCKS_CONSTRUCTION_DIR` -- setting this on an object will prevent objects from being built on it when their directions are the same. _example: directional windows, windoors, railings_ `IGNORE_DENSITY` -- setting this on an object will cause its density to be ignored when performing the construction density check. This could have other potential uses as well in the future. _example: grilles, directional windows, tables_ These three flags cover all the bases for the types of items that are currently craftable, so there is no more need for any type checking or weird snowflake window checks. Simply set the appropriate flag and it'll work as you would expect. --- ### What the recipe vars do: `check_direction` tells the recipe to check if there's something in that direction with the `BLOCKS_CONSTRUCTION_DIR` flag set. `check_density` tells the recipe to run the density check when set. This is true by default. There are very few items in the game that currently have this set to false--namely grilles. Setting this to false will make it so that the object can be constructed regardless of what is in that tile (unless `one_per_turf` is also set, which will make it so that you can't craft the same thing twice in the same turf). `is_fulltile` is used for fulltile windows, but it doesn't necessarily have to be--you can give this to any recipe and it will adopt the same properties as that of the fulltile window. Basically they have a special case where they shouldn't be able to be built over directional constructions, where normally things would be able to be. Setting this makes check_direction true as well. --- ### In summary: Sheet crafting still works just as it did before. But the backend of it has gotten a glow up and will be able to more easily support new behaviors. </details> ## Why It's Good For The Game This makes the crafting system much more flexible to add recipes to, and will prevent bad code practices of stacking more conditionals down the line whenever someone wants to add an item that behaves like grilles or directional windows in how they are constructed. It had to be done. Those window checks were a mess. ## Changelog 🆑 qol: added fifty stack versions of remaining glass sheet stacks for ease of debugging refactor: refactored sheet crafting to better support directional constructions that aren't windows /🆑 --------- Co-authored-by: san7890 <the@san7890.com> |
||
|
|
4c48966ff8 |
Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is not completely accurate, as subsystems can be delayed, however it's useful to have this number as a multiplier or ratio, so that if in future someone changes the subsystem wait time code correctly adjusts how fast it applies effects regexes used git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i 's/DT_PROB/SPT_PROB/g' git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i 's/delta_time/seconds_per_tick/g' |
||
|
|
b2e145be8a |
Fixes ntnet circuits (#74338)
## About The Pull Request I underestimated SEND_GLOBAL_SIGNAL and assumed it worked differently to SEND_SIGNAL, as in I thought it would not be sending the source as the first arg. Because it does, it meant that the list of data was actually just ntnet sending circuit. This fixes it and makes the args work properly. I've shamelessly stolen the circuit in the screenshot of the issue to test it in-game  ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/74327 ## Changelog 🆑 fix: NtNet receive/send circuits should work now. /🆑 |
||
|
|
ccef887efe |
Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW RATHER THAN AFTER THE FACT. ## About The Pull Request Hey there, This took a while to do, but here's the gist: Python file now regexes every file in `/code` except for those that have some valid reason to be tacking on more global defines. Some of those reasons are simply just that I don't have the time right now (doing what you see in this PR took a few hours) to refactor and parse what should belong and what should be thrown out. For the time being though, this PR will at least _halt_ people making the mistake of not `#undef`ing any files they `#define` "locally", or within the scope of a file. Most people forget to do this and this leads to a lot of mess later on due to how many variables can be unmanaged on the global level. I've made this mistake, you've made this mistake, it's a common thing. Let's automatically check for it so it can be fixed no-stress. Scenarios this PR corrects: * Forgetting to undef a define but undeffing others. * Not undeffing any defines in your file. * Earmarking a define as a "file local" define, but not defining it. * Having a define be a "file local" define, but having it be used elsewhere. * Having a "local" define not even be in the file that it only shows up in. * Having a completely unused define* (* I kept some of these because they seemed important... Others were junked.) ## Why It's Good For The Game If you wanna use it across multiple files, no reason to not make it a global define (maybe there's a few reasons but let's assume that this is the 95% case). Let me know if you don't like how I re-arranged some of the defines and how you'd rather see it be implemented, and I'd be happy to do that. This was mostly just "eh does it need it or not" sorta stuff. I used a pretty cool way to detect if we should use the standardized GitHub "error" output, you can see the results of that here https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792 ## Changelog Nothing that really concerns players. (I fixed up all this stuff using vscode, no regexes beyond what you see in the python script. sorry downstreams) |
||
|
|
ecbcef778d |
Refactors Regenerate Organs, and a few organ helpers (#74219)
## About The Pull Request Refactors regenerate organs to be slightly more intelligent in handling organ changes and replacements. Noteably: - We don't remove organs that were modified by the owner; such as changing out your heart for a cybernetic - We early break out of the for loop if they aren't supposed to have an organ there and remove it - We check for the organ already being correct, and just healing it and continuing if it is Also changes the names of some of the organ helpers into snake_case ### Mapping March Ckey to receive rewards: N/A ## Why It's Good For The Game ## Changelog --------- Co-authored-by: Jacquerel <hnevard@gmail.com> |
||
|
|
3e41388e20 |
Removes networks from the game (#74142)
## About The Pull Request This is a continuation of https://github.com/tgstation/tgstation/pull/74085 - I announced in the comments there that this would be my next PR, and this is it. Removes SSnetwork, ``/datum/ntnet``, ``/datum/component/ntnet_interface``, ``var/network_root_id``, the network unit test, and a lot of other things related to networks. - NTNet circuits now check for an Ntnet relay, and uses signals to operate. - Logs in Wirecarp is now only for PDA and Ntnet Relay things, so you can no longer see what ruins exist using it (why should Wirecarp know that Oldstation spawned? The flavor is that they dont know its there). - Removed it from MULEbots entirely, I don't think it even did anything for them? Botkeeper seems to work without it, so it's possibly there from pre-tgui PDAs. - Moves assigning random names to a base proc instead of being tied to network, this is things like random-naming scrubbers/vents. The behavior hasn't changed at all. - Makes Ntos work for consoles when relays are down, as the comments said they're supposed to (because they're wired). I think this was an accidental change on my part, so this is a revert of that. ## Why It's Good For The Game Ntnet is ancient code that hasn't given us much that we can't do with already existing alternatives, we've been slowly moving away from it for init times, and though a large portion of that was limited to airlocks, I still don't think this is a system worth keeping around. It's way too complex to expect feature coders to do anything with it, and too old with better alternatives for anyone to want to improve any of it. ## Changelog 🆑 fix: Computers are now properly connected to Ethernet, and can use Ntos when Relays are down. refactor: Removes Ntnet and Ntnet interfaces, which was only used by Ntnet circuits (which now directly checks for a Relay to work) and MULEbots, which did nothing with it. balance: Wirecarp no longer tells you what ruins spawned in a round, instead it's limited to PDA logs, and tells you the source too. This means the RD can catch someone running illegal programs if they don't make any attempt at hiding it. qol: Wirecarp logs is now set to save 300 at once, instead of 100 and being increased to 300 by the RD during the round. This is pretty insignificant, since there's no reason to NOT want as many logs as possible. /🆑 --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> |
||
|
|
0e1cedd354 |
Machines can now be pried open multiple times and maintain their initial densities (#74163)
## About The Pull Request These changes fix how machines are pried open with crowbars. Currently, most machines can be pried open, but many of them have no method for being closed again. This means they can be pried once, and then never again (as their internal logic has them stuck in an "open" state). Additionally, the densities of these machines is also inconsistent, as density is tied to the procs for opening/closing machines (open = non-dense, closed = dense). Thus, these new changes allow desired densities to be passed to `open_machine()` and `close_machine()`, as well as `default_pry_open()`, meaning that atypical machine densities can be maintained (e.g. machines that should remain dense when open, or non-dense when closed). I've also added a `close_after_pry` boolean parameter to the `default_pry_open()` proc, which determines whether to immediately close a machine after opening it. This is useful for machines that don't really have a use case for remaining open, often lacking a sprite to represent this state as well. * Note: Opening and immediately closing machines with this boolean will still drop their contents onto the floor, but will now immediately "close" in their logic, allowing for further prying attempts in the future. It's worth noting that this implements default density values for these procs, which match the existing behavior for machines, so as to (hopefully) not disrupt existing or expected machine behavior. Two caveats to these changes currently exist: 1. On machines that immediately close after prying, the prying action can now be spammed to the chat with repeated clicking. I'm uncertain if this needs some sort of spam protection or if it's fine as is. 2. I've only been able to manually test this code. I'd love to write unit tests for it, as it affects a lot of different machines, but don't know where to begin with DM Unit Testing (or which files would be good examples to reference in the code base). * Note: I did manually test each and every machine that calls `default_pry_open()` and they all seem to be working correctly. (Except for `obj/machinery/plumbing/sender`, but that doesn't seem to need prying, as it has no contents to drop, only reagents.) As always, let me know if any improvements/changes should be made. This closes #26833. ## Why It's Good For The Game These changes allow crowbar prying to correctly occur multiple times on any machine, which is intended behavior. It prevents player confusion that could occur when a machine couldn't be pried open a second time during a shift, even though it had previously been pried before, forcing players to question themselves. (Are they missing something? Did they perform the action a different way last time? Is the machine actually still powered on instead of off? Etc.) These changes also maintain the correct density for machines after prying, preventing scenarios where a machine might behave differently once it had been pried open. (An example of this was being able to walk through a smartfridge after prying it open.) Additionally, players are no longer required to know/use workarounds (such as machine disassembly) to retrieve a powered-off machine's contents. Overall, these changes improve consistency around machines, creating more scenarios where they behave as players would expect. ## Changelog 🆑 fix: machines can now be pried open more than once. fix: machines now have the correct density when pried open. /🆑 --------- Co-authored-by: san7890 <the@san7890.com> |
||
|
|
f9fe79a307 |
Organ Unit Tests & Bugfixes (#73026)
## About The Pull Request This PR adds a new unit test for all organs, a new unit test for lungs, and includes improvements for the existing breath and organ_set_bonus tests. Using the tests, I was able to root out bugs in the organs. This PR includes an advanced refactor of several developer-facing functions. This PR certainly represents a "quality pass" for organs which will make them easier to develop from now on. ### Synopsis of changes: 1. Fixed many fundamental bugs in organ code, especially in `Insert()`/`Remove()` and their overrides. 2. Added two new procs to `/obj/item/organ` named `on_insert` and `on_remove`, each being called after `Insert()`/`Remove()`. 3. Added `organ_effects` lazylist to `/obj/item/organ`. Converted `organ_traits` to lazylist. 2x less empty lists per organ. 4. Adding `SHOULD_CALL_PARENT(TRUE)` to `Insert()`/`Remove()` was very beneficial to stability and overall code health. 5. Created unit test `organ_sanity` for all usable organs in the game. Tests insertion and removal. 6. Created unit test `lungs_sanity` for `/obj/item/organ/internal/lungs`. 7. Improved `breath_sanity` unit tests with additional tests and conditions. 8. Improved `organ_set_bonus_sanity` unit tests with better documentation and maintainable code. --- ### Granular bug/fix list: - A lot of organs are overriding `Insert()` to apply unique side-effects, but aren't checking the return value of the parent proc which causes the activation of side-effects even if the insertion technically fails. I noticed the use-case of applying "unique side-effects" is repeated across a lot of organs in the game, and by overriding `Insert()` the potential for bugs is very high; I solved this problem with inversion-of-control by adding two new procs to `/obj/item/organ` named `on_insert` and `on_remove`, each being called after `Insert()` and `Remove()` succeed. - Many organs, such as abductor "glands", cursed heart, demon heart, alien hive-node, alien plasma-vessel, etc, were not returning their parent's `Insert()` proc return value at all, and as a result those organs `Insert()`s were always returning `null`. I have been mopping those bugs up in my last few PRs, and now the unit test reveals it all. Functions such as those in surgery expect a truthy value to be returned from `Insert()` to represent insertion success, and otherwise it force-moves the organ out of the mob. - Fixed abductor "glands" which had a hard-del bug due to their `Remove()` not calling the parent proc. - Fixed cybernetic arm implants which had a hard-del bug due to `Remove()` not resetting their `hand` variable to `null`. - Fixed lungs gas exchange implementation, which was allowing exhaled gases to feedback into the inhaled gases, which caused Humans to inhale much more gas than intended and not exhale expected gases. ### Overview of the `organ_sanity` unit test: - The new `organ_sanity` unit test gathers all "usable" organs in the game and tests to see if their `Insert()` and `Remove()` functions behave as we expect them to. - Some organs, such as the Nightmare Brain, cause the mob's species to change which subsequently swaps out all of their organs; the unit test accounts for these organs via the typecache `species_changing_organs`. - Some organs are not usable in-game and can't be unit tested, so the unit test accounts for them via the typecache `test_organ_blacklist`. ### Overview of the `lungs_sanity` unit test: - This unit test focuses on `/obj/item/organ/internal/lungs` including Plasmaman and Ashwalker lungs. The test focuses on testing the lungs' `check_breath()` proc. - The tests are composed of calling `check_breath` with different gas mixes to test breathing and suffocation. - Includes gas exchange test for inhaled/exhaled gases, such as O2 to CO2. ### Improvements to the `breath_sanity` unit tests: - Added additional tests for suffocation with empty internals, pure Nitrogen internals, and a gas-less turf. - Includes slightly more reliable tests for internals tanks. ## Why It's Good For The Game **Organs and Lungs were mostly untested. Too many refactors have been submitted without the addition of unit tests to prove the code works at all.** Time to stop. _Time to get some help_. Due to how bad the code health is in organs, any time we've tried to work with them some sort of bug caused them to blow up in our faces. I am trying to fix some of that by establishing some standard testing for organs. These tests have revealed and allowed me to fix lot of basic developer errors/oversights, as well as a few severe bugs.  ## Changelog 🆑 A.C.M.O. fix: Fixed lungs gas exchange implementation, so you always inhale and exhale the correct gases. fix: Fixed a large quantity of hard-deletes which were being caused by organs and cybernetic organs. fix: Fixed many organs which were applying side-effects regardless of whether or not the insertion failed. code: Added unit tests for Organs. code: Added unit tests for Lungs. code: Improved unit tests for breathing. code: Improved unit tests for DNA Infuser organs. /🆑 |
||
|
|
06e07de7b4 |
Fixes admins having access to admin functions within normal integrated circuits whilst spawned in as a player. (#73904)
## About The Pull Request Admins can currently save circuits and spawn components in whilst adminned in integrated circuits that are not considered admin only. This has been changed so that they can only access these functions when in admin AI mode or when the integrated circuit is admin only. Closes #71173 ## Why It's Good For The Game Playmins shouldn't have access to admin functions when playing the game normally. ## Changelog 🆑 fix: Fixed playmins having access to admin functions within normal integrated circuits. /🆑 |
||
|
|
d755b70d76 |
Removes bad nodamage var from projectiles, fixes Juggernaut / Rust Walker projectiles doing zero damage (#73806)
## About The Pull Request
- Juggernaut and Rust Walker projectiles were subtyped off of magic,
which is `nodamage`.
- The juggernaut actually had a copy+paste error with their type
`on_hit` which caused none of their special effects on hit ("relative
patching catches this")
- Then I realized projectiles have this var `nodamage` which is, for all
intents and purposes, just `damage > 0`. it's not checked for pacifism,
it's just that. This is dumb. So very dumb, so I removed it.
- There are, however, a few situations which used it in a unique way,
such as the blast wave cannon. This is why I replaced it with a proc,
`is_hostile_projectile`, for certain situations to actually find out if
the projectile is damaging. Projectiles can override this on a per type
basis by default, damaging projectiles = hostile.
- This has a chance to break some things, but I ... kinda doubt it will.
Fixes #73756
## Why It's Good For The Game
Projectiles that act as they should, less dumb vars
## Changelog
🆑 Melbert
fix: Fixes Juggernaut / Rust Walker projectiles doing zero damage
fix: Fixes Juggernaut projectiles not doing bonus damage to nearby
structures
code: Removed projectile nodamage var, replaces it with just checking
for damage
/🆑
|
||
|
|
76eddfa59f |
Adds clarity to the associative list data type in wiremod (#73536)
## About The Pull Request Once pulled, these changes will adjust how the associative list data type is shown like on circuits and the description of the index table component.   ## Why It's Good For The Game Given the entry difficulty level of the circuits system, some players may find themselves overwhelmed and frustrated seeing that their index table component's output is not connecting to the index list component's input, despite there being an index associative list component they may not be aware of. These changes should hopefully lead players to learn more about associative lists and how different they are from normal lists. Just adding "assoc." to the descriptor should lead players to search the term in the component printer and find the index associative table. ## Changelog 🆑 qol: Made associative lists more apparent in circuits. /🆑 |
||
|
|
a1ada2c9ef |
Refactor, improve, and rename canUseTopic to be can_perform_action (#73434)
This builds on what #69790 did and improved the code even further. Notable things: - `Topic()` is a deprecated proc in our codebase (replaced with Javascript tgui) so it makes sense to rename `canUseTopic` to `can_perform_action` which is more straightforward in what it does. - Positional and named arguments have been converted into a easier to use `action_bitflag` - The bitflags adds some new checks you can use like: `NEED_GRAVITY | NEED_LITERACY | NEED_LIGHT` when you want to perform an action. - Redundant, duplicate, or dead code has been removed. - Fixes several runtimes where `canUseTopic` was being called without a proper target (IV drips, gibber, food processor) - Better documentation for the proc and bitflags with examples |
||
|
|
d67555a0b5 |
the inevitable Revert "Refactors admin verbs from giant ass lists into datums" in case stuff breaks (#73206)
Reverts tgstation/tgstation#72407 |
||
|
|
fca90f5c78 |
Redoes the admin verb define to require passing in an Admin Visible Name, and restores the usage of '-' for the verb bar when you want to call verbs from the command bar. Also cleans up and organizes the backend for drawing verbs to make it easier in the future for me to make it look better (#73214)
## About The Pull Request Damn that's a long title. Admin Verbs can be used in the verb bar with hyphens instead of spaces again. ## Why It's Good For The Game Admin muscle memory ## Changelog |
||
|
|
7f25d7f17b |
Refactors admin verbs from giant ass lists into datums (#72407)
## About The Pull Request See title. ## Why It's Good For The Game Makes it easier for people to add new admin buttons, and also removes the giant ass ugly lists that are an affront to my eyes. Yes you are still able to call them manually via the verb bar   ## Changelog 🆑 refactor: Admin verbs are now datums with a dedicated panel handler admin: Admin verbs now come with a handy description when you hover over them! /🆑 --------- Signed-off-by: GitHub <noreply@github.com> |
||
|
|
5cf5037a97 |
Fix: DNA Infuser & Unit Tests, Organs Bugfixes (#73003)
## About The Pull Request >_"I don't remember buying tickets to Mutants on Ice."_ >-Duke Nukem This PR is (hopefully the final) part of a series of my continuing refactors of the DNA Infuser. This PR represents a "quality pass" which should also iron-out the rest of the most impactful bugs. Granular list of changes: - This PR adds unit tests for the DNA Infuser organs and `/datum/status_effect/organ_set_bonus` as recommended by @AnturK - I noticed that the base `/datum/infuser_entry` was being used in the machine for the Fly and "rejected" infusions, whereas usually we would expect it to be a base type used only as a development template. I corrected this issue and created `/datum/infuser_entry/fly` to be used for that use-case instead. - Added `/mob/proc/can_mutate()` and `/mob/living/carbon/can_mutate()` to replace a few copied lines across several files. The proc is normally used in the context of mutating a Human via their DNA. - I fixed a ton of typos in organ-related code, specifically where "receiver" was typo'd as "reciever". There are far more of those typos, but I limited the scope of my changes to organs. - I noticed a bug in `/datum/species/proc/regenerate_organs` wherein a race condition caused an organ to remove itself before it's done inserting itself. This happens because the Fly organ set bonus runs `regenerate_organs` which calls `Remove` on the organ while `Insert` is still in the call-stack. I added `INVOKE_ASYNC` as a workaround, and also changed the order the signals are emitted to prevent future bugs. This bug primarily only impacted the flyperson species transformation, which was part of the DNA Infuser's flyperson infusion organ set bonus. - In my last refactor PR #72745 I also introduced a bug in `/obj/machinery/dna_infuser/proc/infuse_organ` wherein I forgot to add the usage of `new` when attempting to implant new organs, and this PR fixes the erroneous code. - Fxed a bug which causes the organ set bonus to activate when mixing organs from different sources, which is caused by a developer oversight wherein all `/datum/status_effect/organ_set_bonus` had identical IDs. - Added a cleaner `replacetext`-based way of handling pronouns in `/datum/element/noticable_organ/proc/on_receiver_examine`, using custom macros `%PRONOUN_S` and `%PRONOUN_ES` as advised by @MrMelbert - This PR also fixes #72767 ## Why It's Good For The Game With the changes in this PR the machine will finally work as we expect it to. By adding unit tests we will also be able to ensure that it works as expected from now on. I feel confident saying that the completeness, algorithmic correctness, and code health of the DNA Infuser is much better than it was before. ## Changelog 🆑 A.C.M.O. fix: Fully fixed the DNA Infuser, which will now infuse organs as expected. fix: Fixed flyperson species transformation and organ set bonus, which was throwing a runtime. fix: Fixed many typos in organ-related source code. /🆑 --------- Co-authored-by: Time-Green <timkoster1@hotmail.com> |
||
|
|
484d2b5900 |
Don't initialize stack components inside machines (#72863)
## About The Pull Request An attempt at the [Initiative](https://github.com/tgstation/dev-cycles-initiative/issues/29) all types/subtypes of `obj/item/stack` no longer exist inside any machine. Only during deconstruction is the stack created from the circuit boards requested components. Also moved the component printer & module duplicator circuitboards into `machine_circuitboards.dm` so they all are in one place I was unable to do this for circuitboards because that still needs to exist so we can use `apply_default_parts()` on the machine. I tried to do the whole datum circuitboard approach just like with stock parts but i'm unsure about it so maybe next time ## Changelog 🆑 refactor: stack components no longer exist inside a machine's component_parts refactor: move component printer & module duplicator circuitboards into machine_circuitboards.dm /🆑 |
||
|
|
cd3e3159ba |
Checks if a machine has no research before connecting techweb (#72944)
## About The Pull Request Currently all machines, if the config to not have a techweb link is on, will set their node to science even if they were meant to be connected to another (like through subtypes). This fixes that by checking to ensure they don't have a techweb connected already before giving them a new one. Also as a minor fix, RD consoles will now properly add themselves to the list of accessing RD consoles if they aren't linking to the default. This list currently does nothing but I can see good uses of it in the future. ## Why It's Good For The Game Fixes an error that was found on a downstream, it's a worthwhile fix that thankfully was caught this early. ## Changelog Nothing player-facing. |
||
|
|
26fc7fc438 |
Adds the 2 new components to the techweb (#72910)
## About The Pull Request Adds the 2 new components I made in my prior PR to the basic circuit research also fix an issue with associative pick list ## Why It's Good For The Game Being able to print them would be usefull Reason I didn't notice was properly since I ran on debug station and it never crossed my mind that they where research thingy ## Changelog 🆑 fix: You can print the new list pick and associative list pick components fix: Associative list pick works as intended now /🆑 |
||
|
|
819b6e3419 |
List pick component (#72097)
## About The Pull Request Adds a new component to let a user pick from a list. and pass the picked value as a result. The player most be adjescent to the connected circuit for this to work. ## Why It's Good For The Game You can do similar thing through voice activation, but this is honestly way easier for normal players to use instead of knowing "magic words" or having the circuit say all the options and copy pasting.  ## Changelog 🆑 add: New circuit component, list pick! /🆑 Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> |
||
|
|
872e64fb05 |
Adds spaces around logical operators (#72603)
## About The Pull Request Part of a prior PR that was closed (#72562). This version does not add the check in CI. ## Why It's Good For The Game The work is already done, so I figured why not. ## Changelog N/A Nothing player facing Co-authored-by: Jeremiah Snow <jlsnow301@pm.me> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> |
||
|
|
ec5c9dfd10 |
Stock Part Datumization Complete (#72559)
So i accidently reverted all my commits in #72511 when resolving a merge conflict So ummm yeah fuck my bad anyway ## About The Pull Request Finishes what was started in #71693 and completes the [initiative](https://github.com/tgstation/dev-cycles-initiative/issues/1) Except for `obj/item/stock_parts/cell` and its subtypes. All machines now use `datum/stock_part` for its requested components & component parts Not sure if i caught every machine & stuff in the game so merge with caution ## Changelog 🆑 code: datum stock part for every obj stock part refactor: all machines & dependent experiments to use datum stock parts /🆑 |
||
|
|
f54dcda1c0 |
afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)
Necessary for #72292 to work effectively, and probably not very useful out of that context. Split out of its own PR because this is long and boring. I want to make sure that we're catching actual mistakes there, and not just experiencing side effects of how shitty the attack chain is. |
||
|
|
4efacff9fa |
Completely Culls req_access_txt/req_one_access_txt (#72281)
Hey there, Now that every instance of `req_access` and `req_one_access` is a list of strings, there is absolutely no reason for req_access_txt/req_access_one_txt to exist. In fact, any instance where they were still used in the codebase was very convoluted and was very broken! Don't worry, I fixed it all out, and life is good. I also dmdoc the surviving access variables, because those were missing. I went on the side of caution and made a more verbose documentation with an example just to have people really grasp this (it took me a while to actually get it) I believe that we changed _everything_ over to the req_access/req_one_access system earlier this year in VV, but the problem is that _new mappers don't understand the difference between the two systems_. In fact, the "txt" system is completely redundant since all it does is transition stuff to the "base" system. So, let's just completely cull the one that's all but deprecated and ensure this confusion no longer arises. The whole purpose of "txt" seemed to be to convert the access, but it's all pointless now that we can just read the list directly. I'm also 99% certain that the "access check" on vending machines broke (and didn't seem to have correct logic in the first place? I legitimately couldn't find a case where it could fail in testing, so I changed that up), and that's fixed up now. Let me know if I was clueless there. I know it's short-circuiting now as opposed to "all must be true", but it just didn't work. |
||
|
|
e9351f6ae0 |
Add lints for idiomatic balloon alert usage (#72280)
Adds lints for `balloon_alert(span_xxx(...))` (which is always wrong), and balloon alert where the first letter is a capital (which is usually wrong). Fixes everything that failed them. As a reminder, abbreviations like "AI" and "GPS" shouldn't be capitalized in a balloon alert. In cases where this is intentional for flavor (there was one case), you can `UNLINT` like so: Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> |
||
|
|
630decd3f5 |
Admin Subtype of Integrated Circuits (#72303)
## About The Pull Request Simply adds an admin only subtype of the integrated circuit because I spawn a lot and this'll save me 30 or so seconds each time I do. ## Why It's Good For The Game When creating a new admin circuit from scratch being able to skip VVing it to change the admin_only var would save a bit of time. ## Changelog 🆑 admin: Integrated Circuits now have an admin only subtype, functionally the same as VVed regular circuits. /🆑 |
||
|
|
0818d6ae4c |
Crafting/Cooking menu update (#71779)
## About The Pull Request Updated crafting menu, adding a lot of new functions and recipes that were not in the crafting menu before. <img alt="cult" src="https://user-images.githubusercontent.com/3625094/206009533-aec3a1dd-cbe5-45eb-8515-1b75fabb65c5.PNG"> <img alt="nH77dLyyGx" src="https://user-images.githubusercontent.com/3625094/206009786-b6706f70-0599-40bf-b051-8f499de43abd.png">  https://user-images.githubusercontent.com/3625094/206009841-738e4a03-0660-45b7-8d83-15eeb6501967.mp4 ## Why It's Good For The Game It is easier to use, and it has a lot of recipes that were spread throughout the game, some of which weren't even on the wiki. Crafting and cooking now count about 1200 recipes in total, including conditionally available ones. ## Changelog 🆑 qol: Rewrote the crafting/cooking menu UI qol: Split crafting and cooking menus in two different menus qol: Crafting is no longer blocking the entire UI, only the "Make" buttons are disabled qol: Added stack crafting recipes to the crafting menu qol: Added cooking recipes that were absent in the crafting menu before (tool recipes, machine recipes, reactions) qol: Added option to search recipes by title qol: Added option to filter recipes by required materials/ingredients qol: Added food types to the cooking menu, highlighting diet of your species (liked, disliked foods) qol: Added total nutrition value of the result to the cooking menu qol: Added option to filter cooking recipes by the food type of the resulting food qol: Added "Can make" category that lists all currently craftable recipes throughout all categories refactor: changed categories and reshuffled some items in them code: Reagents now have default container to get an icon from the reagent datum code: Objects now have `desc_controls` var for OOC information about mouse controls that are visible on examine, but not in the description fix: Fixed alignment on many food icons fix: Fixed missing icon for beef stroganoff /🆑 Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com> |
||
|
|
272af3a2b6 |
View Sensor circuits now have a range modifier (#72123)
## About The Pull Request Adds the ability to use ranges between 0 and 5 for View Sensor circuits. Currently these nodes are locked to 5 tiles and it is rather difficult to limit the area this circuit effects either for speed reasons or otherwise. This PR makes it a simple variable that remains capped at 5, admins can raise the cap by modifying a variable. ## Why It's Good For The Game I mostly use circuits as an admin, I can't for the life of me figure out how to make a shorter range AOE circuit although I imagine its possible by comparing x and y coordinates of things in the list and yourself this is far to finicky. Players can also utilize this to, for example check all objects on the tile the view sensor is on, "possible" at the moment but way to finicky compared to a 5 tiles. ## Changelog 🆑 qol: You can now reduce the range of View Sensor circuits. /🆑 Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> |
||
|
|
965e1f3d59 |
ModuleDuplicator & ComponentPrinter now benefit from upgraded parts (#71183)
**About the pull request** Module Duplicator & Component Printer now provide more local storage and cheaper production costs when upgraded with better matter bins & manipulators respectively. Previously this wasn't the case **Why its good for the game** Better parts mean lower costs and more storage. Thats always a good thing **Change Log** 🆑 add: Module Duplicator & Component Printer now get extra storage & reduced costs from more efficient parts /🆑 Co-authored-by: Time-Green <timkoster1@hotmail.com> |
||
|
|
48e36ef2c7 |
Saycode refactor, unit tests, and fixes (#69799)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> Fixes #69798 Fixes #71621 When using hypnosis on a victim, the language should be accounted for and whether the victim can properly hear it. Before the hearing code would magically translate any message, this is no longer the case. This also fixes the language barrier involving hearing for: - Mind echo trauma - Phobia trauma - Hypnotic trigger trauma - Split Personality brainwashing trauma - Codeword hearing - Hypnotize status effect - Impure Inacusiate reagent ## Why It's Good For The Game <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> Better consistency, improved readability, and less bugs in the future. ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 fix: Fix hypnosis, mind echo trauma, phobia trauma, hypnotic trigger trauma, split personality brainwashing trauma, codeword hearing, and impure inacusiate reagent all bypassing language and hearing checks. If you try to give commands to a victim in a language they don't understand, they will no longer magically understand the words. fix: Fix sign language having accent modifications refactor: Refactored saycode to be more robust, readable, and have more unit tests. /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> |
||
|
|
329921639a |
Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. (#71339)
## About The Pull Request
- Rewrites how action button icons are generated.
- Prior, generated an action button icon was fairly simplistic and
didn't allow for many changes. Someone recently added the option for
overlays to be generated over action buttons, but the framework was very
weak.
- Now, action button icon generation is split across multiple procs,
like atom icon updates.
- The background of action buttons are underlays
- The actual icon of the action button is the icon and icon state of the
action button movable
- The rim / border of the button is an overlay, layered overtop the
button.
- Allows observers to see what action buttons a mob has. They even
update in real time! And no, the observers cannot click on them.
## Why It's Good For The Game
- Runechat text of action buttons are no longer hidden behind the actual
icon. This was very ugly with cooldown actions, as the cooldown text was
hidden behind a lot of spell icons.
- Cuts down on a lot of icon duplication.
- Gives much finer control over action button icons
- Saves a bit of processing from generating full action button icons
when not necessary. Not implemented in many places, but is in some.


## Changelog
🆑 Melbert
add: Observers can now see what action buttons an observed mob has. No,
you can't click them. And no it doesn't show EVERY action.
refactor: Refactored how action button icons are generated. Some actions
will now use a colored border when active instead of just turning green.
Cooldown text will also appear on the top layer of actions too. If you
see any funky lookin' icons (namely their borders), let me know.
refactor: Bluespace Golem's teleport action is now a cooldown action.
fix: Construct actions go to the middle of the screen like expected.
/🆑
|
||
|
|
aa95daa4e8 |
Fixes an exploit with stacking igniters. Refactors some assembly flag oddities. Limits assembly holders at 12 assemblies. (#71264)
## About The Pull Request Soft revert of #71224 , Fixes #71222 Fixes an exploit involving attachment of multiple igniters to one assembly. - Multiple igniters or condensers can no longer be attached to the same assembly holder - Assembly holders have a limit of 12 assemblies maximum - I'm not sure if this is too low or limited, I picked it arbitrarily. Please inform me if it could be upped a smidge. - This lag exploit was born because of limitless assembly holders, which is a little silly even with the exploit aside. All that uncapped holders can bring are exploits or bugs, which I feel confident limited can prevent. What use is there even for having so many? - Cleans up / refactors some aspects of assemblies and assembly holders. - Assemblies had a weird wire type flag that was only ever used by signallers, but also used wrong by signallers. I did some scanning of the code and realized that ... a lot of this was just straight up unused, and not even assigned anywhere. - Now, there is a flag assembly flag var, which everything is read off of. Tested it and still seemed to all work fine. ## Why It's Good For The Game Lag exploits are bad. ## Changelog 🆑 Melbert fix: Fixed an exploit involving igniters attached to themselves. Assembly holders are now limited to 12 assemblies maximum, and you cannot attach multiple igniters to the same assembly. refactor: Refactored some assembly jank, namely in how they pulse and are pulsed. /🆑 |
||
|
|
84f69359a0 |
More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original PR this fixes it. Notable exceptions to the rule: - Paths in add_verb/remove_verb, we need full path instead of a name there to access verb metadata so we can't use proc ref macros there. - regex.Replace, found out that it does not accept call by name. Instead i added new REGEX_REPLACE_HANDLER so we can at least try to mark these. There's still leftover global procs that do not use GLOBAL_PROC_REF but they functionally equivalent so that's for later. I don't see any reasonable way to grep for this. But if you got any ideas please share. |
||
|
|
fa7688d043 |
Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED (#71056)
- Makes QDELETED use isnull(x) instead of !x, giving about 0.2 to 0.25s of speed. - Make disposal constructs only update icon state rather than go through expensive overlay code. Unfortunately did not have much effect, but is something they should've been doing nonetheless. - Makes RegisterSignal only take signals directly as opposed to allocating a fresh list of signals. Very few consumers actually used this and it costs about 0.4s. Also I think this is just a bad API anyway and that separate procs are important `\bRegisterSignal\((.*)list\(` replaced with `RegisterSignals($1list(` |
||
|
|
0747099063 |
Adds a reagent injector component and BCI manipulators to all circuit labs (#71236)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request This PR adds a reagent injector component that's exclusive to BCIs. (Requested to be integrated into BCIs by Mothblocks.) When outside of a circuit, the component itself stores the reagents. However, if it's inside of a BCI, the storage is moved to the BCI. The storage can contain up to 15u of reagents and acts like an open container. (However, it won't spill even if you throw it, it just acts like an open container code-wise, don't worry about it.) You can only have one reagent injector in a circuit. Trying to insert multiple will give you an error message. The entire dose is administered at once. (Requirement set by Mothblocks.) Please don't try to dispute any of the specific limitations in the comments as they're out of my control. They're reasonable anyways. Reagent Injector Input/Output: Inject (Input Signal) - Administers all reagents currently stored inside of the BCI into the user. Injected (Output Signal) - Triggered when reagents are injected. Not triggered if the reagent storage is empty. New BCI Input: Show Charge Meter (Number) - Toggles showing the charge meter action. (Adds some capacity for stealth.) Install Detector Outputs: (Added following a comment about having to use weird workarounds for proper loops.) Current State (Number) - Outputs 1 if the BCI is implanted and 0 if it's not. Installed (Signal) - Triggered when the BCI is implanted into it's user. Removed (Signal) - Triggered when the BCI is removed from it's user. This PR also adds BCI manipulation chambers to all currently present circuit labs. (Solution proposed by Mothblocks.) Yes I had to do some other mapping changes to allow for this. No I don't have any mapping experience, why do you ask? <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game One small step for BCIs, one giant leap for circuit kind. (First "proper" circuit to human interaction in the entire game!) This allows for some funky stuff and also makes it less of a pain in the ass to use BCIs. What's not to love? <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: Added a reagent injector component and BCI manipulators to all circuit labs. (+ install detector component) /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> |
||
|
|
06197693a5 |
Adds support for non-science techwebs (+Config) (#71070)
## About The Pull Request This is an expanding of https://github.com/tgstation/tgstation/pull/69708 Adds a config to not connect machines to a techweb at the start of a round Adds the ability to multitool a server to get its techweb in its buffer, which can then be used on machines to sync them. Adds support for some machines to not cry when they don't have a techweb linked to it, in case they actually don't. If the config to not have machines connected to the science server is enabled, research servers will make their own techwebs instead. This is barebones though and would need more work if this option is used. For misc stuff: - I replaced checking ``GLOB.machines`` for research servers, to instead check ``SSresearch.servers``, where we can use ``as anything``. - Removed unused vars on the RD server control - I renamed the operating computer's .dm file to remove the capitalized letter from it. It's now operating_computer instead of Operations. ## Why It's Good For The Game This is adding support for 2 different cases that can be used in the future: 1. Off-station roles, we can make roles like Oldstation have their own techweb so they don't ruin science's efforts, or use their advanced research to get things we don't want, or even possibly have some blacklist webs for ghost roles (like teleporters) so that way we don't need to have this dance where we have to give them a very specific amount of materials for them to do things while not being able to get a teleporter and leaving. I heard discussions that people wanted this a while back, and one of the main things preventing this from happening is the lack of support. Hopefully this is encouragement to make it a reality, because I think it would be a really cool expansion of ghost roles and a good way to prevent them from messing with the round in progress. 2. Downstreams who want to do different things with Science. Personally I made this PR with voidcrew(shiptest) in mind and think this would make their lives easier. I didn't expand too much on this because I'm leaving up mostly to the downstreams to figure out what they want to do with these systems. ## Changelog This generally isn't really player facing, since most of the changes would only come into effect if the config is enabled?? 🆑 fix: Research servers now only show servers connected to their techweb. /🆑 |
||
|
|
4d6a8bc537 |
515 Compatibility (#71161)
Makes the code compatible with 515.1594+
Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword
And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.
@tgstation/commit-access Since the .proc/stuff is pretty big change.
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
|
||
|
|
ad5debaaa1 |
Add investigate_deaths (#71112)
## About The Pull Request Adds INVESTIGATE_DEATHS, an investigate category intended to better show causes of death.   Also makes suicide_act take a `mob/living` as an argument instead of a `mob`, and some minor style improvements since apparently I hate atomicity. ## Why It's Good For The Game Inspired by a mysterious death and dusting. More logging and leads for admins investigating deaths. Also fixes #59028 ## Changelog 🆑 Tattle admin: added investigate deaths to shed some more light on unusual demises, dustings, and gibbings /🆑 Co-authored-by: tattle <article.disaster@gmail.com> |
||
|
|
d1507aa22b |
[s] Dead people can no longer communicate with the living (#70446)
* [s] Dead people can no longer communicate with the living Thought listener, through chicanery, could let you still pass through valid strings (and not fail) if you were a mob/dead/observer occupying your mob/living body. god dammit. check to make sure the fucker is dead. |
||
|
|
a2fcec6a33 |
BCIs are now stored in the manipulation chamber's contents, instead of nullspace (#70350)
Fixes a bug where MMIs would be sent into the nullspace room when in an MMI component inside of a BCI that is inserted into a BCI manipulation chamber. Stores the BCI in the chamber's contents, instead of nullspace, allowing the MMI to talk, the BCI to still act as it would normally and overall just solves the issue and maybe some others alongside it. Fixes #70349 |
||
|
|
a2577296e6 |
Upgrades the Modsuit Adapter Shell (#70286)
Code improvements are much appreciated as some things may be rather hacky. Adds more options to the currently very limited modsuit adapter shell. Right now you can only select a module and activate (not deploy) the suit. This has some major problems as you literally can't even deploy the suit to activate it so that's rendered useless and selecting a module is like... kind of a weird input anyways but I won't judge so I left it in. Please comment down below if you'd like for me to add an "Activate Selected Module" input and "On Module Activated" output as those are certainly possible to do. I was just a little torn on how balanced that would be. Changes: "Module to Select" input is now an option. You can still use a string input, but simply inserting it into the suit and activating it, then accessing the circuit that way will give you a list of all modules that the modsuit has. Modsuit quick deploy (RMB) no longer tries to deploy the rest of the pieces when used while the suit is only partially deployed. It will now instead retract the extended pieces. This makes the "Toggle Deployment" input less prone to errors. (Why was it like this in the first place? Having to manually retract the already extended pieces sucks ass.) Added Inputs: "Toggle Deployment" is a new signal input that does exactly what it says it does. It simply tries to extend or retract all pieces of the modsuit depending on it's current state. Added Outputs: "Activated" is a new number output that outputs 1 if the suit is activated and 0 if it's not. "Deployed" is a new number output that outputs 1 if all parts of the suit are extended and 0 if they aren't. "Deployed Parts" is a new string list output that outputs a list of the names of all currently deployed parts. "On Deploy" is a new signal output that outputs a signal whenever all parts of the suit are deployed or retracted, regardless of the method used. "Finished Toggling" is a new signal output that outputs a signal whenever the suit has finished activating or deactivating, regardless of the method used. |