Skip to content

Extend functions.yml format #453

Description

@burner1024

I have a suggestion to further detalize function data by splitting detail into separate fields.
That would allow to provide signature help:

Peek 2023-01-24 12-18

The format would change like this:

old

- name: disable_aimed_shots
  detail: void disable_aimed_shots(int pid)
  opcode: 0x823f
  doc: Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) stops a weapon from making aimed shots even if it normally coulld. Affects player and NPCs alike. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload. Use a pid of 0 to represent unarmed.

new

- name: disable_aimed_shots
  type: void
  opcode: 0x823f
  args:
    - type: int
      name: pid
      doc: Weapon PID. 0 means unharmed.
#      default: 123 # this arg has no default, omitted.
  doc: Allows overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) stops a weapon from making aimed shots even if it normally coulld. Affects player and NPCs alike. The list of edited weapons is not saved over game loads, so you need to call the function once at each reload.

The proposal is only to allow this format, not to convert everything at once, hopefully that can happen naturally over time.

Another thing I'd like to suggest is to allow an optional deprecated string field, which could be used to do, well, deprecations.
Captura desde 2023-01-24 12-24-29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions