MCPcopy Create free account
hub / github.com/DFHack/dfhack / sc_event_id

Method sc_event_id

library/Core.cpp:607–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607state_change_event DFHack::sc_event_id (std::string name) {
608 sc_event_map_init();
609 auto it = state_change_event_map.find(name);
610 if (it != state_change_event_map.end())
611 return it->second;
612 if (name.find("SC_") != 0)
613 return sc_event_id(std::string("SC_") + name);
614 return SC_UNKNOWN;
615}
616
617std::string DFHack::sc_event_name (state_change_event id) {
618 sc_event_map_init();

Callers

nothing calls this directly

Calls 3

sc_event_map_initFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected