DR -> DR SDK #16
@ -5,7 +5,7 @@
|
||||
# -------------------------------
|
||||
|
||||
# system function
|
||||
from typing import Tuple, List
|
||||
from typing import Tuple, List, Optional
|
||||
|
||||
# from libs
|
||||
from MCDR.version import Version
|
||||
@ -25,7 +25,6 @@ RequireVersion = Tuple[Version, Version]
|
||||
ForceRequire = bool
|
||||
|
||||
|
||||
# TODO 完善中
|
||||
class ModInfo(Options):
|
||||
"""
|
||||
加载mod时候的参数
|
||||
@ -52,8 +51,12 @@ class ModInfo(Options):
|
||||
|
||||
"""mod 配置"""
|
||||
config: Options = Options() # mod 配置存储
|
||||
old_mod: Optional["ModInfo"] = None # 旧的mod实例
|
||||
|
||||
def on_load(self):
|
||||
""" 加载时调用 """
|
||||
print(f'Mod {self.mod_id} loaded')
|
||||
|
||||
"""
|
||||
一些重置用函数
|
||||
"""
|
||||
def on_unload(self):
|
||||
""" 卸载时调用 """
|
||||
print(f'Mod {self.mod_id} unloaded')
|
||||
|
20
biggit.ps1
Normal file
20
biggit.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
$objects = git verify-pack -v .git/objects/pack/pack-aba4bfc55979194c86dbd466c86e57d8199ae7ad.idx | Select-String -Pattern 'chain' -NotMatch | ForEach-Object {$_.Line} | Sort-Object -Property @{Expression={$_.Split(" ")[2]}; Ascending=$false} | Select-Object -First 50
|
||||
|
||||
Write-Output "All sizes are in kB. The pack column is the size of the object, compressed, inside the pack file."
|
||||
|
||||
$output = "size,pack,SHA,location"
|
||||
foreach ($y in $objects) {
|
||||
# extract the size in bytes
|
||||
$size = [int]($y.Split(" ")[4]/1024)
|
||||
# extract the compressed size in bytes
|
||||
$compressedSize = [int]($y.Split(" ")[5]/1024)
|
||||
# extract the SHA
|
||||
$sha = $y.Split(" ")[0]
|
||||
# find the objects location in the repository tree
|
||||
$other = git rev-list --all --objects | Select-String $sha
|
||||
$output += "`n${size},${compressedSize},${other}"
|
||||
}
|
||||
|
||||
Write-Output $output | ConvertFrom-Csv -Delimiter "," | Format-Table
|
||||
Pause
|
@ -4,11 +4,31 @@
|
||||
# All rights reserved
|
||||
# -------------------------------
|
||||
|
||||
from .sr1_ship import SR1ShipRender
|
||||
|
||||
from MCDR.version import Version
|
||||
from Difficult_Rocket.api.mod import ModInfo
|
||||
from Difficult_Rocket.client import ClientWindow
|
||||
|
||||
INFO = ModInfo(
|
||||
mod_id="Difficult_Rocket_mod",
|
||||
name="Difficult_Rocket_mod",
|
||||
version=Version("0.7.2.0")
|
||||
)
|
||||
|
||||
class DR_mod(ModInfo):
|
||||
|
||||
mod_id = "Difficult_Rocket_mod"
|
||||
name = "Difficult Rocket mod"
|
||||
version = Version("0.7.2.2")
|
||||
|
||||
writer = "shenjackyuanjie"
|
||||
link = "shenjack.top"
|
||||
description = "Difficult Rocket mod (where the game implement)"
|
||||
info = "Difficult Rocket mod (where the game implement)"
|
||||
|
||||
# DR_version = # DR SDK 兼容版本
|
||||
# 反正是内置 mod 跟着最新版本的 DR 走就行了
|
||||
# DR_Api_version = # DR Api版本
|
||||
# 同理 不管 API 版本 这东西要是不兼容了才是大问题
|
||||
|
||||
def on_load(self):
|
||||
...
|
||||
|
||||
|
||||
mod_class = DR_mod
|
||||
|
@ -20,7 +20,6 @@ from pyglet.text import Label
|
||||
from pyglet.shapes import Line
|
||||
from pyglet.sprite import Sprite
|
||||
from pyglet.graphics import Batch, Group
|
||||
from pyglet.image import load as load_image
|
||||
|
||||
# Difficult Rocket
|
||||
from Difficult_Rocket import DR_option
|
||||
|
Loading…
Reference in New Issue
Block a user