Skip to content

Comments

Name Visibility + Create / Destroy detection#47

Open
WarperSan wants to merge 7 commits intoscriptcoded:mainfrom
WarperSan:main
Open

Name Visibility + Create / Destroy detection#47
WarperSan wants to merge 7 commits intoscriptcoded:mainfrom
WarperSan:main

Conversation

@WarperSan
Copy link

New Features

Name Visibility

In my testing, I've found it is quite annoying to have the name always displayed. It breaks the immersion if, for example, the loader is hidden in a structure. To solve this, I've added the rule alwaysShowLoaderName, which determines if the custom name is always displayed or not.

This rule simply overrides the setCustomNameVisible() value, which was always true.

Note: as I'm writing this, the rule doesn't change the visibility of existing loaders.

Create / Destroy detection

In my testing, I've found the mod doesn't have a way to detect when a loader is created nor destroyed. It would be impossible to reliably detect if a cart is a loader.

To fix this, the dispenser now sends vibrations depending on the action. Right now, creating a loader uses the frequency 6, and destroying a loader uses the frequency 5.

Note: as I'm writing this, both actions can be triggered at once (if you create and destroy with the same tick). However, Doing the same action multiple times in the same tick will only trigger the vibration once.

Note 2: I've already written the game tests. They use a new structure, but work fine.

Other

I've fixed the warnings that IntelliJ gave me when loading the project. I'm not sure if I broke anything, but I highly doubt.

@scriptcoded
Copy link
Owner

Hey! Sorry, I completely missed this! I'm completely overloaded at the moment and don't have a lot of time to maintain this mod with all the breaking changes in the modding APIs... But I'll do my best to tackle this as soon as I get the time :) Sounds like great additions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants