-
Couldn't load subscription status.
- Fork 86
Merge feature/ponders into Astral-Experimental #617
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
Draft
The-Shortman
wants to merge
7
commits into
Astral-Experimental
Choose a base branch
from
feature/ponders
base: Astral-Experimental
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
81d7288
New ponder tag registry template
The-Shortman 6fa0aff
Update ponder types to work with namespaces
The-Shortman 4b3c213
Remove old ponders (dw i have backups for reference)
The-Shortman be2d08c
Implement new desizer ponders
The-Shortman 0743ee7
Catalogue some blocks into the new ponder tags
The-Shortman 0fd45ec
Add shimmer refinery ponder
The-Shortman dccc9b4
Merge remote-tracking branch 'origin/Astral-Experimental' into featur…
The-Shortman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| (function ponder() { | ||
| onEvent("ponder.tag", (event) => { | ||
| // Registers tags as seen in the ponder index homepage | ||
|
|
||
| const ponderTags = [ | ||
| { | ||
| namespace: "kubejs:createastral_tips", // Anything unique to astral that isn't a machine or part of a kubejs addon e.g. astralsignals | ||
| icon: "createastral:astral_singularity", | ||
| displayName: "Create: Astral Tips", | ||
| tooltip: "Tips and tricks specific to this modpack", | ||
| assignedPonders: ["createastral:shimmering_stone"], | ||
| }, | ||
| { | ||
| namespace: "kubejs:createastral_machines", // Anything machinery that isnt astral signals or astral gens | ||
| icon: "createastral:electrolyser_dummy", | ||
| displayName: "Create: Astral Machines", | ||
| tooltip: "Guides on the custom machines added by Astral", | ||
| assignedPonders: ["createastral:electrolyser_dummy", "astraladditions:desizer_controller"], | ||
| }, | ||
| { | ||
| namespace: "kubejs:astralsignals", // Everything under the category of Astral Signals including machines and items | ||
| icon: "astralsignals:data_drive_blank", | ||
| displayName: "Astral Signals", | ||
| tooltip: "Guide to Astral Signals", | ||
| assignedPonders: [ | ||
| "astralsignals:signal_coordinator_dummy", | ||
| "astralsignals:radio_telescope_dummy", | ||
| "astralsignals:analog_decryptor_dummy", | ||
| "astralsignals:pp_decryptor_dummy", | ||
| "astralsignals:mp_decryptor_dummy", | ||
| "astralsignals:drive_eraser_dummy", | ||
| ], | ||
| }, | ||
| { | ||
| namespace: "kubejs:tconstruct", // Tips for how tconstruct works | ||
| icon: "tconstruct:seared_table", | ||
| displayName: "Tinker's Construct", | ||
| tooltip: "Tinker's Construct basics", | ||
| assignedPonders: ["tconstruct:seared_melter", "tconstruct:foundry_controller", "tconstruct:seared_faucet"], | ||
| }, | ||
| { | ||
| namespace: "kubejs:yttr", | ||
| icon: "yttr:logo", | ||
| displayName: "Yttr", | ||
| tooltip: "Mechanics that push the boundaries of your gameplay", | ||
| assignedPonders: ["yttr:root_of_continuity"], | ||
| }, | ||
| ]; | ||
|
|
||
| ponderTags.forEach((tag) => { | ||
| event.createTag(tag.namespace, tag.icon, tag.displayName, tag.tooltip, tag.assignedPonders); | ||
| }); | ||
| }); | ||
|
|
||
| onEvent("ponder.registry", (event) => { | ||
| // Registers a ponder to the custom machine block, so create offers to ponder | ||
| // This should never actually be played, as the ponder should be overwritten | ||
| // using Ponder Overrides in the event handlers in the `ponders` directory | ||
| event | ||
| .create("custommachinery:custom_machine_item") | ||
| .scene( | ||
| "custom_machine_item", | ||
| "You shouldn't see this ponder, it's a debug thing.", | ||
| "kubejs:electrolyser", | ||
| (scene, util) => {} | ||
| ); | ||
| }); | ||
|
|
||
| // Registers overrides to show correct ponders | ||
| onEvent("ponder.override", (event) => { | ||
| const item = event.getItem(); | ||
| if (!("machine" in item.nbt && typeof item.nbt.machine === "string")) return; | ||
| // Custom machines are based on _dummy blocks, where the actual ponders are registered | ||
| const machineId = item.nbt.machine; | ||
| switch (machineId) { | ||
| case undefined: | ||
| break; | ||
| case "createastral:shimmer_refinery": | ||
| event.override("yttr:void_filter"); | ||
| break; | ||
| default: | ||
| event.override(`${machineId}_dummy`); | ||
| break; | ||
| } | ||
| }); | ||
| })(); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder, I'm not sure how it works. If necessary, the texts may need to be translated. Thank you for your help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it will be automatically generated in
kubejs/assets/ponderjs_generated/lang? I'm not sure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add this to the to-do list