Github copilot
的翻译(甚至这句话也是copilot
翻译的)
copilot
翻译的(当然,也有可能是Easy Translate
翻译的)Github copilot
for translate (lazy yes!)
copilot
0.8.0.0
+ DR_api 0.1.0.0
+ DR_rs 0.2.7.0
+ 15啊哈! mod 加载来啦!
啊啊啊啊啊 大重构 api
现在控制台是 真 多线程了
0.1.0.0
ModInfo
on_load(game: Game, old_self: Optional[ModInfo]) -> bool
game
: Game 对象 用于存储 DR SDK 的信息old_self
: 旧的 ModInfo 对象, 可以用于从上次加载中恢复信息on_client_start(game: Game, client: ClientWindow) -> None
game
: Game 对象 用于存储 DR SDK 的信息client
: ClientWindow 对象 用于传递客户端状态on_client_stop(game: Game, client: ClientWindow, source: str = 'window')
game
: Game 对象 用于存储 DR SDK 的信息client
: ClientWindow 对象 用于传递客户端状态source
: 关闭调用的来源0.2.7.0
__init__.py
SR1Ship_rs
的 typing
name
description
lift_off
touch_ground
img_pos() -> Tuple[int, int, int, int]
SR1Ship_rs
SR1Ship_rs
types::SR1PartData
get_box(&self, part_type: &SR1PartType) -> (f64, f64, f64, f64)
types::SR1Ship
from_file
Console_rs
game.config
DR_option
& DR_runtime
(long_version
15
)
DR_rust
部分
DR_rust
partclient
不会在 setup()
中调用 DR_runtime
的 find_mods()
方法
client
will not call the find_mods()
method of DR_runtime
in setup()
Difficult_Rocket.crash
write_options
methodwrite_markdown_tablet
method
Option().as_markdown()
Difficult_Rocket.utils.new_thread
Diffiuclt_Rocket.utils.thread
Difficult_Rocket.utils.thread
Threads
main.toml
game.mods.path
Difficult_Rocket.mod.MODInfo
-> Difficult_Rocket.api.mod.ModInfo
Difficult_Rocket.DR_runtime
mod_path: str
字段DR_Mod_List: List[Tuple[str, Version]]
字段load_mods() -> None
方法find_mods -> List[str]
方法
mod_path: str
fieldDR_Mod_List: List[Tuple[str, Version]]
fieldload_mods() -> None
methodfind_mods -> List[str]
methodutils.new_thread
Difficult_Rocket.api
Difficult_Rocket.api.types.Options
( Difficult_Rocket.utils.options.Options
)
options
-> _options
option_with_len(self) ->
List[Union[List[Tuple[str, Any, Any]], int, Any]]:
-> Tuple[List[Tuple[str, Union[Any, Type], Type]], int, int, int]
Difficult_Roocket.main.Game
Options
完全重构init mods
init console
init logger
load_file
Options
init mods
init console
init logger
load_file
Difficult_Rocket.command.api.CommandText
find
-> re_find
Difficult_Rocket.api.types.Options
( Difficult_Rocket.utils.options.Options
)
as_markdown
方法
Options
类的所有字段as_markdown
method
Options
class in a human-readable Markdown formatDifficult_Rocket.command.api.CommandText
添加基于 str.find
的 find(text: str) -> bool
方法
Add method find(text: str)
based on str.find
howto/translate.md
SUMMARY.md
howto/translate.md
howto/game/readme.md
contributors
-> Contributing
ModInfo
on_load(game: Game, old_self: Optional[ModInfo]) -> bool
game
: Game 对象 用于存储 DR SDK 的信息old_self
: 旧的 ModInfo 对象, 可以用于从上次加载中恢复信息game
: Game object used to store information about the DR SDKold_self
: Old ModInfo object, can be used to restore information from the last load0.7.2.2
+ DR_rs 0.2.6.1
+ DR_api 0.0.2.0
+ 14python::translate::Translate
Difficult_Rocket.utils.translate
Difficult_Rocket.utils.translate
in Rusttypes::sr1::SR1PartData
SR1PartDataTrait
RawPartData
和 SR1PartData
attr
的 Option<T>
SR1PartDataTrait
RawPartData
and SR1PartData
Option<T>
of the field attr
types::sr1::SR1PartDataAttr
None
选项
None
optionSR1PartDataTrait
to_sr_part_data
to_raw_part_data
0.0.2.0
api.screen
的变化
api.screen
DR.py
os.curdir
os.path.abspath(os.curdir)
configs/dock1.xml
DisconnectedParts
部分DisconnectedParts
partDifficult_Rocket.crash
write_cache
函数 -> write_cache
和 write_info_to_cache
write_cache
function -> write_cache
and write_info_to_cache
crash
的)
crash
)api.screen
BaseScreen
pyglet
提供的函数添加类型提示
pyglet
api.screen
BaseScreen
window: "ClientWindow"
参数window: "ClientWindow"
parametermain.env.version
python
DR
DR_rs
pyglet
pyglet_rs
mods
路径不存在时 游戏会崩溃的 bug
mods
path does not existWerFault.exe
会跳出来卡住程序的 bug
WerFault.exe
will pop up and block the program when the game crashes / exits from the console0.7.2.1
Difficult_Rocket.utils.translate
_
_
to all built-in fields0.7.2.0
language_set_to
: 设置到对应语言时输出
language_available
: 可用的语言列表
client
config.save.start
config.save.done
Difficult_Rocket.utils.translate
Tr
_language
(@property
) 字段_language
(@property
) fieldinit_translate
lang
参数lang
parametergame.require_DR_rs
DR_rs
才能运行的部分
DR_rs
to runlanguage
TranslateFileNotFound
-> TranslateFileError
lang <language>
lang
命令lang <language>
lang
commandlang <language>
0.7.1.5
+ Build 1.2.1.0
+ DR_rs 0.2.5.6
~0.2.6.0
+ DR_api 0.0.1.0
client.sr1_render
setup.done
setup.use_time
xml.loading
xml.load_done
xml.load_time
ship.load
ship.load_time
ship.info
ship.render.done
server.use_time
client.setup.done
-> client.setup.start
window.setup.done
-> window.setup.start
server.setup.done
-> server.setup.start
dsm.py
dsm.py
BaseScreen
的定义
BaseScreen
cargo fmt
了一遍
cargo fmt
the whole projecttypes::sr1::SR1PartData
types::sr1::SR1PartAttr
-> types::sr1::SR1PartTypeAttr
types::sr1::SR1PartDataAttr
CenterCamera_rs
放回去了
CenterCamera_rs
CenterCamera_rs
back
CenterCamera_rs
Difficult_Rocket.client.render.sr1_ship
Camera_rs
-> CenterCamera_rs
from x import *
from x import *
in the following files
Difficult_Rocket.api.exception.command
Difficult_Rocket.api.exception.logger
Difficult_Rocket.api.exception.threading
Difficult_Rocket.api.exception.unsupport
Difficult_Rocket.client.__init__
Difficult_Rocket.exception.language
Difficult_Rocket.utils.translate
libs.utils.logger
pyproject.toml
中 tool.ruff
的不必要规则忽略
tool.ruff
of pyproject.toml
0.7.1.4
+ DR_rs 0.2.5.4/5
SR1PartType
和 RawPartType
的数据转换方法
Rcs
字段 实际上检测的是 Tank
的问题SR1PartType
and RawPartType
Rcs
field is Tank
SR1PartType
和 RawPartType
的转换0.7.1.3
+ DR_rs 0.2.5.3
+ API 0.0.0.1
+ 13没别的内容了
version.md
记录了 1.0.0.0
的 Semver++
version.md
records the Semver++
of 1.0.0.0
DR_rs
V 0.2.5.30.2.5.2
-> 0.2.5.3
sr1_data.rs
types.rs
pub
的结构体字段PartType
-> RawPartType
PartList
-> RawPartList
types.rs
中多余的 PartTypes
方法Damage
实现了 to_damage
方法RawPartType
实现了 to_sr_part_type
方法
SR1PartTypeData
特征
RawPartType
和 SR1PartType
的互相转换sr1_data.rs
的各类数据结构做了向 types.rs
的转换
简直折磨人
public some forgotten pub
fields
modify some struct name
PartType
-> RawPartType
PartList
-> RawPartList
remove redundant PartTypes
method in types.rs
implement to_damage
method for Damage
implement to_sr_part_type
method for RawPartType
add trait SR1PartTypeData
RawPartType
and SR1PartType
to each otheradd convert from sr1_data.rs
to types.rs
DR_rs
V 0.2.5.20.2.5.0
-> 0.2.5.2
sr1_data.rs
PartList.xml
了PartList
对象
PartList.xml
completelyPartList
object after parsingtypes.rs
PartTypes
使其匹配原始 PartList.xml
的数据内容Difficult_Rocket.client.fps.fps_log
FpsLogger
pyglet
Difficult_Rocket.api.__init__.
from .delivery import Delivery
from .delivery import Delivery
.github/workflows/after_compile.py
-> .github/workflows/post_compile.py
libs/Difficult_Rocket_rs/src/after_build.py
-> libs/Difficult_Rocket_rs/src/post_build.py
Difficult_Rocket.crash.crash
-> Difficult_Rocket.crash
get_buf
test.png
ClientWindow
启动参数的设置, 实装 ClientOption 的使用SR1PartData
的字段 type_
重命名为 p_type
DR_Rs
SR1PartData
的位置
SR1PartData
添加了 connections: Option<Vec<(usize, usize)>>
的字段淦, 忘记步进版本号了(
Translate
毕竟加了一整个 DR_rs
libs.Difficult_Rocket_rs
(DR_rs
) 0.1.0.0
get_version_str
DR_rs
的版本号 可以用于检查我有没有忘记跑 after_build.py
Version
对象 问就是懒得转换better_update_pats
SR1ShipRender.update_parts
的性能
PartDatas
PyObj
里 暗 渡 陈 仓 装 HashMap<uszie, SR1PartData>
Camera_rs
sr1
的命令不大好使,改成 debug
了render
reset
Translates
0.6 还得来几个版本号
stop
fps
log
min
max
default
render
sr1
delta
mouse
delta
CommandText
里的离谱代码tools.load_file
的逻辑(其实是几个版本之前的改动CommandText.match
-> CommandText.re_match
macosx
分支Translates
的优化
Tr
的优化
Translates
配套Difficult_Rocket_rs
pyo3
Logger!
Github Action
的自动 buildutils.translates
中的字体名称常量移动至 api.types.Fonts
中README-cn.md
( 合并到 README.md
中 )README.md
与 README-en.md
的内容统一requirement.txt
的内容 ( 使内容更加有条理性 )Toml
文件 ( 使其更加规范 )screen api
pyglet
版本main.config
logger
nuitka.yml
icon
api/Exp
改为文件夹 api/Exp/__init__.py
client.load_fonts()
现在改为直接加载单独的 pyglet_load_fonts_folder()
command/
里的一大堆东西libs.MCDR
文件夹 (new_thread
没有包含在内)
libs.MCDR
folder (new_thread
not included)争取12月内发一个release
行了,这都2022年了,我接着摸,等我考完试(20220110)再发
20220207 可算是发了,ruaaaa
Difficult_Rocket.py
-> DR.py
Pycharm
检测模块时总是会把主文件检测成主程序,导致一些模块总是检测不到的问题
Difficult_Rocket.py
-> DR.py
Pycharm
module detection problem
api/translate
移动到根目录下
api/translate
to root directoryclient.load_fonts()
client.load_fonts()
tools.load_file()
的错误处理和 .config
文件的解析方式
.config
文件解析后会直接返回一个 ConfigParser
对象.config
文件返回的解析 .config
文件来修改 .config
文件
tools.load_file()
error handling and .config
file parsing method
.config
file parsing after return ConfigParser
object.config
file return parsing .config
file to modify .config
filepyglet
添加 Ctrl+C
和 Ctrl+V
的快捷键解析
Ctrl+C
and Ctrl+V
shortcut for pyglet
pyglet
到 2.0dev13
pyglet
to 2.0dev13
log_tick
指令改为 fps log
log_tick
change to fps log
maxfps
指令改为 fps max
maxfps
change to fps max
minfps
指令改为 fps min
minfps
change to fps min
命令内容输出使用CommandText
而不是str
CommandText.match
来匹配命令内容CommandText
instead of str
CommandText.match
to match command content命令解析现在使用新的CommandText.match
CommandText.match
Cascadia_Code
Cascadia_Code
xmltodict
pyperclip
xmltodict
pyperclip
json5
pyglet
pyperclip
xmltodict
的协议
json5
pyglet
pyperclip
xmltodict
LICENSE
HTMLLabel
的 HTMLformatedLabel
decode_text2HTML
工具(这也是咕咕咕的一大部分原因)HTMLformatedLabel
Label based on HTMLLabel
decode_text2HTML
tool (also a big reason why lazy)toml
和对应的 LICENSE.txt
toml
and corresponding LICENSE.txt
Difficult Rocket
只适用于 python3.8+
:=
的使用Difficult Rocket
will only fit python3.8+
:=
HarmonyOS_Sans
HarmonyOS_Sans
Difficult_Rocket.graphics.widgets.Parts
libs/fonts
have HarmonyOS_Sans
fonton_key_press
and on_key_release
and on_text
on_key_press
和 on_key_release
和 on_text
的处理方式game.config
config filelang/en-us.json5
now up to date with lang/zh-CN.json5
translate/Lang.翻译
same as Lang.lang
command/CommandLine
to render command line@new_thread
now can option if log this thread to crash
or notstart.cmd
witch could debug easierwindow
message.text
command.text
text.motion
text.motion_select
setup.use_time_ns
fonts.found
game.input_stop
game.command_stop
game.window_stop
game.stop_get
game.stop
game.end
client
setup.use_time_ns
t
to call out a message window
/
to open command line/min_fps
/max_fps
/stop
/default
Difficult_Rocket
_test_
prefixpyglet
pypy3.10
(well······ not success (because OpenGL, blame it))crash-report
have more informationpyglet.app.run()
use multiprocesslibs/
lib when using pyglet
or json5
tools.config()
is tools.load_file()
lang
file have server``client
and window
DEBUGGING
to test or check game run stats
True
it will always make a crash reportDifficult_Rocket.api.translate.Lang
can be used to auto translate text in configs/lang/xxx.json5
translate.tr[xxx]
to use translated info.format
to format info's {}
Lang
will try to find translate in default language translatezh-CN
)crash
now have more information about multiprocessclient
logs/
is not found logger will info logger.mkdir
0.5.2
client.Client
and server.Server
only use net_mode
optionapi.new_thread
have no more extra line of testingconfigs/view.json5
now removedmouse.release
and language
to en-uslanguage
to zh-CN
tr.lang(xx, xx)
that can solve error on getting item from lang file
tr[xxx]
can also use but won't solve error when item not foundtr.lang(xx, xx)
client
tools/format_bool
now use more clever way to formaton_resize(self, width, height):
in client
bin/crash/create_crash_report
bin/api/Exp.py
some Exceptionbin/api/translate
to create a translate
class that can reload languagesys.path.append()
andtry: import xxx except: from bin import xxx
has been removedServer
now use Dev to delivery message between thread(will be done in 0.6.0)_test_*.py
for namescrash.py
to handle and create crash report (not done)DragSprite
(maybe will add in future pyglet update PR has been published)name_hanlder
in configs.py
(*args, **kwargs)
to set upzh-cn
-> zh-CN
configs/main.config
to configon_mouse_click
function's debug message now use self.lang
to debug message (witch is multi-language)logging.getLogger()
[window_default]
in configs/main.config
PID
and PPID
info as INFO
client
now change to ClientWindow
new_thread.py
link of stackoverflow have an extra 'find' in the middle REMOVEDnew_thread.py
now can use @new_thread to get a threaded funREADME.md
and README-cn.md
change URL to file pathREADME.md
and README-cn.md
some label style changepyglet
upgrade from 1.5.16
-> 1.5.18
json5
upgrade from 0.9.5
-> 0.9.6
tools.config()
way of raise error change tools.report_file_error()
tools.cb()
change name to tools.format_bool()
test_config_file.py
test_for_speed.py
test_logging_conf.py
test_speed_of_sprite.py
best3.8+
(lang name)(actually is debugging)PS:
Va.b.c
a : Big Version (Big rewrite times) (now at DEMO making)
b : Middle Rewrite Times (Yes I've rewritten for 4 times)
c : normal updates
tools.name_handler()
now use str.format
to handler strDR/sys_value
folder now move to DR/configs/sys_value
tools.name_handler()
use bug(cause crashes){date}
can be successful use in tools.name_handler()
(if you define the format of date)xxxx-xx-xx xx-xx-xx DR.log
but be {date} DR.log
)pyglet 1.5.15
json5 0.9.5
PS: now I'm not sure witch lib will be import first
the local lib or the pip libs
So I'll add some other code to make sure that DR will first try to import pip libs
not the local libs (todo)