tModLoader

tModLoader

55 个评价
Pegasus Lib
   
奖励
收藏
已收藏
取消收藏
模组功能: 模组类库
模组端: 不同步
tModLoader版本: 1.4.4
语言: 英语
文件大小
发表于
更新日期
387.949 KB
2024 年 10 月 20 日 下午 4:48
8 月 21 日 下午 7:19
28 项改动说明 ( 查看 )

订阅以下载
Pegasus Lib

描述
A collection of code I found myself repeating and recommending to other modders

Includes:
A system to easily apply shaders to things drawn in multiple parts, and/or apply multiple shaders to one thing (ShaderLayerTargetHandler)
A strikethrough font which matches the character spacing of the MouseText font
A faster alternative to accessing fields through reflection (FastFieldInfo and FastStaticFieldInfo)
Automatic asset loading (AutoLoadingAsset)
Custom drawing while using or holding an item (ICustomDrawItem)
Various collision methods (CollisionExt)

To use (as a player):
Install and enable alongside a mod which uses it.

To use (as a modder):
Perform the normal setup to use a library mod.
During loading, call PegasusLib.PegasusLib.Require() with any PegasusLib.LibFeatures your mod needs, to ensure that features relying on them do not fail silently.
Alternatively, you can use PegasusLib.PegasusLib.IsFeatureErrored or PegasusLib.PegasusLib.OnFeatureError to handle any issues that may arise in whatever way suits your mod best.
These methods exist to ensure that tModLoader updates or mod incompatibilities only interfere with mods that actually use the features they cause errors with, so that players can continue using your mod without having to wait for features it doesn't use to be fixed.
引用自 tModLoader PegasusLib
Developed By Moonlight Glint
8 条留言
Moonlight Glint  [作者] 8 月 21 日 下午 11:16 
This is no longer an entirely pure library mod as one of the features I wanted it to make available to multiple mods would apply to vanilla, but you can change 2 settings to disable the feature and make it only change 2 inaccurate item tooltips on its own.
Fluffy Moff 7 月 31 日 下午 4:12 
It worked! You really are fricken amazing!
Moonlight Glint  [作者] 7 月 31 日 下午 12:24 
Fixed
Moonlight Glint  [作者] 7 月 29 日 下午 9:50 
That's an interesting error, I'll try to fix it, but for the time being there's a workaround, if you disable the automatic reload after changing mods you can just exit and re-enter the game; Given that bypasses the unloading process it shouldn't even be much slower.
Fluffy Moff 7 月 29 日 下午 7:59 
Mod is now broken. Trying to unload it at all makes it so the game has to close with the Error of "PegasusLib was unable to unload properly" Where something called PegasusLib.ExtraDyeSlots "threw an exception"
wurt 7 月 22 日 下午 8:44 
k :SBpenguin:
Moonlight Glint  [作者] 7 月 22 日 下午 8:41 
I try to ensure that it always does.
wurt 7 月 22 日 下午 8:39 
does it work
:steamthumbsup::steamthumbsdown: