Skip to content

Commit 67c4e50

Browse files
committed
Make GitAssetLoader non-madatory
1 parent 3190c74 commit 67c4e50

File tree

11 files changed

+31
-37
lines changed

11 files changed

+31
-37
lines changed

.squot-materialize

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@
2121
'src'
2222
]
2323
},
24-
SquotBlobMapper {
25-
#path : FSAbsolutePath [
26-
'testMapFile.morph'
27-
],
28-
#encoding : 'bin'
29-
},
3024
SquotImageMapper {
3125
#path : FSAbsolutePath [
3226
'GMTEIcons',
@@ -113,6 +107,13 @@
113107
},
114108
#path : @9
115109
},
110+
SquotBlobMapper {
111+
#path : FSAbsolutePath [
112+
'testingResources',
113+
'map.morph'
114+
],
115+
#encoding : 'bin'
116+
},
116117
SquotCypressMapper {
117118
#package : MCPackage {
118119
#name : 'GameMecha-Examples'
@@ -194,12 +195,6 @@
194195
],
195196
#encoding : @4
196197
},
197-
SquotBlobMapper {
198-
#path : FSAbsolutePath [
199-
'map.morph'
200-
],
201-
#encoding : 'bin'
202-
},
203198
SquotImageMapper {
204199
#path : FSAbsolutePath [
205200
'GMTEIcons',
@@ -226,6 +221,13 @@
226221
},
227222
#path : @9
228223
},
224+
SquotBlobMapper {
225+
#path : FSAbsolutePath [
226+
'testingResources',
227+
'testMapFile.morph'
228+
],
229+
#encoding : 'bin'
230+
},
229231
SquotCypressMapper {
230232
#package : MCPackage {
231233
#name : 'GameMecha-TileEditor'

src/BaselineOfGameMecha.package/BaselineOfGameMecha.class/instance/baseline..st

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ baseline: spec
33
<baseline>
44
spec
55
for: #'common'
6-
do: [
7-
8-
self squotMapper: spec.
9-
6+
do: [
107
spec
118
package: 'GameMecha-ResourceLoading';
129
package: 'GameMecha-Collision';
1310
package: 'GameMecha-KeyHandling';
14-
package: 'GameMecha-TileEditor' with: [spec requires: #('Squot')];
11+
package: 'GameMecha-TileEditor';
1512
package: 'GameMecha-Examples' with: [spec requires: #('core')];
1613
package: 'GameMecha-DemoGame' with: [spec requires: #('core')];
1714
package: 'GameMecha-Test' with: [spec requires: #('core' 'GameMecha-Examples')].

src/BaselineOfGameMecha.package/BaselineOfGameMecha.class/instance/squotMapper..st

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/BaselineOfGameMecha.package/BaselineOfGameMecha.class/methodProperties.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
"class" : {
33
},
44
"instance" : {
5-
"baseline:" : "ek 9/13/2024 19:43",
6-
"squotMapper:" : "ek 9/13/2024 17:43" } }
5+
"baseline:" : "ek 9/16/2024 10:27" } }

src/GameMecha-Test.package/GMTileEditorTest.class/instance/loadTestMapFileToFileDirectory.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ loadTestMapFileToFileDirectory
44

55
|tempFile|
66
tempFile := FileDirectory default asFSReference / self fileUUID.
7-
tempFile writeStreamDo: [:stream | stream nextPutAll: ((GitAssetLoader for: 'GameMecha') loadAsset: '/testMapFile.morph')]
7+
tempFile writeStreamDo: [:stream | stream nextPutAll: (((Smalltalk at: #GitAssetLoader) for: 'GameMecha') loadAsset: '/testingResources/testMapFile.morph')]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
editorTests
22
testDirectImport
33
"tests the creation of a tileMap from a local file path"
4+
Smalltalk at: #GitAssetLoader ifAbsent: [^ self].
45

56
self loadTestMapFileToFileDirectory.
67
self assert: ((GMTEEditor getTileMapFromFilePath: self fileUUID) isKindOf: GMTETileMap)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
editorTests
22
testDirectImportFromAssetbrowser
33
"tests the creation of a tileMap from the git asset browser"
4+
Smalltalk at: #GitAssetLoader ifAbsent: [^ self].
45

5-
self assert: ((GMTEEditor getTileMapFromProjectName: 'GameMecha' withPath: '/testMapFile.morph') isKindOf: GMTETileMap)
6+
self assert: ((GMTEEditor getTileMapFromProjectName: 'GameMecha' withPath: '/testingResources/testMapFile.morph') isKindOf: GMTETileMap)

src/GameMecha-Test.package/GMTileEditorTest.class/instance/testImportButton.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
editorTests
22
testImportButton
33
"tests the import function"
4+
Smalltalk at: #GitAssetLoader ifAbsent: [^ self].
45

56
self loadTestMapFileToFileDirectory.
67
[self editor importFromMorph] valueSupplyingAnswer: self fileUUID.

src/GameMecha-Test.package/GMTileEditorTest.class/methodProperties.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
"editor:" : "jj 6/22/2024 16:55",
88
"fileUUID" : "jj 6/22/2024 20:21",
99
"fileUUID:" : "jj 6/22/2024 16:55",
10-
"loadTestMapFileToFileDirectory" : "JS 6/23/2024 18:18",
10+
"loadTestMapFileToFileDirectory" : "ek 9/16/2024 10:25",
1111
"setUp" : "jj 6/23/2024 18:55",
1212
"tearDown" : "jj 6/22/2024 20:24",
1313
"testAddLayerButton" : "JS 6/24/2024 00:19",
1414
"testDeleteLayer" : "jj 6/22/2024 20:25",
15-
"testDirectImport" : "jj 6/22/2024 20:30",
16-
"testDirectImportFromAssetbrowser" : "jj 6/22/2024 20:30",
15+
"testDirectImport" : "ek 9/16/2024 10:28",
16+
"testDirectImportFromAssetbrowser" : "ek 9/16/2024 10:26",
1717
"testExport" : "jj 6/23/2024 19:02",
1818
"testExportButton" : "jj 6/22/2024 20:28",
19-
"testImportButton" : "jj 6/22/2024 20:28",
19+
"testImportButton" : "ek 9/16/2024 10:28",
2020
"testMoveLayerDown" : "JS 6/25/2024 18:02",
2121
"testMoveLayerUp" : "JS 6/25/2024 18:02",
2222
"testMultiDeleteLayer" : "jj 6/22/2024 20:31",
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
fileHandling
22
getTileMapFromProjectName: aName withPath: aPath
33
"Loads a tileMap from the git asset browser"
4-
5-
^ GMTEEditor getTileMapFromFileBinary: ((GitAssetLoader for: aName) loadAsset: aPath)
4+
Smalltalk at: #GitAssetLoader
5+
ifAbsent: [self error: 'Squot Mapper GitAssetLoader not available'.
6+
^ self].
7+
^ GMTEEditor getTileMapFromFileBinary: (((Smalltalk at: #GitAssetLoader) for: aName) loadAsset: aPath)

src/GameMecha-TileEditor.package/GMTEEditor.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"getInputFieldSize" : "mcjj 7/12/2024 21:41",
55
"getTileMapFromFileBinary:" : "mcjj 7/12/2024 21:41",
66
"getTileMapFromFilePath:" : "mcjj 7/12/2024 21:43",
7-
"getTileMapFromProjectName:withPath:" : "mcjj 7/12/2024 21:43",
7+
"getTileMapFromProjectName:withPath:" : "ek 9/16/2024 10:25",
88
"getVisibilityIndicator:" : "mcjj 7/12/2024 21:44",
99
"hLayoutFrame:ofN:" : "mcjj 7/12/2024 21:47",
1010
"hLayoutFrame:ofN:vSymmetric:" : "tw 7/11/2024 17:03",

0 commit comments

Comments
 (0)