The Minecraft mod "Cyclic" adds a node that can toggle a redstone signal when a player says a certain password in chat.
Here is my attempt at recreating that for mesecons.
Use is limited to a 50-node radius for lag-prevention, but this can easily be changed in the settings.
License:
Code: LGPLv3
Textures: CC-BY (they're barely worth licensing)
Depends:
mesecons (and its subsequent requirements)
Source/Download:
here
Thanks:
loosewheel - for decoding my late night ramblings and pointing me in the right direction 👍
[mod] Mesecons Microphone [mesecons_microphone] [wip]
-
- Member
- Posts: 128
- Joined: Sun Aug 05, 2018 12:37
- In-game: Maverick2797
- Location: Poking about here and there...
[mod] Mesecons Microphone [mesecons_microphone] [wip]
Last edited by Maverick2797 on Tue Jan 18, 2022 14:44, edited 4 times in total.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]
-
- Member
- Posts: 155
- Joined: Mon Dec 28, 2020 01:19
- GitHub: loosewheel
- In-game: loosewheel
Re: [mod] Mesecons Microphone [mesecons_microphone] [wip]
I did the following to get it to work:
- No description in definition, used "Microphone"
- minetest.formspec_escape miss-spelt
- minetest.swap_node needs node table {name = "mod:node"}, not string
- Give the button_exit in the formspec a name (I tried save_hotword). In microphone_on_receive_fields only set the hotword if fields.save_hotword
Otherwise hotword is updated on any form action, including escape key
Code: Select all
if fields.save_hotword then meta:set_string("mesecons_microphone_hotword",fields.hotword) microphone_make_formspec(pos) end
- not_in_creative_inventory should only be for "mesecons_microphone:microphone_on"?
- Could use variable in formspec so you don't need to keep updating it.
"field[0.3,1;5,1;hotword;Set A Hotword;${mesecons_microphone_hotword}]" - Should check if placer is valid player ObjectRef in after_place_node
if placer and placer:is_player () then ... end
(placer can be nil).
-
- Member
- Posts: 128
- Joined: Sun Aug 05, 2018 12:37
- In-game: Maverick2797
- Location: Poking about here and there...
Re: [mod] Mesecons Microphone [mesecons_microphone] [wip]
@loosewheel thank you so much! For some reason I decided to start my first real mod at 11pm and apparently missed a lot of the particulars :)
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]
-
- Member
- Posts: 128
- Joined: Sun Aug 05, 2018 12:37
- In-game: Maverick2797
- Location: Poking about here and there...
Re: [mod] Mesecons Microphone [mesecons_microphone] [wip]
Got this ready to go. Tidied up the code with loosewheel's suggestions, added textures and a license. Please let me know if there's anything else I need to do/add to make it release-worthy 😊
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 24 guests