From 910f972d3ad440eb533f49b1997420c27a604a3a Mon Sep 17 00:00:00 2001 From: smthspec Date: Fri, 19 Jun 2026 23:28:03 +0300 Subject: [PATCH] Fix World-module compile error: invalid GetDuration override The script log showed the only remaining error after the module-binding fix: ActionContinuousBase has no GetDuration(ActionData) to override. Continuous action timing is set via a CAContinuousTime component (in seconds) inside CreateActionComponent(). Replaced the GetDuration override accordingly; falls back to 5s on the client where MainConfig is null (config is server-only, server stays authoritative on channel completion). Co-Authored-By: Claude Opus 4.8 --- scripts/4_World/YALootBoxes_ActionOpen.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/4_World/YALootBoxes_ActionOpen.c b/scripts/4_World/YALootBoxes_ActionOpen.c index 081498c..bc0e4df 100644 --- a/scripts/4_World/YALootBoxes_ActionOpen.c +++ b/scripts/4_World/YALootBoxes_ActionOpen.c @@ -57,11 +57,16 @@ class YALB_ActionOpenLootbox : ActionContinuousBase return true; } - override int GetDuration(ActionData action_data) + // Continuous-action duration is set via a CAContinuousTime component (in + // SECONDS), NOT a GetDuration() override - ActionContinuousBase has no such + // method. Falls back to 5s on the client, where MainConfig is null (config + // is server-only); the server is authoritative on when the channel ends. + override void CreateActionComponent() { - if (YALB_ConfigLoader.MainConfig) - return YALB_ConfigLoader.MainConfig.OpenChannelDurationSeconds * 1000; // ms - return 5000; + float secs = 5.0; + if (YALB_ConfigLoader.MainConfig && YALB_ConfigLoader.MainConfig.OpenChannelDurationSeconds > 0) + secs = YALB_ConfigLoader.MainConfig.OpenChannelDurationSeconds; + m_ActionData.m_ActionComponent = new CAContinuousTime(secs); } // Fired server-side when the channel completes WITHOUT being cancelled.