Scrap Mechanic

Scrap Mechanic

Programmable Processor
wingcomstriker405  [developer] 26 Feb, 2020 @ 9:54am
Changes
Here ill post the changes that come with each update
< >
Showing 1-5 of 5 comments
wingcomstriker405  [developer] 26 Feb, 2020 @ 9:56am 
Update
With this update i release a completely rewritten version of the mod with cool features and improvments.

General stuff:
- changed storage blocks so that they can store multiple files
- changed keys to work with e as activation method (to cycle see block description)
- improved display performance
- added runtime performance (all blank lines will be removed (to time a program see sleep instruction))
- removed fixed file length
- fixed a bug with asynchronous cursor position

Added keys:
pos1 - goes to the start of the line (editor | command line)
end - goes to the end of the line (editor | command line)
copy - copies the line (editor only)
cut - cuts out the line (editor only)
paste - pastes in the content of the clipboard (editor only)
color - writes the color code of the color its painted in (editor only)
stop - stops the program when running or sets all outputs to 0
return - adds a new line and jumps to it can also be used to split a line (editor only)

Added commands:
copy - copies a file to the given destination (copy <source filename> <destination filename>) (console only)
reset - sets all outputs to 0
clear - clears the screen
clean - deletes all programs (including the ones saved)
list - prints out a list in the console

Added instructions:
sleep - waits the given amout of ticks (sleep <value> will result in 0 -> 1 otherwise value -> value)
out - outputs a value (out <color> => outputs the value of the accumulator or out <value> <color> => outputs the given value)
import - imports a file to a given location (import <source filename> or import <source filename> <destination filename>)
stop - sets all outputs to 0
Last edited by wingcomstriker405; 5 Apr, 2020 @ 1:37pm
wingcomstriker405  [developer] 5 Apr, 2020 @ 1:39pm 
Patch
- fixed sleep instruction
- fixed io blocks (red and magenta color codes)
wingcomstriker405  [developer] 9 Apr, 2020 @ 4:14am 
Update
With this update some long needed features finally arrive :D

General:
- added runtime log (see print instruction)

Blocks:
- moved the screen to a new block (able to spawn the screen dynamicaly (in different positions))
- added a program importer to import files
- added a startup block with which you can start a program you set to be the startup program (needs logic input to start)

Instructions:
- added <instruction> <value/address> <address> to the add, sub, div, mul, save instruction to allow more efficient programs
- added print (will print address and value if address is given (otherwise just the value))
- added prints (will always print the value without the address)

Commands:
- startup <filename> sets the file that will be executed when startup block gives input


Changed Behavior:
To get the graphics onto the screen you need to connect the computer to the display manager and than press 'e' on the computer to recognize the screen.
After that just press 'e' on the displaymanager.

To import files you just need to write them into the 'programs.json' file in the mod folder. Than place down the importer and connect it to the storage blocks. Press 'e' on the importer. To check if the files were imported correctly press 'e' on the storage block to get a list of all programs on the storage block.
Last edited by wingcomstriker405; 9 Apr, 2020 @ 4:18am
wingcomstriker405  [developer] 9 Apr, 2020 @ 2:33pm 
Update
Most of this update is related to quality of life to improve programs and programming:)
General Stuff:
- fixed console prints for io blocks
- fixed console prints for piston controller
- fixed console prints for bearing controller
- fixed console prints for motor controller

Instructions:
- added decimal number support
- added relativ jump support


Blocks:
- added logic -> number converter
- added number -> logic converter

Commands:
- added 'ln' command to activate systemwide linenumbers
Last edited by wingcomstriker405; 9 Apr, 2020 @ 3:06pm
wingcomstriker405  [developer] 11 Apr, 2020 @ 10:43am 
Update
This updates contains a new feature which allows you to set a custom screen size.

Commands:
- removed the startup command
- added a bind command (replacement for startup) to have a selection of programs to start
- added a size command to set the display size (max: 100x50, min:10x10)
Last edited by wingcomstriker405; 11 Apr, 2020 @ 10:45am
< >
Showing 1-5 of 5 comments
Per page: 1530 50