Commit Graph

28 Commits (428f7572b1c56bb0ded6064a6ecfa85e279f5f34)

Author SHA1 Message Date
Josh Cooper 00eb02c1bc Implements plugin: channel-safely v1.2.4
- changes report* lookup in `NewReportEvent()`
  - adds a nullptr check
- adds df::coord bound checking in various places
  - where the `get_*neighbours()` functions are used
  - `simulate_fall()`
  - `is_safe_to_dig_down()` and `is_safe_fall()`
- adds nullptr checks to the `is_*job()` functions
- added todo comments for `is_safe_to_dig_down()`
2023-02-24 15:51:11 -08:00
Josh Cooper 5d8d378917 Implements plugin: channel-safely v1.2.3
- Revises a few log lines
- Adds d_assert macro to replace assert usage
  - prints an error to indicate d_assert failed in Release builds as well as Debug builds
  - could be added to the Debug utilities to allow use of assertions on necessary code without needing to buffer the results for use in the assert statement
- Fixes bug wherein designations are never put into marker mode (related to the assert statements)
2023-02-08 12:03:40 -08:00
Myk Taylor 4e35895cf4
fix build errors with channel-safely 2023-01-24 18:48:23 -08:00
Josh Cooper 89eefd006f Implements plugin: channel-safely v1.2.2
minor changes only
The largest change is moving a df::map_block* declaration to an outer loop
2023-01-23 14:24:24 -08:00
Josh Cooper ae8291b952 Implements plugin: channel-safely v1.2.1
- Removes insta-dig feature (too many problems, rarely worked)
- Fixes a segmentation fault introduced in v1.2
- Improves manage_group readability/nesting
- Improves manage_one readability/nesting

Update docs/plugins/channel-safely.rst

Co-authored-by: Myk <myk002@yahoo.com>

Fixes some formatting consistency
2023-01-23 14:24:23 -08:00
Josh Cooper a4bf266770 Implements plugin: channel-safely v1.2
- Updates rst documentation
  - Adds feature: risk-averse
- Revises ChannelManager::manage_group
  - Now performs analysis of group designations
    - If any designation has fall space, designations are analyzed for accessibility (a weighted score of how many ways it can be accessed)
    - If a designation has no fall space, but cannot be accessed it will be "dig_now"'ed
    - accessibility scores are stored for the management phase
  - Management loop has been extended
    - iff no cave-in candidates exist, then perform simple management (as requested)
    - if candidates do exist, then we must check if our current position is one
      - if the current position is a cave-in candidate it must also be within range (+2) of the least access
        - if the candidate is in range or on the dignow queue, then we activate the designation and modify the dig priority according to distance from least_access
      - if not a candidate, or the other checks failed, then we set the designation to marker mode
2023-01-23 14:24:23 -08:00
Josh Cooper 540faff88f Implements plugin: channel-safely v1.1.2b
- Updates rst documentation
  - Adds troubleshooting section
  - Renames the monitor feature to monitoring
- Adds cave-in helper functions
  - ChannelJobs::has_cavein_conditions()
  - ChannelJobs::possible_cavein()
  - find_dwarf() ~ finds the nearest dwarf or the first one that has a path to a position
- Moves dignow/resurrect to inlines.h
- Improves management of regular dig designations
- Adds df::job* tracking back into ChannelJobs to simplify cancellations
- Updates/improves debug logging
  - Switches unordered structures with ordered in some locations to have ordered debugging information
- Simplifies ChannelManager::manage_group()
- Fixes up ChannelManager::manage_one()
  - the return value is now useful even if unused
2023-01-23 14:24:23 -08:00
Josh Cooper e316b7aa75 Implements plugin: channel-safely v1.1.1b 2022-12-01 16:36:32 -08:00
Josh Cooper 3999ed5c72 Implements plugin: channel-safely v1.1b 2022-11-28 17:10:55 -08:00
Josh Cooper c6b15b1ccb Implements plugin: channel-safely v1.2a 2022-11-22 11:03:28 -08:00
Josh Cooper 8a0999ffdc Implements plugin: channel-safely v1.1a 2022-11-21 12:39:26 -08:00
Josh Cooper 9959ef1b36 Implements plugin: channel-safely v1.0.1a 2022-11-21 09:26:55 -08:00
Josh Cooper 6c68e72295 Implements plugin: channel-safely v1.0a 2022-11-21 09:26:55 -08:00
Josh Cooper c4e55f1cc9 Implements plugin: channel-safely v0.6.1.3 2022-11-21 09:26:55 -08:00
Josh Cooper 3cb186a62f Implements plugin: channel-safely v0.6.1.2 2022-11-21 09:26:55 -08:00
Josh Cooper 8847ed23b4 Implements plugin: channel-safely v0.6.1.1 2022-11-21 09:26:55 -08:00
Josh Cooper a9f0021927 Implements plugin: channel-safely v0.6.1 2022-11-21 09:26:55 -08:00
Josh Cooper 92537bc459 Implements plugin: channel-safely v0.6 2022-11-21 09:26:55 -08:00
Josh Cooper fcd6696768 Implements plugin: channel-safely v0.5.3 2022-11-21 09:26:55 -08:00
Josh Cooper 84ffeef092 Implements plugin: channel-safely v0.5.2 2022-11-21 09:26:55 -08:00
Josh Cooper 9db0d809fa Implements plugin: channel-safely v0.5.1 2022-11-21 09:26:55 -08:00
Josh Cooper e5dbaac85d Implements plugin: channel-safely v0.5 2022-11-21 09:26:55 -08:00
Josh Cooper c2d346fc84 Implements plugin: channel-safely v0.4 2022-11-21 09:26:55 -08:00
Josh Cooper a8dcfeead9 Implements plugin: channel-safely v0.3.1 2022-11-21 09:26:55 -08:00
Josh Cooper b7ee01108e Implements plugin: channel-safely v0.3 2022-11-21 09:26:55 -08:00
Josh Cooper 3a6205d19e Removes extra EOF lines 2022-11-21 09:26:55 -08:00
Josh Cooper bd6c748d00 Implements plugin: channel-safely v0.2 2022-11-21 09:26:55 -08:00
Josh Cooper 22414f26fa Implements plugin: channel-safely v0.1 2022-11-21 09:26:55 -08:00