mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-23 15:14:43 +01:00
e6e0200edb0fca2dc7f2d509e8eec0f18e52e7d2
142 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4eadf5caf7 |
The big tooltype_act de-cargo-cult-ing (#95408)
## About The Pull Request Removes a lot of cargo cult copypasta with `default_deconstruction_screwdriver`, `default_deconstruction_crowbar`, and to a lesser extent `default_pry_open` and `default_change_direction_wrench` ALL you gotta do now if you want your machine to have an openable panel or be deconstructible with a crowbar is this ```dm /obj/machinery/dish_drive/screwdriver_act(mob/living/user, obj/item/tool) return default_deconstruction_screwdriver(user, tool) /obj/machinery/dish_drive/crowbar_act(mob/living/user, obj/item/tool) return default_deconstruction_crowbar(user, tool) ``` `default_deconstruction_screwdriver` no longer directly sets `icon_state`, requiring the user pass in the open and closed icon states. Now, it just calls `update_appearance`, and everything that once passed the icon state now uses `base_icon_state` and `update_icon_state`. ## Why It's Good For The Game Many of these procs were terribly overcomplicated and difficult to work with for what should be a relatively simple action Streamlining it makes it easier for coders to understand and work with ## Changelog 🆑 Melbert refactor: A majority of machines had their screwdriver/crowbar/wrench interactions rewritten, report any oddities like being unable to open a machine's panel or deconstruct a machine /🆑 |
||
|
|
de6a6ac46e |
Fixes conditionally added actions not appearing on player HUDs (#95624)
## About The Pull Request Fuckup from the refactor, this should give the action to the mob not the owner of the action. Fixes purple raptors, ninja katanas, etc ## Changelog 🆑 fix: Fixed conditionally added actions not appearing on player HUDs /🆑 |
||
|
|
0917d44cc8 |
Audits and cleans up Trigger() parent calls (#95548)
## About The Pull Request ``/datum/action/proc/Trigger(mob/clicker, trigger_flags)`` has a lot of children, many of which use mixed ``. = ..()`` or no parent calls at all. https://github.com/tgstation/tgstation/blob/d65ee47f6ebd0384d463a1f2a044c321ff2d912f/code/datums/actions/action.dm#L163-L170 This PR attempts to standardize all the children procs to call parent in a uniform way, or cements that they *shouldnt* call parent for whatever reason. ## Why It's Good For The Game Base proc calls are important, yanno? The base proc has the action button signals and availability proc on it, so its technically possible for children procs of trigger() to have check_flags enabled, but never blocked (i.e AB_CHECK_CONSCIOUS, AB_CHECK_HANDS_BLOCKED). Some children procs have IsAvailable on them, but its possible they can be skipped over if a coder is not paying attention. This reduces that risk. |
||
|
|
38c8884d3c |
Adds a boolean type to circuits (#95487)
## About The Pull Request A substantial number of number circuit ports, input and output alike, effectively act as boolean flags. That is, they are either input ports that only care about whether the value is or is not zero, or they are output ports that can only output zero or one. This PR adds a boolean datatype, and converts all these ports to booleans. Anything can be connected to a boolean input port, effectively setting the port to the truthiness of the input. Booleans can be connected to number and signal ports, as they all use numbers as their underlying values. ## Why It's Good For The Game Having a proper boolean datatype makes the affected ports a bit more intuitive to compute with. ## Changelog 🆑 qol: Many circuit components have had ports that effectively act as boolean inputs or outputs converted into a new boolean datatype. /🆑 --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> |
||
|
|
2711d6d038 |
Rewrites BCI implanters to use item_interaction (#95377)
## About The Pull Request One more refactor, one less attackby ## Changelog 🆑 refactor: Rewrote BCI implanters to use item_interaction /🆑 |
||
|
|
f0fc690db8 |
Rewrites dispenser bots to use item_interaction (#95375)
## About The Pull Request Cleans up the code, swing combat will be real one day ## Changelog 🆑 refactor: Rewrote dispenser bots to use item_interaction /🆑 |
||
|
|
17f597a2e8 |
Adds the circuit implant (#95023)
## About The Pull Request The circuit implant is, as the name suggests, an implant that can contain an integrated circuit. It's similar in concept to the BCI, but differs from it in the following ways: - Has a capacity of 12 components, compared to the BCI's 25 - Can be inserted into basic mobs - Does not set off Body Purists' disdain for cybernetics - Cannot use the target interceptor, thought listener, or overlay components - Cannot force the user to speak/emote - the speech component simply makes the implant itself speak like it does in other shells The circuit implant can be printed from the component printer upon researching advanced shells. Only one circuit implant can be inserted into a mob at once. As a little code standardization bonus, implant case interaction has been refactored into an `item_interaction`. ## Why It's Good For The Game Implants seem like an interesting way for circuits to be utilized. Not only do they provide a body-purist-friendly way to have an internal circuit, they also give most basic mobs a way to interact with the circuit ecosystem. Additionally, them being implants implantable with an implanter provides an easier method for a circuit to be forced upon someone in a way that isn't as easy to remove as just dropping the item. |
||
|
|
aedc5bae7a |
allowed is now signals based instead of hardcoded slots (#94871)
## About The Pull Request ID cards/MMI mech access/simple mob access/pAIs now use signals instead of checking specific slots with mob checks. We do this through mob's ``get_access`` proc that collects all access a mob has with a collect_access signal. ## Why It's Good For The Game It looks cleaner and we no longer individually check `check_access` for every single item that may have access. It's cleaner to put it all together and check in one go with all the access we've got. This also makes it easier to add items that hold access that aren't necessarily IDs but you want to be able to open stuff with. ## Changelog 🆑 refactor: ID checking for access has been reworked, please make a bug report if anything that's supposed to grant access is not working. /🆑 --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> |
||
|
|
d25c6201f4 |
Standerdizing currency symbols Part 2 (#94259)
## About The Pull Request Converts almost all non-constant, non-tgui usages of all variantions of "credit" and "cr" Everything seems in order, tested most the currencies. <img width="905" height="119" alt="image" src="https://github.com/user-attachments/assets/3fa005a7-a114-426c-9646-b81f68bc2dec" /> <img width="255" height="128" alt="image" src="https://github.com/user-attachments/assets/14c83b54-4fd9-4bee-838f-5b1c03939d9a" /> ## Why It's Good For The Game Same justification as https://github.com/tgstation/tgstation/pull/94128 Just easier to mantain/adjust the grammer/names of our money ## Changelog 🆑 spellcheck: minor cleanup on some usecases of "credits" /🆑 |
||
|
|
49d2f1f3c9 |
Adds the Modular Suit (Or Portable Suit) (#93776)
## About The Pull Request First, boring stuff. The "Modsuit equipment" techweb node has been split into two nodes, with the additional node containing the more civilian MODules (And the new plating), and costing 20 points. A new "Perfumer" MODule has been added(not printable anywhere, but in the new suit by default) that just cleans you. The MODsuit being added has been added to the LawDrobe's premium section, for 300 credits. Now, the real addition. This adds a MODsuit that is a modular suit, that is to say, a suit, tie, shoes and glasses. The glasses aren't actually real flash-proof sunglasses by default, but the welding protection module can be added. The suit is obviously not space-proof, and offers no protection to anything but biohazards. The suit has 10 complexity max, due to the fact that most modules don't have a point on it. This is subject to change. The pre-made one also has the stamp and paper dispenser MODules pre-installed, which are both now activateable via the neck slot. The suit control unit is the tie. ## Why It's Good For The Game Have you ever been called to court, but you didn't have a nice suit, so the judge holds you in contempt and sends you to jail? Well, never again. Gone are the days that you cause two innocent boys to almost be executed for a crime they didn't commit simply because you don't have a nice suit. With the Moonraker Conglomerate's newest export in your hands, you'll never be the less formal one ever again. No matter the occasion, you're never more than a few moments away from self-representing. Video of the fit: https://github.com/user-attachments/assets/44d08ca8-9ae1-4887-81e6-cec11792132e It's the same look as a suit jacket, white tie, sunglasses and laceup shoes. You must get a matching jumpsuit of your own. I think it's neat, and it's a damn shame that there's not a single MODsuit that isn't just head gloves suit shoes. All these MODules which are activateable from head, mask or glasses, and no suits that allow it. Missed opportunity, I'd say. Also, lawyer buff. Need I say more? ## Changelog 🆑 add: Added a modular SUIT, a deployable, one-piece three-piece suit. Purchasable from the LawDrobe. balance: The MODsuit equipment techweb node has been split in two, with an offshoot for civilian MODules. /🆑 --------- Co-authored-by: san7890 <the@san7890.com> |
||
|
|
d2f34e33be |
moves abstract_type up to datum, spawners wont spawn them (#92909)
## About The Pull Request moves all implementations (im aware of) for "Im a parent type dont spawn me please" to the datum layer to standardized behavior adds a standerized proc for filtering out "bad" items that we dont want spawning. applies to it the subtype vendor, gifts, and a new spawner and mystery box for a random gun (neither playerfacing) "port" of https://github.com/shiptest-ss13/Shiptest/pull/4621 https://github.com/user-attachments/assets/22f6f0b2-b44e-411a-b3dc-6b97dc0287aa small warning: I dont have EVERY abstract type defined right now but, ive done a good enough job for now. Im tired of data entry rn ## Why It's Good For The Game standardizing behavior. Might be a micro hit to performance however having this lets us not rely on icon state to determine whether something is a parent type and makes it much easier to tell something is a parent type (could be applied further to things like admin spawning menus and things like that). need feedback on if this is actually good for the game. ## Changelog 🆑 add: Soda cans show up in the silver slime drink table. add: Examine tag for items that are not mean to show up ingame. refactor: Standardizes how gifts rule out abstract types. fix: gifts no longer check if something has an inhand, massively expanding the list of potential items. /🆑 |
||
|
|
63d9cdebe2 |
Fixes circuit gun recharging issue (#92483)
## About The Pull Request This is a pull request which fixes issue #92227. ## Why It's Good For The Game Closes #92227 which makes circuit guns more confusing than they should be ## Changelog 🆑 fix: fixes circuit gun not recharging it's internal cell when an integrated circuit is inserted /🆑 |
||
|
|
0bc42d6940 |
Fixes the issue of usr pointing to admins by making Trigger pass down clicker (#92354)
## About The Pull Request Fixes the issue of usr pointing to admins by making Trigger pass down clicker, as usr is fucky and can be passed down by other unrelated procs. Fun. Added the clicker arg to all usages of Trigger as well Also changes isobserver check in antagonist ui_act code that prevents observers from clicking UI's instead to check if the ui.user is owner.current ## Why It's Good For The Game Fixes admins giving heretic to people opening the heretic UI for the admin instead |
||
|
|
eb69c087f1 |
Gibs you leave are now based on your biotype/chest bodypart, improves gibber VFX (#91421)
## About The Pull Request * When gibbing mobs, spawned gib type is now based on mob's biotypes if they're not a carbon, or their chest (or first) bodypart if they are, rather than requiring a proc override for every single mob. This means that a few robotic mobs no longer drop meaty gibs, and that gibbing androids now produces cyborg gibs instead of a meaty surprise, plus they should no longer runtime when trying to gib a robot. Gibs also are now spawned around the gibber and streak outwards instead of magically teleporting a few tiles away, for some visual flair. * Fixed meat not overriding blood DNA on blood_walk component which made xeno and lizard meat leave behind orange trails instead of proper lime/dark green blood colors (due to them keeping human meat DNA). * Brightened up the gibber blood overlay I've missed, so it should be consistent with old blood colors now. * Also cleaned up the gibspawner code. ## Why It's Good For The Game Biotype/chest changes should make devs lives easier and gameplay a bit more consistent, and streaking just makes the process look slightly better. ## Changelog 🆑 add: Androids and fully augmented humans now drop robotic gibs instead of meat add: Improved gibber VFX fix: Fixed gibber overlays being darker than intended fix: Fixed xenomorph and lizard meat leaving orange trails behind code: Improved gibs and gibspawner code /🆑 |
||
|
|
73828ecff5 |
Fixes assembly shells not using power from the wire/button they are attached to. (#91384)
## About The Pull Request How did I miss how `COMSIG_SHELL_ATTACH_CIRCUIT` was handled? ## Why It's Good For The Game Makes a circuit shell actually do what I claim it does. Fixes #90786 ## Changelog 🆑 fix: Fixes assembly shells not taking power from machines/mechs/borgs instead of needing a cell when attached to such things. Did you know this was supposed to be a feature, but didn't work for who-knows-how-long? /🆑 |
||
|
|
5261efb67f |
Re-refactors batons / Refactors attack chain force modifiers (#90809)
## About The Pull Request Melee attack chain now has a list passed along with it, `attack_modifiers`, which you can stick force modifiers to change the resulting attack This is basically a soft implementation of damage packets until a more definitive pr, but one that only applies to item attack chain, and not unarmed attacks. This change was done to facilitate a baton refactor - batons no longer hack together their own attack chain, and are now integrated straight into the real attack chain. This refactor itself was done because batons don't send any attack signals, which has been annoying in the past (for swing combat). ## Changelog 🆑 Melbert refactor: Batons have been refactored again. Baton stuns now properly count as an attack, when before it was a nothing. Report any oddities, particularly in regards to harmbatonning vs normal batonning. refactor: The method of adjusting item damage mid-attack has been refactored - some affected items include the Nullblade and knives. Report any strange happenings with damage numbers. refactor: A few objects have been moved to the new interaction chain - records consoles, mawed crucible, alien weeds and space vines, hedges, restaurant portals, and some mobs - to name a few. fix: Spears only deal bonus damage against secure lockers, not all closet types (including crates) /🆑 |
||
|
|
337f7b025f |
Moneybots are no longer capable of crashing the economy (or your game) (#90814)
## About The Pull Request 1. Moneybots round to the nearest 1 credit. 2. Moneybots have a 0.5 second cooldown between being able to dispense credits. 3. Moneybots won't dispense more than 50 credits on a tile. ## Why It's Good For The Game The economy, fools! ## Changelog 🆑 Melbert qol: Moneybots round to the nearest 1 credit. qol: Moneybots have a 0.5 second cooldown between being able to dispense credits. qol: Moneybots won't dispense more than 50 credits on a tile. /🆑 |
||
|
|
339616ae78 |
You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
## About The Pull Request People can now pet held mothroaches and pugs if they want to, or use items on them, hopefully without causing many issues. After all, it only took about a couple dozen lines of code to make... ...Oh, did the 527 files changed or the 850~ lines added/removed perhaps catch your eye? Made you wonder if I accidentally pushed the wrong branch? or skewed something up big time? Well, nuh uh. I just happen to be fed up with the melee attack chain still using stringized params instead of an array/list. It was frankly revolting to see how I'd have had to otherwise call `list2params` for what I'm trying to accomplish here, and make this PR another tessera to the immense stupidity of our attack chain procs calling `params2list` over and over and over instead of just using that one call instance from `ClickOn` as an argument. It's 2025, honey, wake up! I also tried to replace some of those single letter vars/args but there are just way too many of them. ## Why It's Good For The Game Improving old code. And I want to be able to pet mobroaches while holding them too. ## Changelog 🆑 qol: You can now interact with held mobs in more ways beside wearing them. /🆑 |
||
|
|
b49553bdf4 |
Refactors MODsuit module rendering and allows overslotted parts to show items they overslot when unsealed (#90414)
## About The Pull Request MODsuit modules now render on the part they're attached to, that being first part if required_slots is set, otherwise defaulting to the control module. Instead of using icon ops and a cache, module masking (used by armor boosters and insignias) will instead render the module on all parts, each overlay alpha filtered using the worn piece as the mask. To do this we also migrate modules to separate_worn_overlays, which fixes the issue where they'd always get painted the same color as the back piece, ignoring use_mod_colors's value (which is FALSE by default). So now modules that inherit MOD's color like armor booster will be painted accordingly to their piece. This also means that modules actually layer properly, and don't go ontop of items that they should be under. Additionally, whenever gloves or boots overslot an item, the overslotted item will still render underneath them if they're unsealed. Because it looks weird when your gloves disappear when you extend your MODsuit ones.  Look at that hip look, she'd have bare hands and ankles without this PR. Closes #90370 ## Why It's Good For The Game Fixes a bunch of visual jank that looks weird, and overslotting displaying overslotted item is just behavior you'd expect normally. ## Changelog 🆑 add: When a MODsuit piece overslots an item, it will now render beneath that piece as long as its unsealed. refactor: Refactored how MODsuit modules are rendered, report any bugs on GitHub! /🆑 |
||
|
|
4dd6cdeb72 |
Refactors how item actions are handled (#89654)
## About The Pull Request This PR tackles our piss-poor item action handling. Currently in order to make an item only have actions when its equipped to a certain slot you need to override a proc, which I've changed by introducing an action_slots variable. I've also cleaned up a ton of action code, and most importantly moved a lot of Trigger effects on items to do_effect, which allows actions to not call ui_action_click or attack_self on an item without bypassing IsAvailible and comsigs that parent Trigger has. This resolves issues like jump boots being usable from your hands, HUDs being toggleable out of your pockets, etc. Also moved a few actions from relying on attack_self to individual handling on their side. This also stops welding masks/hardhats from showing their action while you hold them, this part of the change is just something I thought didn't make much sense - you can use their action by using them in-hand, and flickering on your action bar can be annoying when reshuffling your backpack. Closes #89653 ## Why It's Good For The Game Makes action handling significantly less ass, allows us to avoid code like this ```js /obj/item/clothing/mask/gas/sechailer/ui_action_click(mob/user, action) if(istype(action, /datum/action/item_action/halt)) halt() else adjust_visor(user) ``` |
||
|
|
90b67b0541 |
A Small Circuit Expansion: Wallmounts, Undertiles, and Wire Bundles (#89122)
## About The Pull Request
This PR adds several circuit features, and changes several
assembly-related features to make them a bit more logical in how they
work. Included are the following changes/additions:
- Assemblies and wires have been refactored with vars that describe
their behavior:
- Assemblies have an `assembly_behavior` bitflag instead of a
`attachable` var. This var has 3 flags:
- `ASSEMBLY_INPUT`: The assembly is able to pulse the wire it is
attached to.
- `ASSEMBLY_TOGGLE_ARMED`: On activation, the assembly toggles whether
it can pulse the wire it is attached to.
- `ASSEMBLY_FUNCTIONAL_OUTPUT`: On activation, the assembly does
something other than just toggling whether it's armed.
- Wires have a `wires_behavior` bitflag with 3 flags:
- `WIRES_INPUT`: The object the wires are attached to does something
when the wires are pulsed.
- `WIRES_TOGGLE_ARMED`: The object the wires are attached to can
activate assemblies attached to those wires, and is fine if all that
activating that assembly does is toggle whether it's armed.
- `WIRES_FUNCTIONAL_OUTPUT`: The object the wires are attached to
expects that assemblies attached to its wires do something other than
toggling themselves when activated.
- Buttons can only accept assemblies with `ASSEMBLY_FUNCTIONAL_OUTPUT`.
- Pressure plates can now accept any assembly with
`ASSEMBLY_FUNCTIONAL_OUTPUT`, not just signalers. Assembly shells
attached to pressure plates will draw power from the powernet if the
pressure plate is under a tile.
- Adds a new circuit component - the wire bundle.
- This component gives the circuit a number of wires corresponding to
the size of the shell.
- Each wire has a corresponding port on the component that can pulse,
and receive pulses from, that wire.
- A circuit can only have one wire bundle component.
- Assembly shells cannot be attached to these wires, and no wires will
be created if the component is added to an assembly shell.
- Available with roundstart tech.
- Adds two new shells.
- The wallmounted shell is a large shell that can be hung on walls, and
uses power from the area it's placed in.
- Frame icon:

- Constructed icon:

- The undertile shell is a small shell that only works when fit under a
floor tile, but uses power from the area it's placed in.

- Both shells support usb cables.
- The above shells are available with the Advanced Shells techweb node.
## Why It's Good For The Game
The wire bundle component complements the functionality of the assembly
shell by allowing circuits to use assemblies directly in their logic.
The wallmounted and undertile shells provide ways of placing circuits
that don't necessarily take up space for machines. The undertile shell
is particularly useful for relaying usb component data over wirenets.
Pressure plates being able to accept assemblies other than signalers
expands their uses significantly.
## Changelog
🆑
refactor: Wires and assemblies have been refactored to have
directionality to them. This mostly makes it so that assemblies can only
be attached to wires it would make sense for them to be attached to.
qol: Pressure plates can now also accept igniters, condensers, flashes,
assembly shells, and door controllers.
add: Undertile circuit shells. They only work when placed under floor
tiles, but support USB cables and use APC power instead of cell power.
add: Wallmounted circuit shells. Large shells that support USB cables
and use APC power instead of cell power.
add: Wire bundle component. Adds a number of wires to the circuit
proportional to the capacity of the shell, allowing you to use
assemblies in circuit logic.
/🆑
|
||
|
|
f057705c4f |
machine board naming convention pass (#88888)
## About The Pull Request Adjusts a bunch of machine board names to comply with the general machine board naming patterns I see. First pass just removed a bunch of errant (Machine Board)s that were still on board names despite them being automatically appended on initialization, second pass set some board designs to actually have "Board" on the end to specify that it's a board and not a whole machine. ## Why It's Good For The Game Machine board naming consistency is probably good, actually. ## Changelog 🆑 spellcheck: A handful of machine boards should no longer have two (Machine Board)s showing up in their name. spellcheck: Boulder machinery boards are now labeled as boards from autolathes/circuit imprinters. /🆑 --------- Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com> |
||
|
|
a54009fd67 |
Circuit Wirenet Components + Assembly Shell Tweaks (#88593)
## About The Pull Request Assembly shells now use power from whatever machine/borg/mech/modsuit they are attached to the wires of, instead of their own power cell, when appropriate. As for the meat of this PR, circuit wirenet components function like NTnet and NFC components, but their signals are transmitted across whatever cable network the shell (or in the case of assembly shells, the machine or button it's inserted into) is connected to. These components are available with roundstart tech. ## Why It's Good For The Game Provides a somewhat intuitive way to make circuit networks that aren't dependent on external factors to continue functioning. NTnet components require a functional NTnet relay, which usually means they need telecomms to be working. NFC components have a range limit, and you need to provide a specific reference to the circuit being communicated with. Wirenet components, on the other hand, just need the shell to be anchored (or for assembly circuits, the thing whose wire it is attached to), and for the shell to have a cable under it. Also might indirectly provide a reason to use cable layers other than the default one. ## Changelog 🆑 add: Adds circuit wirenet components, allowing data to be transmitted and received over cable networks. qol: When attached to a machine, mech, modsuit, or borg, assembly circuit shells will use power from those instead of the circuit's own cell. /🆑 |
||
|
|
2e4d70afe5 |
Updates href uses for 516 (#88699)
## About The Pull Request Was just scrolling through the Paradise github since they seem to have more work done for 516 to see if there's anything I can port over, found this and thought why not. Ports parts of https://github.com/ParadiseSS13/Paradise/pull/25105 Specifically, updaing all hrefs to use the internal ``byond://``, and adding it to grep. ## Why It's Good For The Game More work towards 516. ## Changelog Nothing player-facing. |
||
|
|
6272b3680c |
You can use a fishing rod to snatch organs during organ manipulation surgery (feat organs sanity fix) (#87774)
## About The Pull Request This allows you to use a fishing rod during the "manipulate organs" step of the aforementioned surgery to snatch organs from a target. Unlike other fish sources, this one has a negative fishing difficulty of -20, which when summed with the default minigame difficulty should still result in a negative difficulty. In layman terms, this means the minigame is skipped here (unless you're wearing some clunky stuff like insulated or boxing gloves). It also has a wait time of 8 to 13 seconds versus the more random standard 3 to 25 seconds. A small side-effect of this is that explosions during the "manipulate organs" step will basically disembowel you, but it kinda fits anyway. By the by, because of this, there is a tiny chance bluespace fishing rods can yield you random organs. Worry not, they're newly generated, so you won't be snatching it from another player by accident (at least for now). ## Why It's Good For The Game It adds more possible weird and rare shenanigans involving surgery. ## Changelog 🆑 Add: You can use a fishing rod to snatch organs during organ manipulation surgery /🆑 |
||
|
|
778ed9f1ab |
The death or internal/external organ pathing (ft. fixed fox ears and recoloring bodypart overlays with dye sprays) (#87434)
## About The Pull Request This PR kills the abstract internal and external typepaths for organs, now replaced by an EXTERNAL_ORGAN flag to distinguish the two kinds. This PR also fixes fox ears (from #87162, no tail is added) and mushpeople's caps (they should be red, the screenshot is a tad outdated). And yes, you can now use a hair dye spray to recolor body parts like most tails, podpeople hair, mushpeople caps and cat ears. The process can be reversed by using the spray again. ## Why It's Good For The Game Time-Green put some effort during the last few months to untie functions and mechanics from external/internal organ pathing. Now, all that this pathing is good for are a few typechecks, easily replaceable with bitflags. Also podpeople and mushpeople need a way to recolor their "hair". This kind of applies to fish tails from the fish infusion, which colors can't be selected right now. The rest is just there if you ever want to recolor your lizard tail for some reason. Proof of testing btw (screenshot taken before mushpeople cap fix, right side has dyed body parts, moth can't be dyed, they're already fabolous):  ## Changelog 🆑 code: Removed internal/external pathing from organs in favor of a bit flag. Hopefully this shouldn't break anything about organs. fix: Fixed invisible fox ears. fix: Fixed mushpeople caps not being colored red by default. add: You can now dye most tails, podpeople hair, mushpeople caps etc. with a hair dye spray. /🆑 |
||
|
|
2c7c76a53d |
Fixes BCI messaging and circuit laser pointers (#86978)
## About The Pull Request Closes #86968 Closes #86969 ## Changelog 🆑 fix: Fixed BCIs sending messages twice and circuit laser pointers sometimes failing to work /🆑 |
||
|
|
58501dce77 |
Reorganizes the sound folder (#86726)
## About The Pull Request <details> - renamed ai folder to announcer -- announcer -- - moved vox_fem to announcer - moved approachingTG to announcer - separated the ambience folder into ambience and instrumental -- ambience -- - created holy folder moved all related sounds there - created engineering folder and moved all related sounds there - created security folder and moved ambidet there - created general folder and moved ambigen there - created icemoon folder and moved all icebox-related ambience there - created medical folder and moved all medbay-related ambi there - created ruin folder and moves all ruins ambi there - created beach folder and moved seag and shore there - created lavaland folder and moved related ambi there - created aurora_caelus folder and placed its ambi there - created misc folder and moved the rest of the files that don't have a specific category into it -- instrumental -- - moved traitor folder here - created lobby_music folder and placed our songs there (title0 not used anywhere? - server-side modification?) -- items -- - moved secdeath to hailer - moved surgery to handling -- effects -- - moved chemistry into effects - moved hallucinations into effects - moved health into effects - moved magic into effects -- vehicles -- - moved mecha into vehicles created mobs folder -- mobs -- - moved creatures folder into mobs - moved voice into mobs renamed creatures to non-humanoids renamed voice to humanoids -- non-humanoids-- created cyborg folder created hiss folder moved harmalarm.ogg to cyborg -- humanoids -- -- misc -- moved ghostwhisper to misc moved insane_low_laugh to misc I give up trying to document this. </details> - [X] ambience - [x] announcer - [x] effects - [X] instrumental - [x] items - [x] machines - [x] misc - [X] mobs - [X] runtime - [X] vehicles - [ ] attributions ## Why It's Good For The Game This folder is so disorganized that it's vomit inducing, will make it easier to find and add new sounds, providng a minor structure to the sound folder. ## Changelog 🆑 grungussuss refactor: the sound folder in the source code has been reorganized, please report any oddities with sounds playing or not playing server: lobby music has been repathed to sound/music/lobby_music /🆑 |
||
|
|
a4328ae1f9 |
Audits tgui_input_text() for length issues (#86741)
Fixes #86784
## About The Pull Request
Although some of the issues found were a direct result from #86692
(
|
||
|
|
3690bd3d8a |
Add distance output to direction circuit component, resizes several shells (#86577)
## About The Pull Request The direction component outputs the direction of an entity if it's within 7 tiles of the circuit. Since it already checks the distance, I added distance as one of its outputs. Besides that, I did a pass over the generics and shells and resized many of them. Most I resized to be small or tiny, except for the airlock shell, which I set to be bulky because it's a whole ass door. The shells I didn't touch remain at 'normal' size. 1) All handheld shells set to small, compact remote set to tiny 2) all components and the generic of the circuit set to tiny 3) drone shell set to small 4) airlock shell set to bulky ## Why It's Good For The Game Returning the distance spares any would be circuiteers from having to do a labyrinthine set of calculations to determine distance themselves. Making most circuits more portable makes them more attractive for people to tote around. ## Changelog 🆑 Bisar qol: The 'direction' circuit component now also returns the distance of its target. balance: Most circuit shells and the generic component and generic circuit have had their size reduced. balance: The airlock circuit shell has had its size increased. /🆑 --------- Co-authored-by: Metekillot <ubuntu@ip-172-26-7-23.us-east-2.compute.internal> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> |
||
|
|
9a9b428b61 |
Wallening Revert [MDB Ignore][IDB Ignore] (#86161)
This PR is reverting the wallening by reverting everything up to
|
||
|
|
891394181f |
Computer console sounds (#85358)
## About The Pull Request https://github.com/user-attachments/assets/b756bc49-70f0-4c86-8b04-5f0566d606a2 I've made the sound really quiet (quieter than most other sounds in the game) so it shouldn't be too annoying, there is 7 variants of the clicks so ear fatigue shouldn't strike too bad. ## Why It's Good For The Game Clicky sounds release a dopamine surge for players and gives you audio feedback when you're doing something, it also triggers when someone is else working at a computer which tells you that they're using it. ## Changelog 🆑 grungussuss sound: computers now make clicky clacky sounds /🆑 |
||
|
|
095f7e3b70 |
Death of mutant bodyparts AND external organs (#85137)
## About The Pull Request Removes mutant bodyparts and external organs from the game completely Digitgrade behaviour was mutant bodypart for no reason Cat ears now work with the bodyparts overlay system, same as all the other external organs (since all their behaviour is now just on /organ It doesn't remove all the /external types, but moves all behaviour to /organ. I'll follow up with a PR wiping all the /external organ types, but it's just conflict heaven so not this PR I've also streamlined a lot of duplicate/weird species regeneration code Melbert did the same PR as well but due to a lack of time (?) I have absorbed his PR to double nuke mutant bodyparts ## Why It's Good For The Game Frees us from the chain of unmodular code, and kills my greatest nemesis (after the shuttle meteor murder bug) ## Changelog 🆑 Time-Green and MrMelbert Refactor: External organ behaviour has been moved to /organ, ears now use the same system as the other organs Refactor: Mutant bodyparts are dead! This likely does not mean much to the average person but it's very dear to me code: Improves digitgrade handling in preference code /🆑 I have absorbed #85126, using Melberts code to improve and add some missing changes. Mainly improving the functioning of preferences and digitgrade legs. I didn't take over the hairstyle improvements. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> |
||
|
|
fd0ac2c533 |
Fixes circuit drone pixel/shadow offsets (#85940)
## About The Pull Request Lil guy no longer flies above ground with his shadow on the turf below him  ## Changelog 🆑 fix: Fixed circuit drone pixel/shadow offsets /🆑 |
||
|
|
8a16be72ee |
Fix carbons deathgasping twice (#84347)
## About The Pull Request They deathgasped once on the carbon level and once on the living level I also realized this check I added a while back breaks lag check mechanism so let's just change that around ## Changelog 🆑 Melbert fix: Lizards and Moths don't deathgasp twice when they die /🆑 |
||
|
|
9c9a5d28ff |
Some alt & ctrl click improvements (#84203)
## About The Pull Request Improved code quality of both so they resemble each other. Some of the new specs are as follows 1. Moved` COMSIG_CLICK_ALT` & `COMSIG_CLICK_ALT_SECONDARY` up i.e. before `can_perform_action()` making them pure hooks not bound by any action checks giving components full control over them 2. Removed range check(`CAN_I_SEE`) & view check(`is_blind()`) out of the base alt click proc. They now only apply to living mobs and don't apply to ghosts(ghosts don't get blind & see everything) & revenants (the range check still applies for revenants though). This was actually a bug because these 2 checks were only meant to see if the loot panel could be opened (as stated in https://github.com/tgstation/tgstation/pull/83736#discussion_r1628097941) but because they are at the top of the proc they also apply to all alt click actions which is not intended. Also, by moving these checks down to mob subtype levels some of the snowflake checks like this https://github.com/tgstation/tgstation/blob/7579e0e1734ee40b33ce1fd3fc5c2dd08fe30404/code/_onclick/click_alt.dm#L23 can be removed. We should not check for subtypes within the parent type proc but instead have subtypes override their parent procs to implement custom behaviour 3. Removed redundant signals like` COMSIG_XENO_SLIME_CLICK_ALT` in favour of just `COMSIG_MOB_ALTCLICKON` 4. While looking for alt click signal overrides I found alt click for style meter was run timing, that's fixed now ## Changelog 🆑 fix: alt click runtime no more when using style meter code: improved alt & ctrl click code /🆑 |
||
|
|
0db2a23faf |
Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#84079)
## About The Pull Request As the title says. A standard power cell now only stores 10 KJ and drains power similar to how it did before the refactor to all power appliances. The new standard megacell stock part stores 1 MJ (what cells store right now). APCs and SMESs have had their power cells replaced with these megacell stock parts instead. Megacells can only be used in APCs and SMESs. It shouldn't be possible to use megacells in any typical appliance. This shouldn't change anything about how much 'use' you can get out of a power cell in regular practice. Most should operate the same and you should still get the same amount of shots out of a laser gun, and we can look at expanding what can be switched over to megacells, e.g. if we want mechs to require significantly more power than a typical appliance. Thanks to Meyhazah for the megacell icon sprites. ## Why It's Good For The Game Power cell consumption is way too high ever since the power appliance refactor that converted most things to be in joules. It's a bit ridiculous for most of our machinery to drain the station's power supply this early on. The reason it's like this is because regular appliances (laser guns, borgs, lights) all have a cell type that is identical to the APC/SMES cell type. And it means that if we want to provide an easy way to charge these appliances without making it easy to charge APCs/SMESs through a power bug exploit, we need to introduce a new cell type to differentiate between what supplies power and regular appliances that use power. This is primarily what the megacell stock part does. This moves us back to what it was originally like before the power refactor, where recharging power cells wouldn't drain an exorbitant amount of energy. However, it maintains the goal of the original refactor which was to prevent people from cheesing power generation to produce an infinite amount of power, as the power that APCs and SMESs operate at is drastically different from the power that a regular appliance uses. ## Changelog 🆑 Watermelon, Mayhazah balance: Drastically reduces the power consumption and max charge of power cells balance: Added a new stock part called the battery, used primarily in the construction of APCs and SMESs. add: Suiciding with a cell/battery will shock you and potentially dust you/shock the people around you if the charge is great enough. /🆑 --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> |
||
|
|
6fea9d999d |
Small playsound audit, particularly involving portal sounds (#83893)
## About The Pull Request I was looking at sounds (as you do) and I noticed this  These sounds don't exist We have `portal_open_1`, not `portal_open1`. This wasn't caught on compile because they used `""` and not `''`. So I went through and audited a bunch of playsound uses that don't use `''`. Only one error, fortunately Likewise there was a ton of places running `get_sfx` pointlessly (because `playsound` does it for you) so I clened that up. However while auditing the portal stuff I noticed a few oddities, so I cleaned it up a bit. Also also I added the portal sounds to the wormholes event and gave it a free ™️ optimization because it was an in-world loop ## Changelog 🆑 Melbert sound: Portals made by portal guns now make sounds as expected sound: Wormholes from the wormhole event now make sounds when formed /🆑 |
||
|
|
ff6b41aa07 |
Afterattack is dead, long live Afterattack (#83818)
## About The Pull Request - Afterattack is a very simple proc now: All it does is this, and all it's used for is for having a convenient place to put effects an item does after a successful attack (IE, the attack was not blocked)  - An overwhelming majority of afterattack implementations have been moved to `interact_with_atom` or the new `ranged_interact_with_atom` I have manually tested many of the refactored procs but there was 200+ so it's kinda hard ## Why It's Good For The Game Afterattack is one of the worst parts of the attack chain, as it simultaneously serves as a way of doing random interactions NOT AT ALL related to attacks (despite the name) while ALSO serving as the defacto way to do a ranged interaction with an item This means careless coders (most of them) may throw stuff in afterattack without realizing how wide reaching it is, which causes bugs. By making two well defined, separate procs for handing adjacent vs ranged interactions, it becomes WAY WAY WAY more easy to develop for. If you want to do something when you click on something else and you're adjacent, use `interact_with_atom` If you want to do something when you click on something else and you're not adjacent, use 'ranged_interact_with_atom` This does result in some instances of boilerplate as shown here:  But I think it's acceptable, feel free to oppose if you don't I'm sure we can think of another solution ~~Additionally it makes it easier to implement swing combat. That's a bonus I guess~~ ## Changelog 🆑 Melbert refactor: Over 200 item interactions have been refactored to use a newer, easier-to-use system. Report any oddities with using items on other objects you may see (such as surgery, reagent containers like cups and spray bottles, or construction devices), especially using something at range (such as guns or chisels) refactor: Item-On-Modsuit interactions have changed slightly. While on combat mode, you will attempt to "use" the item on the suit instead of inserting it into the suit's storage. This means being on combat mode while the suit's panel is open will block you from inserting items entirely via click (but other methods such as hotkey, clicking on the storage boxes, and mousedrop will still work). refactor: The detective's scanner will now be inserted into storage items if clicked normally, and will scan the storage item if on combat mode /🆑 |
||
|
|
f6d28662a3 |
Add circuit component cameras (#83578)
## About The Pull Request This PR introduces a limited set of camera components that can be used by surveillance security consoles and the PDA/laptop camera app. <img width="366" alt="components" src="https://github.com/tgstation/tgstation/assets/80724828/0e628863-9998-46d6-8822-e0a44543b4c2"> There is four camera components, each limited to a specified shell circuit type. Additionally, drone circuit shells can now use the recharge stations too, much like how mobs with BCIs can recharge. ### New Components <img width="136" alt="drone camera" src="https://github.com/tgstation/tgstation/assets/80724828/fd045871-56bf-44a6-bb4f-ebe895d56d3d"> * Drone Camera This camera component captures the surrounding area. It has an option to set the camera range (near 5x5/far 14x14). <img width="136" alt="bci camera" src="https://github.com/tgstation/tgstation/assets/80724828/16bf2dd1-823b-4d66-8249-5d0f1bb1b779"> * BCI Camera This camera component uses the active user's eyes as a camera function. If the user's sights are damaged, the range will be forced to the near setting. If the user is unconscious/dead/blinded or has no eyes, the stream will be cut off. It has an option to set the camera range (near 5x5/far 14x14). <img width="136" alt="polaroid camera" src="https://github.com/tgstation/tgstation/assets/80724828/7c4d53df-b4af-4f7c-8942-a63842510720"> * Polaroid Camera Add-On This camera component streams to a camera network. The camera range is hardcoded to the near setting (5x5). <img width="136" alt="airlock camera" src="https://github.com/tgstation/tgstation/assets/80724828/5d9e9d55-49fc-45a7-99c8-aaf1ae08f6d1"> * Airlock Camera This camera component streams to a camera network. The camera range is hardcoded to the near setting (5x5). ### Features * The cameras can be EMP'd and will be disabled for 90 seconds if successful * When the cameras are active, they will actively drain the cell's power per second (near range uses 3kJ & far range uses 8kJ) * Advance camera console/AIs can use these cameras, however the camera light is disabled (they will be useless in dark areas) ### Screenshots In Action <details> This is the drone camera viewed on a security camera console<br> <img width="425" alt="near" src="https://github.com/tgstation/tgstation/assets/80724828/e5247828-0fee-4552-9e70-5e5ee897c117"><br> This is the same drone, now set to the far range setting<br> <img width="425" alt="far" src="https://github.com/tgstation/tgstation/assets/80724828/e58e3e85-aa90-4f1a-9dff-957c65764b77"><br> </details> ## Why It's Good For The Game This promotes emergent gameplay and improves the overall usefulness for drones as they can be 100% used remotely. ## Changelog 🆑 add: Added new circuit camera components qol: Circuit drones can now recharge at recharge stations /🆑 --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> |
||
|
|
7a1fecdb16 |
Check if drone is inside an object, and call the object's relaymove() proc and return (#83504)
## About The Pull Request This PR adds an additional check for drones when they're inside a container, and properly calls the inherited proc `relaymove()` ## Why It's Good For The Game This fixes bugs related to objects that can store living mobs, and properly calls the `relaymove()` related functions needed when leaving/exiting said object. https://github.com/tgstation/tgstation/assets/80724828/b5adeb49-9205-4e70-aeef-ad0428ee5e54 https://github.com/tgstation/tgstation/assets/80724828/615e2a01-802f-44e8-8750-b39bd11aad70 ## Changelog 🆑 fix: Drones stored inside objects will call the stored object's relaymove() and return upon move /🆑 |
||
|
|
2e3a90293d |
Dehardcoded modsuit fixes (#83425)
## About The Pull Request Patches up some things that were lacking post #82905 - Some missing (un)seal messages - a missed direct use of the mod_parts list EDIT: Also fixes the modsuit painter, and makes sure modsuits can still be set to use custom dmi files via `MOD_ICON_OVERRIDE`/`MOD_WORN_ICON_OVERRIDE` Fixes #83442 ## Changelog 🆑 fix: some missing modsuit (un)sealing messages should no longer be missing fix: MOD circuit adapter core deployed parts output should work again fix: Modsuit painter works again /🆑 |
||
|
|
4731db9933 |
[NO GBP]Fixes hypercharged slime core cells and circuit gun cells starting with an insignificant amount of charge. (#82977)
Scales the hypercharged slime core and wiremod gun cell maximum charge and charge rate by the STANDARD_CELL_CHARGE and STANDARD_CELL_RATE defines. Fixes their scale. Closes #82907 ## Changelog 🆑 fix: Fixes hypercharged slime core cells and circuit guns having 1,000 times less energy than intended. /🆑 |
||
|
|
635b7fa66c |
Use cell defined constants for various stuff (#82594)
## About The Pull Request This re writes most cell power usage cases with 2 defines `STANDARD_CELL_CHARGE`(Joules) & `STANDARD_CELL_RATE`(Watts) so changing cell capacity values in the future won't cause discrepancies. ## Changelog 🆑 code: most cell power usages are scaled with defined constants to help adapt to future changes /🆑 |
||
|
|
8e3f635b98 |
Alt click refactor (#82656)
## About The Pull Request Rewrites how alt click works. Based heavily on #82625. What a cool concept, it flows nicely with #82533. Fixes #81242 (tm bugs fixed) Fixes #82668 <details><summary>More info for devs</summary> Handy regex used for alt click s&r: `AltClick\((.*).*\)(\n\t.*\.\.\(\))?` `click_alt($1)` (yes I am aware this only copies the first arg. there are no other args!) ### Obj reskins No reason for obj reskin to check on every single alt click for every object. It applies to only a few items. - Moved to obj/item - Made into signal - Added screentips ### Ventcrawling Every single atmospherics machine checked for ventcrawling capability on alt click despite only 3 objects needing that functionality. This has been moved down to those individual items. </details> ## Why It's Good For The Game For players: - Alt clicking should work more logically, not causing double actions like eject disk and open item window - Added context menus for reskinnable items - Removed adjacency restriction on loot panel For devs: - Makes alt click interactions easier to work with, no more click chain nonsense and redundant guard clauses. - OOP hell reduced - Pascal Case reduced - Glorious snake case ## Changelog 🆑 add: The lootpanel now works at range. add: Screentips for reskinnable items. fix: Alt click interactions have been refactored, which may lead to unintentional changes to gameplay. Report any issues, please. /🆑 |
||
|
|
c403a6eccc |
Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request Fixes #82440 This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not lost on me) to wrap around all calls of `lowertext()` and ensure that whatever we input into that proc will be stringified using the `"[]"` (or `tostring()` for the nerds) operator. very simple. I also added a linter to enforce this (and prevent all forms of regression) because I think that machines should do the menial work and we shouldn't expect maintainers to remember this, let me know if you disagree. if there is a time when it should be opted out for some reason, the linter does respect it if you wrap your input with the `UNLINT()` function. |
||
|
|
6dc40ca522 |
Standardizes object deconstruction throughout the codebase. (#82280)
## About The Pull Request When it comes to deconstructing an object we have `proc/deconstruct()` & `NO_DECONSTRUCT` Lets talk about the flag first. **Problems with `NO_DECONSTRUCTION`** I know what the comment says on what it should do https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/__DEFINES/obj_flags.dm#L18 But everywhere people have decided to give their own meaning/definition to this flag. Here are some examples on how this flag is used **1. Make the object just disappear(not drop anything) when deconstructed** This is by far the largest use case everywhere. If an object is deconstructed(either via tools or smashed apart) then if it has this flag it should not drop any of its contents but just disappear. You have seen this code pattern used everywhere https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/game/machinery/constructable_frame.dm#L26-L31 This behaviour is then leveraged by 2 important components. When an object is frozen, if it is deconstructed it should just disappear without leaving any traces behind https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/datums/elements/frozen.dm#L66-L67 By hologram objects. Obviously if you destroy an hologram nothing real should drop out https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/modules/holodeck/computer.dm#L301-L304 And there are other use cases as well but we won't go into them as they aren't as significant as these. **2. To stop an object from being wrenched ??** Yeah this one is weird. Like why? I understand in some instances (chair, table, rack etc) a wrench can be used to deconstruct a object so using the flag there to stop it from happening makes sense but why can't we even anchor an object just because of this flag? https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/game/objects/objs.dm#L368-L369 This is one of those instances where somebody just decided this behaviour for their own convenience just like the above example with no explanation as to why **3. To stop using tools to deconstruct the object** This was the original intent of the flag but it is enforced in few places far & between. One example is when deconstructing the a machine via crowbar. https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/game/machinery/_machinery.dm#L811 But machines are a special dual use case for this flag. Because if you look at its deconstruct proc the flag also prevents the machine from spawning a frame. https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/game/machinery/_machinery.dm#L820-L822 How can 1 flag serve 2 purposes within the same type? **4. Simply forget to check for this flag altogether** Yup if you find this flag not doing its job for some objects don't be surprised. People & sometimes even maintainers just forget that it even exists https://github.com/tgstation/tgstation/blob/b5593bc6930cb60803214869a7b94c84e7baa02c/code/game/objects/items/piggy_bank.dm#L66-L67 **Solution** These are the main examples i found. As you can see the same flag can perform 2 different functions within the same type and do something else in a different object & in some instances don't even work cause people just forget, etc. In order to bring consistency to this flag we need to move it to the atom level where it means the same thing everywhere. Where in the atom you may ask? .Well, I'll just post what MrMelbert said in https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862 > ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION handling as it wants, Yup that's the ideal case now. This flag is checked directly in `deconstruct()`. Now like i said we want to give a universal definition to this flag and as you have seen from my examples it is used in 3 cases 1) Make an object disappear(doesn't dropping anything) when deconstructed 2) Stop it from being wrenched 3) Stop it from being deconstructed via tools We can't enforce points 2 & 3 inside `deconstruct()` which leaves us with only case 1) i.e. make the object disappear. And that's what i have done. Therefore after more than a decade or since this flag got introduced `NO_DECONSTRUCT` now has a new definition as of 2024 _"Make an object disappear(don't dropping anything) when deconstructed either via tools or forcefully smashed apart"_ Now i very well understand this will open up bugs in places where cases 2 & 3 are required but its worth it. In fact they could even be qol changes for all we know so who knows it might even benefit us but for now we need to give a universal definition to this flag to bring some consistency & that's what this PR does. **Problem with deconstruct()** This proc actually sends out a signal which is currently used by the material container but could be used by other objects later on. https://github.com/tgstation/tgstation/blob/3e84c3e6dad33c831ac259f52f2f023680e4899b/code/game/objects/obj_defense.dm#L160 So objects that override this proc should call its parent. Sadly that isn't the case in many instances like such https://github.com/tgstation/tgstation/blob/3e84c3e6dad33c831ac259f52f2f023680e4899b/code/game/machinery/deployable.dm#L20-L23 Instead of `return ..()` which would delete the object & send the signal it deletes the object directly thus the signal never gets sent. **Solution** Make this proc non overridable. For objects to add their own custom deconstruction behaviour a new proc has been introduced `atom_deconstruct()` Subtypes should now override this proc to handle object deconstruction. If objects have certain important stuff inside them (like mobs in machines for example) they want to drop by handling `NO_DECONSTRUCT` flag in a more carefully customized way they can do this by overriding `handle_deconstruct()` which by default delegates to `atom_deconstruct()` if the `NO_DECONSTRUCT` flag is absent. This proc will allow you to handle the flag in a more customized way if you ever need to. ## Why It's Good For The Game 1) I'm goanna post the full comment from MrMelbert https://github.com/tgstation/tgstation/pull/81656#discussion_r1503086862 > ...Ideally the .deconstruct call would handle NO_DECONSTRUCTION handling as it wants, but there's a shocking lack of consistency around NO_DECONSTRUCTION, where some objects treat it as "allow deconstruction, but make it drop no parts" and others simply "disallow deconstruction at all" This PR now makes `NO_DECONSTRUCTION` handled by `deconstruct()` & gives this flag the consistency it deserves. Not to mention as shown in case 4 there are objects that simply forgot to check for this flag. Now it applies for those missing instances as well. 2) No more copying pasting the most overused code pattern in this code base history `if(obj_flags & NO_DECONSTRUCTION)`. Just makes code cleaner everywhere 3) All objects now send the `COMSIG_OBJ_DECONSTRUCT` signal on object deconstruction which is now available for use should you need it ## Changelog 🆑 refactor: refactors how objects are deconstructed in relation to the `NO_DECONSTRUCTION` flag. Certain objects & machinery may display different tool interactions & behaviours when destroyed/deconstructed. Report these changes if you feel like they are bugs /🆑 --------- Co-authored-by: san7890 <the@san7890.com> |
||
|
|
02d83c1f4f |
Fixes recharge stations charge rates (#82191)
## About The Pull Request - Fixes #82190 Have to now use the assigned constants and not magic number `10000`. Also stuff will take the exact charge needed without any wastage. ## Changelog 🆑 fix: recharge stations draw the same amount of power as before but directly from grid(without using apc cell power) and won't waste any excess power /🆑 --------- Co-authored-by: san7890 <the@san7890.com> |
||
|
|
c1f11f26ce |
Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579)
## About The Pull Request Removes all arbitrary energy and power units in the codebase. Everything is replaced with the joule and watt, with 1 = 1 joule, or 1 watt if you are going to multiply by time. This is a visible change, where all arbitrary energy units you see in the game will get proper prefixed units of energy. With power cells being converted to the joule, charging one joule of a power cell will require one joule of energy. The grid will now store energy, instead of power. When an energy usage is described as using the watt, a power to energy conversion based on the relevant subsystem's timing (usually multiplying by seconds_per_tick or applying power_to_energy()) is needed before adding or removing from the grid. Power usages that are described as the watt is really anything you would scale by time before applying the load. If it's described as a joule, no time conversion is needed. Players will still read the grid as power, having no visible change. Machines that dynamically use power with the use_power() proc will directly drain from the grid (and apc cell if there isn't enough) instead of just tallying it up on the dynamic power usages for the area. This should be more robust at conserving energy as the surplus is updated on the go, preventing charging cells from nothing. APCs no longer consume power for the dynamic power usage channels. APCs will consume power for static power usages. Because static power usages are added up without checking surplus, static power consumption will be applied before any machine processes. This will give a more truthful surplus for dynamic power consumers. APCs will display how much power it is using for charging the cell. APC cell charging applies power in its own channel, which gets added up to the total. This will prevent invisible power usage you see when looking at the power monitoring console. After testing in MetaStation, I found roundstart power consumption to be around 406kW after all APCs get fully charged. During the roundstart APC charge rush, the power consumption can get as high as over 2MW (up to 25kW per roundstart APC charging) as long as there's that much available. Because of the absurd potential power consumption of charging APCs near roundstart, I have changed how APCs decide to charge. APCs will now charge only after all other machines have processed in the machines processing subsystem. This will make sure APC charging won't disrupt machines taking from the grid, and should stop APCs getting their power drained due to others demanding too much power while charging. I have removed the delays for APC charging too, so they start charging immediately whenever there's excess power. It also stops them turning red when a small amount of cell gets drained (airlocks opening and shit during APC charge rush), as they immediately become fully charged (unless too much energy got drained somehow) before changing icon. Engineering SMES now start at 100% charge instead of 75%. I noticed cells were draining earlier than usual after these changes, so I am making them start maxed to try and combat that. These changes will fix all conservation of energy issues relating to charging powercells. ## Why It's Good For The Game Closes #73438 Closes #75789 Closes #80634 Closes #82031 Makes it much easier to interface with the power system in the codebase. It's more intuitive. Removes a bunch of conservation of energy issues, making energy and power much more meaningful. It will help the simulation remain immersive as players won't encounter energy duplication so easily. Arbitrary energy units getting replaced with the joule will also tell people more meaningful information when reading it. APC charging will feel more snappy. ## Changelog 🆑 fix: Fixes conservation of energy issues relating to charging powercells. qol: APCs will display how much power they are using to charge their cell. This is accounted for in the power monitoring console. qol: All arbitrary power cell energy units you see are replaced with prefixed joules. balance: As a consequence of the conservation of energy issues getting fixed, the power consumption for charging cells is now very significant. balance: APCs only use surplus power from the grid after every machine processes when charging, preventing APCs from causing others to discharge while charging. balance: Engineering SMES start at max charge to combat the increased energy loss due to conservation of energy fixes. /🆑 --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> |
||
|
|
47dc38fee2 |
Let's you talk through action figures, plushies, and toy mechs with .l and .r. Also a big clean up of say because its support for non-mobs was lackluster. (#81848)
|