mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-04-30 08:21:47 -04:00
Lot format 3.0
This JSON conversation is lot more readable, to say the least. xD
This commit is contained in:
parent
ac29443425
commit
445d8a6a08
4 changed files with 7770 additions and 12 deletions
|
@ -33,13 +33,13 @@ Will this succeed? *I have no idea*. I'm not much of a game developer, but that
|
||||||
1. **Clone the Repository**:
|
1. **Clone the Repository**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/tonytins/My Simulation.git
|
git clone https://github.com/tonytins/ztso.git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Navigate to the Repository**:
|
2. **Navigate to the Repository**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd My Simulation
|
cd ztso
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Run the Examples**: Execute the code examples using the Zig compiler. For instance:
|
3. **Run the Examples**: Execute the code examples using the Zig compiler. For instance:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"house": {
|
"house": {
|
||||||
|
"version": "2.0",
|
||||||
"size": "77",
|
"size": "77",
|
||||||
"category": "0",
|
"category": "0",
|
||||||
"world": {
|
"world": {
|
||||||
|
|
7764
resources/empty_lot_mysim.json
Normal file
7764
resources/empty_lot_mysim.json
Normal file
File diff suppressed because it is too large
Load diff
13
src/lot.zig
13
src/lot.zig
|
@ -5,12 +5,8 @@ pub const Floor = struct {
|
||||||
value: u8,
|
value: u8,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Floors = struct {
|
|
||||||
floor: []Floor,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const World = struct {
|
pub const World = struct {
|
||||||
floors: Floors,
|
floors: []Floor,
|
||||||
walls: u8,
|
walls: u8,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,13 +19,10 @@ pub const Item = struct {
|
||||||
group: u8,
|
group: u8,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Items = struct {
|
|
||||||
Item: []Item,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const House = struct {
|
pub const House = struct {
|
||||||
|
version: f32,
|
||||||
size: u8,
|
size: u8,
|
||||||
category: u8,
|
category: u8,
|
||||||
world: World,
|
world: World,
|
||||||
items: Item,
|
items: []Item,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue