Skip to content

Commit a684815

Browse files
committed
Fix 99: add 4 missing dead-code-eliminated method stubs
Fix 99a: $getScaledFont / $getScaledFont0 on cpra_RPGAssetManager — called in DFTextButtonStyle init, was missing (only UICommonHelper had it) Fix 99b: $updateForTutorial on cpr_ScreenManager — called as getScreenManager().$updateForTutorial() in tutorial/button events — delegates to current screen.$updateForTutorial() if it exists Fix 99c: $backButtonPressed on cprus_BaseScreen — called by Styles$2 back-button click listener on current screen — stubs a popScreen() call via ScreenManager Fix 99d: $getLastChatRoom on cprgds_SocialDataManager — called in chat button init, returns null safely https://claude.ai/code/session_01EHGKWXxt4q8QPP4xk5LvhQ
1 parent 5b1253a commit a684815

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

proto/output/web/classes.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1700658,6 +1700658,44 @@ cprus_BaseScreen.prototype.$removePopup = function(w) {
17006581700658
if (this.$popupWindows) this.$popupWindows.$remove(w);
17006591700659
} catch(e) { /* no-op */ }
17006601700660
};
1700661+
/* Fix 99a: $getScaledFont missing on RPGAssetManager (dead-code-eliminated) */
1700662+
cpra_RPGAssetManager.prototype.$getScaledFont = function(fontName, fontSize) {
1700663+
/* delegate to UICommonHelper stub which returns a valid stub BitmapFont */
1700664+
if (cpr_UICommonHelper._stubFontInstance) return cpr_UICommonHelper._stubFontInstance;
1700665+
var fd = new cbggg_b$a();
1700666+
cbggg_b$a__init_0(fd);
1700667+
var pages = new cbgu_a();
1700668+
jl_Object__init_(pages);
1700669+
pages.$b151 = 1; pages.$c100 = 0; pages.$d167 = 0;
1700670+
pages.$a514 = null; pages.$e128 = null; pages.$f80 = null;
1700671+
var f = new cbggg_b();
1700672+
jl_Object__init_(f);
1700673+
f.$a557 = fd; f.$b198 = pages; f.$d163 = 0; f.$e132 = 0; f.$f68 = 0;
1700674+
f.$c137 = cbggg_b_m(f);
1700675+
cpr_UICommonHelper._stubFontInstance = f;
1700676+
return f;
1700677+
};
1700678+
cpra_RPGAssetManager.prototype.$getScaledFont0 = function(fontName, fontSize, fontStyle) {
1700679+
return this.$getScaledFont(fontName, fontSize);
1700680+
};
1700681+
/* Fix 99b: $updateForTutorial missing on ScreenManager — delegate to current screen */
1700682+
cpr_ScreenManager.prototype.$updateForTutorial = function() {
1700683+
try {
1700684+
var screen = this.$getScreen ? this.$getScreen() : null;
1700685+
if (screen && typeof screen.$updateForTutorial === 'function') {
1700686+
screen.$updateForTutorial();
1700687+
}
1700688+
} catch(e) { /* no-op */ }
1700689+
};
1700690+
/* Fix 99c: $backButtonPressed missing on screens — stub no-op (or popScreen) */
1700691+
cprus_BaseScreen.prototype.$backButtonPressed = function() {
1700692+
try {
1700693+
var sm = cpr_RPG_app.$getScreenManager();
1700694+
if (sm && sm.$canPopScreen && sm.$canPopScreen()) sm.$popScreen();
1700695+
} catch(e) { /* no-op */ }
1700696+
};
1700697+
/* Fix 99d: $getLastChatRoom missing on SocialDataManager — return null */
1700698+
cprgds_SocialDataManager.prototype.$getLastChatRoom = function() { return null; };
17006611700699
cpr_RPGMain.prototype.$analyticsTrackScreen = function(name) {};
17006621700700
cpra_RPGAssetManager.prototype.$cleanCache = function() {};
17006631700701
cprg_RPGShader.prototype.$setAlphaAtlasDisable = function(v) {};

0 commit comments

Comments
 (0)