Hemiptera Bugtracker at bugs.linux-forks.de

advtrains

Freight wagons are unprotected

Send replies to 108@bugs.linux-forks.de or using the Form below.
avatar From: OP
Tue, 12 Feb 2019 15:42:01 -0000

Everyone can take freight out of any freight wagon. This problam is

very old and was already a few times pointed out.

avatar From: Developer
Tue, 12 Feb 2019 21:25:01 -0000

Are you sure this still exists in the current master version?

Code for wagon inv protection exists, see advtrains/wagons.lua:65ff

avatar From: OP
Tue, 12 Feb 2019 22:12:01 -0000

Am Tue, 12 Feb 2019 22:26:01 +0100 (CET)

schrieb 108@bugs.linux-forks.de:

> Are you sure this still exists in the current master version?

>

> Code for wagon inv protection exists, see advtrains/wagons.lua:65ff

Yes, right, it is now protected.

But the current implementation creates another problem:

How to allow another player to access a freight wagon?

A key allows accessto chests, how is it here?

(And how is the protection with (un)loading tracks?

A total lock there makes also freight transport betweens players

impossible)

avatar From: Developer
Tue, 05 Mar 2019 19:38:01 -0000

The protection is managed through the "whitelist". But I suppose the problem is that it is not possible to access the wagon properties of the wagon.

I can't tell how the behavior of the unloading rails is. gpcf originally made them. But from my understanding it just (un)loads everything without restriction.

Supporting keys sound like a good idea though.

avatar From: Someone else
Tue, 17 Mar 2020 14:37:02 -0000

I implemented access to the whitelist for freight wagons. When registered

with `get_inventory_formspec = advtrains.standard_inventory_formspec`,

wagons will include the "Wagon Properties" button as already seen on

locomotives, allowing you to set the whitelist. The freight wagons included

with advtrains (tank, wood, boxcar) use this and modpacks like moretrains

should move to using it too.

Although this solution is 'good enough' in some ways, it should not

preclude the use of keys in future as an alternative access control method.

Other ideas for access control might include master keys to several wagons

and integration with other propsals like train companies.

avatar From: Someone else
Tue, 17 Mar 2020 14:40:02 -0000

Forgot to mention, code is on https://github.com/Montandalar/advtrains

branch wagon_prop_formspec

avatar Status Update
Mon, 04 Jan 2021 14:59:01 -0000
This bug was closed.
Reply