@@ -5,6 +5,7 @@ import { actionName, state, uiData } from "meta3d-action-mod-unit-init-protocol"
55import { eventName , inputData } from "meta3d-action-mod-unit-init-protocol/src/EventType"
66// import { actionName as infoActionName, state as infoState } from "meta3d-action-mod-unit-info-protocol"
77import { getAllModelData , getModelSnapshotPath } from "./asset-lib/unit-model/Main"
8+ import { getActions } from "./asset-lib/unit-action/Main"
89// import { getData } from "./CareerFeatureData"
910// import { getRandomFloat, getRandomInteger, randomSelect, convertDecimalToPercent, getDecimal } from "./NumberUtils"
1011// import { actionName as languageActionName, state as languageState } from "meta3d-action-mod-language-protocol"
@@ -96,9 +97,12 @@ export let getContribute: getContributeMeta3D<actionContribute<uiData, state>> =
9697 } ,
9798 api . immutable . createMap ( )
9899 ) . then ( newAllModelData => {
100+ let newAllActionData = api . immutable . createMapOfData ( getActions ( ) ) . map ( value => api . immutable . createMapOfData ( value ) )
101+
99102 meta3dState = api . action . setActionState ( meta3dState , actionName , {
100103 ...api . nullable . getExn ( api . action . getActionState < state > ( meta3dState , actionName ) ) ,
101- allModelData : newAllModelData
104+ allModelData : newAllModelData ,
105+ allActionData : newAllActionData ,
102106 } )
103107
104108 return meta3dState
@@ -131,6 +135,8 @@ export let getContribute: getContributeMeta3D<actionContribute<uiData, state>> =
131135 return {
132136 // allModelData: api.immutable.createMapOfData(getAllModelData()),
133137 allModelData : api . immutable . createMap ( ) ,
138+ allActionData : api . immutable . createMap ( ) ,
139+
134140 selectedModelIndex : api . nullable . getEmpty ( ) ,
135141 isShowModelModal : false ,
136142 isShowUnitValueModal : false ,
0 commit comments