MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 430 forks source link

[Suggestion denied] Lua BIOS eeprom readonly and method eeprom.isReadonly() #2823

Closed ExDomino closed 6 years ago

ExDomino commented 6 years ago

Hello,

I suggest to make that the Lua BIOS eeprom is readonly by default. Also, adding a new method isReadOnly() to see if an eeprom is readonly or not. And a return value for set() that returns the same value of isReadOnly().

Thank you in advance.

payonel commented 6 years ago

http://ocdoc.cil.li/component:eeprom see makeReadonly if readonly, set and setLabel cannot be modified, though setData can there is currently no way, short of trying to use set or setLabel, to determine if the eeprom is ro

ExDomino commented 6 years ago

And to make Lua Eeeprom (made from crafted eeprom and manual) readonly by default?

skyem123 commented 6 years ago

Eh, that might cause confusion though...

ExDomino commented 6 years ago

OpenOS floppy disks are already readonly.

payonel commented 6 years ago

we're not going to change the default, and there is a workaround to detect isReadonly (That is: eeprom.set(eeeprom.get()) succeeded if it is rw)

ExDomino commented 6 years ago

Ok, so keep base floppy disks readonly and base eeeprom not readonly. It's confusing but don't worry, you are the author.