Skip to content

Commit f49d203

Browse files
committed
docs: update frame doc
1 parent 3355f6b commit f49d203

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

docs/dev/Lua API.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6570,15 +6570,14 @@ Functions
65706570
Frames are synchronized with the machines this building is connected to.
65716571

65726572
:workshop_type: custom workshop string id, e.g. ``SOAPMAKER`` or numeric id
6573-
:frames: table of frames. Each frame is sparse flat table with ids from ``0`` to ``31*31-1``.
6574-
Each frame tile is table of integers from 4 to 8 members long. Tile members are as
6575-
follow: ``tile``, ``foreground color``, ``background color``, ``bright``,
6576-
``graphics tile``, ``overlay tile``, ``signpost tile``, ``item tile``.
6573+
:frames: table of frames. Each frame is array of rows of tiles with ids from ``1`` to ``31``.
6574+
Each frame tile is table of with following optional members: ``ch``, ``fg``,
6575+
``bg``, ``bold``, ``tile``, ``tile_overlay``, ``tile_signpost``, ``tile_item``.
65776576
First 4 are function same as ascii workshop definition. The latter 4 are graphics
6578-
layers. ``signpost tile`` is an optional row that sticks up over the workshop.
6577+
layers. ``tile_signpost `` is only valid in first row and it shows up above the workshop.
65796578
6580-
:frame_skip: How many ticks to display one frame. If set to negative number (or skipped) frames
6581-
are synchronized with machine animation.
6579+
:frame_skip: How many ticks to display one frame. If set to negative number, zero or skipped frames
6580+
are synchronized with other connected machines animations.
65826581
65836582
* ``setAnimationInfoAuto(workshop_type, make_graphics_too[, frame_length][, gear_tiles])``
65846583

plugins/building-hacks.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,12 @@ static void loadFrames(lua_State* L,workshop_hack_data& def,int stack_pos)
462462
}
463463
lua_pop(L, 1); //pop current row
464464
}
465-
466465
def.frames.push_back(frame);
467466
frame_index++;
468467
lua_pop(L, 1); //pop current frame
469468
}
470469

471-
return ;
470+
return;
472471
}
473472

474473
//fixImpassible(workshop_type) - changes how impassible tiles work with liquids.

0 commit comments

Comments
 (0)