mirror of
https://github.com/a2x/cs2-dumper.git
synced 2026-04-18 02:09:58 +08:00
Change json structure and add comments for modules
This commit is contained in:
@@ -14,8 +14,12 @@ impl FileBuilder for PythonFileBuilder {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_namespace(&mut self, output: &mut dyn Write, name: &str) -> Result<()> {
|
||||
write!(output, "class {}:\n", name)?;
|
||||
fn write_namespace(&mut self, output: &mut dyn Write, name: &str, comment: Option<&str>) -> Result<()> {
|
||||
if let Some(comment) = comment {
|
||||
write!(output, "class {}: # {}\n", name, comment)?;
|
||||
} else {
|
||||
write!(output, "class {}:\n", name)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user