mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
Delegation of methods to associated objects
More object-oriented method placement. SurveyService class had methods that could be put to object classes. Attributes now set from constructor.
This commit is contained in:
@@ -11279,6 +11279,17 @@ public class ResourceService implements INetworkDispatch {
|
||||
return resourceRootreference;
|
||||
}
|
||||
|
||||
public GalacticResource grabResourceByName(String searchName){
|
||||
GalacticResource resource = null;
|
||||
Vector<GalacticResource> allResources = core.resourceService.getAllSpawnedResources();
|
||||
for (GalacticResource res : allResources){
|
||||
if (res.getName().equals(searchName)){
|
||||
resource = res;
|
||||
}
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Utility method to quickly spawn resource containers into the inventory
|
||||
|
||||
Reference in New Issue
Block a user