MightyPirates / OpenComputers

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

Feature request: Allow robot to change tool/card/disk/upgrade #87

Closed rmellema closed 10 years ago

rmellema commented 10 years ago

Allow a robot to (un)equip a tool/card/disk/upgrade would give the user more flexibility and more opportunities to build autonomous robots.

For example, currently it is impossible to have a robot that can both recharge itself and know its relative position, since both need an upgrade to be installed. Allowing the robot to (un)equip the upgrade however, would solve this problem.

I would imagine that it would not be possible to swap a tool/card/disk/upgrade with another tool/card/disk/upgrade, however. I think it would be more fair if you would need an empty slot to unequip first, before you can reequip an item.

This would also allow a robot to replace broken tools.

fnuecke commented 10 years ago

Read a certain tweet? ;-)

The fact that robots cannot change their own equipment is deliberate, to keep their power in check a little. You can use another robot (or any inventory manipulation system, such as pipes) to change a robot's equipment, though. Right is the tool, left the card, back the floppy - and in the next release probably the upgrade, too (originally intended not to make this automatable, but thinking about it again, if cards can be swapped this should be changeable, too, I guess). The reasoning for the sides is that up, down and front are used to interface with the actual inventory, in both directions (i.e. the robot can "pick up" and "eject" inventory stuff in those directions in various ways actively, too).

I might add a setting to allow autonomous equipment changes, so I'll keep this open for now. Though I think coding a team of two robots that exchange each other's equipment is much more interesting :-)

rmellema commented 10 years ago

No, not at all :P Had the idea for a longer time though, but didn't have the time to try so stuff first, and I wanted to do that. I didn't know that you could change the equipment using sides, but I will try that out.

But having two robots cooperate is indeed more interesting

fnuecke commented 10 years ago

There'll be an upgrade in 1.3 that will allow changing the equipped tool.