You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,7 +22,10 @@ class FloorMakerCLI : CliktCommand() {
21
22
return"The Sims 1 Floor Maker made by MrPowerGamerBR (https://sneakysims.net)"
22
23
}
23
24
24
-
val inputImage by option("--input", help ="The image that will be converted to a floor").required()
25
+
val inputImage by option("--input", help ="The image that will be converted to a floor")
26
+
val inputRawFarZoomImage by option("--input-raw-far-zoom", help ="The image that will be converted to a floor (far zoom), raw in this context means the image in the same position/rotation as a floor")
27
+
val inputRawMediumZoomImage by option("--input-raw-medium-zoom", help ="The image that will be converted to a floor (medium zoom), raw in this context means the image in the same position/rotation as a floor")
28
+
val inputRawNearZoomImage by option("--input-raw-near-zoom", help ="The image that will be converted to a floor (near zoom), raw in this context means the image in the same position/rotation as a floor")
25
29
val name by option("--name", help ="The name of the item in game")
26
30
val description by option("--description", help ="The description of the item in game")
27
31
val price by option("--price", help ="The price of the item in game").int()
@@ -31,24 +35,48 @@ class FloorMakerCLI : CliktCommand() {
31
35
val output by argument("output", help ="The output flr file")
32
36
33
37
overridefunrun() {
34
-
val inputImage =ImageIO.read(File(inputImage))
35
-
val slippyImage =SlippyImage.convertToSlippyImage(inputImage)
36
-
val floorSprite =FloorMaker.createFloorSprite(slippyImage)
37
-
val stepSound = stepSound ?:FloorSound.HARD_FLOOR
38
-
39
-
val colors =PaletteCreator.extractColors(floorSprite)
40
-
val palette =PaletteCreator.kMeansQuantization(colors, 256)
41
-
42
-
val iff =FloorMaker.createFloorIFF(
43
-
name ?:"",
44
-
price ?:1,
45
-
description ?:"",
46
-
stepSound,
47
-
floorSprite,
48
-
palette
49
-
)
50
-
51
-
File(output).writeBytes(iff.write())
38
+
if (inputImage !=null) {
39
+
val inputImage =ImageIO.read(File(inputImage))
40
+
val slippyImage =SlippyImage.convertToSlippyImage(inputImage)
41
+
val floorSprite =FloorMaker.createFloorSprite(slippyImage)
42
+
val stepSound = stepSound ?:FloorSound.HARD_FLOOR
43
+
44
+
val colors =PaletteCreator.extractColors(floorSprite)
45
+
val palette =PaletteCreator.kMeansQuantization(colors, 256)
0 commit comments