How to make an item apply a ModExtension to another item?

Started by BrockLee, May 21, 2021, 09:49:39 PM

Previous topic - Next topic

BrockLee

So I've been trying to figure out how to get one item to apply a defmodextension to another item.

I'm working on a personal mod adding some new custom tents to the Camping Tent mod. My mod is piggybacking on the code of the said mod, and I want to have an air conditioner unit as a linkable facility that, placed adjacent to a tent, will apply (or possibly replace) the extension.

I've tried a couple of approaches, but they keep applying the extension to the linkable itself.

Any ideas would be appreciated 

RawCode

when you specify list inside def extension, it's addition to existing list, unlike "normal" fields that is direct replacement.

if you want to replace list, you must explicitly clean it first and then add new items.