private void SetTokens() { if (Settings.TokenPrefix.IsNullOrEmptyOrWhitespace()) { throw ErrorShorthands.ThrowNullTokenPrefix(); } string objName = TargetType.name.ToLowerInvariant(); if (objName.Contains(prefix.ToLowerInvariant())) { objName = objName.Replace(prefix.ToLowerInvariant(), ""); } TargetType.modifierToken = $"{Settings.GetPrefixUppercase()}_AFFIX_{objName.ToUpperInvariant()}"; }
private void SetTokens() { if (Settings.TokenPrefix.IsNullOrEmptyOrWhitespace()) { throw ErrorShorthands.ThrowNullTokenPrefix(); } GameObject go = TargetType.gameObject; if (go) { TargetType.baseNameToken = $"{Settings.TokenPrefix.ToUpperInvariant()}_{go.name.ToUpperInvariant()}_NAME"; TargetType.subtitleNameToken = $"{Settings.TokenPrefix.ToUpperInvariant()}_{go.name.ToUpperInvariant()}_SUBTITLE"; } else { throw new NullReferenceException(); } }
private void SetTokens() { if (Settings.TokenPrefix.IsNullOrEmptyOrWhitespace()) { throw ErrorShorthands.ThrowNullTokenPrefix(); } string objName = TargetType.name.ToLowerInvariant(); if (objName.Contains(prefix.ToLowerInvariant())) { objName = objName.Replace(prefix.ToLowerInvariant(), ""); } string tokenBase = $"{Settings.GetPrefixUppercase()}_EQUIP_{objName.ToUpperInvariant()}_"; TargetType.nameToken = $"{tokenBase}NAME"; TargetType.pickupToken = $"{tokenBase}PICKUP"; TargetType.descriptionToken = $"{tokenBase}DESC"; TargetType.loreToken = $"{tokenBase}LORE"; }