Skip to content

Commit

Permalink
#61: a shorter template for doors
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Jan 11, 2021
1 parent ec2f32e commit 66e48ca
Show file tree
Hide file tree
Showing 47 changed files with 156 additions and 112 deletions.
1 change: 1 addition & 0 deletions extra/compile_skip.list
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vault13/waypnt.ssl

template/emitter.ssl
template/ffeild.ssl
template/gdoor.ssl
template/generic.ssl
template/genffld.ssl
template/peasant.ssl
Expand Down
3 changes: 2 additions & 1 deletion scripts_src/arroyo/aicavdor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Super_Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;


Expand Down Expand Up @@ -149,6 +148,8 @@ variable last_source_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/arroyo/ailkbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock; //added by killap
procedure Super_Set_Lockpick_Lock; //added by killap
Expand Down Expand Up @@ -139,6 +138,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/arroyo/aitemdor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Super_Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;


Expand Down Expand Up @@ -151,6 +150,8 @@ variable last_source_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/arroyo/ascrldr.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock;
procedure Super_Set_Lockpick_Lock;
Expand Down Expand Up @@ -137,6 +136,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/base/eslkdor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock;
procedure Super_Set_Lockpick_Lock;
Expand Down Expand Up @@ -137,6 +136,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/brokhill/hscelldr.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure anger;
procedure Super_Lockpick_Lock;
Expand Down Expand Up @@ -140,6 +139,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/brokhill/hscrldr.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure key_unlock_door;
procedure key_lock_door;
Expand Down Expand Up @@ -145,6 +144,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
if( self_tile == JAIL_DOOR_1_HEX) then
Jail_Door_1 := self_obj;
Expand Down
3 changes: 2 additions & 1 deletion scripts_src/gecko/gsrdoor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure key_lock_door;
procedure key_unlock_door;
Expand Down Expand Up @@ -143,6 +142,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/gecko/gsydoor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure key_lock_door;
procedure key_unlock_door;
Expand Down Expand Up @@ -144,6 +143,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/generic/zilckdor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Super_Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;


Expand Down Expand Up @@ -149,6 +148,8 @@ variable last_source_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/generic/zimtldor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Super_Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;


Expand Down Expand Up @@ -153,6 +152,8 @@ variable last_source_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
68 changes: 0 additions & 68 deletions scripts_src/headers/doors.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,72 +23,4 @@ procedure trap_search_result(variable found_trap, variable who) begin
end
end

/***************************************************************************
This procedure is used should the player try to pry the door open using a
crowbar or some similar instrument.
***************************************************************************/

procedure Pry_Door begin
variable Stat_Roll;

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

if (is_success(Stat_Roll)) then begin
set_local_var(LVAR_Locked, STATE_INACTIVE);
obj_unlock(self_obj);

if (source_obj == dude_obj) then begin
display_msg(mstr(176));
end

else begin
display_msg(mstr(181));
end
end

else if (is_critical(Stat_Roll)) then begin
critter_dmg(source_obj,Crowbar_Strain,(DMG_normal_dam BWOR DMG_BYPASS_ARMOR));

if (source_obj == dude_obj) then begin
if (Crowbar_Strain == 1) then begin
display_msg(mstr(177));
end
else begin
display_msg(mstr(178)+Crowbar_Strain+mstr(179));
end
end

else begin
if (is_male(source_obj)) then begin
if (Crowbar_Strain == 1) then begin
display_msg(mstr(182));
end
else begin
display_msg(mstr(183)+Crowbar_Strain+mstr(184));
end
end

else begin
if (Crowbar_Strain == 1) then begin
display_msg(mstr(186));
end
else begin
display_msg(mstr(187)+Crowbar_Strain+mstr(188));
end
end
end
end

else begin
if (source_obj == dude_obj) then begin
display_msg(mstr(180));
end

else begin
display_msg(mstr(185));
end
end
end


#endif // DOORS_H
3 changes: 2 additions & 1 deletion scripts_src/klamath/kscvdoor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock; //added by killap
procedure Super_Set_Lockpick_Lock; //added by killap
Expand Down Expand Up @@ -138,6 +137,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/klamath/ksmalldr.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure key_unlock_door;
procedure key_lock_door;
Expand Down Expand Up @@ -139,6 +138,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/ncr/siclsdor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure checkPartyMembers;
procedure Super_Lockpick_Lock;
Expand Down Expand Up @@ -151,6 +150,8 @@ variable last_source_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/ncr/sidtbl.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock; //added by killap
procedure Super_Set_Lockpick_Lock; //added by killap
Expand Down Expand Up @@ -144,6 +143,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
i_duppo_table := self_obj;
end
Expand Down
3 changes: 2 additions & 1 deletion scripts_src/ncr/sikdoor.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure checkPartyMembers;
procedure Super_Lockpick_Lock;
Expand Down Expand Up @@ -151,6 +150,8 @@ variable last_source_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
i_cell_door_obj := self_obj;
end
Expand Down
3 changes: 2 additions & 1 deletion scripts_src/ncr/silocker.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock; //added by killap
procedure Super_Set_Lockpick_Lock; //added by killap
Expand Down Expand Up @@ -139,6 +138,8 @@ variable Traps_Roll;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
end

Expand Down
3 changes: 2 additions & 1 deletion scripts_src/ncr/simbox.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ procedure Lock_Door;
procedure Set_Lock;
procedure Set_Lockpick_Lock;
procedure Set_Trap;
procedure Pry_Door;
procedure Damage_Critter;
procedure Super_Lockpick_Lock; //added by killap
procedure Super_Set_Lockpick_Lock; //added by killap
Expand Down Expand Up @@ -140,6 +139,8 @@ import variable scmikey_inventory_box_obj;
should be placed in here.
*******************************************************************/

#include "../template/gdoor.ssl"

procedure start begin
scmikey_inventory_box_obj := self_obj;
end
Expand Down
Loading

0 comments on commit 66e48ca

Please sign in to comment.