TBye101/MagicalLife

Multi-Language Support

TBye101 opened this issue · 13 comments

Multi-Language Support
a2937 commented

Can you provide more details? Do you mean that you want the ability to load languages for your application? If so, what sort of external file format did you have in mind to use?

Supporting multiple languages for the GUI text/other game text was the goal in mind. I'm open to suggestions for the external file format, but off the top of my head I would most likely favor .resx files or json.

a2937 commented

Hehe. I was going to actually suggest using resx files to be quite honest.

Given that this is a .net game, resx would be very convenient.

a2937 commented

I was looking over the classes and noticed Item durability is not being stored in the MagicalLifeAPI.World.Base namespace under MagicalLifeAPIStandard.

/// <summary> /// /// </summary> /// <param name="name">The display name of the item.</param> /// <param name="durability">The durability of the item.</param> /// <param name="lore">Any text accompanying the item.</param> /// <param name="location">The location of this item.</param> /// <param name="stackableLimit">How many items of this kind can be in one stack.</param> /// <param name="count">How many of this item to create into a stack.</param> /// <param name="itemID">The ID of this item.</param> protected Item(string name, int durability, List<string> lore, int stackableLimit, int count, Type itemType, string textureName, double itemWeight) { this.Name = name; this.Lore = lore; this.StackableLimit = stackableLimit; this.CurrentlyStacked = count; this.ItemID = ItemRegistry.ItemTypeID.First(x => x.Value == itemType).Key;//slow this.TextureIndex = AssetManager.GetTextureIndex(textureName); this.TextureName = textureName; this.Validate(); this.TextureIndex = AssetManager.GetTextureIndex(this.TextureName); this.ItemWeight = itemWeight; }

Was this intentional? If not, should I add a durability property or remove it from the constructor?

Definitely unintentional. If you'd like, please add a durability property. Durability isn't used right now, but will be someday in the future.

a2937 commented

On the MagicalLifeGuiWindows I have two comments regarding, the NewGameButton GetTexture method. First, it doesn't seem to be used anywhere. Secondly is it possible that it could work better as a constant?

a2937 commented

I'm almost ready to push what I have so far, but I wanna test it. The thing is I keep getting a crash when I try to create a new world on the MagicalLifeGUIWindows project. I've fixed the recursive log error but still seem to keep getting a chunk null exception. Perhaps you can look at the repo version I have see what the issue could be.

a2937 commented

I pulled from the main branch because I had no reason to not believe it was the most up to date version until I checked the other branches.

a2937 commented

My apologies. It was my fault it crashes. I was not paying to ProtoUtil's number system.