Feature Suggestion: Booleans In Signs

  • EmpanadaGuy
    1st Apr 2021 Member 0 Permalink

    Problem:


    Certain saves must display complex information, such as whether a computer is ready for user input, or if a reactor is ready to use. These saves must make use of custom displays to convey this to the user, which are annoying to create, and tend to be unintuitive.

    Solution:


    Implement conditionals in signs using the preexisting sign commands ({t}, {p}, {aheat}, etc.) in conjunction with a new sign command: {if}! Signs would be able to test almost any element property against a value, and display different information to the user accordingly. This would allow for worlds of possibilities.

     

    Sample implementation:

    {if|{property} (boolean operator) (value)|Text to display if true|Text to display if false}

     

    property: {t}, {p}, etc.

    boolean operator: >, <, >=, <=, ==

    value: value to text against

     

    Example:

    {if|{p}>10|High pressure!|Pressure normal}

    (if pressure is > 10, display "High pressure", otherwise display "Pressure normal")

     

    Concerns with this implementation:

     

    • The sign limit would prevent meaningfully long messages, maybe increase sign limit for {if} commands
    • Slightly complex to implement
  • LBPHacker
    2nd Apr 2021 Developer 1 Permalink
    Or you could just use any sensor in conjunction with LCRY. The annoyance is part of the fun.