JeCel reports: Would it be possible to have a ... #4041

Open
opened 2023-03-21 15:01:44 +00:00 by yourland-report · 10 comments

JeCel reports a bug:

Would it be possible to have auto-complete for city names? Could come in handy when doing announcements but also generally since some city names are rather long and have complicated spelling.

Player position:

{
	x = 6524.1201171875,
	y = -25.499000549316,
	z = 10357.842773438
}

Player look:

{
	x = 0.3882916867733,
	y = 0.012042480520904,
	z = 0.92145782709122
}

Player information:

{
	formspec_version = 6,
	min_rtt = 0.020999999716878,
	avg_rtt = 0.035000000149012,
	lang_code = "",
	max_jitter = 0.391999989748,
	avg_jitter = 0.0069999992847443,
	connection_uptime = 6440,
	serialization_version = 29,
	patch = 1,
	protocol_version = 41,
	state = "Active",
	minor = 6,
	min_jitter = 0,
	max_rtt = 0.42599999904633,
	major = 5,
	version_string = "5.6.1",
	ip_version = 6
}

Player meta:

{
	fields = {
		crafted = "433930",
		["ambience.svol"] = "0.1",
		["stamina:level"] = "14",
		xp = "2001785",
		["stamina:exhaustion"] = "18",
		yl_commons_player_created = "1621787993",
		yl_commons_player_joined = "1679404504",
		arenalib_infobox_arenaID = "0",
		["signslib:pos"] = "(-1549,155,-3510)",
		xp_redo_hud_color = "0x99ffff",
		repellant = "0",
		["ocean_build.last_warning"] = "1.66672e+09",
		inflicted_damage = "1640556",
		yl_commons_thankyou = "169",
		jointime = "1621787993",
		bitten = "0",
		["petz:werewolf"] = "0",
		["petz:lycanthropy"] = "0",
		["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"jump\"] = 1.5, [\"gravity\"] = 1, [\"sneak_glitch\"] = false, [\"speed\"] = 2, [\"sneak\"] = true}",
		["3d_armor_inventory"] = "return {\"3d_armor:helmet_crystal 1 3260\", \"3d_armor:chestplate_crystal 1 3260\", \"3d_armor:leggings_crystal 1 3260\", \"3d_armor:boots_crystal 1 3260\", \"shields:shield_rainbow 1 1304\", \"\"}",
		["petz:werewolf_vignette_id"] = "19",
		partychat = "main",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		["stamina:poisoned"] = "no",
		["petz:werewolf_clan_idx"] = "4",
		punch_count = "76912",
		played_time = "4794338",
		yl_church = "return {[\"last_heal\"] = 1673875344, [\"last_death\"] = {[\"y\"] = 50, [\"z\"] = 1385, [\"x\"] = 3638}, [\"last_death_portal\"] = 1679012670}",
		hud_state = "on",
		digged_nodes = "1430074",
		placed_nodes = "404355",
		died = "35",
		["ocean_build.ocean_built"] = "8"
	}
}

Log identifier


[MOD] yl_report log identifier = f1oYJ5DVExKlhYXg9S54G04Cije9q5Gb

Profiler save:

profile-20230321T150144.json_prettyEE

Status:

# Server: version: 5.6.1-yl | game: Minetest Game | uptime: 20h 53min 47s | max lag: 4.21s | clients (24/52): AliasAlreadyTaken, Bailiff, Barlog4, Bla, BobaCat, daydream, ElusiveAstropath, FullmetalBOI, JeCel, johanlegend, keli, labrat, Lupercus, mahou, MineWorlds, Murmel, niceride, Qualia, Quavery, Service, shanish3, Stelio, totman1234, upie

Teleport command:

/teleport xyz 6524 -25 10358

Compass command:

/give_compass Construction f1oYJ5DVExKlhYXg9S54G04Cije9q5Gb D2691E 6524 -25 10358
JeCel reports a bug: > Would it be possible to have auto-complete for city names? Could come in handy when doing announcements but also generally since some city names are rather long and have complicated spelling. Player position: ``` { x = 6524.1201171875, y = -25.499000549316, z = 10357.842773438 } ``` Player look: ``` { x = 0.3882916867733, y = 0.012042480520904, z = 0.92145782709122 } ``` Player information: ``` { formspec_version = 6, min_rtt = 0.020999999716878, avg_rtt = 0.035000000149012, lang_code = "", max_jitter = 0.391999989748, avg_jitter = 0.0069999992847443, connection_uptime = 6440, serialization_version = 29, patch = 1, protocol_version = 41, state = "Active", minor = 6, min_jitter = 0, max_rtt = 0.42599999904633, major = 5, version_string = "5.6.1", ip_version = 6 } ``` Player meta: ``` { fields = { crafted = "433930", ["ambience.svol"] = "0.1", ["stamina:level"] = "14", xp = "2001785", ["stamina:exhaustion"] = "18", yl_commons_player_created = "1621787993", yl_commons_player_joined = "1679404504", arenalib_infobox_arenaID = "0", ["signslib:pos"] = "(-1549,155,-3510)", xp_redo_hud_color = "0x99ffff", repellant = "0", ["ocean_build.last_warning"] = "1.66672e+09", inflicted_damage = "1640556", yl_commons_thankyou = "169", jointime = "1621787993", bitten = "0", ["petz:werewolf"] = "0", ["petz:lycanthropy"] = "0", ["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"jump\"] = 1.5, [\"gravity\"] = 1, [\"sneak_glitch\"] = false, [\"speed\"] = 2, [\"sneak\"] = true}", ["3d_armor_inventory"] = "return {\"3d_armor:helmet_crystal 1 3260\", \"3d_armor:chestplate_crystal 1 3260\", \"3d_armor:leggings_crystal 1 3260\", \"3d_armor:boots_crystal 1 3260\", \"shields:shield_rainbow 1 1304\", \"\"}", ["petz:werewolf_vignette_id"] = "19", partychat = "main", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", ["stamina:poisoned"] = "no", ["petz:werewolf_clan_idx"] = "4", punch_count = "76912", played_time = "4794338", yl_church = "return {[\"last_heal\"] = 1673875344, [\"last_death\"] = {[\"y\"] = 50, [\"z\"] = 1385, [\"x\"] = 3638}, [\"last_death_portal\"] = 1679012670}", hud_state = "on", digged_nodes = "1430074", placed_nodes = "404355", died = "35", ["ocean_build.ocean_built"] = "8" } } ``` Log identifier ``` [MOD] yl_report log identifier = f1oYJ5DVExKlhYXg9S54G04Cije9q5Gb ``` Profiler save: ``` profile-20230321T150144.json_prettyEE ``` Status: ``` # Server: version: 5.6.1-yl | game: Minetest Game | uptime: 20h 53min 47s | max lag: 4.21s | clients (24/52): AliasAlreadyTaken, Bailiff, Barlog4, Bla, BobaCat, daydream, ElusiveAstropath, FullmetalBOI, JeCel, johanlegend, keli, labrat, Lupercus, mahou, MineWorlds, Murmel, niceride, Qualia, Quavery, Service, shanish3, Stelio, totman1234, upie ``` Teleport command: ``` /teleport xyz 6524 -25 10358 ``` Compass command: ``` /give_compass Construction f1oYJ5DVExKlhYXg9S54G04Cije9q5Gb D2691E 6524 -25 10358 ```
AliasAlreadyTaken was assigned by yourland-report 2023-03-21 15:01:44 +00:00
flux added the
1. kind/enhancement
3. source/engine
labels 2023-03-21 17:14:28 +00:00
Member

it'd be lovely, but currently autocomplete is hard-coded client side in the way it is. upstream issue: https://github.com/minetest/minetest/issues/9663

it'd be lovely, but currently autocomplete is hard-coded client side in the way it is. upstream issue: https://github.com/minetest/minetest/issues/9663

This could be a good first issue for a novice C++ programmer?

This could be a good first issue for a novice C++ programmer?
Member

This could be a good first issue for a novice C++ programmer?

probably not. this involves creating an appropriate lua API, implementing new netcode to transmit the dictionary of complete-able strings, and also modifying the client to be able to use it. not super hard, but also not a good novice project as it touches on so many disparate systems.

> This could be a good first issue for a novice C++ programmer? probably not. this involves creating an appropriate lua API, implementing new netcode to transmit the dictionary of complete-able strings, and also modifying the client to be able to use it. not super hard, but also not a good novice project as it touches on so many disparate systems.

I'd expect something as simple as

core.add_to_autocomplete("Haven")

The datastructure that autocompletes hopefully is not derived clientside from the list of known other clients ...

I'd like the next best C++ apprentice programmer have a look at that. It can't be too hard, but it's certainly not easy.

I'd expect something as simple as ``` core.add_to_autocomplete("Haven") ``` The datastructure that autocompletes hopefully is not derived clientside from the list of known other clients ... I'd like the next best C++ apprentice programmer have a look at that. It can't be too hard, but it's certainly not *easy*.

The datastructure that autocompletes hopefully is not derived clientside from the list of known other clients ...

https://github.com/minetest/minetest/blob/master/src/gui/guiChatConsole.cpp#L644
Minetest 1 : Alias 0 😝

> The datastructure that autocompletes hopefully is not derived clientside from the list of known other clients ... https://github.com/minetest/minetest/blob/master/src/gui/guiChatConsole.cpp#L644 Minetest 1 : Alias 0 😝

but I just learned by looking at the code that you can cycle through names with hitting TAB again and even backwards with shift+TAB.
Doesnt work if its at the start at the line probably because of the ":" that gets added

but I just learned by looking at the code that you can cycle through names with hitting TAB again and even backwards with shift+TAB. Doesnt work if its at the start at the line probably because of the ":" that gets added

The datastructure that autocompletes hopefully is not derived clientside from the list of known other clients ...

https://github.com/minetest/minetest/blob/master/src/gui/guiChatConsole.cpp#L644
Minetest 1 : Alias 0 😝

SIGH

Ofc. Why not.

But if its clientside, you can cheat yourself in all the strings you want to have:

else if(event.KeyInput.Key == KEY_TAB)
		{
			// Tab or Shift-Tab pressed
			// Nick completion
			std::list<std::string> names = m_client->getConnectedPlayerNames();
			bool backwards = event.KeyInput.Shift;
			names.push_back("Sacrementum");
			names.push_back("Aloha");
			names.push_back("Haven");
			prompt.nickCompletion(names, backwards);
			return true;
		}
> > The datastructure that autocompletes hopefully is not derived clientside from the list of known other clients ... > > https://github.com/minetest/minetest/blob/master/src/gui/guiChatConsole.cpp#L644 > Minetest 1 : Alias 0 😝 > *SIGH* Ofc. Why not. But if its clientside, you can cheat yourself in all the strings you want to have: ```cpp else if(event.KeyInput.Key == KEY_TAB) { // Tab or Shift-Tab pressed // Nick completion std::list<std::string> names = m_client->getConnectedPlayerNames(); bool backwards = event.KeyInput.Shift; names.push_back("Sacrementum"); names.push_back("Aloha"); names.push_back("Haven"); prompt.nickCompletion(names, backwards); return true; } ```

Was sure it was suggested/done before and found it.
https://github.com/minetest/minetest/issues/9663

Was sure it was suggested/done before and found it. https://github.com/minetest/minetest/issues/9663
Member

Was sure it was suggested/done before and found it.
https://github.com/minetest/minetest/issues/9663

#4041 (comment)

> Was sure it was suggested/done before and found it. > https://github.com/minetest/minetest/issues/9663 https://gitea.your-land.de/your-land/bugtracker/issues/4041#issuecomment-45146

Was sure it was suggested/done before and found it.
https://github.com/minetest/minetest/issues/9663

#4041 (comment)

Please explain, cause honestly makes no sense as this is #4041 so you are posting a link to this issue itself as reply to my linking to the minetest repo with a discussion about that feature.

> > Was sure it was suggested/done before and found it. > > https://github.com/minetest/minetest/issues/9663 > > https://gitea.your-land.de/your-land/bugtracker/issues/4041#issuecomment-45146 Please explain, cause honestly makes no sense as this is #4041 so you are posting a link to this issue itself as reply to my linking to the minetest repo with a discussion about that feature.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#4041
No description provided.