Tachytaenius
0836962007
Rename [xyz]CategoryActionTimers to [xyz]GroupActionTimers in action timer API
2022-12-01 23:24:04 +00:00
Tachytaenius
ae532e1452
Rename affectedActionTypeCategory to affectedActionTypeGroup in action timer API
2022-12-01 23:22:02 +00:00
Tachytaenius
76cdbfbc5c
Rename affectedActionCategory to affectedActionTypeCategory in action timer API
2022-12-01 23:19:10 +00:00
Tachytaenius
f06f17b59c
Rename affectedActionTypes to affectedActionCategory in action timer API
2022-12-01 23:17:57 +00:00
Tachytaenius
aa2cf44c4b
Use lambdas to violate DRY less in action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
a925c34413
Rename [xyz]ActionTimer functions to [xyz]ActionTimers
2022-12-01 13:34:54 +00:00
Tachytaenius
f863b9807a
Add action timer API input validation
2022-12-01 13:34:54 +00:00
Tachytaenius
cc40b80456
Protect against integer overflow when subtracting with action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
6148307e9b
Change != 0 to > 0 in action timer API core functions
2022-12-01 13:34:54 +00:00
Tachytaenius
5e0c0d22cb
Group action timer API internal functions together
2022-12-01 13:34:54 +00:00
Tachytaenius
e93d7eefb3
Factor out set and add shared action timer code into own functions
2022-12-01 13:34:54 +00:00
Tachytaenius
357b871b4f
Factor out shared unit action timer multiplication code into its own function
2022-12-01 13:34:54 +00:00
Tachytaenius
8f0b7663d9
Change ints in action timer API function signatures to int32_ts
2022-12-01 13:34:54 +00:00
Tachytaenius
4b33097e57
Remove default in action timer API switch case
2022-12-01 13:34:54 +00:00
Tachytaenius
a3b1125c28
Progress on action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
7f54a77ed9
Continue work on unit action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
16ef4f8313
Rename action_type_group to unit_timer_action_type_group
2022-12-01 13:34:54 +00:00
Tachytaenius
2cbbed6750
Use df-structures XML enums for action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
fa589b5764
Make progress with action timer API
2022-12-01 13:34:54 +00:00
Tachytaenius
0f8ce360ac
Make first pass of action timer API
2022-12-01 13:34:54 +00:00
Josh Cooper
807894ac6c
Updates Units::isAnimal
...
Now checks that the unit cannot learn or speak, and has either a wilderness population source, a pet/pet_exotic token, or is trainable for war/hunting
2022-11-29 13:19:19 -08:00
Josh Cooper
d112649886
Organizes and documents Units::is*(unit) functions
2022-11-12 16:40:20 -08:00
Josh Cooper
ebd450af0e
Adds isUnitInBox to Units module
2022-11-12 14:42:41 -08:00
Josh Cooper
34de030ba9
Units module
...
- Updates `Lua API.rst`
- Only adds the most important additions (complicated enough to need explaining)
- Adds new functions to LuaApi.cpp
- Revises isUndead to accommodate `dfhack.units.isUndead(u)` => `Units::isUndead(u, false)` instead of taking the default value
2022-11-09 22:03:39 -08:00
Josh Cooper
80824f5b75
Extends Units module
2022-11-09 14:41:45 -08:00
Josh Cooper
c0ffcc2f79
Updates Units::isDemon()
2022-11-09 12:37:41 -08:00
Josh Cooper
beee445f6f
Extends Units module
...
Adds unit check functions for
- animals
- demons
- titans
- megabeasts
- semimegabeasts
- night creatures
2022-11-09 11:44:28 -08:00
lethosor
e6336e769a
Units::teleport(): set idle_area
2022-09-24 13:30:24 -04:00
lethosor
d1f0edd33b
Apply initial pre-commit config
2022-04-12 14:48:19 -04:00
Ryan Williams
88b403ec7a
Add functions reverse-engineered from ambushing unit code ( #1992 )
...
* Add functions reverse-engineered from ambushing unit code
* Fix whitespace
* Fix debug_showambush check
* Remove getOuterContainerRef from Lua API
Don't think this works properly without allocating a new specific_ref. More trouble that it's worth.
* Fixed tile visibility check
* I don't think gamemode or gametype are ever NULL
* Minor tweaks to documentation
* Reimplement getOuterContainerRef for Lua; fix some comments
* Update Units.cpp and changelog
* Update Units.cpp
* Update changelog.txt
2022-03-13 17:19:35 -07:00
myk002
fc860478e4
move fastdwarf's teleport code to Units module
...
and expose in Lua API
2021-06-06 08:48:32 -07:00
myk002
9e17bc938c
only set labor validity for the player civ
2021-02-17 09:16:49 -08:00
myk002
6819ee9928
make alchemist flag valid for controllable civs
2021-02-05 16:45:39 -08:00
lethosor
8c5b21b7ee
Fix a couple warnings in the Units module ( #1615 )
2020-08-08 14:35:12 -04:00
Ryan Bennitt
23c22b3b9d
Merge branch 'develop' of https://github.com/DFHack/dfhack into feature/manipulator_goal
2020-08-07 22:17:32 +01:00
Ryan Bennitt
a85b77e6f1
Retrieve goal string values from enum attributes and add new Units methods to Lua API and docs
2020-08-07 22:07:48 +01:00
Ryan Bennitt
9510dd52e1
Add Goal to Manipulator Detail Modes
2020-08-04 23:01:28 +01:00
PatrikLundell
5570a5743b
Merge branch 'develop' of https://github.com/DFHack/dfhack into Units
2020-06-26 09:53:41 +02:00
PatrikLundell
d5b5b81450
changes
2020-06-02 15:03:59 +02:00
Ben Lubar
5d05cfc7cc
Fix several functions in the Units module ignoring unit caste.
...
Fixes #1583 .
2020-06-02 01:18:57 -05:00
PatrikLundell
ec7f97bb7a
adapted to enum value name change
2020-05-02 17:37:10 +02:00
PatrikLundell
21be5cf061
adapted to structures
2020-04-22 15:32:49 +02:00
PatrikLundell
f371ae6da8
adapted to histfig_nemesis_id->union
2020-04-22 12:38:37 +02:00
PatrikLundell
f4f2aa0d5e
removed underscores, adapted to structure (re)naming
2020-04-15 10:18:37 +02:00
PatrikLundell
55988e3fc4
adapted to updated structures, remote Using units for age
2020-04-08 08:45:40 +02:00
PatrikLundell
a0e2abe20a
Units update need coordination with structure identity
2020-04-04 14:00:26 +02:00
Ben Lubar
66ded03bc1
update structures
2020-03-02 20:41:13 -06:00
lethosor
5eca50476e
Merge remote-tracking branch 'nornagon/unit-description' into develop
2020-01-13 23:31:23 -05:00
Ben Lubar
be5dc2d4a4
Make Units::isGay act consistently when called on an asexual unit.
...
The function appears to be used to determine whether heterosexual relationships are possible, so asexual units will always return true for isGay.
Old behavior was to treat asexual units as male.
2020-01-09 14:48:30 -06:00
Jeremy Apthorp
5de368a1ed
unit_{=> get_}physical_description
2020-01-04 22:17:03 +11:00