MCPcopy Create free account
hub / github.com/SimHacker/micropolis / fixZone

Method fixZone

MicropolisCore/src/MicropolisEngine/src/connect.cpp:554–573  ·  view source on GitHub ↗

* Update connections (rails, and wire connections) to a zone. * @param x X map coordinate * @param y Y map coordinate. * @param effects Modification collecting object. */

Source from the content-addressed store, hash-verified

552 * @param effects Modification collecting object.
553 */
554void Micropolis::fixZone(int x, int y, ToolEffects *effects)
555{
556 fixSingle(x, y, effects);
557
558 if (y > 0) {
559 fixSingle(x, y - 1, effects);
560 }
561
562 if (x < WORLD_W - 1) {
563 fixSingle(x + 1, y, effects);
564 }
565
566 if (y < WORLD_H - 1) {
567 fixSingle(x, y + 1, effects);
568 }
569
570 if (x > 0) {
571 fixSingle(x - 1, y, effects);
572 }
573}
574
575
576/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected