Skip to content

Conversation

@zyxkad
Copy link
Collaborator

@zyxkad zyxkad commented Jun 29, 2025

  • add DisabledPeripheral
  • fix peripherals

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

  • Please check if the PR fulfills these requirements
  • The commit message are well described
  • Docs have been added / updated (for features or maybe bugs which were noted). If not, please update the needed documentation here. Feel free to remove this check if you don't need it
  • All changes have fully been tested
  • What kind of change does this PR introduce? (Bug fix, feature, ...)

  • What is the current behavior? (You can also link to an open issue here)

  • What is the new behavior (if this is a feature change)?

  • Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)

  • Other information:

For disabled peripherals, it will have an additional peripheralDisabled method which always returns true. And all other operations will throw LuaException.

An example for people want to detect if a peripheral is disabled will be:

local chatbox = peripheral.find('chatBox')
if chatbox.peripheralDisabled then -- invoke the method is not necessary since it will always return a true
  printError('chat box is disabled!')
end

@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2025

Build Preview

badge

You can find files attached to the below linked Workflow Run URL (Logs).

Name Link
Commit 105f9c0
Logs https://github.com/IntelligenceModding/AdvancedPeripherals/actions/runs/17558413257
Jar Files AdvancedPeripherals PR 755
Expires At 2025-12-07T17:04:29Z

@zyxkad zyxkad marked this pull request as ready for review June 30, 2025 14:27
@zyxkad zyxkad requested a review from SirEndii June 30, 2025 14:29
@SirEndii SirEndii added enhancement New feature or request 1.19x labels Sep 8, 2025
@SirEndii SirEndii added this to the 0.7.x milestone Sep 8, 2025
@SirEndii SirEndii moved this to Needs testing/review in Advanced Peripherals Sep 8, 2025
Copy link
Member

@SirEndii SirEndii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to merge this when the styling is fixed

@SirEndii SirEndii merged commit 5dee231 into IntelligenceModding:dev/1.19.2 Sep 8, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from Needs testing/review to Done in Advanced Peripherals Sep 8, 2025
@zyxkad zyxkad deleted the dev/1.19.2-disable-patch branch September 14, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.19x enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants