MCPcopy Create free account
hub / github.com/PCGen/pcgen / isVisible

Method isVisible

code/src/java/pcgen/core/Equipment.java:2036–2060  ·  view source on GitHub ↗

Returns true if the equipment modifier is visible @param eqMod The equipment modifier @return The visible value

(final EquipmentModifier eqMod, View v)

Source from the content-addressed store, hash-verified

2034 * @return The visible value
2035 */
2036 public boolean isVisible(final EquipmentModifier eqMod, View v)
2037 {
2038 Visibility vis = eqMod.getSafe(ObjectKey.VISIBILITY);
2039
2040 if (Visibility.QUALIFY.equals(vis))
2041 {
2042 bonusPrimary = true;
2043 if (PrereqHandler.passesAll(eqMod, this, null))
2044 {
2045 return true;
2046 }
2047 //
2048 // Check the secondary head if the primary head doesn't qualify (and
2049 // the item has a secondary head)
2050 //
2051 if (isDouble())
2052 {
2053 bonusPrimary = false;
2054 return PrereqHandler.passesAll(eqMod, this, null);
2055 }
2056 return false;
2057 }
2058
2059 return vis.isVisibleTo(v);
2060 }
2061
2062 /**
2063 * Returns true if the equipment modifier is visible

Callers

nothing calls this directly

Calls 5

passesAllMethod · 0.95
isDoubleMethod · 0.95
isVisibleToMethod · 0.95
getSafeMethod · 0.80
equalsMethod · 0.65

Tested by

no test coverage detected