mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Limit the titles of printed pages
Just enforce the same restrictions as we do for computer/disk labels.
This commit is contained in:
		| @@ -11,6 +11,7 @@ import dan200.computercraft.api.lua.LuaException; | |||||||
| import dan200.computercraft.api.peripheral.IComputerAccess; | import dan200.computercraft.api.peripheral.IComputerAccess; | ||||||
| import dan200.computercraft.api.peripheral.IPeripheral; | import dan200.computercraft.api.peripheral.IPeripheral; | ||||||
| import dan200.computercraft.core.terminal.Terminal; | import dan200.computercraft.core.terminal.Terminal; | ||||||
|  | import dan200.computercraft.shared.util.StringUtil; | ||||||
|  |  | ||||||
| import javax.annotation.Nonnull; | import javax.annotation.Nonnull; | ||||||
|  |  | ||||||
| @@ -108,7 +109,7 @@ public class PrinterPeripheral implements IPeripheral | |||||||
|                 // setPageTitle |                 // setPageTitle | ||||||
|                 String title = optString( args, 0, "" ); |                 String title = optString( args, 0, "" ); | ||||||
|                 getCurrentPage(); |                 getCurrentPage(); | ||||||
|                 m_printer.setPageTitle( title ); |                 m_printer.setPageTitle( StringUtil.normaliseLabel( title ) ); | ||||||
|                 return null; |                 return null; | ||||||
|             } |             } | ||||||
|             case 8: // getPaperLevel |             case 8: // getPaperLevel | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 SquidDev
					SquidDev