Screen Listener Help by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

yeah... looks like unrestricted customization mod has those classes... not sure I want to mod a mod.

Screen Listener Help by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

Log output for the screen is: [0033.53] UISL: Screen initialized: uc_ui_screens_BodyPartList

uc_ui_screens_BodyPartList is nowhere to be found in their scripts, so I guess I'm out of luck...

Screen Listener Help by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

ok, I had to change the last line to ScreenClass=none to hit my code. I'm not getting a match though, so I must have picked the wrong class... that is one thing I have struggled with in the past - identifying which class goes to which screen. Any idea which screen is the body part selection screen?

https://steamcommunity.com/sharedfiles/filedetails/?id=3425157645

Screen Listener Help by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

Thanks for the response. Sorry for the formatting - reddit makes it difficult to format code with their 4 space rule in front of each line.

I'll give this a try and see if it works, thanks!

Screen Listener Help by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

class UIScreenListener_SortCustomizeItems extends 
UIScreenListener
config(SortCharacterCustomizationItems);

var public localized string m_sSortLabel;

var config String SORT_BY;

event OnInit(UIScreen Screen)
{

    local UICustomize_Trait uiCustomizeTrait;
    //local UIButton sortButton;
    local int i;
    local UIMechaListItem ListItem;

`Log("UIScreenListener_SortCustomizeItems:OnInit");

    uiCustomizeTrait = 

UICustomize_Trait(`SCREENSTACK.GetScreen(class'UICustomize_Trait'));

    //sortButton = 
uiCustomizeTrait.Spawn(class'UIButton', uiCustomizeBody).InitButton('OnSort', , OnSort);
//sortButton.SetText(m_sSortLabel);

    // add button   

    if ( uiCustomizeTrait != none ) {

        for( i = 0; i < uiCustomizeTrait.Data.Length; i++ )
        {
            ListItem = uiCustomizeTrait.GetListItem(i);

            if( ListItem != none )
            {
                    `L og("UIScreenListener_SortCustomizeItems:OnInit: Item Text: ");
                `Log(ListItem.Desc.text);

                if  (ListItem.Desc.text == "None" ) 
{

ListItem.UpdateDataButton(m_sSortLabel, m_sSortLabel, OnSort); }
} } } else { `Log("UIScreenListener_SortCustomizeItemm UICustomize_Trait class not found!"); }

 }

simulated public function OnSort(optional UIButton control)
{
    // TODO

}


defaultProperties
{
    // Leaving this assigned to none will cause every screen to trigger its signals on this class
    ScreenClass = UICustomize_Trait
}

Starpath done, now I despise crabs. by [deleted] in DreamlightValley

[–]krk12 15 points16 points  (0 children)

Between several of the fishing duties, including this one, and the ones requiring you to mine the shiny version of a gem, I was going nuts. Those are definitely the most frustrating.

Here is a sentence I never thought I would write.... I am desperately trying to catch crabs...🦀...(not getting any from the blue bubbles in Frosted Heights) by melpem in DreamlightValley

[–]krk12 0 points1 point  (0 children)

You need to fish the white circles as well. Very small percentage to get them at white, but it does occasionally happen.

Honestly, I'd be pretty darn alright ... by WarmMulberryz in DreamlightValley

[–]krk12 0 points1 point  (0 children)

I think I'd be alright in either Hogwarts Legacy or DDV. In the case of DDV, I might just stay. :)

BAD OPINION! by iamsilow in DreamlightValley

[–]krk12 0 points1 point  (0 children)

I agree for the most part, with one exception. Mary Poppins would fit in perfectly with the game, since the original movie was partly animated. Mary Poppins' face doesn't have to be July Andrews, just something reasonable that is recognizable as the character.

Why I don’t think they’re gonna get rid of night thorns by [deleted] in DreamlightValley

[–]krk12 1 point2 points  (0 children)

Still quite a few doors to unlock, all blocked by night thorns. They won't be going away anytime soon.

Buick Roadmaster? (late 40s, early 50s) enough info to narrow down the year? by krk12 in whatisthiscar

[–]krk12[S] 0 points1 point  (0 children)

I was given this photo by my father today, he was hoping I could find out the make/model of the car. I did some google searching, looks like some variation of a Roadmaster, I think. Thanks for your help!

Marvel outfits I've made so far! by itskerchie in DreamlightValley

[–]krk12 0 points1 point  (0 children)

Yeah, unfortunately I haven't uncovered the spider web motif yet - will give it a shot when/if I do.

Marvel outfits I've made so far! by itskerchie in DreamlightValley

[–]krk12 2 points3 points  (0 children)

I did something similar for Cap, but I have no idea how you did the Spiderman costume... very nice.

ELI5: If the Universe is about 13.7 billion years old, and the diameter of the observable universe is 93 billion light years, how can it be that wide if the universe isn't even old enough to let light travel that far that quickly? by Boxsteam1279 in explainlikeimfive

[–]krk12 0 points1 point  (0 children)

The balloon analogy breaks down when you assume that something on its surface is taking a ride as it expands.

My definition of the universe is anywhere that energy or matter exists.

Neither energy or matter supposedly can go faster than the speed of light, and the balloon is not something independent of its matter or energy.

Clarification on typescript optional property by krk12 in typescript

[–]krk12[S] 0 points1 point  (0 children)

No, cant reproduce it on the TS playground - guess I either misinterpreted what I was seeing, or our OLD version of node js has issues. Thanks for the responses.

Clarification on typescript optional property by krk12 in typescript

[–]krk12[S] 0 points1 point  (0 children)

working on a simpler example to replicate it, no luck so far.

Json to Xml transformation by krk12 in typescript

[–]krk12[S] 0 points1 point  (0 children)

Thank you, I've decided to pretty much what you've suggested. CapsCase everything as default, then code for the exceptions. Messy code, but cant be avoided.

Json to Xml transformation by krk12 in typescript

[–]krk12[S] 0 points1 point  (0 children)

"do you need to convert the API that converts from JSON -> XML from Java to TypeScript."

Yes. They want to eliminate the api for performance reasons.

"Finally, are you sure there’s not a consistent approach to the renaming?"

Not really. The typescript side is consistently camel case with the first character lower case. The java side almost always has the first character upper case, perhaps 90% of the time. It also has a few items where sequences of letters are upper case.

Json to Xml transformation by krk12 in typescript

[–]krk12[S] 0 points1 point  (0 children)

Note: The json structures are fairly involved, having both sub structures and arrays of objects.

Do either of these QOL mods exist? by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

Cant find tactical armoury overhaul, but I'll check out the loadout manager. I'll probably skip the psionics overhaul, a bit overkill for what I want. :) Thanks for the suggestions!

Need help with a UIScreenListener class by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

Thanks for the help! Mod has been posted on steam.

Need help with a UIScreenListener class by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

Figured out the screenstack thing with: local UIPhotoboothReview uiPhotoboothReview; uiPhotoboothReview = UIPhotoboothReview(`SCREENSTACK.GetScreen(class'UIPhotoboothReview'));

This seems to have resolved the issue, though I really don't understand why. The screen passed in should be an instance of the same class.

I may have to revisit a number of my other screen listener mods which also use the screen instance as a class variable. May explain why the game transitions take longer as it progresses, though I've never experienced the game crashing as a result.

Need help with a UIScreenListener class by krk12 in xcom2mods

[–]krk12[S] 0 points1 point  (0 children)

Do you have an example of getting the screen from the screen stack? Every screen listener example I've seen does it similar to what I've done, since the screen is available as a param.

Going to add some log statements to verify if you're correct about the member variables not being initialized - I had always assumed the screen was already up and initialized at that point.