Track LocalMods as part of monolith
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
local Api = require("ConsentRequiredExtended.Api")
|
||||
|
||||
local function isItemAffected(identifier)
|
||||
return Api.IsItemAffected(identifier)
|
||||
end
|
||||
|
||||
---@param item Barotrauma_Item Item being applied.
|
||||
---@param user Barotrauma_Character The character that is applying the item.
|
||||
---@param target Barotrauma_Character The character of the target of the item's application.
|
||||
local function OnItemApplied(item, user, target)
|
||||
if not NTConfig.Get("NTCRE_ConsentRequiredExtra", true) then
|
||||
return
|
||||
end
|
||||
local itemIdentifier = item.Prefab.Identifier.Value
|
||||
if isItemAffected(itemIdentifier) then
|
||||
Api.onAffectedItemApplied(user, target)
|
||||
end
|
||||
end
|
||||
|
||||
return OnItemApplied
|
||||
Reference in New Issue
Block a user