Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new Artron Energy functions for e2 #971

Merged
merged 2 commits into from
Nov 4, 2023
Merged

Added new Artron Energy functions for e2 #971

merged 2 commits into from
Nov 4, 2023

Conversation

NovaAstral
Copy link
Collaborator

@NovaAstral NovaAstral commented Nov 4, 2023

  • Added tardisEnergy() which returns the current Artron Energy of the TARDIS.
  • Added tardisMaxEnergy() which returns the current 'tardis2_artron_energy_max' setting.
  • Added tardisRemoveEnergy(number) which removes 'number' amount of energy from the TARDIS it is used on. This can be used if one wants to either easily drain a tardis, or for the intended use case, add fuel cost to custom e2 functions.

Unsure if this last function should only work on the Owners TARDISes or not.

- Added tardisEnergy() which returns the current Artron Energy of the TARDIS.
- Added tardisMaxEnergy() which returns the current 'tardis2_artron_energy_max' setting.
- Added tardisRemoveEnergy(number) which removes 'number' amount of energy from the TARDIS it is used on. This can be used if one wants to either easily drain a tardis, or for the intended use case, add fuel cost to custom e2 functions.

Unknown if this last function should only work on the Owners TARDISes or not.
- use GetArtron everywhere
- rename tardis2 to tardis as legacy no longer has the E2 extension
- rename functions to include artron
- slight variable naming tweaks
Copy link
Owner

@MattJeanes MattJeanes left a comment

Choose a reason for hiding this comment

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

Looks good to me! I think prop protection cantool is enough for removing artron energy, but we can adjust later if we see abuse. Note that I made a few little tweaks which you may want to see for future reference :)

@MattJeanes MattJeanes merged commit 23fa3cf into dev Nov 4, 2023
1 check passed
@MattJeanes MattJeanes deleted the e2-artron-funcs branch November 4, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants