Added an additional '"Can't Use" flag to misc flags in item objects

* it makes the weapon object unusable in combat.

Updated gl_npcarmor script.
Edits to header files and hookscripts.md.
This commit is contained in:
NovaRain
2021-09-03 21:30:12 +08:00
parent edc2755ef6
commit 806cc765bb
9 changed files with 189 additions and 94 deletions
@@ -11,7 +11,7 @@
Requires sfall 3.8.29 or higher
version 1.1
version 1.4
*/
@@ -79,13 +79,13 @@ procedure check_weapon_change(variable critter, variable weapon, variable isWiel
end
/*
Finds the first weapon which can be used by the party member in the inventory
Finds the first weapon that can be used by the party member in the inventory
*/
procedure search_alt_weapon(variable critter) begin
variable obj, res, i := 0;
obj := inven_ptr(critter, 0);
while (obj) do begin
if (obj_item_subtype(obj) == item_type_weapon) then begin
if (obj_item_subtype(obj) == item_type_weapon and weapon_is_unusable(obj) == false) then begin
if (unWieldWeapon == 0 or unWieldWeapon != obj_pid(obj)) then begin
res := check_weapon_change(critter, obj, 1);
if (res == -1) then begin