Anonymous Login
2018-12-16 10:15 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001969OpenClonkObjectspublic2018-01-14 13:47
ReporterMarky 
Assigned ToMarky 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Versiongit master 
Summary0001969: Pushing a lorry into a cabin makes the contents irretrievable
DescriptionIf you push a filled lorry into a wooden cabin you cannot get those items anymore, because the cabin does not display any contents.
Steps To ReproduceIn "acid drilling", grab the lorry and push it in front of the cabin entrance. Hold the interaction key and cycle to "Enter wooden cabin". If you choose this action the lorry enters the cabin and its contents are inside the cabin.

You can probably get the items back by destroying the cabin.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0005983

Marky (developer)

I'd simply remove the Entrance() function from the lorry: The only structure that can be entered is the wooden cabin and it does not have any container functionality (what is it good for even?). The callback NoLorryEjection() that the lorry issues in Entrance() is also not implemented anywhere.

~0005985

Maikel (developer)

There is also the guard tower (not in the main repos yet) which can be entered and the lorry should not eject contents in this case.

~0005988

Marky (developer)

So, if we were to keep the Entrance() function in the lorry I'd rather have a callback that triggers the lorry ejection instead of one that prevents it: I'd actually only want the lorry to eject its contents if it enters a building where you'd need the lorry contents.

~0005992

Maikel (developer)

Agreed

~0005997

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/66adf0f72c74790993055a217c0362c5790dbbb8

Changeset 66adf0f by Mark <markh4b@hotmail.com>
Fix 0001969: Lorry does not eject contents by default
Instead, the lorry asks a container whether it should eject its contents. This is done via the callback LorryEjectionOnEntrance(object lorry) in the object that is being entered.
The old callback NoLorryEjection(object lorry) is obsolete.

~0005998

Marky (developer)

Note that the lorry is still irretrievable in the cabin :/

~0005999

Marky (developer)

Regarding the last problem: I wanted to prevent pushing "interaction objects" into a building if the building is not a container.

This is could done by modifying Objects.ocd/Libraries.ocd/ClonkInteractionControl.ocd/Script.c, line 528:

ObjectCommand("Enter", action_info.interaction_object, nil, nil, nil, C4CMD_Enter_PushTarget);

so that you push the interaction object only if the building is a container. However, this is really specific and may lead to further errors, such as entering the building with the clonk only and leaving the vehicle outside.
Another (probably better?) option is preventing the entrance interaction while pushing a vehicle, if the building is not a container. This makes it clear that you cannot push the vehicle inside, and you have to consciously let go if it before you can enter.

~0006058

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/7b13b3455ce7b47e978cb913055180b415916206

Changeset 7b13b34 by Mark <markh4b@hotmail.com>
Fix 0001969: Prevent pushing vehicles into buildings where they are irretrievable

~0006059

Marky (developer)

I tested and liked my proposed solution :)

~0006061

Maikel (developer)

I added the possibility for structures to accept vehicles even though they are not a container.
+Notes

-Issue History
Date Modified Username Field Change
2017-12-27 18:46 Marky New Issue
2017-12-27 18:58 Marky Assigned To => Marky
2017-12-27 18:58 Marky Status new => assigned
2017-12-27 19:01 Marky Note Added: 0005983
2017-12-27 19:01 Marky Status assigned => feedback
2017-12-28 17:41 Maikel Note Added: 0005985
2017-12-29 08:15 Marky Note Added: 0005988
2017-12-29 14:40 Maikel Note Added: 0005992
2017-12-31 15:14 occ Note Added: 0005997
2017-12-31 15:15 Marky Status feedback => resolved
2017-12-31 15:15 Marky Resolution open => fixed
2017-12-31 15:15 Marky Fixed in Version => git master
2017-12-31 15:16 Marky Note Added: 0005998
2018-01-05 10:12 Marky Note Added: 0005999
2018-01-05 10:12 Marky Status resolved => assigned
2018-01-13 08:52 Marky Status assigned => feedback
2018-01-14 13:34 occ Note Added: 0006058
2018-01-14 13:36 Marky Status feedback => resolved
2018-01-14 13:36 Marky Note Added: 0006059
2018-01-14 13:47 Maikel Note Added: 0006061
+Issue History