Skip to content

Draft: Add function to trigger crimes in lua

Zackhasacat requested to merge zackhasacat/openmw:lua_crime_time into master

This MR pretty much exposes MechanicsManager::commitCrime 1 to 1.

It allows you to trigger crimes occurring, with the same method as in the normal engine.

The documentation is completed, and available here.

Some concerns would be:

  • There are a lot of parameters for a lua function. It may be better to move some of them to an options table.
  • The victim parameter is not optional. I am not sure if this would be desirable, but if needed we can make it optional.
  • A delayed action is not used. I'm not sure if it would be useful. If it was used, we would not be able to return the bool.
  • We may not want to expose the crime types.
Edited by Zackhasacat

Merge request reports