mirror of
https://github.com/baiqwerdvd/ArknightsUID.git
synced 2025-05-05 03:23:45 +08:00
适配低等级skd model
This commit is contained in:
parent
d3db936d70
commit
bf6c1dde26
@ -204,64 +204,75 @@ async def draw_ap_img(uid: str) -> Image.Image:
|
|||||||
img.paste(blue_bar_bg1_img, (-20, 800), blue_bar_bg1_img)
|
img.paste(blue_bar_bg1_img, (-20, 800), blue_bar_bg1_img)
|
||||||
|
|
||||||
# recruit refresh check
|
# recruit refresh check
|
||||||
recruit_refresh = player_info.building.hire.refreshCount
|
if player_info.building.hire:
|
||||||
if recruit_refresh == 0:
|
if player_info.building.hire.refreshCount == 0:
|
||||||
|
grey_bar_bg1_img = grey_bar_bg1.copy()
|
||||||
|
grey_bar_bg1_draw = ImageDraw.Draw(grey_bar_bg1_img)
|
||||||
|
complete_work_time = player_info.building.hire.completeWorkTime
|
||||||
|
# 获取当前时间与 completeWorkTime 的时间差, 转换为几小时几分钟
|
||||||
|
now = datetime.now()
|
||||||
|
complete_work_time = datetime.fromtimestamp(complete_work_time)
|
||||||
|
delta = complete_work_time - now
|
||||||
|
delta_hour = delta.seconds // 3600
|
||||||
|
delta_minute = (delta.seconds - delta_hour * 3600) // 60
|
||||||
|
grey_bar_bg1_draw.text(
|
||||||
|
(170, 60),
|
||||||
|
'公开刷新',
|
||||||
|
font=sans_font_34,
|
||||||
|
fill=first_color,
|
||||||
|
anchor='lm',
|
||||||
|
)
|
||||||
|
grey_bar_bg1_draw.text(
|
||||||
|
(540, 70),
|
||||||
|
f'{delta_hour}小时{delta_minute}分钟后获取刷新次数',
|
||||||
|
font=sans_font_18,
|
||||||
|
fill=first_color,
|
||||||
|
anchor='rm',
|
||||||
|
)
|
||||||
|
grey_bar_bg1_draw.text(
|
||||||
|
xy=(777, 58),
|
||||||
|
text='联络中',
|
||||||
|
font=sans_font_34,
|
||||||
|
fill=white_color,
|
||||||
|
anchor='rm',
|
||||||
|
)
|
||||||
|
img.paste(grey_bar_bg1_img, (-20, 910), grey_bar_bg1_img)
|
||||||
|
else:
|
||||||
|
blue_bar_bg1_img = blue_bar_bg1.copy()
|
||||||
|
blue_bar_bg1_draw = ImageDraw.Draw(blue_bar_bg1_img)
|
||||||
|
blue_bar_bg1_draw.text(
|
||||||
|
(170, 60),
|
||||||
|
'公开招募刷新',
|
||||||
|
font=sans_font_34,
|
||||||
|
fill=first_color,
|
||||||
|
anchor='lm',
|
||||||
|
)
|
||||||
|
blue_bar_bg1_draw.text(
|
||||||
|
(540, 70),
|
||||||
|
'可进行公开招募刷新',
|
||||||
|
font=sans_font_18,
|
||||||
|
fill=first_color,
|
||||||
|
anchor='rm',
|
||||||
|
)
|
||||||
|
blue_bar_bg1_draw.text(
|
||||||
|
xy=(777, 58),
|
||||||
|
text='可刷新',
|
||||||
|
font=sans_font_34,
|
||||||
|
fill=white_color,
|
||||||
|
anchor='rm',
|
||||||
|
)
|
||||||
|
img.paste(blue_bar_bg1_img, (-20, 910), blue_bar_bg1_img)
|
||||||
|
else:
|
||||||
grey_bar_bg1_img = grey_bar_bg1.copy()
|
grey_bar_bg1_img = grey_bar_bg1.copy()
|
||||||
grey_bar_bg1_draw = ImageDraw.Draw(grey_bar_bg1_img)
|
grey_bar_bg1_draw = ImageDraw.Draw(grey_bar_bg1_img)
|
||||||
complete_work_time = player_info.building.hire.completeWorkTime
|
|
||||||
# 获取当前时间与 completeWorkTime 的时间差, 转换为几小时几分钟
|
|
||||||
now = datetime.now()
|
|
||||||
complete_work_time = datetime.fromtimestamp(complete_work_time)
|
|
||||||
delta = complete_work_time - now
|
|
||||||
delta_hour = delta.seconds // 3600
|
|
||||||
delta_minute = (delta.seconds - delta_hour * 3600) // 60
|
|
||||||
grey_bar_bg1_draw.text(
|
grey_bar_bg1_draw.text(
|
||||||
(170, 60),
|
(170, 60),
|
||||||
'公开刷新',
|
'暂无数据',
|
||||||
font=sans_font_34,
|
font=sans_font_34,
|
||||||
fill=first_color,
|
fill=first_color,
|
||||||
anchor='lm',
|
anchor='lm',
|
||||||
)
|
)
|
||||||
grey_bar_bg1_draw.text(
|
|
||||||
(540, 70),
|
|
||||||
f'{delta_hour}小时{delta_minute}分钟后获取刷新次数',
|
|
||||||
font=sans_font_18,
|
|
||||||
fill=first_color,
|
|
||||||
anchor='rm',
|
|
||||||
)
|
|
||||||
grey_bar_bg1_draw.text(
|
|
||||||
xy=(777, 58),
|
|
||||||
text='联络中',
|
|
||||||
font=sans_font_34,
|
|
||||||
fill=white_color,
|
|
||||||
anchor='rm',
|
|
||||||
)
|
|
||||||
img.paste(grey_bar_bg1_img, (-20, 910), grey_bar_bg1_img)
|
img.paste(grey_bar_bg1_img, (-20, 910), grey_bar_bg1_img)
|
||||||
else:
|
|
||||||
blue_bar_bg1_img = blue_bar_bg1.copy()
|
|
||||||
blue_bar_bg1_draw = ImageDraw.Draw(blue_bar_bg1_img)
|
|
||||||
blue_bar_bg1_draw.text(
|
|
||||||
(170, 60),
|
|
||||||
'公开招募刷新',
|
|
||||||
font=sans_font_34,
|
|
||||||
fill=first_color,
|
|
||||||
anchor='lm',
|
|
||||||
)
|
|
||||||
blue_bar_bg1_draw.text(
|
|
||||||
(540, 70),
|
|
||||||
'可进行公开招募刷新',
|
|
||||||
font=sans_font_18,
|
|
||||||
fill=first_color,
|
|
||||||
anchor='rm',
|
|
||||||
)
|
|
||||||
blue_bar_bg1_draw.text(
|
|
||||||
xy=(777, 58),
|
|
||||||
text='可刷新',
|
|
||||||
font=sans_font_34,
|
|
||||||
fill=white_color,
|
|
||||||
anchor='rm',
|
|
||||||
)
|
|
||||||
img.paste(blue_bar_bg1_img, (-20, 910), blue_bar_bg1_img)
|
|
||||||
|
|
||||||
# training char check
|
# training char check
|
||||||
if player_info.building.training:
|
if player_info.building.training:
|
||||||
|
@ -501,17 +501,17 @@ class BuildingTiredChar(Struct):
|
|||||||
|
|
||||||
|
|
||||||
class PlayerBuilding(Struct):
|
class PlayerBuilding(Struct):
|
||||||
tiredChars: list[BuildingTiredChar]
|
tiredChars: list[BuildingTiredChar] | None
|
||||||
powers: list[BuildingPower]
|
powers: list[BuildingPower] | None
|
||||||
manufactures: list[BuildingManufactures]
|
manufactures: list[BuildingManufactures] | None
|
||||||
tradings: list[BuildingTradings]
|
tradings: list[BuildingTradings] | None
|
||||||
dormitories: list[BuildingDormitories]
|
dormitories: list[BuildingDormitories] | None
|
||||||
meeting: BuildingMeeting
|
meeting: BuildingMeeting | None
|
||||||
hire: BuildingHire
|
hire: BuildingHire | None
|
||||||
labor: BuildingLabor
|
labor: BuildingLabor
|
||||||
furniture: BuildingFurniture
|
furniture: BuildingFurniture
|
||||||
elevators: list[BuildingElevator]
|
elevators: list[BuildingElevator]
|
||||||
corridors: list[BuildingCorridor]
|
corridors: list[BuildingCorridor] | None
|
||||||
control: BuildingControl
|
control: BuildingControl
|
||||||
training: BuildingTraining | None = None
|
training: BuildingTraining | None = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user