Skip to content

Commit 8881889

Browse files
committed
feat(editor): continue "add skill ui"
add action data;
1 parent 5b3aded commit 8881889

7 files changed

Lines changed: 41 additions & 5 deletions

File tree

contributes/meta3d-action-mod-unit-init/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "meta3d-action-mod-unit-init",
3-
"version": "1.3.9",
3+
"version": "1.3.10",
44
"publisher": "meta3d",
55
"protocol": {
66
"name": "meta3d-action-mod-unit-init-protocol"

contributes/meta3d-action-mod-unit-init/src/Main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { actionName, state, uiData } from "meta3d-action-mod-unit-init-protocol"
55
import { 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"
77
import { 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,
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { action, actionType, category, meleeRange, model, skillType } from "meta3d-action-mod-unit-publish-to-game-protocol/src/UnitType"
2+
3+
export let getActions = () => {
4+
return {
5+
[category.EliteGiantess]: {
6+
[action.StompLight]: {
7+
// type: actionType.Body,
8+
skillType: skillType.Melee,
9+
meleeRange: meleeRange.Level6 * 1.5 * 1.1 / 22,
10+
},
11+
}
12+
}
13+
}

doc/1.3.1.org

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,10 +1655,14 @@ TODO skill data
16551655
commit
16561656

16571657
update action data
1658-
add icon to asset-lib
1658+
# add icon to asset-lib
1659+
1660+
add Main
1661+
16591662

16601663
button:select action
16611664
Modal: grid ui
1665+
no image
16621666

16631667

16641668
button:set action value

protocols/contribute_protocols/meta3d-action-mod-unit-init-protocol/src/StateType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { action, nullable } from "meta3d-action-mod-unit-publish-to-game-protocol/src/UnitType"
2-
import { models } from "./Type"
2+
import { actions, models } from "./Type"
33

44
export const actionName = "UnitModInit"
55

66
export type uiData = null
77

88
export type state = {
99
allModelData: models,
10+
allActionData: actions,
1011

1112
selectedModelIndex: nullable<number>,
1213

protocols/contribute_protocols/meta3d-action-mod-unit-init-protocol/src/Type.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// import { box3, damageType, euler, nullable, vector3 } from "type-api/src/ImportedTypes"
22
// import { api } from "type-api/src/Type"
3-
import { category, model } from "meta3d-action-mod-unit-publish-to-game-protocol/src/UnitType"
3+
import { action, category, meleeRange, model, skillType } from "meta3d-action-mod-unit-publish-to-game-protocol/src/UnitType"
44
import { Map } from "immutable"
55

66
export type modelData = {
@@ -21,3 +21,10 @@ export type modelData = {
2121
// [category.EliteGiantess]: Array<modelData>
2222
// }
2323
export type models = Map<category, Array<modelData>>
24+
25+
export type actionData = {
26+
skillType: skillType,
27+
meleeRange?: meleeRange,
28+
}
29+
30+
export type actions = Map<category, Map<action, actionData>>

protocols/contribute_protocols/meta3d-action-mod-unit-publish-to-game-protocol/src/UnitType.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,11 @@ export type generateData = {
679679
export type unitUniqueName = string
680680

681681

682+
export enum skillType {
683+
Melee,
684+
Ranged,
685+
}
686+
682687
// export enum modPropName {
683688

684689
// }

0 commit comments

Comments
 (0)