Starbound
Crew Customization +
Luna 2022년 8월 7일 오후 12시 44분
Interface locks up when viewing certain modded crewmates.
I'm not certain what mods exactly cause this, but at least with all the mods I'm currently using, FU's "Assassin" crewmate spawns without any armour and causes the interface to lock up, in the log,

[Error] Exception while invoking lua function 'crewSelected'. (LuaException) Error code 2, [string "/interface/CCustomization/CCustomization.lua"]:375: attempt to index a nil value (local 'items') stack traceback: [C]: in metamethod '__index' [string "/interface/CCustomization/CCustomization.lua"]:375: in global 'putItemsOnSlots' [string "/interface/CCustomization/CCustomization.lua"]:841: in global 'resetView' [string "/interface/CCustomization/CCustomization.lua"]:351: in function <[string "/interface/CCustomization/CCustomization.lua"]:301>

I'm not quite sure what leads to both self.items and items being nil in resetView(), but modifying putItemsOnSlots() to the following solves the issue:

function putItemsOnSlots(items) if items == nil then clearSlots() else for slot, widgetName in pairs(self.widgetSlots) do setSlotManual(widgetName,items[slot],false) end end updateSpeciesSlots() end

note of course that this causes calling putItemsOnSlots() without items specified to instead duplicate clearslots(), if you want to preserve throwing an error on this, it might be better to instead check if items or self.items is not nil in resetView().
Luna 님이 마지막으로 수정; 2022년 8월 7일 오후 6시 19분
< >
전체 댓글 2개 중 1~2개 표시 중
Luna 2022년 8월 7일 오후 6시 31분 
while what I put earlier worked for some crew members, the following function -putSlotsOnItems also seems to error trying to index self.items as well, but I'm not sure why in initial tests after fixing putItemsOnSlots alone the other function didn't error.

a more complete fix to this issue, and the one listed above is adding the following to the start of resetView():
if self.items == nil then self.items = {} end
while a bit of a hacky solution (it literally defaults to being naked still...) it does allow you to edit crew members who defaulted to wearing nothing, for one reason or another.
Luna 님이 마지막으로 수정; 2022년 8월 7일 오후 6시 31분
BurntKrispe 2022년 11월 8일 오후 7시 05분 
I've noticed the same issue with saturnians.
Log:
[Error] Exception while invoking lua function 'crewSelected'. (LuaException) Error code 2, [string "/interface/CCustomization/CCustomization.lua"]:375: attempt to index a nil value (local 'items') stack traceback: [C]: in metamethod '__index' [string "/interface/CCustomization/CCustomization.lua"]:375: in global 'putItemsOnSlots' [string "/interface/CCustomization/CCustomization.lua"]:841: in global 'resetView' [string "/interface/CCustomization/CCustomization.lua"]:351: in function <[string "/interface/CCustomization/CCustomization.lua"]:301>
BurntKrispe 님이 마지막으로 수정; 2022년 11월 8일 오후 7시 05분
< >
전체 댓글 2개 중 1~2개 표시 중
페이지당 표시 개수: 1530 50