You've already forked ComfyFactorio
							
							
				mirror of
				https://github.com/ComfyFactory/ComfyFactorio.git
				synced 2025-10-30 23:47:41 +02:00 
			
		
		
		
	locale fixes
This commit is contained in:
		| @@ -1,9 +1,14 @@ | ||||
| local Public = {} | ||||
|  | ||||
| local locale_string = {'', '[PRINT] ', nil} | ||||
| local locale_string = {'', nil, nil} | ||||
| local raw_print = print | ||||
|  | ||||
| function print(str) | ||||
| function print(str, tag) | ||||
|     if tag then | ||||
|         locale_string[2] = tag | ||||
|     else | ||||
|         locale_string[2] = '[PRINT]' | ||||
|     end | ||||
|     locale_string[3] = str | ||||
|     log(locale_string) | ||||
| end | ||||
|   | ||||
| @@ -115,8 +115,12 @@ end | ||||
|  | ||||
| --- Sends a embed message to the linked discord channel. The message is sanitized of markdown server side. | ||||
| -- @param  message<string> the content of the embed. | ||||
| function Public.to_discord_embed(message) | ||||
|     raw_print(discord_embed_tag .. message) | ||||
| function Public.to_discord_embed(message, loc) | ||||
|     if loc then | ||||
|         somefunc that includes loc | ||||
|     else | ||||
|         raw_print(discord_embed_tag .. message) | ||||
|     end | ||||
| end | ||||
|  | ||||
| --- Sends a embed message to the linked discord channel. The message is not sanitized of markdown. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user