调整json格式
This commit is contained in:
1 parent
d69778bf11
commit
d1f62dc32c
27 files changed
+71
-69
No files matched your search
@@ -1,9 +1,8 @@
|
||||
# coding=utf-8
|
||||
import time
|
||||
|
||||
from ToolsConfig import *
|
||||
from ItemTools import IsSameItem
|
||||
from FastComp import *
|
||||
from ToolsConfig import *
|
||||
|
||||
CdTags = {}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# coding=utf-8
|
||||
from ToolsConfig import serverCompFactory, clientCompFactory, serverApi, clientApi, LevelId
|
||||
from ItemTools import IsSameItem
|
||||
from ToolsConfig import serverCompFactory, clientCompFactory, serverApi, LevelId
|
||||
|
||||
|
||||
def DictFromBlockEntityData(blockEntityData, posDim):
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# coding=utf-8
|
||||
import copy
|
||||
|
||||
from ToolsConfig import *
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# coding=utf-8
|
||||
import copy
|
||||
from ToolsConfig import *
|
||||
|
||||
MOD_NAME = 'rtdd'
|
||||
MOD_VERSION = '0.0.1'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# coding=utf-8
|
||||
from SystemTools import *
|
||||
from SpecialFunciton.BlueFoxSystem import *
|
||||
from OtherTools import *
|
||||
from SpecialFunciton.BlueFoxSystem import *
|
||||
from SystemTools import *
|
||||
from ToolsConfig import *
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
# coding=utf-8
|
||||
import copy
|
||||
|
||||
from ..ToolsConfig import *
|
||||
from BlueFoxSystem import BlueFoxServerSystem
|
||||
from ..OtherTools import Mount
|
||||
from LocalCoord import FixPosition, OriginCoord, RotCoord, RotAxes, BlockFaceRot
|
||||
from ..OtherTools import Mount
|
||||
from ..ToolsConfig import *
|
||||
|
||||
blockBlocks = {}
|
||||
blockEntityDataComp = serverCompFactory.CreateBlockEntityData(LevelId)
|
||||
|
||||
-3
@@ -1,10 +1,7 @@
|
||||
# coding=utf-8
|
||||
from math import *
|
||||
from ..ToolsConfig import *
|
||||
import time
|
||||
|
||||
|
||||
|
||||
class GraduallySum(object):
|
||||
"""
|
||||
渐变数
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
# coding=utf-8
|
||||
|
||||
from ..ToolsConfig import *
|
||||
from ..ItemTools import IsSameItem, GetItemBaseInfoSafely, GetItemDurabilityPercent, DeclareItemAnyNum, IsItemDict
|
||||
from ..ScreenTools import ScreenTools
|
||||
from BlueFoxSystem import BlueFoxClientSystem
|
||||
from ..OtherTools import Mount, FixList
|
||||
from ControllableUi.Animation import MoveToPos
|
||||
from ..ItemTools import IsSameItem, GetItemBaseInfoSafely, GetItemDurabilityPercent, DeclareItemAnyNum, IsItemDict
|
||||
from ..OtherTools import Mount, FixList
|
||||
from ..ScreenTools import ScreenTools
|
||||
from ..ToolsConfig import *
|
||||
|
||||
|
||||
class SlotOffset(dict):
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
# coding=utf-8
|
||||
from ..ToolsConfig import clientBaseSystem, serverBaseSystem, clientCompFactory, LevelId
|
||||
from ..MolangTools import molangNames
|
||||
from ..OtherTools import mounts
|
||||
from ..ScreenTools import ScreenTools, RegisterScreenFastly
|
||||
from ..SystemTools import SystemTools
|
||||
from ..ToolsConfig import MOD_NAME, serverCompFactory, serverApi
|
||||
from ..ScreenTools import ScreenTools, RegisterScreenFastly
|
||||
from ..OtherTools import mounts
|
||||
from ..MolangTools import molangNames
|
||||
from ..ToolsConfig import clientBaseSystem, serverBaseSystem, clientCompFactory, LevelId
|
||||
|
||||
|
||||
class BlueFoxClientSystem(clientBaseSystem):
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
# coding=utf-8
|
||||
from BlueFoxMath import cos, sin, floor, pi, ceil, MatProduct
|
||||
from ..ToolsConfig import *
|
||||
|
||||
|
||||
def FixPosition(pos):
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
# coding=utf-8
|
||||
import copy
|
||||
|
||||
from ..ToolsConfig import *
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
# coding=utf-8
|
||||
from ..ToolsConfig import *
|
||||
import random
|
||||
|
||||
from ..ToolsConfig import *
|
||||
|
||||
|
||||
def Probability(odds):
|
||||
"""
|
||||
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
# coding=utf-8
|
||||
import copy
|
||||
|
||||
from ..OtherTools import AddTupleContext, GetDistance
|
||||
from ..ToolsConfig import *
|
||||
from ..OtherTools import GetDistance
|
||||
|
||||
routeControls = {} # 所有路径节点
|
||||
|
||||
|
||||
+4
-2
@@ -3,13 +3,15 @@ import math
|
||||
import random
|
||||
import re
|
||||
import time
|
||||
|
||||
import mod.client.extraClientApi as clientApi
|
||||
from mod.common.utils.mcmath import Matrix
|
||||
|
||||
from config.PlayConfig import PlayConfig
|
||||
from exception.NotClientSystemException import NotClientSystemException
|
||||
from exception.NotPlayConfigException import NotPlayConfigException
|
||||
from utils.SafeEval import SafeEval
|
||||
from .utils.CatmullRom import getCatmullromLerpFromKeyframe
|
||||
from exception.NotPlayConfigException import NotPlayConfigException
|
||||
from exception.NotClientSystemException import NotClientSystemException
|
||||
|
||||
compFactory = clientApi.GetEngineCompFactory()
|
||||
levelId = clientApi.GetLevelId()
|
||||
|
||||
+8
-4
@@ -51,8 +51,10 @@ def startListen(client):
|
||||
Camera.globalCameraObj.destroyListen()
|
||||
|
||||
_enable = True
|
||||
client.ListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "GameRenderTickEvent", cameraListenObj, cameraListenObj.GameRenderTickEvent, 10)
|
||||
client.ListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "HealthChangeClientEvent", cameraListenObj, cameraListenObj.HealthChangeClientEvent)
|
||||
client.ListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "GameRenderTickEvent",
|
||||
cameraListenObj, cameraListenObj.GameRenderTickEvent, 10)
|
||||
client.ListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "HealthChangeClientEvent",
|
||||
cameraListenObj, cameraListenObj.HealthChangeClientEvent)
|
||||
|
||||
|
||||
def stopListen(client, delayTime=0):
|
||||
@@ -74,8 +76,10 @@ def stopListen(client, delayTime=0):
|
||||
return
|
||||
|
||||
_enable = False
|
||||
client.UnListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "GameRenderTickEvent", cameraListenObj, cameraListenObj.GameRenderTickEvent)
|
||||
client.UnListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "HealthChangeClientEvent", cameraListenObj,
|
||||
client.UnListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "GameRenderTickEvent",
|
||||
cameraListenObj, cameraListenObj.GameRenderTickEvent)
|
||||
client.UnListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(),
|
||||
"HealthChangeClientEvent", cameraListenObj,
|
||||
cameraListenObj.HealthChangeClientEvent)
|
||||
|
||||
if delayTime > 0:
|
||||
|
||||
+12
-5
@@ -1,14 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import math
|
||||
import time
|
||||
|
||||
import mod.client.extraClientApi as clientApi
|
||||
|
||||
from .utils.CatmullRom import getCatmullromLerpFromKeyframe
|
||||
from .Camera import Camera, levelId, compFactory
|
||||
from .exception.NotClientSystemException import NotClientSystemException
|
||||
from .utils.CatmullRom import getCatmullromLerpFromKeyframe
|
||||
|
||||
|
||||
class Interpolation(object):
|
||||
|
||||
# 全局对象
|
||||
globalObj = None
|
||||
|
||||
@@ -40,7 +41,8 @@ class Interpolation(object):
|
||||
# 摄像机接口对象
|
||||
self.cameraComponentFactory = compFactory.CreateCamera(levelId)
|
||||
|
||||
self.client.ListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "GameRenderTickEvent", self, self.onGameRenderTick, 0)
|
||||
self.client.ListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(),
|
||||
"GameRenderTickEvent", self, self.onGameRenderTick, 0)
|
||||
|
||||
def onGameRenderTick(self, event):
|
||||
"""
|
||||
@@ -97,11 +99,14 @@ class Interpolation(object):
|
||||
self.tempRot[2] -= tempRot[2]
|
||||
|
||||
def stop(self):
|
||||
self.client.UnListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(), "GameRenderTickEvent", self, self.onGameRenderTick)
|
||||
self.client.UnListenForEvent(clientApi.GetEngineNamespace(), clientApi.GetEngineSystemName(),
|
||||
"GameRenderTickEvent", self, self.onGameRenderTick)
|
||||
Interpolation.globalObj = None
|
||||
if not self.isReturn and not self.cancelReturn:
|
||||
# 启动回正
|
||||
endTime = math.sqrt(self.tempRot[0] * self.tempRot[0] + self.tempRot[1] * self.tempRot[1] + self.tempRot[2] * self.tempRot[2])
|
||||
endTime = math.sqrt(
|
||||
self.tempRot[0] * self.tempRot[0] + self.tempRot[1] * self.tempRot[1] + self.tempRot[2] * self.tempRot[
|
||||
2])
|
||||
endTime *= 0.3
|
||||
keyframes = [
|
||||
(0.0, [0, 0, 0]),
|
||||
@@ -109,6 +114,7 @@ class Interpolation(object):
|
||||
]
|
||||
setInterpolation(self.client, keyframes, 1, isReturn=True)
|
||||
|
||||
|
||||
def setInterpolation(client, keyframes, index, speed=10.0, isReturn=False):
|
||||
"""
|
||||
设置插值
|
||||
@@ -131,6 +137,7 @@ def setInterpolation(client, keyframes, index, speed=10.0, isReturn=False):
|
||||
Interpolation.globalObj.updateTime = time.time()
|
||||
Interpolation.globalObj.index = index
|
||||
|
||||
|
||||
def stopInterpolation():
|
||||
"""
|
||||
停止插值
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@
|
||||
|
||||
class PlayConfig(object):
|
||||
|
||||
def __init__(self, isFirstPerson = False, isAllowDrag = False, isAllowMove = False, isPosFollowXRot = True, isPosFollowYRot = True, isZRotForceReturn = True, isZRotStartOrigin = False, isDelayOneFrame = True, isLockPerspective = True, tickPosFunc = None, tickRotFunc = None, playAfterFunc = None):
|
||||
def __init__(self, isFirstPerson=False, isAllowDrag=False, isAllowMove=False, isPosFollowXRot=True,
|
||||
isPosFollowYRot=True, isZRotForceReturn=True, isZRotStartOrigin=False, isDelayOneFrame=True,
|
||||
isLockPerspective=True, tickPosFunc=None, tickRotFunc=None, playAfterFunc=None):
|
||||
"""
|
||||
play 方法的参数对象
|
||||
|
||||
|
||||
+2
@@ -55,6 +55,7 @@ class SplineCurve:
|
||||
)
|
||||
return y
|
||||
|
||||
|
||||
def getCatmullromLerp(beforePlus, before, after, afterPlus, axis, alpha):
|
||||
"""
|
||||
Catmull-Rom 插值函数
|
||||
@@ -92,6 +93,7 @@ def getCatmullromLerp(beforePlus, before, after, afterPlus, axis, alpha):
|
||||
point = curve.getPoint(timeParam)
|
||||
return point
|
||||
|
||||
|
||||
def getCatmullromLerpFromKeyframe(keyframeArray, index, nowTime, axis):
|
||||
"""
|
||||
通过关键帧数组获取当前时间点的平滑插值
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from ..exception.SafeEvalException import SafeEvalException
|
||||
|
||||
|
||||
class SafeEval:
|
||||
def __init__(self):
|
||||
self.operators = {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# coding=utf-8
|
||||
import mod.server.extraServerApi as serverApi
|
||||
import mod.client.extraClientApi as clientApi
|
||||
from mod.common.mod import Mod
|
||||
from ModConfig import *
|
||||
import logging
|
||||
|
||||
import mod.client.extraClientApi as clientApi
|
||||
import mod.server.extraServerApi as serverApi
|
||||
|
||||
if False:
|
||||
from typing import *
|
||||
from mod.client.ui.controls.baseUIControl import *
|
||||
pass
|
||||
IsDebug = 1
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# coding=utf-8
|
||||
import time
|
||||
|
||||
from BlueFoxTools.SpecialFunciton.BlockBlock import BlockBlock
|
||||
from BlueFoxTools.ToolsConfig import *
|
||||
from BlueFoxTools.SystemTools import SystemTools
|
||||
from BlueFoxTools.ItemTools import CreateItemDict
|
||||
import ModUtil as util
|
||||
from BlueFoxTools.ItemTools import CreateItemDict
|
||||
from BlueFoxTools.SpecialFunciton.BlockBlock import BlockBlock
|
||||
from BlueFoxTools.SystemTools import SystemTools
|
||||
from BlueFoxTools.ToolsConfig import *
|
||||
|
||||
|
||||
class CookingStateEnum(object):
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# coding=utf-8
|
||||
from ...BlueFoxTools.SystemTools import SystemTools
|
||||
from ...BlueFoxTools.SpecialFunciton.BlueFoxSystem import BlueFoxClientSystem
|
||||
from ...BlueFoxTools.SystemTools import SystemTools
|
||||
from ...BlueFoxTools.ToolsConfig import *
|
||||
from ...BlueFoxTools.EventFilter import BlueFoxFilterEnum as ef
|
||||
from ...Function import blockIndex
|
||||
|
||||
|
||||
class MainClient(BlueFoxClientSystem):
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
from ...BlueFoxTools.SystemTools import SystemTools
|
||||
from ...BlueFoxTools.ModConfig import *
|
||||
from ...BlueFoxTools.SpecialFunciton.BlueFoxSystem import BlueFoxServerSystem
|
||||
from ...BlueFoxTools.EventFilter import BlueFoxFilterEnum as eF
|
||||
from ...BlueFoxTools.SpecialFunciton.BlueFoxSystem import BlueFoxServerSystem
|
||||
from ...Function import *
|
||||
from ...BlueFoxTools.SpecialFunciton.BlockBlock import GetLoadedBlockBlock, GetLoadedBlockBlockByPosDim
|
||||
from ...Function import GetBaseBlock
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from BlueFoxTools.ModLoader import *
|
||||
|
||||
from System.Server.MainServer import MainServer
|
||||
|
||||
if not serverApi.IsInServer():
|
||||
from System.Client.MainClient import MainClient
|
||||
pass
|
||||
LoadMod()
|
||||
@@ -12,10 +12,10 @@
|
||||
"min": [
|
||||
0,
|
||||
0.05,
|
||||
0.95
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
0.25,
|
||||
0.05,
|
||||
1,
|
||||
1
|
||||
]
|
||||
@@ -24,10 +24,10 @@
|
||||
"min": [
|
||||
0,
|
||||
0.05,
|
||||
0.95
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
0.3,
|
||||
0.1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
"min": [
|
||||
0,
|
||||
0,
|
||||
0.95
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
0.25,
|
||||
0.05,
|
||||
1,
|
||||
1
|
||||
]
|
||||
@@ -24,10 +24,10 @@
|
||||
"min": [
|
||||
0,
|
||||
0,
|
||||
0.95
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
0.3,
|
||||
0.1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
"min": [
|
||||
0,
|
||||
0,
|
||||
0.95
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
0.25,
|
||||
0.05,
|
||||
1,
|
||||
1
|
||||
]
|
||||
@@ -24,10 +24,10 @@
|
||||
"min": [
|
||||
0,
|
||||
0,
|
||||
0.95
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
0.3,
|
||||
0.1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user