mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Changed item highlighting mod to only highlight lootable corpses. #126
This commit is contained in:
@@ -7,7 +7,7 @@ Key=42
|
||||
; Set to 1 to also highlight containers
|
||||
Containers=1
|
||||
|
||||
; Set to 1 to also highlight corpses
|
||||
; Set to 1 to also highlight lootable corpses
|
||||
Corpses=1
|
||||
|
||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||
|
||||
Binary file not shown.
@@ -23,6 +23,7 @@
|
||||
#define CRITTER_IS_DEAD (1)
|
||||
#define PID_MOTION_SENSOR (59)
|
||||
#define NO_HIGHLIGHT(obj) (get_flags(obj) bwand FLAG_NOHIGHLIGHT)
|
||||
#define NO_STEAL(obj) (get_proto_data(obj_pid(obj), PROTO_CR_FLAGS) bwand CFLG_NOSTEAL)
|
||||
|
||||
variable configSection := "Highlighting";
|
||||
variable highlightKey;
|
||||
@@ -52,7 +53,7 @@ procedure ToggleHighlight(variable enable) begin
|
||||
end
|
||||
if (alsoCorpse) then begin
|
||||
foreach obj in list_as_array(LIST_CRITTERS) begin
|
||||
if critter_state(obj) == CRITTER_IS_DEAD then begin
|
||||
if critter_state(obj) == CRITTER_IS_DEAD and not NO_STEAL(obj) then begin
|
||||
call ToggleHighlightObject(obj, enable);
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user