饥荒联机版

饥荒联机版

闪亮战利品
 此主题已被置顶,因此可能具有重要性
Leonidas IV  [开发者] 6 月 29 日 下午 6:34
🔧 Mod Support
Shiny Loot supports other mods! You can define custom logic to decide when your prefabs should shine.

📦 How to add support for your prefab

Add the following code to your modmain.lua file:

TUNING.SHINY_LOOT_MOD_DEFS = TUNING.SHINY_LOOT_MOD_DEFS or {} TUNING.SHINY_LOOT_MOD_DEFS[prefab] = TestFunction

📝 Parameters

prefab (string):

  • The name of the prefab you want to support.

TestFunction (function or string):

  • This function is called whenever an instance of the specified prefab is spawned. It checks nearby entities to determine whether the prefab should shine.

See the code at the end of the modmain file for more details.
Shiny Loot's mod id is 3371086303.

✅ Examples

TUNING.SHINY_LOOT_MOD_DEFS = TUNING.SHINY_LOOT_MOD_DEFS or {} TUNING.SHINY_LOOT_MOD_DEFS["fire_crystal"] = FireCrystalTest TUNING.SHINY_LOOT_MOD_DEFS["shadow_pickaxe_blueprint"] = "CreatureTest" TUNING.SHINY_LOOT_MOD_DEFS["glass_tear"] = GlassTearTest

Please let me know if you have any questions! Happy modding :)
最后由 Leonidas IV 编辑于; 6 月 29 日 下午 6:39