vgstation13 icon indicating copy to clipboard operation
vgstation13 copied to clipboard

Scale miner output with power

Open adacovsk opened this issue 2 years ago • 22 comments

See #33135. Had an issue with the bot. Some sort of map conflict. Redoing PR.

Changelog

:cl:

  • rscadd: Gas miner output scales with power output

adacovsk avatar Aug 28 '22 05:08 adacovsk

one problem i see is that atmos(on most maps) is on the main station powernet, not the engineering one having it suck all excess power always is pretty stupid in my opinion

pedr69 avatar Aug 28 '22 18:08 pedr69

one problem i see is that atmos(on most maps) is on the main station powernet, not the engineering one having it suck all excess power always is pretty stupid in my opinion

Ahh you're right. I actually meant to keep it at using around 50% the surplus rather than max it out

adacovsk avatar Aug 28 '22 18:08 adacovsk

one problem i see is that atmos(on most maps) is on the main station powernet, not the engineering one having it suck all excess power always is pretty stupid in my opinion

It's not as big of an issue as you might think, since its power priority is the lowest

adacovsk avatar Aug 28 '22 22:08 adacovsk

The power pulled should be adjustable via multitool or some other method, I shouldn't need to pump twice the power required into the grid, to produce more gasses because it only takes 50% of excess.

DorainGrey avatar Aug 29 '22 15:08 DorainGrey

Dorain is fully right on this one. Needs to be configurable how much juice you want to pump into it.

Kurfursten avatar Sep 02 '22 02:09 Kurfursten

Dorain is fully right on this one. Needs to be configurable how much juice you want to pump into it.

It uses jellyveggie2's power priority, so it will only take excess in the connected powernet. This is the best I can do right now

adacovsk avatar Sep 02 '22 02:09 adacovsk

I can show you how to make a multitool menu

Kurfursten avatar Sep 02 '22 03:09 Kurfursten

I can show you how to make a multitool menu

yeah okay

adacovsk avatar Sep 02 '22 03:09 adacovsk

Won't this make pressurizing a new location such as the derelict or a custom built locale much much harder due to the lack of power?

PrimeDSS13 avatar Sep 06 '22 15:09 PrimeDSS13

Won't this make pressurizing a new location such as the derelict or a custom built locale much much harder due to the lack of power?

They already require power to be on, so no. I scaled the pressure output to be on par at about 150 kW. So any engine will output the expected amount of pressure, other than PACMAN. Even as such, an output of 100kPa from the miner is enough to pressurize anything reasonably over time.

adacovsk avatar Sep 06 '22 17:09 adacovsk

So there's a baseload generation that doesn't suck any excess power? What's the output pressure at room temp from 30kw input for example? That's about the excess on box with an AME.

DorainGrey avatar Sep 06 '22 20:09 DorainGrey

So there's a baseload generation that doesn't suck any excess power? What's the output pressure at room temp from 30kw input for example? That's about the excess on box with an AME.

There is no baseload because I thought having consequences of no power seems fun. 30kW is 3000kPa. Currently, the miners without this PR just output 4500kPa. With a singulo you're probably generating even more already

adacovsk avatar Sep 06 '22 22:09 adacovsk

miners will now need 150kw each to be as fast they were before

now you need 5*150kw=750KW to cool plasma at the old rate, since you can't prioritise the plasma miner i'd add a way to change their power priority

this also removes the 10MPA max pressure limit on the miners?

pedr69 avatar Sep 09 '22 16:09 pedr69

https://github.com/vgstation-coders/vgstation13/blob/9a306ca45aa55eb51e7dc87798d90bc2ab979a46/code/game/machinery/atmoalter/gas_mine.dm#L57 oh, and why not add the power draw here, so you can see how fast they're pumping when you examine em

pedr69 avatar Sep 09 '22 16:09 pedr69

miners will now need 150kw each to be as fast they were before

now you need 5*150kw=750KW to cool plasma at the old rate, since you can't prioritise the plasma miner i'd add a way to change their power priority

this also removes the 10MPA max pressure limit on the miners? oh, and why not add the power draw here, so you can see how fast they're pumping when you examine em

ahh shit you're right, I calculated wrong.. I'll scale it differently. Very good ideas. This should also remove the max pressure limit, yes.

And you're right, there should be a way to change the power priority, that is another great idea. I'll look into it.

adacovsk avatar Sep 09 '22 16:09 adacovsk

Ceiling(0.5 * power_load)

magic numbers detected #define GASMINER_JOULES_PER_CREATED_KILOPASCAL? could also have a "rate" var exist always, and be set in update_rate(), so you can use that when displaying, instead of only having it defined inside update_rate()

man, it's hard to explain what i mean, is it because i'm an ESL and haven't read programming books, or is it like that for everyone?

pedr69 avatar Sep 11 '22 12:09 pedr69

No, I think your statement is reasonable. You're asking for the same thing that Dorain and I are - the ability to configure how much power draw these take instead of having it just always be half of power_load

Kurfursten avatar Sep 13 '22 01:09 Kurfursten

https://github.com/vgstation-coders/vgstation13/blob/d6363976bfe887800ae402e858b55443cadac1d6/code/game/machinery/atmoalter/gas_mine.dm#L77 magic numbers...

pedr69 avatar Sep 14 '22 06:09 pedr69

imagine the ZAS stuns... even now, with 10MPA pressure checks, an atmos tech entering the plasmaminer chamber without maggies on gets stunned for a good 2-3 minutes imagine someone doing that at 14:00, when the pressure inside is several gigapascals

pedr69 avatar Sep 18 '22 18:09 pedr69

imagine the ZAS stuns... even now, with 10MPA pressure checks, an atmos tech entering the plasmaminer chamber without maggies on gets stunned for a good 2-3 minutes imagine someone doing that at 14:00, when the pressure inside is several gigapascals

I put a cap on the ZAS stuns, so no worries

adacovsk avatar Sep 18 '22 19:09 adacovsk

So uh what happens when they're wrenched in space? The place where power isn't required? (Miners work in space.)

jwhitak avatar Oct 02 '22 18:10 jwhitak

So uh what happens when they're wrenched in space? The place where power isn't required? (Miners work in space.)

they need a powernet, so the rate will be 0 unless there's a powered APC... Could change it so that if there's no powernet it has a base rate

adacovsk avatar Oct 03 '22 02:10 adacovsk

any day now....

pedr69 avatar Oct 31 '22 04:10 pedr69

This just looks like pure griefing to me but /shrug. Let's see how it works.

ShiftyRail avatar Nov 18 '22 08:11 ShiftyRail