mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
docker-container
23
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
62c08cd213 |
Fix broken default_deconstruction_screwdriver calls (#5673)
## About The Pull Request The proc no longer takes icon state arguments so these calls are all broken now ## Why It's Good For The Game Makes a bunch of stuff not runtime when you try to open the panel on it ## Proof Of Testing I spawned in every object changed and tested screwdrivering the panel open and closed ## Changelog 🆑 fix: fixed screwdrivering certain machines not working /🆑 |
||
|
|
44336fafb5 |
Fixes Multi-Cell Chargers working at range (#4608)
## About The Pull Request Turns out you could take cells out of a multi-cell charger from range, this adds a check to stop that. ## Why It's Good For The Game Minor bugfix ## Proof Of Testing <details> <summary>Screenshots/Videos</summary> </details> ## Changelog 🆑 fix: Multi-Cell chargers can't be withdrawn from range anymore. /🆑 |
||
|
|
3d99134379 |
Lets Borgs pop out cells from cell chargers (#3525)
## About The Pull Request Borgs can now remove cells from (multi)cell chargers. Does not touch the way carbons remove individual cells. ## Why It's Good For The Game Engineering and Science borgs can put cells in cell chargers to recharge them but cannot remove them without help or destroying the charger. This fixes it by allowing borgs to make full use of cell chargers. ## Proof Of Testing It compiles and was tested locally. <details> <summary> https://github.com/user-attachments/assets/56fe06ed-4ffe-49b4-b67b-2331cd528bce </summary> </details> ## Changelog 🆑 add: Adds ability for borgs to eject cells from cell chargers by alt clicking on the charger add: Changes popping cells out on multicell chargers from right click to alt click to keep the actions the same between chargers /🆑 |
||
|
|
65f0e6bd76 |
[MIRROR] Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#28376)
* Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] * Multi chargers * all this other shit * maps * more fixes * even more * mapping * map fixes * MCR * map2 * map3 * map4 * map5 --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com> Co-authored-by: Fluffles <piecopresident@gmail.com> |
||
|
|
26b15a012e |
Fixes multi-cell chargers (#27357)
* Update multi_cell_charger.dm * Update wall_cell_charger.dm |
||
|
+3 |
59d74624b1 |
Upstream power stuff combined and shit (#27284)
* Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579) 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. 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. 🆑 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> * Corrects Suit Storage Unit charge rate (#82192) ## About The Pull Request Adjusts SSU charge rate according to the new conversion ratio. Betcha didn't know SSUs recharge suit and MOD cells? This number is actually supposed to be equal to the rate a recharger station does it. I don't know if we have some macro for it. ## Changelog 🆑 Melbert fix: Fixed Suit Storage Unit cell charging rate /🆑 * Corrects EVA thermal regulator cell cost (#82195) ## About The Pull Request Another unit not converted to watts / joules ## Changelog 🆑 Melbert fix: Fixed space suit thermal regulators cell usage. /🆑 * Fixing cell power usage (Part 1) (#82197) ## About The Pull Request Yeah i am not about to create 30 different PR's to address 1 issue at a time. The changes are small enough to be grouped together in bulk. This fixes the following issues specified in #82196 - Borg & exosuit RCD (Fixes #82193) - Motorized wheelchair - Canister shielding - Electrolyser - Potato cell - Space heater - Microwave ## Changelog 🆑 fix: Fixed cell energy usage for a bunch of stuff(Part 1). See PR 82197 for details /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * Fixing cell power usage (Part 2) (#82198) ## About The Pull Request Continuation of #82197. Fixes these issues in #82196 - Cyborg self repair - Cyborg lollipop dispenser - Mauna mug - Plasma cutter (Initial charge not the number of laser shots so partial fix) ## Changelog 🆑 fix: Fixed more energy usages for cells(Part 2). See PR 82198 for details /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * Fixing cell power usage (Part 3) (#82204) ## About The Pull Request Continuation of #82198 Fixes these issues in #82196 - Borg hypo spray - Borg projectile dampen - Borg chameleon - Firelance - MODlink scryer - Emergency light usage ## Changelog 🆑 fix: Fixed more energy usages for cells(Part 3). See PR 82204 for details /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * [NO GBP]Fixes static power usage not always drawing the remaining energy of an APC cell. (#82205) ## About The Pull Request Makes APC static power draw consume the remaining energy of the cell if there's not enough energy. ## Why It's Good For The Game Prevents a niche issue where an area composed entirely of static power users with no dynamic users from running forever with no power supply. ## Changelog 🆑 fix: Fixes static power usage from being able to not draw power. /🆑 * 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> * Fixes space heater power usage (#82208) ## About The Pull Request Related to https://github.com/tgstation/tgstation/issues/82196 fixes the space heater power cell usage relating to power per tile heated. Space heater calculates the amount of power required to heat a tile, but only uses power at the end of the processing loop. Fixes so the power consumption matches the calculated usage per tile. Reverts changes to space heater power efficiency in https://github.com/tgstation/tgstation/pull/82197 that causes the heater to instantly drain the cell. Fixes https://github.com/tgstation/tgstation/issues/82228 ## Changelog 🆑 LT3 fix: Fixes Schrödinger's space heater, where a space heater both consumes a power cell instantly while also not consuming power when heating adjacent tiles /🆑 * General maintenance for reagent grinder (#82161) ## About The Pull Request **1. Qol** - Adds examines & screentips for screwdriver, crowbar & wrench acts. - Adds examines & screentips for inserting, replacing & removing beaker, Also for inserting items from bags or directly - Adds an off icon overlay for when the reagent grinder is either screwed open or loses power, **2. Code Improvements** - Replaced `attackby()` with `item_interaction()` so we can end the attack chain early for non combat operations like inserting beakers/ ingredients for grinding etc. - Removed custom shake animations & replaced it with the global `Shake()` proc cause it did the same thing - Removed constructed version of reagent grinder. We instead just check `mapload` to see if we need the beaker to be created or not for round start reagent grinders - Grinding & Juicing use the same `operate_for()` rather than having seperate procs for each operation - Removed trait `TRAIT_MAY_CONTAIN_BLENDED_DUST`. Why do we have this? Its just used to change the grinder description to warn it may contain dust. It's a waste. **3. Fixes** - You cannot insert hologram items into the grinder. Rather than destroying that item & making it vanish you simply won't be allowed to put it inside the grinder so you can save that item - You can hit the grinder with items like screwdriver, wrench, crowbar, beaker & even with stuff you would normally put in the grinder when in combat mode - Adds `can_interact()` checks for using the UI & other stuff - Fixes #46356. All items of type `obj/item/grown` can be put from any bag into the grinder - The item "and its contents" are now grinded/juiced recursively to get all the reagents it has to offer just like a real grinder would - An AI/Human with AI access examining the reagent grinder now actually works. **4. Refactors** - The grinder now measures its available capacity based on the "total weight" of all items present & not its number. This is more realistic because the grinder has limited space inside & so inserting huge items should have greater impact rather than deciding on an arbitrary number like 10(The grinder having the capacity for 10 items of any size inside its small compartment makes no sense). Examines are displayed to show how much capacity of the grinder has been filled. Upgrading the grinder with better matter bins will allow for higher storage capacities. - Total power consumed is measured based on the duration & weight of all items grinded cause you know its realistic. 🆑 qol: adds examines & screentips for tool acts & other operations for reagent grinder qol: adds an off icon for when the grinder panel is open/not powered code: auto docs vars & procs. Shared common proc for grinding or juicing code: removed trait for blended dust, changed some item interactions to end the attack chain early & save time fix: no inserting hologram items into the reagent grinder fix: you can hit the reagent grinder tools like screwdriver, wrench, crowbar & even beakers/ingredients etc when in combat mode fix; adds sanity checks for when & how mobs interact with the reagent grinder fix: examining a reagent grinder by an AI/Human with AI access now actually works. fix: you can insert Nova flowers & other food items from any bag type fix: reagent grinder now grinds all the contents of an item recursively to produce maximum reagents like a real grinder would refactor: reagent grinder now measures available capacity to store items as total weight of stored items & not number. Capacity can be increased with upgraded matter bin refactor: reagent grinder power usage is now a function of duration & total weight of items blended, meaining blending more number of items/larger items will consume more power refactor: reagent grinder code has been optimized overall. Report bugs on github /🆑 --------- Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk> * Suit Storage Units / Inducers can charge MODsuits without necessitating them be screwdrivered opened (#82194) ## About The Pull Request So MODsuits do this thing here with `get_cell` in that they don't return anything when they're closed  And I... can't tell why they do this. I looked through every use of `get_cell` and the only things affected by this are A. Suit Storage Units, which I believe have always been intended to charge MODsuits? and B. Inducers So I removed the `open` check. Allowing both Inducers and Suit Storage Units to charge mods without needing you screwdriver their panel open first. I also took the opportunity to allow SSUs to charge multiple items at once (divvying charge accross all items) ## Why It's Good For The Game I asked Fikou and they said it was "probably not" intended that you need to screwdriver them open so yeah. I think I remember charging my MODs during the original test merges years back but I can't remember if I opened the suit first when I did or not. Either way, it's not super intuitive. Though it's already not very intuitive that SSUs charge things. ## Changelog 🆑 Melbert qol: Suit Storage Units charge MODsuits while their cell panel is closed or open, rather than only when screwed open qol: Inducers can charge MODsuits while their cell panel is closed or open, rather than only when screwed open qol: Suit Storage Units will charge all items within simultaneously (if possible) /🆑 --------- Co-authored-by: san7890 <the@san7890.com> * Fixes modular computer boot-up (#82254) ## About The Pull Request Fixes a bug where modular computers (specifically PDAs) will fail to start up if there is zero required application power draw. PDA will now consume base active power usage during startup. Related https://github.com/tgstation/tgstation/issues/82196 Fixes https://github.com/tgstation/tgstation/issues/82245 Fixes https://github.com/tgstation/tgstation/issues/82229 ## Changelog 🆑 LT3 fix: Fixed modular computers failing to boot up using cell power (eg: contractor tablet) /🆑 * Fixing cell power usage (Part 4) (#82227) ## About The Pull Request Continuation of #82204 Fixes these issues in #82196 - Cyborg Electroadaptive Pseudocircuit - Defib EMP - Cell EMP - `/datum/action/cooldown/mob_cooldown/charge_apc` stuff - Mecha movement, melee, light ,weapon & tool energy drains - Ninja drain ## Changelog 🆑 fix: Fixed more energy usages for cells(Part 4). See PR 82227 for details /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * Fixing cell power usage (Part 5) (#82296) ## About The Pull Request Continuation of #82227 Fixes these issues in https://github.com/tgstation/tgstation/issues/82196 and others that weren't noticed. - Batton emp protection - Cyborg stun arm - Cyborg energy sword - Cyborg hug attack - Mechanical god religious sect charge check - Mecha fixes - Phasing energy drain - Short circuit energy drain - Durand shield damage energy drain - Plasma engine recharge rate - Mechbay recharge power rate - Recharge station charge rate Stuff that was already working & didn't require fixing. - Plasma cutter energy shots - Botany cell charging ## Changelog 🆑 fix: Fixed cell energy usage for a bunch of stuff(Part 5). See PR 82296 for details /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * Ties power limit of anchored circuits to 20 * standard cell charge to make it consistent with power changes. (#82287) ## About The Pull Request It just makes the power requirement 20 * standard cell charge instead of 20000 ## Why It's Good For The Game This is too restrictive to make anything with. https://github.com/tgstation/tgstation/assets/62126254/e39dcf27-8793-42b0-84a0-7f747e95efcc ## Changelog 🆑 fix: anchored circuits no longer blow up after 2 components are used. /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * Space heater power and heating tweaks (#82344) ## About The Pull Request - Fixes #82342 - Space heater computes total power for heating adjacent turfs and uses cell energy once rather multiple times per turf - Improvised space heater actually works & uses beaker heat capacity and not a constant of 200 for heating beaker contents ## Changelog 🆑 SyncIt21,Pickle-Coding fix: space heater(including improvised) turns off when cell is drained fix: optimized power usage for both improvised and main space heater. Improvised heater now works & uses beaker heat capacity /🆑 * Improved lathe error message (#82260) ## About The Pull Request Improves the auto/protolathe low charge error message. Instead of simply saying low power, it will tell you how long until it has enough charge to print.  ## Why It's Good For The Game Less mashing the lathe over and over with no idea how much APC charge it needs to start printing again ## Changelog 🆑 LT3 code: APCs can now calculate time-to-charge qol: Overloaded lathes will now tell you the wait time until they're ready to print again /🆑 --------- Co-authored-by: san7890 <the@san7890.com> * Fixes issues with multitools on power objects (#82389) ## About The Pull Request So at some point the power object's `multitool_act(...)` proc was set to _always_ block, for what I could find to be no discernable reason. ### The Main Thing https://github.com/tgstation/tgstation/blob/d38f9385b863e49f83455a227764d302629e2867/code/modules/power/power.dm#L62-L74 Now, of course, it shouldn't, because this cuts the entire chain short and thus blocks any other multitool interactions. Like opening the wires panel with a multitool, in this case. Even if `can_change_cable_layer` were to be false and thus the object would never actually care about having this interaction, it'd _still_ block it. So we don't do that. But what _do_ we do? I decided to just split off the actual cable changing part into its own proc, `cable_layer_act(...)`. ```dm /obj/machinery/power/proc/cable_layer_act(mob/living/user, obj/item/tool) var/choice = tgui_input_list(user, "Select Power Line For Operation", "Select Cable Layer", GLOB.cable_name_to_layer) if(isnull(choice)) return ITEM_INTERACT_BLOCKING cable_layer = GLOB.cable_name_to_layer[choice] balloon_alert(user, "now operating on the [choice]") return ITEM_INTERACT_SUCCESS ``` Which is then called on `multitool_act(...)`, if `can_change_cable_layer` is true. ```dm /obj/machinery/power/multitool_act(mob/living/user, obj/item/tool) if(can_change_cable_layer) return cable_layer_act(user, tool) ``` Which continues with the chain if we can't change layers by default, and otherwise lets `cable_layer_act(...)` work out whether we should block or continue. Notably, we've removed the `cable_layer_change_checks(...)` proc from the equation, and just let inheritors override it to add their own preconditions and what flags they should return. On its own this fixes the APC wire panel interactions, but also lets us just return `NONE` when we need to. ```dm /obj/machinery/power/emitter/cable_layer_act(mob/living/user, obj/item/tool) if(panel_open) return NONE if(welded) balloon_alert(user, "unweld first!") return ITEM_INTERACT_BLOCKING return ..() ``` ### The OTHER Things While doing this I noticed there's actually very little sanity checks after we close our input list. ```dm var/choice = tgui_input_list(user, "Select Power Line For Operation", "Select Cable Layer", GLOB.cable_name_to_layer) if(isnull(choice)) return ITEM_INTERACT_BLOCKING ``` We only care about whether we made a choice! Testing this, lo and behold, this can cause runtimes if the power object gets qdeleted before you close the menu. As a funny side, it _also_ doesn't care about whether you're on the other side of the station, while your multitool is on a different z-level, or just doesn't exist anymore. So we just add a few basic sanity checks while we're at it. ```dm var/choice = tgui_input_list(user, "Select Power Line For Operation", "Select Cable Layer", GLOB.cable_name_to_layer) if(isnull(choice) || QDELETED(src) || QDELETED(user) || QDELETED(tool) || !user.Adjacent(src) || !user.is_holding(tool)) return ITEM_INTERACT_BLOCKING ``` That's all. Having done some basic testing, I believe the behaviour is otherwise unaffected. ## Why It's Good For The Game It's annoying to need to swap to an empty hand or wirecutters to interact with APC, emitter, or tesla coil wires. This fixes that. (Fixes #81745.) ...and then a few other tidbits I realized existed. ## Changelog 🆑 fix: Fix using a multitool on a power object with wires not actually opening the wires menu when it should. fix: Fix a runtime from a power object being deleted before selecting what cable layer to put it at. fix: Fix power object cable changing not caring about whether you were still adjacent, still holding your multitool, or whether it even still existed after the selection menu was closed. /🆑 * Updates cyborg cells created from borgifier to the SI standard (#82437) ## About The Pull Request Unchanged value in transformer.dm resulted in borg charge draining to zero immediately after forced conversion in the borgifer. Changing the value of robot cell charge to 5 MJs to fix this. ## Why It's Good For The Game Fixes #82426 ## Changelog 🆑 fix: changed value of cell charge from 5000 to 5 megajoules /🆑 * cell chargers now bypass APCs (#82309) ## About The Pull Request This makes cell chargers and suit storage units draw from the grid before the local apc ## Why It's Good For The Game Upgraded Cell chargers have a charging power of 1MW leading to them instantly draining the apc of any room they are in, this Pr makes them draw from the grid preventing immediate blackout. This is a stopgap until someone smarter than me changes power values so a pocket-sized battery won't require the same power to charge then over 600 average suburban homes. ## Changelog 🆑 balance: suit and cell chargers should draw from grid preventing instant apc blackouts in most cases. /🆑 * Let ethereals starve again (#82308) ## About The Pull Request Ethereals use energy as 'food', so of course #81579 had to touch them. To bring them in line with the new standard, the Ethereal charge levels were updated to be in megajoules. https://github.com/tgstation/tgstation/blob/466b3df0483162c3900e411c25dfe15c2320786e/code/__DEFINES/mobs.dm#L292-L299 https://github.com/tgstation/tgstation/blob/7fa8daad63f49a11e22ab64a984d29b35619852c/code/__DEFINES/mobs.dm#L285-L292 However! This forgot to update the rate at which Ethereals passively discharge. https://github.com/tgstation/tgstation/blob/7fa8daad63f49a11e22ab64a984d29b35619852c/code/modules/surgery/organs/internal/stomach/stomach_ethereal.dm#L11-L14 https://github.com/tgstation/tgstation/blob/7fa8daad63f49a11e22ab64a984d29b35619852c/code/__DEFINES/mobs.dm#L437 Meaning it's effectively a thousand times less with the new charge levels. So we simply update this define to be in kilowatts. ```dm #define ETHEREAL_CHARGE_FACTOR (0.8 KILO WATTS) //factor at which ethereal's charge decreases per second ``` ## Why It's Good For The Game Fixes issue with ethereal hunger caused by #81579. ## Changelog 🆑 fix: Ethereal starvation has been updated to the new joules/watts standard. Congratulations Ethereals! You can starve again! /🆑 * [NO GBP]Fixes ethereal charging and recharge station charge speed. (#82483) ## About The Pull Request Fixes many instances of things not charging ethereals properly. Scales all things that are meant for charging/taking from the ethereal stomach by STANDARD_CELL_CHARGE, so we never run into this issue again. Ethereal stomachs now store a cell inside them, and uses that for the charge instead of tracking a variable. Fixes recharging stations not being able to charge ethereal stomachs. The ethereal signal proc attempted to feed a callback datum to adjust_charge(), which caused a runtime. Changes that by invoking the charge_cell callback instead. Also fixes recharge station charging speed. They weren't converted correctly. Also formats their charging speed in their description, and displays power rather than referencing cycles. ## Why It's Good For The Game So ethereals charge properly. Closes #82470 ## Changelog 🆑 fix: Fixes many instances of energy sources for ethereals supplying a thousand times less energy than intended. fix: Fixes recharging stations not being able to charge ethereals. fix: Fixes recharge stations charging too fast. qol: Recharge stations display their recharging speed in formatted power, rather than unformatted energy per cycle. /🆑 --------- Co-authored-by: san7890 <the@san7890.com> * Update lead acid batteries charge values (#82510) ## About The Pull Request So during the whole power consistency update thing, it seems lead acid batteries were entirely forgotten about. Which, well, is easy, because they never actually used `STANDARD_CELL_CHARGE`. https://github.com/tgstation/tgstation/blob/c34d56a45b0461f5e0fad3cc75e81580c3357119/code/game/objects/items/maintenance_loot.dm#L32-L33 Looking into it, the previous value for `STANDARD_CELL_CHARGE` seemed to have been 1000, so we convert it directly: ```dm maxcharge = STANDARD_CELL_CHARGE * 20 chargerate = STANDARD_CELL_CHARGE * 1.4 ``` But, comparing this to the normal power cells, it seems their charge rates got _halved_ during the update. So, we do that too. ```dm maxcharge = STANDARD_CELL_CHARGE * 20 chargerate = STANDARD_CELL_CHARGE * 0.7 ``` And that fixes it. ## Why It's Good For The Game Fixes lead acid batteries still using the old power amounts, and not being relative to `STANDARD_CELL_CHARGE`. ## Changelog 🆑 fix: Lead acid batteries have had their power values fixed. /🆑 * This should do for modular code, for now. * Fixing cell power usage (Part 5) (#82296) Continuation of #82227 Fixes these issues in https://github.com/tgstation/tgstation/issues/82196 and others that weren't noticed. - Batton emp protection - Cyborg stun arm - Cyborg energy sword - Cyborg hug attack - Mechanical god religious sect charge check - Mecha fixes - Phasing energy drain - Short circuit energy drain - Durand shield damage energy drain - Plasma engine recharge rate - Mechbay recharge power rate - Recharge station charge rate Stuff that was already working & didn't require fixing. - Plasma cutter energy shots - Botany cell charging 🆑 fix: Fixed cell energy usage for a bunch of stuff(Part 5). See PR 82296 for details /🆑 --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> * [NO GBP]Fixes some mapped SMES starting with low energy. (#82203) ## About The Pull Request Scales them all by up to 20 to account for removing the dumb SMESRATE define. This isn't a 100% conversion for every SMES because it would go beyond their capacity (old SMES use to duplicate cell energy, so they had a higher capacity than their cell parts imply). Also removes instances of varediting their capacity to fucking 1e+600 and replaces them with magical SMES. ## Why It's Good For The Game So lavaland and crap don't instantly run out of power. Also I don't think we should be varediting anything to 1e+600. ## Changelog 🆑 fix: Fixes lavaland SMES and other crap from not starting with enough energy. fix: The pirate SMES are now magical instead of secretly infinite. /🆑 * Mechbay & modsuit recharger tweaks (#82337) ## About The Pull Request - Both mechbay & modsuit rechargers now waste a small amount of energy as heat like it did before - Fixes #82332. Mechbay recharger displays the energy of the mech in joules & charges the cell with the exact energy required directly from the grid thus not causing the room to blackout ## Changelog 🆑 fix: Mechbay & modsuit rechargers waste a small amount of energy as heat fix: Mechbay recharger console displays mech charge as joules & charges directly from the grid thus sparing the rooms apc cell from huge loads /🆑 * Refactor APCs interaction chain from attackby to item_interaction (#82390) ## About The Pull Request For how many lines this is, there's not a lot to really say. In general, we simply move all item interactions from `attackby(...)` to `item_interaction(...)`, split each item interaction off into a separate proc, and make them all return the proper item interaction flags. We _do_ kill some probably dead code, and remove a call to `attackby(...)` elsewhere. Then, for clarity, we move the cell check below the ID check so it can be next to the other item type checks, as the priority between cell and ID is unlikely to matter anyway. Other than what's described above and detailed below, each section's functionality should be the same. Now, for the parts that _do_ need to be explained more. ### Killing Probably Dead Code Alright, so, the first part that does not have the cleanest transition. https://github.com/tgstation/tgstation/blob/d38f9385b863e49f83455a227764d302629e2867/code/modules/power/apc/apc_attack.dm#L22-L23 Whatever the fuck this is. Asking around, this seems to just be dead code. For sanity's sake removing it and testing, silicon interactions with it seem to work just fine. So we kill it. We just kill it. We Just Kill It. Closest we could find requires the distance check there to be false, so it wouldn't apply. But it _does_ bring us to the second bit of weird code. ### Calling APC Attackby Elsewhere? So wallframes let you screwdriver them to put them up, which from a comment seems to be because of cyborgs. APC wallframes of course override this with their own implementation, that allows you to also replace a damaged cover or frame like that! https://github.com/tgstation/tgstation/blob/d38f9385b863e49f83455a227764d302629e2867/code/game/objects/items/apc_frame.dm#L29-L39 ...By just calling the wholeass `attackby(...)` proc on the APC and calling it a day. But hey, this is where our previous splitting up comes in handy, because we just have a `wallframe_act(...)` proc! So we just call that instead. ```dm var/obj/machinery/power/apc/mounted_apc = locate(/obj/machinery/power/apc) in get_turf(user) mounted_apc.wallframe_act(user, src) return ITEM_INTERACT_SUCCESS ``` ...And not use single letter variables, while we're at it. That should be all. Remember to get snacks and drinks. ## Why It's Good For The Game Split off 178 line `attackby(...)` item interaction chain into separate procs called in `item_interaction(...)`. Screwdrivering APC wallframes no longer calls the wholeass `attackby(...)` on the APC, but just call the new sub-proc for the specific interaction it cares about. ## Changelog 🆑 refactor: APCs have had their item interaction chain refactored. This should functionally be the same, but please report any issues. /🆑 * [NO GBP]Cells will only consider 0.1% of their charge when shocking a user. (#82456) ## About The Pull Request Makes cells only consider 0.1% of their charge when calculating the damage for shocking someone. This makes the minimum damage 20, and goes up to 22 (previous behaviour, even though that's a shockingly small difference) with a 50 MJ cell, which is the highest capacity crew can get. This makes it inversely scale with the standard cell charge define, so if that gets changed, cells will use a different composition of their charge to consider. ## Why It's Good For The Game Airlocks instantly critting people when shocked regardless of what's in the grid wasn't previous behaviour. * Oops. There we go. * Oh, these two too. --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: san7890 <the@san7890.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk> Co-authored-by: moocowswag <62126254+moocowswag@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: Archie700 <archie712@hotmail.com> Co-authored-by: Blacklist897 <149209377+Blacklist897@users.noreply.github.com> |
||
|
|
806f038524 |
[MIRROR] Refactors how machines are deconstructed (#26466)
* Refactors how machines are deconstructed (#81291) ## About The Pull Request This refactors how machines are deconstructed in the following ways - You can no longer override `obj/machinery/deconstruct()`. If you want customized behaviour then override `on_deconstruction()` instead. This comes with the added benifit of no longer needing to check for the `NO_DECONSTRUCTION` flag because the machine base proc does that for us & if it finds that flag it won't proceed to call `on_deconstruction()` meaning no machine will have a chance to spawn anything which is the current behaviour. This is required to make #81290 work for all machines at least so that machine can send the `COMSIG_OBJ_DECONSTRUCT` signal without subtypes overriding & forgetting to call the parent proc - `dump_contents()` only gets called when the machine is deconstructed not destroyed thus not leaving behind any of its contents inside. Fixes https://github.com/tgstation/tgstation/pull/81290#issuecomment-1925752583 ## Changelog 🆑 fix: machines that should not drop contents when deleted no longer do. refactor: refactors how machines are deconstructed. report bugs on github. /🆑 --------- Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> * Refactors how machines are deconstructed * is this it? --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com> |
||
|
|
8e1c2a5b47 |
Cargo Engineering Content Part 1 | My little machines that go wwwhrhhhr | Die of CO2 poisoning (#24058)
* uhh yeah sure * das solarpanelen * solar panel test * fix the dme * that path changed silly * should make the designs actually choose the right ones, makes it easier * i hate techwebs i hate techwebs * makes that not just "protolathe" * designs be like ??? * i give up on trying to modularize that * day 100 still despise tech code * makes those not drop anything when repacked * maybe we can modularize it after all * yeah not quite * STOP DROPPING THINGS WHEN YOU'RE TAKEN APART * ok shut up * tonie tsark * live arc furnace audio * fixes some code bits * slight logic errors * makes the soundloop stop * makes the audio not pop * trims a quiet clip from arc furnace audio * should make the fabricator's icon fully correct * power cells * removes extra bit of code that doesn't need * fuel generator, gas output * arc furnace exhaust * solid fuel generator done i think * logical * I LOVE ELEMENTS HOLY SHIT * lets see if thats all still stable enough * must not sleep * ggraahhhhh * i see it all makes sense now * massively nerfs the gas spewing of the arc furnace * makes solid fuel generators bolted by default * moves the designs to a folder * aint hat neat? * designs designs and more designs * that is hopefully it for now * get logical * maybe that ought to work better * oughghg kill me * reworks the arc welder * terminator * we dont need to override that i dont think * reverts changes to that because it didnt work * mmm boulder up a big mountain so good! * ok that makes sense actually * fuark of * wallframe device * doohickey * one eternity later * now why doth that one not work right? * fugget about it * ok lets pr this as part 1 * name death * that one too * that makes more sense * last bit * should fix the missing test * what the flarp?? * yum radiation * lets borgs manipulate the flatpack machines * ok checks cancel deez * wall cell charger * ggrahhh * Update modular_skyrat/modules/colony_fabricator/code/colony_fabricator.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/colony_fabricator/code/colony_fabricator.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/colony_fabricator/code/tools/tools.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * everything everywhere all at once * attributions and restricts the crowbar * fixes that * Update modular_skyrat/modules/colony_fabricator/code/design_datums/flatpack_machines.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/colony_fabricator/code/machines/solid_fuel_generator.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/colony_fabricator/code/machines/solid_fuel_generator.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * sprite changes * changes the solar panels again actually * grey panels, colored base * ok * makes undeployed rtgs not radioactive * fixes wall cell charger overlays * for real this time * lets the wall charger actually be taken down * ok buddy pal friend * lets the machines be repacked regardless of power * castle vein * gives design descriptions to the fabricator things * adds screen context to repacking * lets pumps and scrubbers of the portable variety be produced * who built this thing? * moves that around a bit * huh? * ok pal * thermomachines, yippie! * i forgot the animation that plays when it deploys its so over * should fix the thermomachine not being interactable much * makes the arc furnace hopefully put the right amount of materials * adds some very much needed devices * fixes some things * fixes some missing designs * gives the thermomachine a sound for operation * grahh!! * ooprs!! * co2 cracker * actually adds that path * fixes the AC audio being WAY too loud. * makes the cracker not repackable, its not meant to be * fixes that reaction being a lie * water synthesizer * oh yeah baby * joly moly * fixes the dme * updates some stuff * undefines some stuff at the end of their files * I LOVE FIXING CODE!!! * moves the can hold global list up to defines * riiight * restores include i accidentally got rid of * lets those actually be printed * fixes some organics printer things * reconfigures the company stuff a bit * gps locator beacon * LOL * those appeared to be causing problems too * gives the gps thing a working overlay * sustenance dispenser * fixes up a few things * retweaks the sustenance machine to have a godawful cell * except not backwards * makes it not show nri clothing designs * makes the organics printer less awful * unanchors the synth * final fixes for the night * fixes an appliance research node * resorts a lot of stuff and nerfs the clothes pt1 * galaxy in devastation as the chest rig is nerfed! * works some stuff around * makes a few of the structures in cargo deployables instead * probably actually makes the co2 cracker work now * deployable cracker for cargo * co2 cracker deployable object sprite * the cracker remains a problem and im not fully sure why * yeah the co2 cracker has some messed up stuff * that node doesnt exist anymore * i lied its REALLY missing these two cooking machines * snap back to reality --------- Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> |
||
|
|
ecbad87344 |
[MODULAR] Fix hardcoded MCC rack max_batteries (#21636)
* Fix hardcoded MCC rack max_batteries * Update modular_skyrat/modules/multicellcharger/code/multi_cell_charger.dm --------- Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> |
||
|
|
9a594755f3 |
[MIRROR] Renames delta time to be a more obvious name [MDB IGNORE] (#20507)
* Renames delta time to be a more obvious name * updates to our code --------- Co-authored-by: oranges <email@oranges.net.nz> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com> |
||
|
|
0718001fcf |
Fixes a runtime in the multi cell charger secondary attack chain (#19506)
its secondary attack Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> |
||
|
|
bdd6e2e477 |
[MIRROR] Renames Datum Parts above tier 1 accordingly to their tier. [MDB IGNORE] (#18771)
* Renames Datum Parts above tier 1 accordingly to their tier. * Makes it so all of our machine also use the datum stock parts, because that's also important --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com> |
||
|
|
1c5549831e |
The great Unfuckening of all the tech/mechfab categories (#18673)
* Finally Sanity * Update robot_items.dm * leftover * multi-cell oops * tweak * suggested * Match upstream Research category for integrations sake * Revert "Match upstream Research category for integrations sake" This reverts commit 5ad819888368c07ee992bc9facf36872a12041fb. * Fixes Newlines |
||
|
|
5c6c91144c |
[MIRROR] Changes the missing food icon test to cover ALL /obj's [MDB IGNORE] (#18139)
* Changes the missing food icon test to cover ALL /obj's * Update implant.dm * Hopefully fixes all the failing integration tests! * Fixes more missing icons * Even more icon fixes * Hopefully that was all of them * Okay now SURELY that's all of them * I'm tired of this shit man * Hopefully that's all, for real this time! Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> |
||
|
|
729132a4e0 |
[MIRROR] Rebalanced Power consumption, increase for machines [MDB IGNORE] (#12930)
* Rebalanced Power consumption, increase for machines * wew Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com> |
||
|
|
f3020a7f42 |
Microfusion Energy Guns (#9638)
* RELOADING! * Update skillchip.dm * a * Update master.dm * Update master.dm * Part one * E * E * EOR * Oops * EEEH * Fixes. * begone oldcode from old times * fixes * cell attatchments * haha u cant spell * Gun attachments! * Fastest gun in the west * Update multi_cell_charger.dm * ESA * Stability * phase emitters * foixes * More fixes * Update microfusion_gun_attachments.dm * Update microfusion_gun_attachments.dm * eee * Intermediate interactions. * Update microfusion_energy_master.dm * wooh * EEE * Update microfusion_cell.dm * Map edits * Merge branch 'master' into gun_reloads * E * attachment removal * Update _basemap.dm * proper parent gun interactions * Update code/game/machinery/recharger.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> * E * Update modular_skyrat/modules/gunsgalore/code/guns/ballistic_master.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> * Update modular_skyrat/modules/microfusion/code/microfusion_cell.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> * Update modular_skyrat/modules/microfusion/code/microfusion_cell.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> * Review comments pt2 * review comments pt2 * review part 3 * review part 4 * review 4.1 * review fixes * Update microfusion_designs.dm * ffs * Update code/__DEFINES/~skyrat_defines/traits.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Nearly there * final review commit * Update multi_cell_charger.dm * Update microfusion_energy_master.dm * E * insight * Fixes, rgb, remove instability on cells * de epic * Update _basemap.dm * TGUI in the houise * Update MicrofusionGunControl.js * FULL STEAM AHEAD CHOO CHOO (Adds zooming) * FUU bayonets and flights * e * Nearly * microCHANGES * Update gun.dm * Minidate. - Shooting the gun while it's overheating can cause it to [REDACTED]. - Shooting the gun while it's overheating will burn your hand! - Some cells will now notify you when they're empty using an alarm sound. - Gun barrel attachments now change the sound of the laser! - An overheating emitter slows down! - Emitters now control fire time more! * 0 * owo * FFF * Update code/game/machinery/recharger.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/gunhud/code/gun_hud_component.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * no spolsion * Generally we want the cell in our hands * 0 * Update microfusion_gun_attachments.dm * E * E * FINAL * superheater * Update projectiles.dm * Update microfusion_energy_master.dm * Update projectiles.dm * Update microfusion_gun40x32.dmi * Update laser_1.ogg * E * whoop * Cargo crates! * Review plus material updates * Update microfusion_designs.dm * E * E * E * E * EEEE * Update gun_spawns.dm * Some fine tuining * Update gun_spawns.dm * Update recharger.dm * E * Update microfusion_gun_attachments.dm * E * E * Update microfusion_gun_attachments.dmi * Update code/game/machinery/recharger.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> * E * You can now actually insert different cells into advanced guns! * 0 * E * Update microfusion_gun_attachments.dm * Update microfusion_energy_master.dm * Update modular_skyrat/modules/microfusion/code/microfusion_cell.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update modular_skyrat/modules/microfusion/code/microfusion_cell.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * E * Update microfusion_energy_master.dm * Update microfusion_gun_attachments.dm Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> |
||
|
|
21f894e9b8 | Spans to procs (#9495) | ||
|
|
665fe76566 |
[MIRROR] Modifies right click logic so that it is not the same priority as modifier keys. (#6498)
* Modifies right click logic so that it is not the same priority as modifier keys. (#59656) Strips out the existing right click code - Due to the myriad of ways right clicking has been implemented, dedicated signals and procs for right clicking without modifiers are fundamentally incompatible with our system of primary and secondary attacks. Adds additional signals to attacking code. These signals allow atoms to cancel the attack chain early on secondary attacks, or override the standard procs and not send signals to prevent any undesired behaviour from signal handlers. Items that used RightClick procs have been converted to attack_hand_secondary. The slaughter demon, having its own set of snowflake code as poor OOP principles have been applied in UnarmedAttack() procs with lacking calls to parent procs and arbitrary redefinition of behaviour, checks for a right click in its own UnarmedAttack() and performs a bodyslam off that. Storage components now hijack the secondary attackby stage via signals to handle their opening and closing shortcuts on right click. When you right click a storage component equipped item with an object in your active hand, the object has an opportunity to perform its logic in pre secondary attack code and cancel the attack chain. If it does not cancel the attack chain in pre-attack, then the storage component takes over for attackby and, if possible, opens the relevant inventory and ends the attack chain. The forensic scanner is a proof-of-concept of this working in action. With its scan logic moved from afterattack code to pre attack code for right clicking, right clicking with the scanner will now perform a scan where previously one was impossible. Left clicking still does what it always does - Scans at the very end of the attack chain. The logic still isn't perfect - For example, you still can't attack containers in melee even in combat mode (you'll either open them or put your weapon into them regardless of which option you choose) - But this is a better setup overall which allows for items to at least override this behaviour in pre-attack if needed. * Modifies right click logic so that it is not the same priority as modifier keys. * a Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk> Co-authored-by: Gandalf <jzo123@hotmail.com> |
||
|
|
fe3eb5ec52 |
Moves multi-cell charger empty to right click (#6265)
* change to rclick * unregister and no cell exception * adds warning about rebind * Re-run checks to get rid of someone else's runtime * If in doubt, run checks again |
||
|
|
6b8a912840 |
Item use power and cell component refactor (#4900)
* aaaaaaa * Update cell_component.dm * Update cell_component.dm * Update cell_component.dm * aaaaa * aaaaaaaaaaaaaaaaaaaaa * Update flashlight.dm * Update flashlight.dm * aaaaaaaaaaaaaaaaaaaaaaaaaaaa * AAAAAAAAAA * Update _wires.dm * aaaa * AAAAAAAAAAAAAAAAA * aaa * Update cell_component.dm * aaaa * AAAAAAAAAAAAAAA * AAAAAAAAAA * AAAAAAAA * Update youtool.dm * aaaaaaaa * aaaa * aaaa * asaa * HOLY FUCK YOU GUYS ARE ALL SO LAZY JESUS FUCKING CHRIST * aaaaa * Update cell_component.dm * Update cell_component.dm * Update cell_component.dm * Update cell_component.dm * Update cell_component.dm * Update traitordevices.dm * aaa * Update traitordevices.dm * Update traitordevices.dm * aaa * Update cell_component.dm * POWER CELLS VERSION 2 * OH YEAH BABY * A * Update cell_component.dm * Update flashlight.dm * AAAAAA * Update flashlight.dm * Update atoms.dm * aa * AAAAAAAAAAAAA * aa * Update multi_cell_charger.dm * Update flashlight.dm * Update flashlight.dm * Update multi_cell_charger.dm * aaa * Update _wires.dm * Update electric_welder.dm * aaaaa * Update tools.dmi |
||
|
|
efc7a388a0 |
[Bug Fix] Multi-Cell chargers no longer only care about the last capacitor (#4914)
* Update multi_cell_charger.dm * I can math I promise 250 * 4 * 4 is 4000 not 2000 Co-authored-by: Matthew <matthew@tfaluc.com> |
||
|
|
57935d53c2 | Update multi_cell_charger.dm (#4896) | ||
|
|
e342f4b170 |
[CELL QOL] Multi-cell charger (#4867)
* aaa * aaaa * Update multi_cell_charger.dm * Update multi_cell_charger.dm |