https://github.com/kade-github/intrasharp
An intralisim map configuration tool.
https://github.com/kade-github/intrasharp
Last synced: 3 months ago
JSON representation
An intralisim map configuration tool.
- Host: GitHub
- URL: https://github.com/kade-github/intrasharp
- Owner: Kade-github
- License: gpl-3.0
- Created: 2019-10-12T18:17:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T14:45:32.000Z (about 3 years ago)
- Last Synced: 2025-06-14T19:05:29.530Z (7 months ago)
- Language: C#
- Size: 4.36 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.codacy.com/manual/KadeDev/IntraSharp?utm_source=github.com&utm_medium=referral&utm_content=KadeDev/IntraSharp&utm_campaign=Badge_Grade)
# IntraSharp
An intralisim map configuration tool.
# How to use
## Installing
Naviage towards the releases page [Here](https://github.com/KadeDev/IntraSharp/releases/latest)
Download the latest release,
Add it to your refrences in your C# Project.
## Features
- Full map json data.
- Ability to read and write map data.
## Examples
### Getting a configuration file
```csharp
using IntraSharp;
public class Program
{
public static void Main(string[] args)
{
IntraConfig config = IntraConfig.LoadConfig(args[0]); // Loads the config in the 1st argument, which is a file path.
}
}
```
### Removing/Adding events
```csharp
using IntraSharp;
public class Program
{
public static void Main(string[] args)
{
IntraConfig config = IntraConfig.LoadConfig(args[0]); // Loads the config in the 1st argument, which is a file path.
config.Config.Events.Clear(); // Removes all events
Event e = new Event(); // Creates a new event object
e.Time = 0; // Sets the time to the begging of the map.
Data data = new Data(); // Makes a new data type
data.Type = DataType.SpawnObj; // We want to spawn in some arcs so use SpawnObj
data.DataString = "[LeftUpDownRight]"; // We want to have a full circle so we do [LeftUpDownRight]
e.Data = data.ConvertToReadableData(); // Convert it to readable data so Intra can load it
config.Config.Events.Add(e); // Add the event
}
}
```
### Saving the config
```csharp
using IntraSharp;
public class Program
{
public static void Main(string[] args)
{
IntraConfig config = IntraConfig.LoadConfig(args[0]); // Loads the config in the 1st argument, which is a file path.
config.Config.Events.Clear(); // Removes all events
Event e = new Event(); // Creates a new event object
e.Time = 0; // Sets the time to the begging of the map.
Data data = new Data(); // Makes a new data type
data.Type = DataType.SpawnObj; // We want to spawn in some arcs so use SpawnObj
data.DataString = "[LeftUpDownRight]"; // We want to have a full circle so we do [LeftUpDownRight]
e.Data = data.ConvertToReadableData(); // Convert it to readable data so Intra can load it
config.Config.Events.Add(e); // Add the event
config.SaveConfig(); // Save the config
}
}
```
# Libarys used:
## Newtonsoft.Json