s1m13 Posted May 31, 2019 Share Posted May 31, 2019 (edited) Hey pals, I just finished another mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1757258298 It's a client mod for one simple automation which I thought was helpful. In the last couple days I forgot to choose a nice new skin I received for a firepit. So I looked up the code and saw, that the default skin is chosen even if there is a new skin. So why not choosing it automatically? So now - using this mod - you don't have to click the right arrow in the item skins spinner. The logic is: CallTheOldRefreshMethod() local preferred = 2 if there are item options then while iterating over options i do if option has a new_indicator then preferred = i break end i = i + 1 end local skin_index = spinner:GetSelectedIndex() if skin_index is default then self.skins_spinner.spinner:SetSelectedIndex(preferred) end end I achieved that using the AddClassPostConstruct method. Do you think this is helpful? I find the default items skins too boring compared to every item skin! Edited June 4, 2019 by s1m13 typo Link to comment https://forums.kleientertainment.com/forums/topic/106953-mod-prefer-new-skins/ Share on other sites More sharing options...
eternalLocket Posted June 6, 2019 Share Posted June 6, 2019 As long as I've crafted the item with it's skin once, I get the skinned item when crafting later. But I guess it might be useful for people who forget. Link to comment https://forums.kleientertainment.com/forums/topic/106953-mod-prefer-new-skins/#findComment-1205352 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now