Coder Social home page Coder Social logo

botany's People

Contributors

benharri avatar christophgra avatar cosarara avatar ensiss avatar epif4nio avatar huy-ngo avatar jifunks avatar jmdejong avatar marado avatar mcsinyx avatar noelleleigh avatar rakiru avatar rickcarlino avatar sanqui avatar selfsame avatar vilmibm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botany's Issues

Use python3

In a month support for python2 will end. I think you should consider moving to python3. I made a PR you can use as the base for migrating - #24

Watering certain plants breaks plant view

"I tried visiting cmccabe plant, which gave me the preview (with the RIP tomb), but now I can't see my own plant (either with water or look)"

also doesn't show "you watered x's

can resolve the issue by visiting a working plant.

i think the issue starts around line 704 in menu_screen.py
cmccabe also has weirdly formed json:

{"generation": 1, "score": 82672, "description": "seed", "owner": "cmccabe", "file_name": "/home/cmccabe/.botany/cmccabe_plant.datq\u0014", "age": "10d:17h:7m:22s", "stage": "seed", "is_dead": true, "last_watered": 1525946641}
(why is q\u0014 there?)


so kind of two issues:

  1. what causes the display bug to show a gravestone and not refresh to your own plant after?
  2. what happened to cmccabe's json file that breaks it?

Botany strips "-" from usernames

Botany is installed on the tildeverse server I frequent. It was noticed that if a user's username contains a - botany will strip that out when you try to copy and paste the username or it wont let you type it in in order visit this users garden. I'm not sure if this is be design or an oversight. I suspect it does this to all special characters.

botany crashes if terminal doesn't support colours

It crashes on startup on terminals that don't support colours.
This corrupts the save file, making it crash all the next times too.

To reproduce, run:

TERM=vt100 ./botany.py

It is possible to detect whether the terminal supports colours by checking curses.COLORS. This is the number of colours supported. If no colours are supported it is 0.

EDIT: curses.COLORS doesn't seem to work, but using curses.has_colors() does.

"database is locked" eventually happens

If I leave botany running for too long (possibly while other users run it, or also leave it running), eventually a "database is locked" error invades the screen.

Sorry that it wasn't possibly to copy paste the full trace well (the output mangled with botany's usual output), but that I captured provides the relevant parts:

self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
File "/    self._target(*self._args, **self._kwargs) _bootstrap_inner
File "/home/repos/botany/botany.py", line 434, in autosave
self.update_garden_db(this_plant)
File "/home/repos/botany/botany.py", line 517, in update_garden_db
self.init_database()
File "/home/repos/botany/botany.py", line 491, in init_database
c.execute(init_table_string)
sqlite3.OperationalError: database is locked

I could provide a patch to catch the error on init_database's execute, but before that it probably makes sense to decide what to do in these cases: while ignoring the failure is probably alright on autosave calls (the next autosave deals with it; we can also create a counter of consecutive fails to make sure it is only a sporadic concurrency issue), it probably is not in other calls. Also, it make sense investigating the root cause of the issue - who/what is locking the database for so long?

Growth rate with too many decimal places

After harevsting a plant, the next one showed up with a surprising growth rate:

  'To see things in the seed, that is genius' - Lao Tzu
  Generation: 64
  Growth rate: 13.600000000000001x

how to properly install on server

Pardon this beginner-level question.

I'm created a small tilde server and a bit unsure the install process. Does botany get placed inside a shared directory that all users have access to? or is there some other system i should be setting up? Perhaps more explicit install instructions can be added to the README.md (I'd be happy to contribute if i knew the answer)

idea

I saw that you also did rpg task.
why don't you merge the two projects and allow to give some water to the plants every time you complete a task?

Use of Python 2

Is there a reason that this project is using python 2? Would it be better to port it to python 3?
Or are there reasons for this choice?

Web-integration

It would be cool to make a web version of this so you could add it to a personal website. Since it’s already in python it could be run by a GitHub action, and somehow give users the ability to water the plant.

plants will die when community waters are cleared at the end of the week

if the plant owner waters the plant, disappears for a week, and during that time someone else waters the plant every day, and then sunday rolls around, the visitors will be cleared and the plant will die if the owner comes back even though it has not been a week since the plant was last watered

How to find active botany communities?

If I am correct, you can only find bigger communities in a tilde space (tilde.town, tildeverse), but it's really hard (if not impossible) to figure out if a tilde server runs botany and if they have active players and if, how many?

Is there a list with botany communities?

Would be very interesting to play this game within a big community.

Malicious visitors could kill a well-watered plant

Although it is not really possible to prevent malicious users from removing the visitors, even if you water your own plant every day a malicious user could kill it.

Botany checks whether a plant is alive by checking if there is a difference in timestamps from all the waterings that is larger than 5 days.
A malicious user could create a timestamp in the past that is more than 5 days before the last time the user watered their own plant.
When the user then opens botany the plant will be killed.

A simple fix would be to discard all visitor timestamps that are before the last watered timestamp of the user themself (just like timestamps in the future are discarded).

duplicate users in garden

I have a few users showing up multiple times in the garden on cosmic.
Screenshot from 2021-10-19 01-21-28
I'm not sure how it happened or how to fix it. Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.