@@ -3,13 +3,15 @@ import { state as meta3dState, getContribute as getContributeMeta3D, api } from
33import { actionContribute , service as editorWholeService } from "meta3d-editor-whole-protocol/src/service/ServiceType"
44import { actionName , state , uiData } from "meta3d-action-mod-unit-publish-to-game-protocol"
55import { actionName as initActionName , state as initState } from "meta3d-action-mod-unit-init-protocol"
6+ import { actionName as uploadModelFileActionName , state as uploadModelFileState } from "meta3d-action-mod-unit-upload-model-file-protocol"
7+ import { actionName as uploadModelSnapshotActionName , state as uploadModelSnapshotState } from "meta3d-action-mod-unit-upload-model-snapshot-protocol"
68import { actionName as infoActionName , state as infoState } from "meta3d-action-mod-career-info-protocol"
79import { eventName , inputData } from "meta3d-action-mod-unit-publish-to-game-protocol/src/EventType"
810import { publish , getUserName , checkModData , buildUniqueName } from "meta3d-action-mod-unit-publish-utils/src/Main"
911import { getLanguageTextData , isChinese } from "meta3d-language-utils/src/Main"
1012import { languageKey } from "meta3d-language-utils/src/Type"
1113
12- let _checkPublishData = ( api : api , meta3dState : meta3dState , { languageTextData, displayNameCN, displayNameEN, description, modIconBase64 } : initState , isChinese : boolean ) => {
14+ let _checkPublishData = ( api : api , meta3dState : meta3dState , { selectedModelIndex , languageTextData, displayNameCN, displayNameEN, description, modIconBase64 } : initState , isChinese : boolean ) => {
1315 let message = api . nullable . getEmpty < string > ( )
1416
1517 if ( isChinese && displayNameCN . length <= 0 ) {
@@ -25,6 +27,19 @@ let _checkPublishData = (api: api, meta3dState: meta3dState, { languageTextData,
2527 // message = api.nullable.return(getLanguageTextData(api, meta3dState, languageTextData, languageKey.NeedModIcon))
2628 // }
2729
30+ if ( api . nullable . isNullable ( selectedModelIndex ) ) {
31+ let uploadModelFileState = api . action . getActionState < uploadModelFileState > ( meta3dState , uploadModelFileActionName )
32+ let uploadModelSnapshotState = api . action . getActionState < uploadModelSnapshotState > ( meta3dState , uploadModelSnapshotActionName )
33+
34+ if ( ! (
35+ uploadModelFileState . files . has ( "lod1" ) && uploadModelFileState . files . has ( "lod2" )
36+ && ! api . nullable . isNullable ( uploadModelSnapshotState . snapshot )
37+ )
38+ ) {
39+ message = api . nullable . return ( getLanguageTextData ( api , meta3dState , languageTextData , languageKey . NeedLOD1LOD2SnapshotModelFile ) )
40+ }
41+ }
42+
2843 return api . nullable . getWithDefault (
2944 api . nullable . map ( ( message ) => {
3045 api . message . warn ( message )
0 commit comments