gmlaxfanatic / Contraptions

Emergent machine creation through fuctionalized minecraft blocks
MIT License
3 stars 6 forks source link

Make custom blocks that remember lore when placed #29

Open TealNerd opened 9 years ago

TealNerd commented 9 years ago

We can do so many things if we can place, for instance, a snitch. But this snitch has lore that says it never expires. So that gets logged in a database or a save file somewhere and when the block is broken it drops a snitch with the same lore.

gmlaxfanatic commented 9 years ago

So each contraption is saved with a string that associates it with a particular properties file. So I think this would be implemented with a gadget which listens for a block being placed of a particular type, and then when the block is placed it creates a contraption with the associated properties reference, say "perpetualsnitch", this properties file then also specifies through another gadget to drop the same item when the contraption is destroyed. This should give you expected behavior in the contraptions framework.

On a side note expiring snitchs exist to prevent databases from growing too large over, so its probably not something we'd want to implement.

On Tue, Mar 31, 2015, 8:40 AM biggestnerd notifications@github.com wrote:

We can do so many things if we can place, for instance, a snitch. But this snitch has lore that says it never expires. So that gets logged in a database or a save file somewhere and when the block is broken it drops a snitch with the same lore.

— Reply to this email directly or view it on GitHub https://github.com/gmlaxfanatic/Contraptions/issues/29.

TealNerd commented 9 years ago

Yeah it would have to be super expensive but just an example

On Tuesday, March 31, 2015, gmlaxfanatic notifications@github.com wrote:

So each contraption is saved with a string that associates it with a particular properties file. So I think this would be implemented with a gadget which listens for a block being placed of a particular type, and then when the block is placed it creates a contraption with the associated properties reference, say "perpetualsnitch", this properties file then also specifies through another gadget to drop the same item when the contraption is destroyed. This should give you expected behavior in the contraptions framework.

On a side note expiring snitchs exist to prevent databases from growing too large over, so its probably not something we'd want to implement.

On Tue, Mar 31, 2015, 8:40 AM biggestnerd <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

We can do so many things if we can place, for instance, a snitch. But this snitch has lore that says it never expires. So that gets logged in a database or a save file somewhere and when the block is broken it drops a snitch with the same lore.

— Reply to this email directly or view it on GitHub https://github.com/gmlaxfanatic/Contraptions/issues/29.

— Reply to this email directly or view it on GitHub https://github.com/gmlaxfanatic/Contraptions/issues/29#issuecomment-88144121 .