eccentricdevotion / TARDIS

A Spigot / Paper plugin for all Doctor Who fans - create and use a TARDIS! It's bigger on the inside!
GNU General Public License v3.0
80 stars 27 forks source link

Allow us to update where the redstone lamps/sea lanterns that are affected by the light switch are. #681

Closed MagmaBro123 closed 1 year ago

MagmaBro123 commented 1 year ago

Describe the feature request

Title.

"/tardis update lamp". Click on a sea lantern, glowstone block, or a redstone lamp, this will update where the toggle-able lamps that are affected by the light switch button are. Or, add some kind of craft-able survival TARDIS lamp that is affected by light switches for players to use.

Describe alternatives you've considered

N/A

eccentricdevotion commented 1 year ago

There is already a /tardis update lamps command, it rescans the TARDIS console for SEA_LANTERN or REDSTONE_LAMP blocks (depending on the console type / player preference) and adds them to the database.

MagmaBro123 commented 1 year ago

/tardis update lamps isn't valid. (Didn't mean to close, oops.)

2022-12-20_10 20 33

eccentricdevotion commented 1 year ago

Sorry, try just /tardis lamps

MagmaBro123 commented 1 year ago

2022-12-20_11 44 47

Well, some lamps are added/updated, but random ones placed by the player, aren't. I don't think TARDIS likes player-placed lamps being directly next to each other.

(Yes, also tried without those redstone blocks. Same issue.)

2022-12-20_11 47 32

eccentricdevotion commented 1 year ago

Togglable lamps will still need actual redstone power, TARDIS doesn't provide that - turning them off just changes it to a non-lamp block and then back to a lamp - if it isn't powered it will stay off.

eccentricdevotion commented 1 year ago

Command is only scanning one chunk, I'll need to update it to scan bigger consoles...

Initially the command was to update TARDISes from pre-malfunction plugin versions so that the lamps can flash, there probably weren't big consoles back then.

MagmaBro123 commented 1 year ago

Oh.

This is a modified Supersized Deluxe console. I never changed its actual size, just added some bits here n' there and removed the outer walls.

(I put a black concrete sphere around the outside to make it look like your in the void.)

eccentricdevotion commented 1 year ago

Rechecked code in a proper IDE, it definitely scans the entire console - if modified it won't find any outside the original console bounds.

MagmaBro123 commented 1 year ago

Ah.

eccentricdevotion commented 1 year ago

I should perhaps do number 2 on the todo list https://github.com/eccentricdevotion/TARDIS/blob/master/todo.md Though that won't help with customised consoles...

Technoguyfication commented 1 year ago

Rechecked code in a proper IDE, it definitely scans the entire console - if modified it won't find any outside the original console bounds.

Just want to share in case you don't know, you can press . (period key) anywhere in a GitHub repository to launch a Visual Studio Code session in your browser and edit a project. If you press the button while viewing a file, it'll open that file up in the editor for you. It'll even do Intellisense and let you compile certain languages in the browser. Still not as powerful as a real IDE for Java but it gets a lot closer than the regular source code viewer.

eccentricdevotion commented 1 year ago

You can press . (period key) anywhere in a GitHub repository to launch a Visual Studio Code session in your browser and edit a project.

I did not know that. Very useful, thanks for the tip :)