MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / evaluate

Method evaluate

source/game/StarObject.cpp:830–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828}
829
830void Object::evaluate(WireCoordinator* coordinator) {
831 for (size_t i = 0; i < m_inputNodes.size(); ++i) {
832 auto& in = m_inputNodes[i];
833 bool nextState = false;
834 for (auto const& connection : in.connections.get())
835 nextState |= coordinator->readInputConnection(connection);
836
837 if (in.state.get() != nextState) {
838 in.state.set(nextState);
839 m_scriptComponent.invoke("onInputNodeChange", JsonObject{
840 {"node", i},
841 {"level", nextState}
842 });
843 }
844 }
845}
846
847void Object::setImageKey(String const& name, String const& value) {
848 if (!isSlave())

Callers 11

renderMethod · 0.45
generateNpcVariantMethod · 0.45
readNpcVariantMethod · 0.45
initMethod · 0.45
damageSourcesMethod · 0.45
processMethod · 0.45
refreshStatusEffectsMethod · 0.45
evalFunctionMethod · 0.45
evalFunction2Method · 0.45
calcDistanceFadeAlphaMethod · 0.45

Calls 5

readInputConnectionMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45
setMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected