## Mirror of PR #25566: [Cycle injector transfer amount on alt. use](https://github.com/space-wizards/space-station-14/pull/25566) from <img src="https://avatars.githubusercontent.com/u/10567778?v=4" alt="space-wizards" width="22"/> [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `ad6ac73f6f41d1cbd3fe80a43c8bf4b83e03f392` PR opened by <img src="https://avatars.githubusercontent.com/u/68151557?v=4" width="16"/><a href="https://github.com/veprolet"> veprolet</a> at 2024-02-25 19:37:49 UTC --- PR changed 3 files with 26 additions and 3 deletions. The PR had the following labels: - Status: Needs Review --- <details open="true"><summary><h1>Original Body</h1></summary> > ## About the PR > When the user tries to use alternative interaction on an injector capable of changing transfer volume, this will cycle between the maximal and minimal transfer amount (defaulting to maximum if the value was in-between the extremes). > > The interaction is only available with in-hand usage or empty-handed usage. This is deliberate (but not necessarily correct). > The interaction is only implemented for injectors and not arbitrary containers capable of solution transfers. This is to limit the scope of this PR. > > ## Why / Balance > Changing the transfer amount was only possible using the context menu. This was difficult and slow, but this tedium didn't seem to be a valuable part of the gameplay experience. > > Instead of cycling over all the possible transfer amounts, the choice has been made to only cycle between the two extremes. This is for two reasons: > - Scalability: If this is merged, we'll probably want the same behavior for the other solution containers like jugs. It would be very tedious (probably more tedious than using the context menu) to cycle to the correct transfer amount with more available transfer amount steps. It would also be IMO unintuitive to have a different behavior between the two types of solution containers. > - Simplicity: It is easier to reason about the next state this way. Otherwise, one would have to figure out how many times to perform the interaction to cycle to the desired amount, which involves knowing the total number of steps for each injector/container, order of the current step and modular arithmetic (or just cycling until you are at the correct one, which is slow, error-prone and frustrating whenever you overshoot). > > This decision has obviously some tradeoffs, but I feel like those are manageable. If you need to transfer the in-between amounts, you can usually switch to the minimal amount (I assume the property of in-between amounts being a multiple of the minimum will be upheld in the future) and click a few times. This is generally as tedious or less tedious than cycling the amounts. There are some instances where you can't do that. One example would be manual mixing of the advanced brute medications. This is a niche use-case and can be still solved using the context menu verb system and is supposed to be a bit more difficult anyway. > > This also makes the alternative interaction a bit less predictable, as it no longer always uses the first context menu verb. I think the interaction is similar enough and inconsequential enough to justify this. > > It makes the syringe marginally more powerful, but as this doesn't introduce any previously unavailable actions, I believe this to be perfectly acceptable and heavily outweighed by the convenience. > > ## Technical details > ~~This introduces a new concept of "special alternative" interactions. Those interactions have their own events and handlers.~~ > > Please scrutinize the code hard ~~, because it touches some quite fundamental parts of the game, and~~ I'm not too knowledgeable about C# or the conventions of this repo. I tried to follow guidelines where possible while not impacting the existing code too much, but maybe this leads to too much weirdness in some places. > > ## Media >  > > - [X] I acknowledge that I have no idea how to showcase or record this feature well, **or** I'm trying my best. > > ## Breaking changes > N/A > > **Changelog** > 🆑 > - tweak: Injectors like the syringe can now toggle their transfer amount using alternative interactions. > </details> Co-authored-by: SimpleStation14 <Unknown>
Einstein Engines
Einstein Engines is a hard fork of Space Station 14 built around the ideals and design inspirations of the Baystation family of servers from Space Station 13 with a focus on having modular code that anyone can use to make the RP server of their dreams. Our founding organization is based on a democratic system whereby our mutual contributors and downstreams have a say in what code goes into their own upstream. If you are a representative of a former downstream of Delta-V, we would like to invite you to contact us for an opportunity to represent your fork in this new upstream.
Space Station 14 is inspired heavily by Space Station 13 and runs on Robust Toolbox, a homegrown engine written in C#.
As a hard fork, any code sourced from a different upstream cannot ever be merged directly here, and must instead be ported. All code present in this repository is subject to change as desired by the council of maintainers.
Official Server Policy
No official servers will ever be made for Einstein-Engines.
In order to prevent a potential conflict of interest, we will never open any server directly using the Einstein Engines codebase itself. Any server claiming to be an official representation of this fork is not endorsed in any way by this organization. We however would like to invite anyone wishing to create a server to make a fork of Einstein Engines.
Links
Website | Discord | Steam(SSMV Launcher) | Steam(WizDen Launcher) | Standalone
Contributing
We are happy to accept contributions from anybody, come join our Discord if you want to help. We've got a list of issues that need to be done and anybody can pick them up. Don't be afraid to ask for help in Discord either!
We are currently accepting translations of the game on our main repository. If you would like to translate the game into another language check the #contributor-general channel in our Discord.
Building
Refer to the Space Wizards' guide on setting up a development environment for general information, but keep in mind that Einstein Engines is not the same and many things may not apply. We provide some scripts shown below to make the job easier.
Build dependencies
- Git
- DOTNET SDK 7.0 or higher
- python 3.7 or higher
Windows
- Clone this repository
- Run
RUN_THIS.pyto init submodules and download the engine, or rungit submodule update --init --recursivein a terminal- Run the
Scripts/bat/run1buildDebug.bat- Run the
Scripts/bat/run2configDev.batif you need other configurations run other config scripts- Run both the
Scripts/bat/run3server.batandScripts/bat/run4client.bat- Connect to localhost and play
Linux
- Clone this repository
- Run
RUN_THIS.pyto init submodules and download the engine, or rungit submodule update --init --recursivein a terminal- Run the
Scripts/sh/run1buildDebug.sh- Run the
Scripts/sh/run2configDev.shif you need other configurations run other config scripts- Run both the
Scripts/sh/run3server.batandscripts/sh/run4client.sh- Connect to localhost and play
MacOS
I don't know anybody using MacOS to test this, but it's probably roughly the same steps as Linux
License
Content contributed to this repository after commit 87c70a89a6 (17 February 2024 23:00:00 UTC) is licensed under the GNU Affero General Public License version 3.0 unless otherwise stated.
See LICENSE-AGPLv3.
Content contributed to this repository before commit 87c70a89a6 (17 February 2024 23:00:00 UTC) is licensed under the MIT license unless otherwise stated.
See LICENSE-MIT.
Most assets are licensed under CC-BY-SA 3.0 unless stated otherwise. Assets have their license and the copyright in the metadata file. Example.
Note that some assets are licensed under the non-commercial CC-BY-NC-SA 3.0 or similar non-commercial licenses and will need to be removed if you wish to use this project commercially.
