Allow shadows to be omitted without generating a warning.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4014 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -352,8 +352,8 @@ public class CharacterManager
|
||||
{
|
||||
final ComponentClass cclass = _crepo.getComponentClass(sclass);
|
||||
if (cclass == null) {
|
||||
Log.warning("Components reference non-existent shadow layer class " +
|
||||
"[sclass=" + sclass +
|
||||
Log.warning("Components reference non-existent shadow layer " +
|
||||
"class [sclass=" + sclass +
|
||||
", scomps=" + StringUtil.toString(scomps) + "].");
|
||||
return null;
|
||||
}
|
||||
@@ -369,9 +369,6 @@ public class CharacterManager
|
||||
source.frames = source.ccomp.getFrames(
|
||||
action, StandardActions.SHADOW_TYPE);
|
||||
if (source.frames == null) {
|
||||
Log.warning("Missing shadow frames for action " +
|
||||
"[action=" + action +
|
||||
", comp=" + source.ccomp + "].");
|
||||
// skip this shadow component
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class ComponentClass implements Serializable
|
||||
/** The class name of the layer from which this component class obtains a
|
||||
* mask to limit rendering to certain areas. */
|
||||
public String mask;
|
||||
|
||||
|
||||
/** Indicates the class name of the shadow layer to which this component
|
||||
* class contributes a shadow. */
|
||||
public String shadow;
|
||||
|
||||
@@ -61,6 +61,7 @@ import com.threerings.cast.ComponentRepository;
|
||||
import com.threerings.cast.FrameProvider;
|
||||
import com.threerings.cast.Log;
|
||||
import com.threerings.cast.NoSuchComponentException;
|
||||
import com.threerings.cast.StandardActions;
|
||||
import com.threerings.cast.TrimmedMultiFrameImage;
|
||||
|
||||
/**
|
||||
@@ -344,6 +345,12 @@ public class BundledComponentRepository
|
||||
_setcache.put(dpath, aset);
|
||||
}
|
||||
|
||||
// if this is a shadow image, no need to freak out as they are
|
||||
// optional
|
||||
if (type.equals(StandardActions.SHADOW_TYPE)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// if that failed too, we're hosed
|
||||
if (aset == null) {
|
||||
Log.warning("Unable to locate tileset for action '" +
|
||||
|
||||
Reference in New Issue
Block a user