[Mod] Smart renting [4.0] [smartrenting]

Post Reply
User avatar
AiTechEye
Member
Posts: 1002
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

[Mod] Smart renting [4.0] [smartrenting]

by AiTechEye » Post

Rent out your locked things and earn money!

Image

Licenses: code: LGPL-2.1, media: CC BY-SA-4.0
Version: 4
Depends: default?, pipeworks?, mesecons?
Source
Download




In V2-4:
fixed, deadlock by card
fixed set infotext on any checked node
fixed owner name to int again
+ can be dug by anyone if owner string is 0 or ""
+ user 0 cant place it
fixed users cant change rent status with the card
check item to put
test and prepare when card is used
drop paying itemstack when diging the node

Set up a rent panel and how much you want and how often the rented need to pay.
the renter can rent as long as they are paying, or for a limeted time for free (if you set up free renting, or players could rent it for ever)

The time is based on reality time and date, even no one would be near the panels, will it still update next time someone are near them (node timer)

Statuses:
Gray: is in setup mode
Green: is able for renting
Yellow: is rented by someone
Purple: the owner is ending the renting, the user cant add money to pay in this period, then the panels changes to setup mode.
Red: error, the owner need to empy the panels inventory

How to rent:

1: Set up the area
blocks to left, right, front, back...
choose kind of periods (Day,hour,minute,secund) and how many (count)
Category) is just a title
Put what to pay or nothing (free)
2: Save
Press Prepare to prepare stuff to rent out (by you)
3: Rent out
Now is the panel able for renting for a user

The card allows users to copy and paste settings in theirs panels and put them able for renting

All data is saved as metadata, not in a database


Notes:

The owner cant take the stuff the renter is paying with, as long they are renting.
and cant remove the panel as long someone is renting

Users with protection_bypass can
throw out renters without waiting time
do things like the owner can

Users with give or creative can use unlimited inventory / throw pays
Attachments
screenshot_20170904_141902.png
screenshot_20170904_141902.png (907.44 KiB) Viewed 1037 times
Last edited by AiTechEye on Mon Dec 31, 2018 07:52, edited 17 times in total.

gpcf
Member
Posts: 383
Joined: Fri May 27, 2016 10:48
GitHub: gpcf

Re: [Mod] Smart renting 0.7 [smartrenting]

by gpcf » Post

This is pretty similar to this mod: viewtopic.php?f=11&t=8606

I'll try to test this mod, it seems pretty useful for shop areas.

User avatar
AiTechEye
Member
Posts: 1002
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Smart renting 0.7 [smartrenting]

by AiTechEye » Post

yeah, its based on apartments, but renting users does it for ever and for free.
this made me had to make this mod :)

gpcf
Member
Posts: 383
Joined: Fri May 27, 2016 10:48
GitHub: gpcf

Re: [Mod] Smart renting 0.7 [smartrenting]

by gpcf » Post

Does it use apartments code? Also, please learn how to use versioning software (such as git), especially in mods as complex as this it helps us to make changes. I'm willing to contribute, since this mod is exactly what I need on my server and I may help you setting up a git repo for this if you want.

User avatar
AiTechEye
Member
Posts: 1002
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Smart renting 1 [smartrenting]

by AiTechEye » Post

I writed the code by my own.

i have been trying github 3-4 times and i never getting it to work :)
but its cool if you want to put it up.
the code is already as advanced as its hard to me to remember how everything works.

New in V1:
#glitch fix, people with other panels cant take control over unprotected already rented stuff.
+mesecons support (on when renting)
+ pipeworks support
#the inventory name is changed, to make it work with pipeworks
+works with default furnace


I was thinking about making a mod like this for about 1-2 years ago, but didn't know how
because the most people that was renting never came back, and could keep the stuff for ever.

This mod solved this, people have to pay / or reserve to use them,
as same time we can build real/automatic hotels and stuff like that in game

Sokomine
Member
Posts: 4317
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Smart renting [1.0] [smartrenting]

by Sokomine » Post

AiTechEye wrote: This mod solved this, people have to pay / or reserve to use them,
as same time we can build real/automatic hotels and stuff like that in game
Renting a place...that works in RL. But in a world where you come and join whenever you have time and want to? Timeflow just isn't the same for all players on a server. I'm more for people building nice things and the server keeping them so that others can enjoy what was built and add their own creations. Fields for farming can be shared if needed.
If an appartment cannot be changed by the user, we might indeed "rent" out the same place to multiple people and just switch the content of the locked chests around. Could make for some really cheap hotels close to spawn. But then, some nicely built homes plus a more complex locker system might be more fitting.
A list of my mods can be found here.

User avatar
AiTechEye
Member
Posts: 1002
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Smart renting [1.0] [smartrenting]

by AiTechEye » Post

thats true, but the biggest reason to i made this mod is, the problem with people that, joins, rent, then never coming back, or dont care about it.

We made a big hotel, with about 100 apartments, but fast got filled with people that not even played on the server, while there was noone available for those who really needed.

so to solve the problem: make people have to do something to keep their apartment, pay or for free.
and at same time, it can be fun for users that want to rent out and make business :)

users can choose how long between the periods (reality time), from every sec to 32'th day.

gpcf
Member
Posts: 383
Joined: Fri May 27, 2016 10:48
GitHub: gpcf

Re: [Mod] Smart renting [1.0] [smartrenting]

by gpcf » Post

It really should have monthly/weekly settings instead of minute/second, since renting stuff out by the second doesn't make any sense.

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [Mod] Smart renting [1.0] [smartrenting]

by BBmine » Post

This is the mod I've heard about! Totally great!

User avatar
AiTechEye
Member
Posts: 1002
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Smart renting [4.0] [smartrenting]

by AiTechEye » Post

for who that want to rent out stuff, this mod should be bug free now

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [Mod] Smart renting [4.0] [smartrenting]

by BBmine » Post

AiTechEye wrote:for who that want to rent out stuff, this mod should be bug free now
Nice!

Sokomine
Member
Posts: 4317
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Smart renting [4.0] [smartrenting]

by Sokomine » Post

AiTechEye wrote: users can choose how long between the periods (reality time), from every sec to 32'th day.
That's still time-based and counts time when the player is absent. Maybe...make opening the door cost. Or rather: Add a machine with a slot for coins that'll load the player's own furniture whenever paid. Affter 2 hours or when punched, the furniture can be stored away again and the room be ready for the next customer. Setting your home in such a room ought to be impossible; instead, a special command could either take you to your own active room or to a free one where "your" room is then loaded. Voila: Minimum space requirement - only one room for each player logged in withhin the last two hours. The furnishing could later on even be exported to the player's own new-built house. People who need their own locked places could be happy.
A list of my mods can be found here.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Mod] Smart renting [4.0] [smartrenting]

by benrob0329 » Post

Any chance of getting aliveai to support this? Then we could set up hotels with customers :-D

Post Reply