KEYON.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. namespace OpenVIII.Fields.Scripts.Instructions
  2. {
  3. /// <summary>
  4. /// <para>Enable Key</para>
  5. /// <para>Enables certain keys to be pressed after they are otherwise disabled (for example with UCOFF). See some other page for the key values (will edit later)</para>
  6. /// </summary>
  7. /// <see cref="http://wiki.ffrtt.ru/index.php?title=FF8/Field/Script/Opcodes/06E_KEYON"/>
  8. public sealed class KEYON : JsmInstruction
  9. {
  10. #region Fields
  11. /// <summary>
  12. /// key flags, probably the same enum that kernel uses for Zell's attacks.
  13. /// </summary>
  14. private readonly IJsmExpression _arg0;
  15. #endregion Fields
  16. #region Constructors
  17. public KEYON(IJsmExpression arg0) => _arg0 = arg0;
  18. public KEYON(int parameter, IStack<IJsmExpression> stack)
  19. : this(
  20. arg0: stack.Pop())
  21. {
  22. }
  23. #endregion Constructors
  24. #region Methods
  25. public override string ToString() => $"{nameof(KEYON)}({nameof(_arg0)}: {_arg0})";
  26. #endregion Methods
  27. }
  28. }