Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs #318

Merged
merged 8 commits into from
Nov 5, 2023
Merged

Add docs #318

merged 8 commits into from
Nov 5, 2023

Conversation

Athozus
Copy link
Member

@Athozus Athozus commented Jul 22, 2023

Based on @BuckarooBanzay post :

  • HV Digilines cable
  • Polyfuse
  • Overload (cheat mitigation)
  • Chest sort modes and inventory move buttons
  • Chest digilines functionality
  • Multimeter

I didn't added the non-checked documentations because I don't know what you mean with, so I also made this PR as a draft.

EDIT : I've added those in the commit de3e6b9

Helps with #53

@Athozus Athozus added this to the 2.0.0 milestone Jul 22, 2023
@Athozus Athozus requested a review from S-S-X July 22, 2023 23:01
@Athozus Athozus changed the title Add docs (#53) Add docs Jul 22, 2023

## Sorting

Chests can be sorted with one button with the following sort types : natural sort, by item, by quantity, by tipe or by wear. The chests can also be sorted automatically when its content changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Chests can be sorted with one button with the following sort types : natural sort, by item, by quantity, by tipe or by wear. The chests can also be sorted automatically when its content changes.
Chests can be sorted with one button with the following sort types : natural sort, by item, by quantity, by type or by wear. The chests can also be sorted automatically when its content changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are actually three buttons, one to change the sort method, one to sort, and one to toggle auto-sorting (except for iron chests, which lack auto-sorting).

Really the chest docs need a lot more changed, particularly when it comes to the mithril chests (which is what the "Chest digilines functionality" task is about).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally chests documentation should probably be moved under chests mod instead of keeping it in technic mod.
I think it would probably be better to create another PR just for chests documentations.

@@ -4,6 +4,10 @@
This document describes the interaction of
technic machines with the `digilines` mod (https://github.com/minetest-mods/digilines)

## Digicables

Digicables are a new type of cables that bring both electricity power and digiline-based information (analogic). Like both original types of cable (electric cable and digiline), you just have to connect cables to each other in order to transmit power/information. They are needed to access nuclear reactor digiline information (through the bottom). The digicables are available in HV, MV and LV.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just drop "new", reactor does not have to be bottom, also few other suggestions.

Suggested change
Digicables are a new type of cables that bring both electricity power and digiline-based information (analogic). Like both original types of cable (electric cable and digiline), you just have to connect cables to each other in order to transmit power/information. They are needed to access nuclear reactor digiline information (through the bottom). The digicables are available in HV, MV and LV.
Digicables are a type of cable that carry both electric power and digiline messages. Like both original types of cable (electric cable and digiline), you just have to connect cables to each other in order to transmit power/information. They are needed to access nuclear reactor digiline information. The digicables are available in HV, MV and LV.

I think important thing to add would be crafting because it needs alloying and therefore might not be that obvious especially if crafting guide isn't able to display alloying recipes (or if playing without guide).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then also, recipes maybe do not belong here in this file. Not sure if those are already somewhere but probably not...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's better not to document recipes, because they can often be different. Servers change recipes quite often.

It should state the difference in connecting rules though, digicables connect differently than standard digilines.

Copy link
Member

@S-S-X S-S-X Jul 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not actually ever seen a single change in any of special recipes (that are not crafting which in turn works in all guides). Probably those too have changed outside the mods but definitely not often.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably a bad assumption, but I have seen recipes changed. I do remember some technic recipes changed on Tunnelers' Abyss for example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technic recipes changed on Tunnelers' Abyss for example.

They're not using either Technic plus nor original Technic mod, they're using their own fork which has their own documentation. Same goes with all of the servers I've seen changing their recipes.


<img src="../textures/technic_multimeter.png"/>

This electric tool is used for quick lookup at an electric network. It works by clicking on an electric node (cable, machine, generator, switchting station), and gives values about : the position of the attached switching station, its current status, the lag, the batteries, the supply and the demand, and the total of each type of node.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For multimeter it would be very good to actually document values it displays, few are obvious but many are not if player isn't very familiar with technical stuff under the hood.
Maybe table with descriptions for each value displayed by multimeter.

@Athozus
Copy link
Member Author

Athozus commented Jul 23, 2023

I followed your suggestions, but I wrote basic meanings for "Timeout" and "Skip" because I'm not sure what it really means.


| Property | Example Value | Unit | Meaning |
|------------------|---------------|------------|---------------------------------------------------------------|
| Ref. point | 61, 19, 62 | Coordinate | The location of the switching station attached to the network |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually isn't pointing to switching station but 1 node below it which is cable.
While it is very often directly below switching station this is not always the case, there does not have to be switching station above it.

Actually this information is technical detail that isn't too simple when you dive into it.
Reason it is included is that I first created multimeter to aid debugging during development but just tried to make it also usable by regular players.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to change in description though... Network ID is derived from this coordinate (for both actual network implementation and for ID that shows up in multimeter).
Coordinate is also used with administrative commands, same location those commands will show.

technic/doc/tools.md Outdated Show resolved Hide resolved
technic/doc/tools.md Outdated Show resolved Hide resolved
technic/doc/tools.md Outdated Show resolved Hide resolved
technic/doc/tools.md Outdated Show resolved Hide resolved
@Athozus
Copy link
Member Author

Athozus commented Jul 23, 2023

Corrected the docs following your suggestions, notably multimeter properties table. Now waiting for approval.

@S-S-X
Copy link
Member

S-S-X commented Jul 23, 2023

When you think it is ready, mark as ready for review taking PR out of the draft state.
Also when starting reviews it would be good to rebase it to master or merge changes from master here.

Currently however this probably would not yet be enough to close #53 so either closing keyword should be removed or rest of it implemented (at least what is listed on #53).

@OgelGames
Copy link
Contributor

OgelGames commented Jul 24, 2023

We might as well keep this as a draft until it's complete, there's no rush, the documentation isn't a blocker for 2.0.0.

@Athozus do you mind if I add to this PR? I can at least do the chests and quarry docs, as those are two parts of the mod I know well (because I designed and wrote the code of the new versions).

@Athozus
Copy link
Member Author

Athozus commented Jul 24, 2023

When you think it is ready, mark as ready for review taking PR out of the draft state. Also when starting reviews it would be good to rebase it to master or merge changes from master here.

Currently however this probably would not yet be enough to close #53 so either closing keyword should be removed or rest of it implemented (at least what is listed on #53).

Was too fast, forgot that there was still docs for polyfuse, overload and chests digilines. I don't know what means all those, the behaviour, ... so I need someone to explain me a bit, or write the doc.

@Athozus
Copy link
Member Author

Athozus commented Jul 24, 2023

We might as well keep this as a draft until it's complete, there's no rush, the documentation isn't a blocker for 2.0.0.

@Athozus do you mind if I add to this PR? I can at least do the chests and quarry docs, as those are two parts of the mod I know well (because I designed and wrote the code of the new versions).

add what you want to the PR, np (i may squash my commits later)

@Athozus Athozus marked this pull request as ready for review July 25, 2023 16:40
@Athozus
Copy link
Member Author

Athozus commented Jul 25, 2023

I added some explanations based on @S-S-X's ones to me. I hope it will okay for that time.

@Athozus Athozus requested review from OgelGames and S-S-X July 27, 2023 09:49
@Athozus
Copy link
Member Author

Athozus commented Nov 4, 2023

I just saw back this one. @S-S-X @OgelGames are you approving for merging ? Are there still changes to do ?

technic/doc/tools.md Outdated Show resolved Hide resolved
@S-S-X
Copy link
Member

S-S-X commented Nov 4, 2023

Also rebase first, simplest way to do this is "Update branch"-button and select "Update with rebase" option.

Copy link

github-actions bot commented Nov 4, 2023

Click for detailed source code test coverage report

Test coverage report for Technic CNC 87.36% in 11/14 files:

File                             Hits Missed Coverage
-----------------------------------------------------
programs.lua                   263  0      100.00%
materials/technic_worldgen.lua 32   0      100.00%
materials/init.lua             14   0      100.00%
materials/default.lua          183  0      100.00%
materials/basic_materials.lua  17   0      100.00%
init.lua                       16   0      100.00%
digilines.lua                  55   0      100.00%
cnc.lua                        53   0      100.00%
formspec.lua                   104  7      93.69%
api.lua                        219  43     83.59%
pipeworks.lua                  25   13     65.79%
materials/moreblocks.lua       0    29     0.00%
materials/ethereal.lua         0    37     0.00%
materials/bakedclay.lua        0    13     0.00%

Test coverage report for technic chests 45.49% in 6/6 files:

File          Hits Missed Coverage
----------------------------------
chests.lua    102  18     85.00%
init.lua      34   18     65.38%
register.lua  84   78     51.85%
formspec.lua  76   94     44.71%
inventory.lua 10   100    9.09%
digilines.lua 2    61     3.17%

Test coverage report for technic 66.04% in 96/96 files:

File                                      Hits Missed Coverage
--------------------------------------------------------------
max_lag.lua                               12   0      100.00%
machines/register/init.lua                15   0      100.00%
machines/register/freezer_recipes.lua     15   0      100.00%
machines/other/init.lua                   6    0      100.00%
machines/MV/solar_array.lua               12   0      100.00%
machines/MV/init.lua                      17   0      100.00%
machines/MV/grinder.lua                   17   0      100.00%
machines/MV/generator.lua                 9    0      100.00%
machines/MV/freezer.lua                   17   0      100.00%
machines/MV/extractor.lua                 17   0      100.00%
machines/MV/electric_furnace.lua          17   0      100.00%
machines/MV/compressor.lua                17   0      100.00%
machines/MV/centrifuge.lua                17   0      100.00%
machines/MV/cables.lua                    40   0      100.00%
machines/MV/battery_box.lua               17   0      100.00%
machines/MV/alloy_furnace.lua             19   0      100.00%
machines/LV/solar_array.lua               11   0      100.00%
machines/LV/init.lua                      17   0      100.00%
machines/LV/grinder.lua                   16   0      100.00%
machines/LV/generator.lua                 9    0      100.00%
machines/LV/electric_furnace.lua          15   0      100.00%
machines/LV/compressor.lua                20   0      100.00%
machines/LV/cables.lua                    40   0      100.00%
machines/LV/battery_box.lua               15   0      100.00%
machines/LV/alloy_furnace.lua             17   0      100.00%
machines/HV/solar_array.lua               11   0      100.00%
machines/HV/init.lua                      12   0      100.00%
machines/HV/grinder.lua                   17   0      100.00%
machines/HV/generator.lua                 9    0      100.00%
machines/HV/electric_furnace.lua          17   0      100.00%
machines/HV/compressor.lua                17   0      100.00%
machines/HV/cables.lua                    39   0      100.00%
machines/HV/battery_box.lua               17   0      100.00%
legacy.lua                                33   0      100.00%
crafts.lua                                133  0      100.00%
machines/LV/led.lua                       74   1      98.67%
items.lua                                 107  2      98.17%
config.lua                                48   1      97.96%
machines/register/compressor_recipes.lua  38   1      97.44%
machines/LV/geothermal.lua                75   3      96.15%
machines/register/solar_array.lua         46   2      95.83%
init.lua                                  22   1      95.65%
machines/LV/solar_panel.lua               42   2      95.45%
machines/network.lua                      403  21     95.05%
tools/init.lua                            13   1      92.86%
machines/register/alloy_recipes.lua       39   3      92.86%
machines/register/cables.lua              97   8      92.38%
machines/LV/water_mill.lua                67   6      91.78%
machines/compat/tools.lua                 58   6      90.62%
machines/register/grindings.lua           42   5      89.36%
machines/LV/lamp.lua                      124  17     87.94%
register.lua                              28   4      87.50%
machines/register/grinder_recipes.lua     108  16     87.10%
machines/register/recipes.lua             68   12     85.00%
machines/register/battery_box.lua         239  43     84.75%
tools/flashlight.lua                      64   13     83.12%
util/throttle.lua                         9    2      81.82%
machines/init.lua                         38   9      80.85%
machines/register/machine_base.lua        166  41     80.19%
machines/LV/extractor.lua                 18   5      78.26%
radiation.lua                             271  80     77.21%
machines/register/centrifuge_recipes.lua  22   7      75.86%
machines/power_monitor.lua                59   19     75.64%
machines/switching_station.lua            80   32     71.43%
effects.lua                               5    2      71.43%
machines/overload.lua                     12   5      70.59%
machines/MV/wind_mill.lua                 46   22     67.65%
machines/supply_converter.lua             95   46     67.38%
machines/other/coal_furnace.lua           2    1      66.67%
machines/other/injector.lua               72   39     64.86%
machines/switching_station_globalstep.lua 28   16     63.64%
tools/multimeter.lua                      130  78     62.50%
machines/MV/hydro_turbine.lua             43   26     62.32%
machines/other/coal_alloy_furnace.lua     80   49     62.02%
machines/MV/tool_workshop.lua             56   35     61.54%
machines/register/generator.lua           122  88     58.10%
tools/cans.lua                            53   48     52.48%
tools/mining_lasers.lua                   36   35     50.70%
machines/other/constructor.lua            67   69     49.26%
machines/LV/music_player.lua              44   47     48.35%
tools/tree_tap.lua                        24   27     47.06%
tools/vacuum.lua                          16   20     44.44%
machines/register/common.lua              50   64     43.86%
machines/HV/forcefield.lua                103  158    39.46%
machines/HV/quarry.lua                    144  242    37.31%
machines/HV/nuclear_reactor.lua           119  206    36.62%
helpers.lua                               55   98     35.95%
tools/sonic_screwdriver.lua               16   33     32.65%
machines/compat/api.lua                   16   34     32.00%
tools/chainsaw.lua                        37   80     31.62%
chatcommands.lua                          19   45     29.69%
tools/mining_drill.lua                    65   195    25.00%
machines/other/anchor.lua                 14   74     15.91%
tools/prospector.lua                      14   100    12.28%
machines/register/extractor_recipes.lua   8    77     9.41%
machines/compat/digtron.lua               4    41     8.89%

Raw test runner output for geeks:

CNC:

++ Executing suite spec/api_spec.lua
++ Executing suite spec/digilines_spec.lua
++ Executing suite spec/interaction_spec.lua
++ Executing suite spec/technic_cnc_spec.lua

31 successes / 0 failures / 0 errors / 0 pending : 3.922059 seconds

Chests:

++ Executing suite spec/api_spec.lua
W:	Configuration: invalid key	exclude_textures


5 successes / 0 failures / 0 errors / 0 pending : 0.209732 seconds

Technic:

++ Executing suite spec/api_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin
◌◌◌
++ Executing suite spec/building_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin

++ Executing suite spec/hv_network_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin

++ Executing suite spec/lv_network_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin

++ Executing suite spec/network_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin

++ Executing suite spec/nodes_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin

++ Executing suite spec/supply_converter_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin
◌
++ Executing suite spec/tools_compatibility_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin
⭆ Starting test set tools_compatibility_spec.lua:11 ⯈ Technic power tool compatibility
W:	Deprecated technic.register_power_tool use. Setting max_charge for oldlegacy:powertool
W:	Deprecated technic.register_power_tool use. Setting max_charge for oldminimal:powertool
W:	Deprecated technic.register_power_tool use. Setting max_charge for oldhalfway:powertool
W:	Deprecated technic.register_power_tool use. Ensuring fields for oldlegacy:powertool
W:	Using metadata charge values for oldlegacy:powertool
W:	Updated legacy Technic power tool definition for oldlegacy:powertool
W:	Deprecated technic.register_power_tool use. Ensuring fields for oldminimal:powertool
W:	Using metadata charge values for oldminimal:powertool
W:	Updated legacy Technic power tool definition for oldminimal:powertool
W:	Deprecated technic.register_power_tool use. Ensuring fields for oldhalfway:powertool
W:	Mod oldhalfway seems to be aware of technic.plus but oldhalfway:powertool is still using deprecated registration, skipping meta charge compatibility.
W:	Updated legacy Technic power tool definition for oldhalfway:powertool
🢆 Running tests from tools_compatibility_spec.lua:92 ▷ Technic power tool compatibility oldlegacy:powertool can be used (minimum charge)
W:	Use of deprecated function technic.set_RE_wear with stack: oldlegacy:powertool
🢆 Running tests from tools_compatibility_spec.lua:106 ▷ Technic power tool compatibility oldlegacy:powertool can be used (minimum charge + 1)
W:	Use of deprecated function technic.set_RE_wear with stack: oldlegacy:powertool
🢆 Running tests from tools_compatibility_spec.lua:92 ▷ Technic power tool compatibility oldminimal:powertool can be used (minimum charge)
W:	Use of deprecated function technic.set_RE_wear with stack: oldminimal:powertool
🢆 Running tests from tools_compatibility_spec.lua:106 ▷ Technic power tool compatibility oldminimal:powertool can be used (minimum charge + 1)
W:	Use of deprecated function technic.set_RE_wear with stack: oldminimal:powertool

++ Executing suite spec/tools_spec.lua
E:	Loading common/fs from 5.4.1 failed, trying to use builtin


219 successes / 0 failures / 0 errors / 4 pending : 65.645348 seconds

Pending → spec/api_spec.lua @ 133
Technic API Machine registration registers my_mod:my_battery
spec/api_spec.lua:133: Battery box registration does not include all fields

Pending → spec/api_spec.lua @ 190
Technic API Machine registration registers my_mod:machine_base
spec/api_spec.lua:190: Base machine registration does not include all fields

Pending → spec/api_spec.lua @ 285
Technic API internals technic.cables TBD, misleading name and should be updated
spec/api_spec.lua:285: TBD technic.cables naming and need, see technic networks data for possible options

Pending → spec/supply_converter_spec.lua @ 78
Supply converter building overloads network
spec/supply_converter_spec.lua:78: overload does not work with supply converter

@Athozus
Copy link
Member Author

Athozus commented Nov 4, 2023

Should be able for approval now.

Copy link
Member

@S-S-X S-S-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot better documentation, still incomplete but in my opinion better to merge what we have here. Removed keyword for #53 as this wont still document everything, no reason to keep documentation improvements pending for months.

@S-S-X S-S-X mentioned this pull request Nov 5, 2023
12 tasks
@OgelGames
Copy link
Contributor

Yeah, it would be nice to have everything fixed in one PR, but it's been too long to keep this waiting.

@OgelGames OgelGames merged commit 4d9bb7d into master Nov 5, 2023
12 checks passed
@OgelGames OgelGames deleted the docs branch November 5, 2023 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants