colobot-data icon indicating copy to clipboard operation
colobot-data copied to clipboard

improve documentation of factory()

Open hexagonrecursion opened this issue 6 months ago • 2 comments

  1. The link to cbot\file was a red herring - factory() only accepts strings, not file handles.
  2. It took me a lot of effort to figure out how to make factory() accept a file name. Who could have guessed that I have to prefix it with program/? Documenting it here for future players.
  3. Fixes https://github.com/colobot/colobot/issues/1522 by adding an example of how to correctly pass a public function to factory()

hexagonrecursion avatar Dec 27 '23 11:12 hexagonrecursion

Good job!

Please add Russian also! En. "Program that will be run on the bot after factory finishes the construction. This can be either a \l;public\u cbot\public; \l;function\u cbot\function;, a filename or raw code." Ru. "Программа, которая будет запускаться на боте после завершения строительства завода. Это может быть \l;public\u cbot\public; \l;function\u cbot\function;, имя файла или фрагмент кода."

En. "Save this as say-foo.cbot. Note: make sure to check the "Public" checkbox when saving - this will cause say-foo.cbot to be inside the program/ folder." Ru. "Сохраните это как say-foo.cbot. Примечание. При сохранении обязательно установите флажок «Public» — чтобы say-foo.cbot оказался внутри папки program/."

Please add others languages using auto translation!

AndreiCherniaev avatar Feb 02 '24 06:02 AndreiCherniaev

@AndreiCherniaev done.

hexagonrecursion avatar Apr 05 '24 11:04 hexagonrecursion