To provide procs which will allow an object to be concealed and revealed. The object can be revealed by any mob which searches and finds the hidden obj as well as the original mob which concealed it.
obj/var hidden=0 // 0=false|1=true; obj is hidden mounted=0 // 0=false|1=true; obj is mounted and can not be picked up hidden_list // List containing mobs that know where obj is hidden obj/proc/CheckStatus(obj/O) O.verbs.len=0 if(O.hidden == 0) if(O.mounted == 0) O.verbs.Add(/obj/proc/Conceal) O.verbs.Add(/obj/proc/Drop) O.verbs.Add(/obj/proc/Get) obj/proc/Conceal() set src in usr src.loc=usr.loc src.hidden=1 src.hidden_list.Add(usr) CheckStatus(src) return obj/proc/Reveal() set src in src.hidden_list // THIS DOESN'T WORK, NOR DOES ANYTHING ELSE I'VE TRIED. ANY IDEAS? src.hidden=0 src.hidden_list.len=0 return
I'm trying to find a way to make this work without having to move the source of the proc into the actual mob. For example, I can get this to work if the procs are mob/proc wih the hidden_list stored in individual mobs.
The main problem is I'm trying to avoid searching through all the mobs in world.contents to remove the object from hidden_list everytime the object is revealed by another mob.