Opened 3 years ago

Last modified 15 months ago

#6083 new enhancement

Load cheats from files.

Reported by: Freagarach Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Simulation Keywords: Cheats
Cc: Patch:

Description

Currently, cheats are hardcoded and their description is not really tied to what they do.

It would be nice to be able to load cheats from their respective files in data, including perhaps the arbitrary code they'll execute?

That way one can easily modify specific cheats and load their description from the files defining them (refs. #4918).

I reckon one needs a Cheats.js globalscript, change the GUI to load its data from there and change Cheats-helper to load its data from there. Entries needed in such a {cheat}-file would include, not be limited to:

  • trigger - The text to trigger this cheat with.
  • Name - The name of the cheat, for e.g. in a manual.
  • Description - Textual description what this cheat does.
  • Default parameter - The default parameter to use with this cheat (implies that this cheat takes a parameter).
  • Effect - The code to execute when this cheat is triggered.

Perhaps more, or one of the above not.

Change History (3)

comment:1 by Stan, 3 years ago

Milestone: Alpha 25Alpha 26

comment:2 by Stan, 2 years ago

Milestone: Alpha 26Alpha 27

Unlikely to get done for A26

comment:3 by Freagarach, 15 months ago

Milestone: Alpha 27Backlog

Pushing back.

Note: See TracTickets for help on using tickets.