Page MenuHomeFeedback Tracker

ActionDismantlePart to make codelock fall off
Assigned, UrgentPublic

Description

I've asked Impuls and Sumrak, and I got a remark that I should try here .....

I'm trying to revive the Old MoreDoors mod and made it more codelock compatible.

I got the attach function going fine, made the codelocks show up on the doorframe and all, made the destroy door function work fine again, only thing I'm stuck on is dismantle gate option from the inside so the codelocks fall off

I know fence.c uses wall_gate but I'm not sure if I need to make mods to the model or just the c file it both.

Could you please guide me ? Or give hints where to look. I'll do it myself to not take your time too much.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
Latest Server 2019
Category
General
Steps To Reproduce

I can post full codeblocks if needed

Additional Information

Impuls sent me :D

Event Timeline

Using this code for the ActionDismantlePart

modded class ActionDismantlePart {
    protected override bool DismantleCondition(PlayerBase player, ActionTarget target, ItemBase item, bool camera_check) {
        Fence fence = Fence.Cast(target.GetObject());

        if (fence && GetDayZGame().GetCodeLockConfig().OwnerOnlyDismantle()) {
            CodeLock codelock = CodeLock.Cast(fence.GetCodeLock());

            if (codelock && !codelock.IsOwner(player.GetIdentity().GetId())) {
                return false;
            }
        }
        return super.DismantleCondition(player, target, item, camera_check);
    }
}

But in game, I do not get the option 'dismantle gate' so I most likely miss the box in the model to aim at ?

Maybe the question would be, what triggers the dismantle gate option ? is it a selection in the model ?

Geez changed the task status from New to Assigned.Mon, May 16, 1:34 PM