New: Now entire apartment complexes can be spawned with a simple build chest.
Do you know this problem? New players join a server and start building ugly cobble boxes around spawn. Others ask everyone they can find if they can "stay"/"move into" a house. You'd love to give them a small place for their locked chests (space close to spawn is useful on survival servers) and a protected place to melt their ores - but you can't really because locked objects have to be placed by their owner. Which would require very split-up and small-sized protection around spawn and usually both players have to be present.
This mod has been inspired by cheapies new-player-apartments on VanessaEs Vanilla server, but also by the need arising on many other servers, especially the Xanandu server with its more likely item loss at death.
This is a sample apartment house that can hold up to 16 players. One row of apartments is underground. The mod itself does not come with any buildings - this is really just an example how you can make it look like:
And here is a sample apartment from the house above. It has 9 locked chests, 3 furnaces, a travelnet box and locked signs between the chests where players may write down what they put into the chests. The apartment is protected against thiefs (content of furnaces) by a steel door.
Apartments are controlled through apartment control panels. Their texture is a mixture of the top of a chest and a steel door, and they look a bit like buttons.
When right-clicking a newly placed apartment control panel, it asks you to enter some values:
The "Name or number" field has to be a uniq name for each apartment. It may be something like street name/building name plus number plus letter or any other scheme you like. The "category" field is important because each player can only rent one apartment of each category at a time. This way, you may for example permit to rent an apartment and a shop.
The left/right/back/front/up/down values instruct the panel as to how far its influence - that is, the change of ownership of nodes - shall reach. All values are relative to the position of the panel. The suggested values are adjusted for the type of apartment shown in the pictures.
Once you've clicked on "Store and offer", the infotexts (mouseover descriptions) of all those nodes that have owners and which are now part of the apartment are changed automaticly. They indicate which apartment i.e. the chest or door belongs to. The panel can now be used to actually rent the apartment:
After a player who wants to rent it clicked on the rent-button, the panel will show who rented the apartment. The infotexts of the locked objects again change accordingly.
If a player no longer wants to live in his apartment, he can click on the "move out" button. The apartment will then be free for rent again. In case the player forgot any items in the locked chests, he can rent the apartment again in order to take those items out.
Players who have been banned or which admins want to move out for other reasons can be thrown out of apartments by clicking on the "move out" button - provided you do have the apartment_unrent privilege.
Since there can be many apartments, and finding back to one's own might be tricky for new players, there's an
Code: Select all
/aphome
Download: https://github.com/Sokomine/apartment/a ... master.zip
Browse code: https://github.com/Sokomine/apartment
Version: 1.2
Licence: GPLv3
License for textures: same as minetest_game (does not add any new)
Depends on: -nothing-
Supported nodes that change ownership to the player who rented the apartment (not all tested yet):
* default: locked chest, steel door
* locked_sign
* technic: locked iron, copper and gold chests
* inbox
* locks: shared locked chest, furnace, sign, door
* More chests: Dropbox, secred chest, shared chest
* Item frames: frames and pedestrals
* travelnet: travelnet (elevator might be problematic)
* locked travelnet: travelnet (elevator might be problematic)
* money: shop and barter shop
* currency and economy: shop and safe
* BitChange: Bank, moneychanger, warehouse and shop; not toolrepair
* Vendor: vendor and depositor
There is no craft receipe for the apartment control panel. Use /giveme apartment:apartment
The panel may also be used to rent out individual shops or locked signs.
All players who want to rent something have to do is right-click the panel once and click on the rent-buttion :-)
New: Admins can now spawn entire apartment blocks in one go. Just use
Code: Select all
/giveme apartment:build_chest
This is the sample apartment with horizontal copies set to 4 and vertical copies set to 3:
Experiment with diffrent materials for the houses.
If you no longer want the apartment house, dig the build chest. The nodes in the apartments will be replaced by leaves which will soon decay.
You may spawn up to 20x20 apartments at once, although that's a bit much. Try to stick to a reasonable number so that your server will not look boring.
It is also possible to add own schematics if you want to use a diffrent type of apartment on your server. You can either create a schematic with worldedit or you can build the apartment, attach an apartment control panel - and initiate saving of that apartment as a schematic by adding "save_as_" in front of the apartment's name - i.e. name it "save_as_myapartment". Provided you do have the apartment_unrent priv, you'll find a file schems/myapartment_0_90.mts (instead of 90, it may be 0, 180 or 270), and you'll be able to use myapartment_0_90 as the file name in the apartment spawn chest. Make sure that your apartment either contains the right OR left wall, and either contains the floor OR the ceiling. Else you'll have walls or floors 2 blocks thick.
The huge advantage of this way of placing apartments in the world is that they will be set up automaticly and are ready to rent immediately. The only thing you'll have to do is the missing floor or ceiling plus one wall. You may of course also add further decoration.
Once you are satisfied with your building, remove the build chest with worldedit in order to avoid accidental digs.