ID:1631222
 
Code:
area/War
var
ID
Faction
Owned
Capturing
Cooldown
list/SS = list()
list/HM = list()
list/Earth = list()

proc/GetFaction()
for(var/mob/player/M in world)
for(var/X in SS)
if(M.race == X) return "Soul Society"
for(var/X in HM)
if(M.race == X) return "Hueco Mundo"
for(var/X in Earth)
if(M.race == X) return "Earth"

proc/SetLists(mob/player/M)
var/list/Earth = list("Fullbring", "Quincy", "Sado", "Vaizard")
for(M in view(15, src))
if(M.race == "Shinigami") SS += M
if(M.race == "Hollow" || M.race == "Arrancar") HM += M
for(var/X in Earth)
if(M.race == X) Earth += M

Entered(mob/player/M)
if(ismob(M))
src.SetLists(M)
src.Faction = src.GetFaction()
if(src.Owned)
usr << "This area belongs to [src.Faction]!"
if(src.Cooldown)
usr << "You can't capture this area yet."
return
if(src.SS.len > 0)
var/Text = src.Faction ? " is capturing [src.ID] from [src.Faction]" : " is capturing [src.ID]"
world << "[Text]"
return ..()


Problem description:

Spent a few minutes trying to learn about area prototype and a bit more about lists. So now I am trying to do a Capture Area system, I've been testing step by step and got to a point that it doesn't say anything when I enter the area that I put on the map. It should sy that I am capturing it, I've checked my logs and it doesn't even say that my list is null or w/e. Also if there's any part of my code that should be simplified, please notify me and give me a hint!
And here's a question, is there a way to make this area by default like 4x4 in the map ? Or I have to put it in the map and set the same ID on each instance placed in the map ?

Thanks in advance!