@@ -2,8 +2,11 @@ import { state as meta3dState, getContribute as getContributeMeta3D, api } from
22// import { language } from "meta3d-action-mod-unit-add-careerfeature-protocol"
33import { actionContribute , service as editorWholeService } from "meta3d-editor-whole-protocol/src/service/ServiceType"
44import { actionName , state , uiData } from "meta3d-action-mod-unit-quicktest-protocol"
5+ import { actionName as initActionName , state as initState } from "meta3d-action-mod-unit-init-protocol"
56import { eventName , inputData } from "meta3d-action-mod-unit-quicktest-protocol/src/EventType"
6- import { publish } from "meta3d-action-mod-unit-publish-utils/src/Main"
7+ import { publish , checkModData } from "meta3d-action-mod-unit-publish-utils/src/Main"
8+ import { getLanguageTextData } from "meta3d-language-utils/src/Main"
9+ import { languageKey } from "meta3d-language-utils/src/Type"
710
811export let getContribute : getContributeMeta3D < actionContribute < uiData , state > > = ( api ) => {
912 return {
@@ -13,10 +16,21 @@ export let getContribute: getContributeMeta3D<actionContribute<uiData, state>> =
1316
1417 return new Promise ( ( resolve , reject ) => {
1518 resolve ( eventSourcingService . on < inputData > ( meta3dState , eventName , 0 , ( meta3dState ) => {
19+ if ( checkModData ( api , [ getLanguageTextData , languageKey ] , meta3dState , api . action . getActionState < initState > ( meta3dState , initActionName ) )
20+ ) {
21+ return Promise . resolve ( meta3dState )
22+ }
23+
1624 api . flow . deferExec ( api , ( meta3dState ) => {
1725 let author = "tempUser"
1826 let name = `temp_unit`
19- return publish ( api , meta3dState , name , author ) . then ( meta3dState => {
27+ return publish ( api , meta3dState , name , author ,
28+ "test1" ,
29+ "test1" ,
30+ "" ,
31+ false ,
32+ ""
33+ ) . then ( meta3dState => {
2034 // TODO restore
2135 // window.open("https://www.gts-play.cn?quicktest", "_blank")
2236 window . open ( "http://localhost:8093/?quicktest" , "_blank" )
0 commit comments