Skip to content

Commit

Permalink
pry door should only work on closed objects #61
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Jan 20, 2021
1 parent ad5c1d9 commit 36d3e46
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/text/english/dialog/containr.msg
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
{187}{}{ strains her back while trying to bust the lock and takes }
{188}{}{ points of damage.}

{601}{}{It is open, dummy.}
#############################################################
# Damage done to the door due to explosives. #
#############################################################
Expand Down
1 change: 1 addition & 0 deletions data/text/english/dialog/door.msg
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
{187}{}{ strains her back while trying to bust the lock and takes }
{188}{}{ points of damage.}

{601}{}{It is open, dummy.}
#############################################################
# Damage done to the door due to explosives. #
#############################################################
Expand Down
7 changes: 6 additions & 1 deletion scripts_src/generic/ziwoddor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,12 @@ crowbar or some similar instrument.
procedure Pry_Door begin
variable Stat_Roll;
script_overrides;


if not obj_is_locked(self_obj) then begin
display_msg(my_mstr(601));
return;
end

Stat_Roll:=do_check(source_obj,STAT_st,Crowbar_Bonus);

if (is_success(Stat_Roll)) then begin
Expand Down
7 changes: 6 additions & 1 deletion scripts_src/headers/doors_containers.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ crowbar or some similar instrument.
#ifndef custom_Pry_Door
procedure Pry_Door begin
variable Stat_Roll;


if not obj_is_locked(self_obj) then begin
display_msg(my_mstr(601));
return;
end

Stat_Roll:=do_check(source_obj,STAT_st,Crowbar_Bonus);

if (is_success(Stat_Roll)) then begin
Expand Down

0 comments on commit 36d3e46

Please sign in to comment.