MCPcopy Create free account
hub / github.com/TurningWheel/Barony / createScriptEntityInMapGen

Method createScriptEntityInMapGen

src/actgeneral.cpp:5214–5228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5212}
5213
5214Entity* TextSourceScript::createScriptEntityInMapGen(int x, int y, const char* text)
5215{
5216 Entity* scriptEntity = newEntity(132, 1, map.entities, nullptr); // text script
5217 setSpriteAttributes(scriptEntity, nullptr, nullptr);
5218 scriptEntity->x = x * 16.0;
5219 scriptEntity->y = y * 16.0;
5220 scriptEntity->textSourceDelay = 1;
5221
5222 if ( text )
5223 {
5224 addScriptToTextSource(*scriptEntity, text);
5225 }
5226
5227 return scriptEntity;
5228}
5229
5230void TextSourceScript::addScriptToTextSource(Entity& src, const char* text)
5231{

Callers 1

generateDungeonFunction · 0.80

Calls 2

newEntityFunction · 0.85
setSpriteAttributesFunction · 0.85

Tested by

no test coverage detected