MSUTeam / MSU

Modding Standards and Utilities for Battle Brothers
22 stars 4 forks source link

[REQUEST] implement smart getOriginID function #326

Open Darxo opened 1 year ago

Darxo commented 1 year ago

Is your feature request related to a problem? Please describe. If I want to check whether some (usually my own) origin is currently being played I have to do 4 checks one after another which leads to a big line of text. This is because I can't always guarantee that my line is only executed "in game".

Here is how such a check looks like in Vanilla: image

Describe the solution you'd like Implement some new smart global MSU function, for example getOriginID which always returns a string. If the Origin ID couldn'T be retrieved for a variety of reasons the function returns an empty string.

That should make origin specific checks much easier to read and write