Replace all secondary flags with bitflags stored in the flags_2 var
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
#define HAS_SECONDARY_FLAG(atom, sflag) (atom.secondary_flags ? atom.secondary_flags[sflag] : FALSE)
|
||||
#define SET_SECONDARY_FLAG(atom, sflag) if(!atom.secondary_flags) { atom.secondary_flags = list(); } atom.secondary_flags[sflag] = TRUE;
|
||||
#define CLEAR_SECONDARY_FLAG(atom, sflag) if(atom.secondary_flags) atom.secondary_flags[sflag] = null
|
||||
#define TOGGLE_SECONDARY_FLAG(atom, sflag) if(HAS_SECONDARY_FLAG(atom, sflag)) { CLEAR_SECONDARY_FLAG(atom, sflag); } else {SET_SECONDARY_FLAG(atom, sflag) ; }
|
||||
@@ -164,7 +164,7 @@
|
||||
. = list()
|
||||
while(processing_list.len)
|
||||
var/atom/A = processing_list[1]
|
||||
if(A.flags & HEAR)
|
||||
if(A.flags_1 & HEAR_1)
|
||||
. += A
|
||||
processing_list.Cut(1, 2)
|
||||
processing_list += A.contents
|
||||
|
||||
@@ -978,19 +978,19 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
|
||||
// Used to make the frozen item visuals for Freon.
|
||||
if(resistance_flags & FREEZE_PROOF)
|
||||
return
|
||||
if(!HAS_SECONDARY_FLAG(src, FROZEN))
|
||||
if(!(flags_2 & FROZEN_2))
|
||||
name = "frozen [name]"
|
||||
add_atom_colour(list(FROZEN_RED_COLOR, FROZEN_GREEN_COLOR, FROZEN_BLUE_COLOR, rgb(0,0,0)), TEMPORARY_COLOUR_PRIORITY)
|
||||
alpha -= 25
|
||||
SET_SECONDARY_FLAG(src, FROZEN)
|
||||
flags_2 |= FROZEN_2
|
||||
|
||||
//Assumes already frozed
|
||||
/obj/proc/make_unfrozen()
|
||||
if(HAS_SECONDARY_FLAG(src, FROZEN))
|
||||
if(flags_2 & FROZEN_2)
|
||||
name = replacetext(name, "frozen ", "")
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, list(FROZEN_RED_COLOR, FROZEN_GREEN_COLOR, FROZEN_BLUE_COLOR, rgb(0,0,0)))
|
||||
alpha += 25
|
||||
CLEAR_SECONDARY_FLAG(src, FROZEN)
|
||||
flags_2 &= ~FROZEN_2
|
||||
|
||||
#undef FROZEN_RED_COLOR
|
||||
#undef FROZEN_GREEN_COLOR
|
||||
|
||||
Reference in New Issue
Block a user