mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 11:45:01 +01:00
py script
This commit is contained in:
parent
2be0e28305
commit
851d491846
4 changed files with 31 additions and 6 deletions
19
apply.py
Executable file
19
apply.py
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
with open("src/tiles.rs") as f:
|
||||
content: str = f.read()
|
||||
|
||||
result = ''
|
||||
|
||||
while True:
|
||||
next_add = content.find("//ADD")
|
||||
if next_add == -1:
|
||||
break
|
||||
|
||||
result += content[:next_add]
|
||||
content = content[(next_add + 5):]
|
||||
|
||||
result += content
|
||||
|
||||
with open("src/tiles.rs", "w") as f:
|
||||
f.write(result)
|
||||
3
repro.sh
3
repro.sh
|
|
@ -3,7 +3,8 @@
|
|||
cp tiles.rs src/tiles.rs
|
||||
cargo clean -p mantle-diver
|
||||
cargo build
|
||||
git apply crash.patch
|
||||
|
||||
./apply.py
|
||||
|
||||
OUT=$(cargo build 2>&1)
|
||||
|
||||
|
|
|
|||
10
src/tiles.rs
10
src/tiles.rs
|
|
@ -52,7 +52,7 @@ impl Bg {
|
|||
h: 0,
|
||||
},
|
||||
layer: (),
|
||||
blend_graphic: String::new(),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ impl Mid {
|
|||
h: 32,
|
||||
}),
|
||||
},
|
||||
blend_graphic: String::new(),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ impl Fg {
|
|||
h: 0,
|
||||
},
|
||||
layer: (),
|
||||
blend_graphic: String::new(),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ where
|
|||
pub graphic_name: String,
|
||||
pub tex_rect: IntRect,
|
||||
pub layer: Layer::SpecificDef,
|
||||
pub blend_graphic: String,
|
||||
//ADD pub blend_graphic: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Inspect, Default, Serialize, Deserialize)]
|
||||
|
|
@ -183,7 +183,7 @@ where
|
|||
graphic_name: Default::default(),
|
||||
tex_rect: Default::default(),
|
||||
layer: Layer::SpecificDef::default(),
|
||||
blend_graphic: String::new(),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
5
tiles.rs
5
tiles.rs
|
|
@ -52,6 +52,7 @@ impl Bg {
|
|||
h: 0,
|
||||
},
|
||||
layer: (),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -76,6 +77,7 @@ impl Mid {
|
|||
h: 32,
|
||||
}),
|
||||
},
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -92,6 +94,7 @@ impl Fg {
|
|||
h: 0,
|
||||
},
|
||||
layer: (),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -145,6 +148,7 @@ where
|
|||
pub graphic_name: String,
|
||||
pub tex_rect: IntRect,
|
||||
pub layer: Layer::SpecificDef,
|
||||
//ADD pub blend_graphic: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Inspect, Default, Serialize, Deserialize)]
|
||||
|
|
@ -179,6 +183,7 @@ where
|
|||
graphic_name: Default::default(),
|
||||
tex_rect: Default::default(),
|
||||
layer: Layer::SpecificDef::default(),
|
||||
//ADD blend_graphic: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue