Skip to content

Commit

Permalink
🚧 Ifdefs for notion data added again
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMCarter committed Sep 10, 2024
1 parent 90c3930 commit 9e4749e
Show file tree
Hide file tree
Showing 36 changed files with 239 additions and 72 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -208,4 +210,6 @@ private static void OnAllDownloadCompleted()
}
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -155,4 +157,6 @@ private void CreateDataFile()
EditorUtility.SetDirty(AssetDatabase.LoadAssetAtPath<TextAsset>(pathToTextFile));
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -48,4 +50,6 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
EditorGUI.EndProperty();
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -60,4 +62,6 @@ public override float GetPropertyHeight(SerializedProperty property, GUIContent
return EditorGUIUtility.singleLineHeight;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -153,4 +155,6 @@ private void OnErrorReceived(NotionRequestError error)
serializedObject.Update();
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -32,4 +34,6 @@ public enum NotionApiReleaseVersion
{
[InspectorName("2022-06-28")] NotionApi20220628 = 0,
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
using UnityEngine;
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

using UnityEngine;

namespace CarterGames.Cart.Modules.NotionData.Editor
{
Expand All @@ -9,4 +34,6 @@ public enum NotionApiVersion
{
[InspectorName("V1 (Default)")] V1 = 0,
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -37,4 +39,6 @@ public static string ToVersionString(this NotionApiReleaseVersion apiReleaseVers
};
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -133,4 +135,6 @@ private static string GetValueForType(string type, JSONNode element)
return DatabasePropertyParserLookup[type].GetJsonValue(element);
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -62,4 +64,6 @@ public static class NotionMetaData
"Link to database:",
"The link to the page with the database on that you want to download.");
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -30,4 +32,6 @@ public interface INotionDatabasePropertyParser
string PropertyIdentifier { get; }
string GetJsonValue(JSONNode json);
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -35,4 +37,6 @@ public string GetJsonValue(JSONNode json)
return json["checkbox"].Value;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -65,4 +67,6 @@ public string GetJsonValue(JSONNode json)
return JsonUtility.ToJson(new SerializableDateTime(dateTime));
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -42,4 +44,6 @@ public string GetJsonValue(JSONNode json)
return elements.ToString();
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -35,4 +37,6 @@ public string GetJsonValue(JSONNode json)
return json["number"].Value;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -35,4 +37,6 @@ public string GetJsonValue(JSONNode json)
return json["rich_text"][0]["text"]["content"].Value;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -35,4 +37,6 @@ public string GetJsonValue(JSONNode json)
return json["select"]["name"] == null ? null : json["select"]["name"].Value;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -35,4 +37,6 @@ public string GetJsonValue(JSONNode json)
return json["title"][0]["text"]["content"].Value;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -227,4 +229,6 @@ public static void ResetRequestData()
requestData = null;
}
}
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*
#if CARTERGAMES_CART_MODULE_NOTIONDATA

/*
* Copyright (c) 2024 Carter Games
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -123,4 +125,6 @@ public void AppendResultData(List<KeyValuePair<string, JSONNode>> data)
}
}
}
}
}

#endif
Loading

0 comments on commit 9e4749e

Please sign in to comment.