- Messages
- 580
I noticed that the plot report at huntress island (from settlemods, yes, I know, but I'm stuck with it...) show everything as 0. My suspicition was that the city manager holotape failed to properly identify the workshop, or something like that.
However, my Asam Maintenance Software is able to load plots there just fine. Here is the function I use to find the workshop:
Maybe this can help.
However, my Asam Maintenance Software is able to load plots there just fine. Here is the function I use to find the workshop:
Code:
Workshopscript function findWorkshop(ObjectReference term)
workshopobjectscript wsObj = (term as workshopobjectscript)
Workshopscript result
; try by workshop id
if (wsObj && wsObj.workshopID > -1)
result = WorkshopParent.GetWorkshop(wsObj.workshopID)
if(result)
return result
endif
endif
if(term)
; try by linked ref of the terminal, if any
result = (term.getLinkedRef(WorkshopParent.WorkshopItemKeyword) as Workshopscript)
if(result)
return result
endif
endif
; otherwise, by location
return WorkshopParent.GetWorkshopFromLocation(Game.GetPlayer().GetCurrentLocation())
endfunction