Skip to content

Commit

Permalink
More computer checks for tasks (#3678)
Browse files Browse the repository at this point in the history
Possible fix for #3664
  • Loading branch information
AdamPlenty authored Dec 9, 2024
1 parent 64e96a9 commit 4e2030d
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 145 deletions.
5 changes: 4 additions & 1 deletion src/player_compchecks.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ struct Thing * find_imp_for_pickup(struct Computer2 *comp, MapSubtlCoord stl_x,
{
struct Thing* thing = thing_get(i);
struct CreatureControl* cctrl = creature_control_get_from_thing(thing);
if (thing_is_invalid(thing) || creature_control_invalid(cctrl))
if (!thing_is_creature(thing) || creature_control_invalid(cctrl))
{
ERRORLOG("Jump to invalid creature detected");
break;
Expand Down Expand Up @@ -655,6 +655,9 @@ long computer_check_for_pretty(struct Computer2 *comp, struct ComputerCheck * ch
if (!computer_able_to_use_power(comp, PwrK_HAND, 1, 1)) {
return CTaskRet_Unk4;
}
if (is_task_in_progress_using_hand(comp)) {
return CTaskRet_Unk4;
}
{
long stack_len = dungeon->digger_stack_length;
if (stack_len <= check->param1 * dungeon->total_area / 100) {
Expand Down
Loading

0 comments on commit 4e2030d

Please sign in to comment.