Yes.
It doesn’t; that’s what it was relying on. If the turn count is unchanged since the last action, it concluded the previous action was out of world.
But it fails for the multiple action case. I had convinced myself it would work and didn’t check. Dang, this is hard. OK, how 'bout:
lab is a room.
spam is in lab.
box is in lab.
Include (-
Global previous_action_name;
Global current_action_name = ##Look;
[ BeginAction a n s moi notrack rv;
ChronologyPoint();
previous_action_name = current_action_name;
current_action_name = action;
@push action; @push noun; @push second; @push self; @push multiple_object_item;
action = a; noun = n; second = s; self = noun; multiple_object_item = moi;
if (action < 4096) rv = ActionPrimitive();
@pull multiple_object_item; @pull self; @pull second; @pull noun; @pull action;
if (notrack == false) TrackActions(true, meta);
return rv;
];
-) replacing "BeginAction".
To decide what action name is the previous action name: (- previous_action_name -)
To decide if the previous action was out of world:
decide on whether or not previous action name is out of world.
setting action variables:
say "previous action [previous action name] was [if previous action was out of world]out of[else]in[end if] world.";
To decide if (ac - an action name) is out of world:
(- ActionNameHasFlag({ac}, OUT_OF_WORLD_ABIT) -)
Include (-
[ ActionNameHasFlag ac flag at;
!ac = BlkValueRead(stored, STORA_ACTION_F);
at = FindAction(ac);
if (at == 0) rfalse;
if (ActionData-->(at+AD_REQUIREMENTS) & flag) rtrue;
rfalse;
];
-)
test me with "jump. actions. z. z. verify. verify. take all. verify. verify. jump. jump."
You don’t get good results until turn 2, and results after turning on the actions listing is weird because of how that’s special-cased.
output
previous action waiting was in world.
lab
You can see spam and box here.
test me
previous action waiting was in world.
(Testing.)
[1] jump. actions. z. z. verify. verify. take all. verify. verify. jump. jump.
previous action was in world.
You jump on the spot.
previous action jumping was in world.
Actions listing on.
previous action was in world.
[waiting]
Time passes.
[waiting - succeeded]
previous action waiting was in world.
[waiting]
Time passes.
[waiting - succeeded]
previous action waiting was in world.
[verifying the story file]
The game file has verified as intact.
[verifying the story file - succeeded]
previous action verifying the story file was out of world.
[verifying the story file]
The game file has verified as intact.
[verifying the story file - succeeded]
previous action verifying the story file was out of world.
[taking spam]
spam: Taken.
[taking spam - succeeded]
previous action taking was in world.
[taking box]
box: Taken.
[taking box - succeeded]
previous action taking was in world.
[verifying the story file]
The game file has verified as intact.
[verifying the story file - succeeded]
previous action verifying the story file was out of world.
[verifying the story file]
The game file has verified as intact.
[verifying the story file - succeeded]
previous action verifying the story file was out of world.
[jumping]
You jump on the spot.
[jumping - succeeded]
previous action jumping was in world.
[jumping]
You jump on the spot.
[jumping - succeeded]