>On question remains: on which side of the door is the default electronics station?!
Below? :o just kidding, it's a good question actually. Could be visible in the construction preview and allow flipping it.
Looks good so far! (from skimming over it)
Some words to the notation:
If
>Could be replaced by one function with boolean argument if desired.
Some words to the notation:
If
DoSwitchOn
is a callback (I can't tell from the name), I'd suggest starting it with "On" (OnSwitchOn
). If it's a setter function that changes internal state, I'd suggest starting it with "Set" (SetSwitchOn
). And no matter which one it is, I'd suggest merging DoSwitchOn
and DoSwitchOff
into one function (e.g. SetSwitchState(bool)
), like you mention. Usually you have conditions likeif (pressed) SetSwitchOn() else SetSwitchOff()
which are more maintainable when written as SetSwitchState(pressed)
. Even in your base library, it would already remove code duplication (because most of the code in DoSwitchOn
and DoSwitchOff
is copy-pasted).
Tested what is in the main repos. Fixed my local stuff which was quite easy! So that is all good.
Regarding moving the player view, I think it should move back again after some time, as long as the light is on basically. Also when switching back and forth the view moves from door to clonk to door to clonk. It is better if it stays with the door all the time.
Regarding moving the player view, I think it should move back again after some time, as long as the light is on basically. Also when switching back and forth the view moves from door to clonk to door to clonk. It is better if it stays with the door all the time.
Switching back is possible, no problem. Don't know how I can prevent switching the view back to the Clonk if you interact repeatedly, though.
Your local stuff is tower of despair? Also, are there any other packs that have custom switches? I'd adjust those, too, but it's really not that much work, as you said.
Your local stuff is tower of despair? Also, are there any other packs that have custom switches? I'd adjust those, too, but it's really not that much work, as you said.
> Don't know how I can prevent switching the view back to the Clonk if you interact repeatedly, though.
Me neither, anyone else has an idea?
Here is the current state of the objects, since I am stuck with low motivation and need input: https://github.com/gitMarky/openclonk/tree/switches
The experimental folder contains a test scenario with two stations (one with a switch), and a dynamite object that can be connected to it. Connections are done via pipe object at the moment (I wanted to avoid creating yet another object with the "same" functionality), and may behave buggy when connecting stations and objects that are not intended for connection.
The station is an or-gate currently, and this cannot be changed at the moment.
My thoughts:
* Instead of making the station and the switch separate structures, I'd rather like to be able to add switches to a station, like a basement.
* Instead of having the pipe connect to stations, I'd prefer a "wire box"/"wire kit" or whatever that can also add the switch to the station.
* The lorry dumping its contents as a reaction to switching it is a good idea, however I did not implement that, because it is difficult to decide in which direction to dump (left or right?) and I'd have to possibly animate the lorry body going sideways for dumping contents on the spot (in itself not a problem, but I'd not make the effort yet in case we decide to scrap the whole thing)
* Does it even add anything to the gameplay? At the moment it's rather limited. The advantages for Hazard, etc. are already there with the basic switch interface in OC 8.0
The experimental folder contains a test scenario with two stations (one with a switch), and a dynamite object that can be connected to it. Connections are done via pipe object at the moment (I wanted to avoid creating yet another object with the "same" functionality), and may behave buggy when connecting stations and objects that are not intended for connection.
The station is an or-gate currently, and this cannot be changed at the moment.
My thoughts:
* Instead of making the station and the switch separate structures, I'd rather like to be able to add switches to a station, like a basement.
* Instead of having the pipe connect to stations, I'd prefer a "wire box"/"wire kit" or whatever that can also add the switch to the station.
* The lorry dumping its contents as a reaction to switching it is a good idea, however I did not implement that, because it is difficult to decide in which direction to dump (left or right?) and I'd have to possibly animate the lorry body going sideways for dumping contents on the spot (in itself not a problem, but I'd not make the effort yet in case we decide to scrap the whole thing)
* Does it even add anything to the gameplay? At the moment it's rather limited. The advantages for Hazard, etc. are already there with the basic switch interface in OC 8.0
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill