Skip to content

scripts/ban-cooking.rb can cause crashes - pull request submitted #995

@rndmvar

Description

@rndmvar

DFHack/scripts#6 (link fixed)

Specific items addressed by an issue:

  1. All ban-able items must be cook-able to be banned.
  2. Checks to ensure that kitchen.exc_types[index] exists before attempting to write to it.
    -- Ran into issues with the original script attempting to ban non-cookable plant items, which lead to mismatches in the length of the kitchen.exc_types versus the others.
  3. Change the index variable in the ban_cooking function from a key lookup to a numerical index value
  4. Fixed mill and thread banning, as they referenced local variable 'm', but didn't set it.
    -- I don't know if there are any cook-able mill or thread plants...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions