Skip to content

Commit

Permalink
Add u_var: activity_level
Browse files Browse the repository at this point in the history
  • Loading branch information
wapcaplet committed Feb 5, 2022
1 parent 5c6103b commit 18c3cfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/NPCs.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ Example | Description
`"u_val": "pkill"` | Current painkiller level.
`"u_val": "rad"` | Current radiation level.
`"u_val": "focus"` | Current focus level.
`"u_val": "activity_level"` | Current activity level index, from 0-5
`"u_val": "fatigue"` | Current fatigue level.
`"u_val": "stamina"` | Current stamina level.
`"u_val": "sleep_deprivation"` | Current sleep deprivation level.
Expand Down
4 changes: 4 additions & 0 deletions src/condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,10 @@ std::function<int( const T & )> conditional_t<T>::get_get_int( const JsonObject
return [is_npc]( const T & d ) {
return d.actor( is_npc )->focus_cur();
};
} else if( checked_value == "activity_level" ) {
return [is_npc]( const T & d ) {
return d.actor( is_npc )->get_activity_level();
};
} else if( checked_value == "fatigue" ) {
return [is_npc]( const T & d ) {
return d.actor( is_npc )->get_fatigue();
Expand Down

0 comments on commit 18c3cfd

Please sign in to comment.