Skip to content

Commit cbd84ce

Browse files
committed
place all included resources under mod id again
1 parent 05f3aaf commit cbd84ce

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "geode"
3-
version = "2.0.0"
3+
version = "2.1.0"
44
authors = ["HJfod <[email protected]>", "Camila314 <[email protected]>"]
55
edition = "2021"
66
build = "build.rs"

src/package.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,16 @@ fn create_resources(
157157
cache: &mut cache::ResourceCache,
158158
working_dir: &Path,
159159
output_dir: &PathBuf,
160-
sprite_output_dir: &PathBuf,
161160
shut_up: bool,
162161
) {
163162
// Make sure output directory exists
164163
fs::create_dir_all(output_dir).expect("Could not create resource directory");
165-
fs::create_dir_all(sprite_output_dir).expect("Could not create sprite resource directory");
166164

167165
// Create spritesheets
168166
for sheet in mod_info.resources.spritesheets.values() {
169167
let sheet_file = spritesheet::get_spritesheet_bundles(
170168
sheet,
171-
sprite_output_dir,
169+
output_dir,
172170
cache_bundle,
173171
mod_info,
174172
shut_up,
@@ -178,7 +176,7 @@ fn create_resources(
178176

179177
// Create fonts
180178
for font in mod_info.resources.fonts.values() {
181-
let font_file = bmfont::get_font_bundles(font, sprite_output_dir, cache_bundle, mod_info, shut_up);
179+
let font_file = bmfont::get_font_bundles(font, output_dir, cache_bundle, mod_info, shut_up);
182180
cache.add_font(font, font_file.cache_name(working_dir));
183181
}
184182

@@ -194,13 +192,13 @@ fn create_resources(
194192

195193
// Collect all errors
196194
(|| {
197-
sprite.save(sprite_output_dir.join(base.to_string() + "-uhd.png"))?;
195+
sprite.save(output_dir.join(base.to_string() + "-uhd.png"))?;
198196

199197
spritesheet::downscale(&mut sprite, 2);
200-
sprite.save(sprite_output_dir.join(base.to_string() + "-hd.png"))?;
198+
sprite.save(output_dir.join(base.to_string() + "-hd.png"))?;
201199

202200
spritesheet::downscale(&mut sprite, 2);
203-
sprite.save(sprite_output_dir.join(base.to_string() + ".png"))
201+
sprite.save(output_dir.join(base.to_string() + ".png"))
204202
})()
205203
.expect(&format!(
206204
"Unable to copy sprite at {}",
@@ -247,7 +245,6 @@ fn create_package_resources_only(
247245
&mut new_cache,
248246
output_dir,
249247
output_dir,
250-
output_dir,
251248
shut_up,
252249
);
253250

@@ -306,7 +303,6 @@ fn create_package(
306303
&mut cache_bundle,
307304
&mut new_cache,
308305
&working_dir,
309-
&working_dir.join("resources"),
310306
&working_dir.join("resources").join(&mod_file_info.id),
311307
false,
312308
);

0 commit comments

Comments
 (0)