边缘世界 RimWorld

边缘世界 RimWorld

评价数不足
Brawler-Friendly
   
奖励
收藏
已收藏
取消收藏
Mod, 1.6
文件大小
发表于
49.250 KB
6 月 28 日 上午 7:42
1 项改动说明 ( 查看 )

订阅以下载
Brawler-Friendly

在 Zaljerem 的 1 个合集中
Zal's Original Mods
106 件物品
描述
This mod allows you to add a modExtension to a ranged weapon so brawlers can use it without penalty.

It's really made for modders who were using VEF's (entirely different) implementation that has been removed for 1.6, but it's certainly usable by anyone who wants to add a modExtension to a ThingDef. :)

Feel free to put the assembly directly into your mod rather than using this as a dependency.
MIT License

modExtension:
<modExtensions> <li Class="BrawlerFriendly.DefModExtension_BrawlerFriendly" /> </modExtensions>

Background and technical info:

Vanilla Expanded Framework had this functionality until 1.6. When, at Taranchuk's suggestion, I went to examine the code to hopefully get it working and back into the Framework, I realized that it is overly-convoluted and complex. I fell back to my standard mode: "What's the simplest possible thing that can work?" ... so I rolled my own:

- modExtension for the weapon ThingDef - for detection
- Harmony postfix to Alert_BrawlerHasRangedWeapon.GetReport - addresses the alert message
- Harmony prefix to ThingDef.IsRangedWeapon (getter) - addresses the right-click equip warning
- Harmony prefix to ThoughtWorker_IsCarryingRangedWeapon.CurrentStateInternal - addresses the bad thought

Source code included.
Github:
https://github.com/Zaljerem/BrawlerFriendly
2 条留言
Cyber Witch ~ 6 月 29 日 上午 11:17 
Hey thanks a lot. I have a lot of gun mods with meele attachements so thats nice
Kimo' 6 月 28 日 上午 8:06 
Thank you Zal, This will definitely be useful!