Skip to content

Commit

Permalink
Merge pull request #197 from alexbatalov/fix-lockpicks-removal
Browse files Browse the repository at this point in the history
- Fixed lockpicks not being removed on critical failure for some doors.
  • Loading branch information
NovaRain authored Nov 21, 2023
2 parents 44c76e7 + 3895ff9 commit 711239e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ begin
else begin
if (is_critical(LVar2)) then begin
display_msg(message_str(SCRIPT_GLOBLDOR, 121));
rm_obj_from_inven(source_obj, LVar0);
destroy_object(LVar0);
rm_obj_from_inven(source_obj, obj_being_used_with);
destroy_object(obj_being_used_with);
end
else begin
display_msg(message_str(SCRIPT_GLOBLDOR, 122));
Expand Down Expand Up @@ -925,4 +925,3 @@ begin
end
end
end

Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ procedure use_obj_on_p_proc begin
else begin
// Lockpicks broken:
if (is_critical(Skills_Roll)) then begin
rm_obj_from_inven(dude_obj, Tool);
destroy_object(Tool);
rm_obj_from_inven(dude_obj, obj_being_used_with);
destroy_object(obj_being_used_with);
display_msg(mstr(101));
end
// Not able to open the door:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ begin
end
else begin
if (is_critical(LVar2)) then begin
rm_obj_from_inven(dude_obj, LVar0);
destroy_object(LVar0);
rm_obj_from_inven(dude_obj, obj_being_used_with);
destroy_object(obj_being_used_with);
jam_lock(self_obj);
display_msg(mstr(109));
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ procedure use_obj_on_p_proc begin
display_msg(self_mstr(121));
jam_lock(self_obj);
display_msg(message_str(SCRIPT_DOOR, 110));
rm_obj_from_inven(source_obj, Item);
destroy_object(Item);
rm_obj_from_inven(source_obj, obj_being_used_with);
destroy_object(obj_being_used_with);
end
else begin
display_msg(self_mstr(122));
Expand Down

0 comments on commit 711239e

Please sign in to comment.