mirror of
				https://github.com/simon987/Much-Assembly-Required.git
				synced 2025-10-31 16:26:51 +00:00 
			
		
		
		
	Confirmation on code upload
This commit is contained in:
		
							parent
							
								
									8f117c5e27
								
							
						
					
					
						commit
						41b981f3ab
					
				| @ -10,7 +10,6 @@ import java.net.InetSocketAddress; | |||||||
| public class Main { | public class Main { | ||||||
|     public static void main(String[] args){ |     public static void main(String[] args){ | ||||||
| 
 | 
 | ||||||
|         //TODO: Confirmation on code upload |  | ||||||
|         //TODO: Copper/Iron/Biomass: on hover only |         //TODO: Copper/Iron/Biomass: on hover only | ||||||
|         //TODO: Docs |         //TODO: Docs | ||||||
|         //TODO: |         //TODO: | ||||||
|  | |||||||
| @ -30,6 +30,12 @@ public class CodeUploadHandler implements MessageHandler { | |||||||
|                 //Write assembled code to mem |                 //Write assembled code to mem | ||||||
|                 user.getUser().getCpu().getMemory().write((char) ar.origin, ar.bytes, ar.bytes.length); |                 user.getUser().getCpu().getMemory().write((char) ar.origin, ar.bytes, ar.bytes.length); | ||||||
|                 user.getUser().getCpu().setCodeSegmentOffset(ar.origin); |                 user.getUser().getCpu().setCodeSegmentOffset(ar.origin); | ||||||
|  | 
 | ||||||
|  |                 JSONObject response = new JSONObject(); | ||||||
|  |                 response.put("t", "codeResponse"); | ||||||
|  |                 response.put("bytes", ar.bytes.length); | ||||||
|  | 
 | ||||||
|  |                 user.getWebSocket().send(response.toJSONString()); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user