CDPR-Modding-Documentation / CDPR-Modding-Documentation/REDkit-bugtracker
witcherscript, annotations: Statemachines
- Dominant language
- No language data
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Currently when attempting to wrap or replace functions using annotations within states, the only way to do so is to input the `state` name in the `class` field:
Ex:
```js
state Exploration in CR4Player extends ExtendedMovable
{
entry function ExplorationInit( prevStateName : name )
{
.....
}
}
```
To wrap the function `ExplorationInit`, one must do:
```js
@wrapMethod( Exploration ) function ExplorationInit( prevStateName : name )
{
wrappedMethod(prevStateName);
}
```
The problem arises when there are multiple states of the same name, as the state `Exploration` not only exists in `CR4Player`, but also in `W3HorseComponent`.
The proposed solution is to use the engine name for states in the class field when wrapping or replacing functions within states, such as `CR4PlayerStateExploration` or `W3HorseComponentStateExploration`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.