Skip to content

Commit

Permalink
Mod rewrite and new models (#21)
Browse files Browse the repository at this point in the history
* Aliases moved to utils folder

* Method to generate two different formspec layouts, big and small

* Log Actions moved to separate module

* Added method to generate a chest definition

* Rewritten models

* Add Fridge model

* Add Toolbox models

* "Mod loaded" message; Updated localization template

* Add Italian localization

* Fridge now has both normal and big (2 blocks) models

* Fixed mixed indentation

* Rewritten README; improved IT and FR (thanks to @louisroyer) localizations.
  • Loading branch information
nxet committed Oct 8, 2020
1 parent 939c7ea commit 74b3c5a
Show file tree
Hide file tree
Showing 37 changed files with 659 additions and 595 deletions.
102 changes: 70 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,85 @@
more_chests
===========
<style>
th { display: none; }
td { text-align: center; }
</style>

More Chests
# more_chests
Originally a fork of 0gb.us's chests_0gb_us (https://forum.minetest.net/viewtopic.php?f=11&t=4366).
Megaf's more_chests fixes several bugs, uses new textures and adds compatibility with [VanessaE's Pipeworks] (https://github.com/VanessaE/pipeworks) mod.
nxet's rework introduces a new backend which allows for easier extension of the available models, including two new models showcasing the feature.

This mod is a fork of 0gb.us's chests_0gb_us https://forum.minetest.net/viewtopic.php?f=11&t=4366

Megaf's more_chests fixes several bugs, uses new textures and adds compatibility with [VanessaE's Pipeworks] (https://github.com/VanessaE/pipeworks) mod.
### Available models
> NOTE: descriptions of the original models come from 0gb.us initial effort
The following text was writen by 0gb.us
```
Cobble Chest:
{'default:wood','default:cobble','default:wood'},
{'default:cobble','default:steel_ingot','default:cobble'},
{'default:wood','default:cobble','default:wood'}
#### Cobble Chest
This locked chest looks like cobblestone, and has no info text. Great for hiding things in. However, unlike real cobblestone, this chest is breakable by hand. If you suspect there is one hiding, hold the left mouse button and run your hand along the walls. When cracks appear, you've found the chest.
1 | 2 | 3
---|---|---
default:wood | default:cobble | default:wood
default:cobble | default:steel_ingot | default:cobble
default:wood | default:cobble | default:wood

This locked chest looks like cobblestone, and has no info text. Great for hiding things in. However, unlike real cobblestone, this chest is breakable by hand. If you suspect there is one hiding, Hold the left mouse button, ant run your hand along the walls. When cracks appear, you've found the chest.
Drop Box:
{'default:wood','','default:wood'},
{'default:wood','default:steel_ingot','default:wood'},
{'default:wood','default:wood','default:wood'}

#### Drop Box
Anyone can put things in, but only the chest's placer can remove items.
1 | 2 | 3
---|---|---
default:wood | _empty_ | default:wood
default:wood | default:steel_ingot | default:wood
default:wood | default:wood | default:wood

Secret Chest:
{'default:wood','default:cobble','default:wood'},
{'default:wood','default:steel_ingot','default:wood'},
{'default:wood','default:wood','default:wood'}

As long as you remember to click “close” before you leave the chest, no one can see what the chest contains. Only the chest's owner can click “open” and “close” on the chest's formspec, revealing and hiding the chest's contents.
#### Secret Chest
As long as you remember to click "close" before you leave the chest, no one can see what the chest contains. Only the chest's owner can click "open" and "close" on the chest's formspec, revealing and hiding the chest's contents.
1 | 2 | 3
---|---|---
default:wood | default:cobble | default:wood
default:wood | default:steel_ingot | default:wood
default:wood | default:wood | default:wood

Shared Chest:
{'default:wood','default:leaves','default:wood'},
{'default:wood','default:steel_ingot','default:wood'},
{'default:wood','default:wood','default:wood'}

#### Shared Chest
Exactly what it sounds like. The chest's placer can add people to the chest's shared list using the chest's formspec. Warning: anyone you add may empty the chest. When the chest is empty, it can be mined by anyone, just like a regular locked chest.
1 | 2 | 3
---|---|---
default:wood | default:leaves | default:wood
default:wood | default:steel_ingot | default:wood
default:wood | default:wood | default:wood

Wifi Chest
{'default:wood','default:mese','default:wood'},
{'default:wood','default:steel_ingot','default:wood'},
{'default:wood','default:wood','default:wood'}

#### Wifi Chest
A wacky chest that doesn't store it's items in the usual way, but instead, stores them remotely. For that reason, all wifi chests appear to have the same inventory. Due to not actually having an inventory, wifi chests can also be mined, even when they appear to have stuff in them. Lastly, as everyone gets their own wifi account, the items you see in the wifi chest are not the same items anyone else sees. This chest's properties make it nice for keeping secrets, as well as essentially almost doubling your inventory space, if you choose to carry one with you.
```
1 | 2 | 3
---|---|---
default:wood | default:mese | default:wood
default:wood | default:steel_ingot | default:wood
default:wood | default:wood | default:wood


#### Fridge
A new model which comes in two forms, 1- and 2-block tall, which indeed have different sizes inventories. No fancy functionality here, I just wanted to know at a glance which one is the chest I'm storing food into.

###### Fridge Recipe
1 | 2 | 3
---|---|---
_empty_ | default:steel_ingot | _empty_
default:steel_ingot | default:ice | default:steel_ingot
_empty_ | default:steel_ingot | _empty_

###### Big Fridge Recipe
1 | 2 | 3
---|---|---
default:steel_ingot | default:steel_ingot | default:steel_ingot
default:steel_ingot | default:ice | default:steel_ingot
default:steel_ingot | default:steel_ingot | default:steel_ingot


#### Toolbox
This model has no particular functionality to offer other than giving your tools' chest a new look. As a bonus you can also craft the chest with different types of wood, which will give you different results. For the fanciest garage workshop you ever built on Minetest.
1 | 2 | 3
---|---|---
default:wood | default:wood | default:wood
default:wood | default:pickaxe | default:wood
default:wood | default:wood | default:wood
> Note: crafting also accepts Aspen, Acacia, Junglewood, Pine and Steel instead of wood
115 changes: 0 additions & 115 deletions cobble.lua

This file was deleted.

113 changes: 0 additions & 113 deletions dropbox.lua

This file was deleted.

16 changes: 10 additions & 6 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
dofile(minetest.get_modpath("more_chests").."/cobble.lua")
dofile(minetest.get_modpath("more_chests").."/dropbox.lua")
dofile(minetest.get_modpath("more_chests").."/secret.lua")
dofile(minetest.get_modpath("more_chests").."/shared.lua")
dofile(minetest.get_modpath("more_chests").."/wifi.lua")
dofile(minetest.get_modpath("more_chests").."/aliases.lua")
dofile(minetest.get_modpath("more_chests").."/models/cobble.lua")
dofile(minetest.get_modpath("more_chests").."/models/dropbox.lua")
dofile(minetest.get_modpath("more_chests").."/models/fridge.lua")
dofile(minetest.get_modpath("more_chests").."/models/secret.lua")
dofile(minetest.get_modpath("more_chests").."/models/shared.lua")
dofile(minetest.get_modpath("more_chests").."/models/toolbox.lua")
dofile(minetest.get_modpath("more_chests").."/models/wifi.lua")

dofile(minetest.get_modpath("more_chests").."/utils/aliases.lua")

print ("[MOD] more_chests loaded")
10 changes: 8 additions & 2 deletions locale/more_chests.fr.tr
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# textdomain: more_chests
Cobble Chest=Coffre en pierre taillée
Dropbox=Boîte de dépôt
Fridge=Réfrigérateur
Big Fridge=Grand réfrigérateur
Secret Chest=Coffre secret
Shared Chest=Coffre partagé
Wifi Chest=Coffre wifi


Wooden Toolbox=Boîte à outils en bois
Aspen Wood Toolbox=Boîte à outils en bois de tremble
Acacia Wood Toolbox=Boîte à outils en bois d’acacia
Junglewood Toolbox=Boîte à outils en bois de la jungle
Pine Wood Toolbox=Boîte à outils en bois de pin
Steel Toolbox=Boîte à outils en acier
@1 (owned by @2)=@1 (appartient à @2)
Shared with (separate names with spaces)=Partagé avec (séparez les noms avec des espaces)
submit=valider
Loading

0 comments on commit 74b3c5a

Please sign in to comment.