From a49c99b0167198deaf9bbed0b9fe7a188eac4d4b Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Mon, 17 May 2021 14:18:22 -0400 Subject: Added ability to allow operations to fail and still be marked successful. --- player/instructions.f90 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/player/instructions.f90 b/player/instructions.f90 index a1aaa9d..07007a3 100644 --- a/player/instructions.f90 +++ b/player/instructions.f90 @@ -230,6 +230,21 @@ contains end subroutine get_task_name + function get_task_failure_okay(j, i) result(res) + implicit none + + class(json_file)::j + integer, intent(in)::i + character(*), intent(in)::component + + logical::res + + if(.not. get_task_logical(j, i, "failure_okay", res)) then + res = .false. + end if + + end function get_task_failure_okay + subroutine get_task_operation(j, i, op) use json_module implicit none @@ -345,6 +360,10 @@ contains end if + if(get_task_failure_okay(j, i) .and. .not. success) then + success = .true. + end if + end function perform_task subroutine perform_tasks(j, job_id) -- cgit v1.2.3