Add ability to write on map
Todo: - make ChunkDiffs contain deletions - inserting a " " counts as deletion on chunk level - allow for more unicode characters! ^^ (only harmless ones though - no newline or control characters etc.)
This commit is contained in:
parent
7b5458e1d5
commit
38ab48d6f8
3 changed files with 107 additions and 10 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import curses
|
||||
import string
|
||||
import sys
|
||||
import threading
|
||||
from maps import Map
|
||||
|
|
@ -60,6 +61,9 @@ class Client():
|
|||
elif i == "kDN5": self.map_.scroll(0, 10)
|
||||
elif i == "kLFT5": self.map_.scroll(-20, 0)
|
||||
elif i == "kRIT5": self.map_.scroll(20, 0)
|
||||
# edit world
|
||||
elif i in string.digits + string.ascii_letters + string.punctuation + " ":
|
||||
self.map_.write(i)
|
||||
|
||||
else: sys.stdout.write(repr(i) + "\n")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue