Skip to content

Conversation

@niknal357
Copy link

Added modpack API for other mods to use. This will be especially helpful with mods that want to interface with data stored in memory panels and counters. I added the other methods because I saw no harm in doing so.

The following methods have been added:

sm.modpackAPI.memorypanel.write (compatible with old sm.modpack.memorypanelWrite)
sm.modpackAPI.memorypanel.read
sm.modpackAPI.memorypanel.writeValue
sm.modpackAPI.memorypanel.readValue

sm.modpackAPI.counter.setValue
sm.modpackAPI.counter.getValue

sm.modpackAPI.mathblock.getMode
sm.modpackAPI.mathblock.setMode

sm.modpackAPI.wirelessblock.setIsSender
sm.modpackAPI.wirelessblock.getIsSender
sm.modpackAPI.wirelessblock.getWirelessData
sm.modpackAPI.wirelessblock.getWirelessDataValues

sm.modpackAPI.smartsensor.setMode
sm.modpackAPI.smartsensor.getMode

sm.modpackAPI.orienter.setMode
sm.modpackAPI.orienter.getMode

@niknal357
Copy link
Author

This is in response to issue #43

@JuneCarya
Copy link

I don't know how much more work you want to put into this, so this suggestion might be more than required:

Consider moving interfaces into the publicData field of the respective interactibles. I think that would be a better approach compared to adding new methods into a global namespace.

Anyway, it would be great to have an active maintainer testing all of those changes for proper behaviour and approving the final design. Better to wait for further feedback before reworking these changes.

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