WheteThunger / MonumentAddons

Add entities, spawn points and more to monuments
https://umod.org/plugins/monument-addons
MIT License
5 stars 9 forks source link

Auto light lanterns #21

Closed WheteThunger closed 2 years ago

WheteThunger commented 2 years ago

Currently, some entities will automatically be lit, but this is not the case for lanterns, despite user expectations. We should figure out which entities should be automatically lit, such as lanterns, jackolanterns, etc. and make the change to all of them. We should also mark those entities as busy to prevent players from toggling them on/off.

m-hynek commented 2 years ago

I'll submit PR with lanterns, but should i include items like fog machine, snow machine, fuel generator, etc?

WheteThunger commented 2 years ago

Fog machines -- Yes, great idea. I just looked at the FogMachine class and I see that there are multiple interesting properties that we could allow people to edit in the future, such as fogLength, nozzleBlastDuration, and flags that could be useful such as FogMachine.MotionMode and FogMachine.FogFieldOn. Some of the flag settings could be achieved by #23 but we would have to implement custom commands to edit the other properties. This is out of scope for this issue, but we can track it in another if you think it's worth doing those things.

Snow machine -- Yes, also great idea. The SnowMachine class inherits from FogMachine so enhancements we make for fog machines would apply here too.

Fuel generator -- Not sure. What's the use case?

Let me know of any others you have others in mind.

m-hynek commented 2 years ago

For me personaly, fuel generator is just for ambience and illusion of generating power for nearby entities - example near car lift. I cant manage to submit PR tonight, but I have time tommorow so ill try to add these and possibly identify if there are more items with 'toggle' functionality, that MA dont interact with yet

WheteThunger commented 2 years ago

That's an interesting application. One concern is that people might want to use fuel generators as part of a puzzle (#27) in the future, so forcibly toggling it on might cause issues. However, I think we can just make the logic exempt fuel generators that have connected wires, so I'd say you are good to proceed with automatically toggling fuel generators on for now.

Edit: I noticed that fuel generators are already turning on automatically so no change needed.

m-hynek commented 2 years ago

31

Fuel generator is indeed auto toggled, but it can be turned off, and then it needs fuel to run. Adding busy flag just for my edge case doesnt make sense. But i was thinking about it in more general way and realized that there are certain items, that could be toggled for functionality, or just for looks. Take campfire for example. Someone might want to use it as place for players to cook food, others might want nonstop light source with no interaction. It could be solved with comand to disable interaction on these addons by flagging it as busy and on

WheteThunger commented 2 years ago

Agreed. Good judgment on allowing the fuel generator use case to be achieved by using commands to set the flags explicitly.

As part of the puzzle implementation, we can go back over the IO entities with a fine toothed comb to update their behavior to what makes sense. Currently they are all turned On automatically which is probably not the right behavior for all of them.

WheteThunger commented 2 years ago

Merged into develop branch in PR #31.