public bool TryApply(Structure structure) { if (Mod.CanMod(structure)) { structure.Mods.AddMod(UnityEngine.Object.Instantiate(Mod)); return(true); } return(false); }
private bool AddMod(IModdable moddable) { if (Mod.CanMod(moddable)) { moddable.Mods.AddMod(Instantiate(Mod)); return(true); } return(false); }
public override IEnumerable <IModdable> GetPotentialBroadcastTargets() { foreach (Transform sibling in GetSiblings()) { if (IsAdjecent(sibling.gameObject)) { IModdable moddable = sibling.GetComponent <IModdable>(); if (moddable != null && Mod.CanMod(moddable)) { yield return(moddable); } } } }