Browse Source

settings/wolfbot.py volledig vertaald

translation
Jeebeevee 10 years ago committed by Rogier Neeleman
parent
commit
cba3b8436d
  1. 8
      modules/wolfgame.py
  2. 68
      settings/wolfgame.py

8
modules/wolfgame.py

@ -1305,11 +1305,11 @@ def transition_day(cli, gameid=0):
dups.append(victim) dups.append(victim)
victim = random.choice(dups) victim = random.choice(dups)
message = [("Night lasted \u0002{0:0>2}:{1:0>2}\u0002. It is now daytime. "+ message = [("Nacht duurde \u0002{0:0>2}:{1:0>2}\u0002. Het is nu dag. "+
"The villagers awake, thankful for surviving the night, "+ "De burgers worden wakker, dankbaar dat ze de nacht hebben overleeft, "+
"and search the village... ").format(min, sec)] "en doorzoeken het dorp... ").format(min, sec)]
dead = [] dead = []
crowonly = var.ROLES["werecrow"] and not var.ROLES["wolf"] crowonly = var.ROLES["weerkraai"] and not var.ROLES["wolf"]
if victim: if victim:
var.LOGGER.logBare(victim, "WOLVESVICTIM", *[y for x,y in var.KILLS.items() if x == victim]) var.LOGGER.logBare(victim, "WOLVESVICTIM", *[y for x,y in var.KILLS.items() if x == victim])
for crow, target in iter(var.OBSERVED.items()): for crow, target in iter(var.OBSERVED.items()):

68
settings/wolfgame.py

@ -51,35 +51,35 @@ GAME_MODES = {}
AWAY = [] # cloaks of people who are away. AWAY = [] # cloaks of people who are away.
SIMPLE_NOTIFY = [] # cloaks of people who !simple, who want everything /notice'd SIMPLE_NOTIFY = [] # cloaks of people who !simple, who want everything /notice'd
ROLE_INDICES = {0 : "seer", ROLE_INDICES = {0 : "ziener",
1 : "wolf", 1 : "wolf",
2 : "cursed villager", 2 : "vervloekte burger",
3 : "village drunk", 3 : "dronken burger",
4 : "harlot", 4 : "prostituée",
5 : "traitor", 5 : "verrader",
6 : "gunner", 6 : "kanonnier",
7 : "werecrow", 7 : "weerkraai",
8 : "guardian angel", 8 : "bescherm engel",
9 : "detective"} 9 : "detective"}
INDEX_OF_ROLE = dict((v,k) for k,v in ROLE_INDICES.items()) INDEX_OF_ROLE = dict((v,k) for k,v in ROLE_INDICES.items())
NO_VICTIMS_MESSAGES = ("The body of a young penguin pet is found.", NO_VICTIMS_MESSAGES = ("Het lichaam van een jonge huisdier is gevonden.",
"A pool of blood and wolf paw prints are found.", "Een plas van bloed en wolfpoot afdrukken zijn gevonden.",
"Traces of wolf fur are found.") "Een pluk van wolvenhaar is gevonden.")
LYNCH_MESSAGES = ("The villagers, after much debate, finally decide on lynching \u0002{0}\u0002, who turned out to be... a \u0002{1}\u0002.", LYNCH_MESSAGES = ("De burgers hebben, na lang overleg, besloten te elmineren \u0002{0}\u0002, hij/zij was een... \u0002{1}\u0002.",
"Under a lot of noise, the pitchfork-bearing villagers lynch \u0002{0}\u0002, who turned out to be... a \u0002{1}\u0002.", "Onder veel lawaai, de woedende burgers elimineren \u0002{0}\u0002, hij/zij was een... \u0002{1}\u0002.",
"The mob drags a protesting \u0002{0}\u0002 to the hanging tree. S/He succumbs to the will of the horde, and is hanged. It is discovered (s)he was a \u0002{1}\u0002.", "De menigte sleept een protesterende \u0002{0}\u0002 naar de galg. Hij/zij bezwijkt aan de wil van de groep, en wordt opgehangen. Hij/zij was een \u0002{1}\u0002.",
"Resigned to his/her fate, \u0002{0}\u0002 is led to the gallows. After death, it is discovered (s)he was a \u0002{1}\u0002.") "Verslagen door zijn/haar lot, is \u0002{0}\u0002 naar de galg geleid. Na de dood bleek hij/zij een \u0002{1}\u0002 te zijn.")
import botconfig import botconfig
RULES = (botconfig.CHANNEL + " channel rules: 1) Be nice to others. 2) Do not share information "+ RULES = (botconfig.CHANNEL + " Kanaal regels: 1) Wees aardig voor elkaar. 2) Deel geen spel infomatie "+
"after death. 3) No bots allowed. 4) Do not play with clones.\n"+ "na je dood. 3) Bots zijn niet toegestaan. 4) Speel niet met clones van jezelf.\n"+
"5) Do not quit unless you need to leave. 6) No swearing and keep it "+ "5) Stop niet met spelen, tenzij het niet anders kan. 6) Niet vloeken en hou het leuk "+
"family-friendly. 7) Do not paste PM's from the bot during the game. "+ "voor iedereen. 7) Sla geen Prive berichten over van het spel tijdens het spel. "+
"8) Use common sense. 9) Waiting for timeouts is discouraged.") "8) Gebruik je gezonde verstand. 9) Wachten op timeouts is niet leuk.")
# Other settings: # Other settings:
START_WITH_DAY = False START_WITH_DAY = False
@ -91,8 +91,8 @@ PING_IN = [] # cloaks of users who have opted in for ping
is_role = lambda plyr, rol: rol in ROLES and plyr in ROLES[rol] is_role = lambda plyr, rol: rol in ROLES and plyr in ROLES[rol]
def plural(role): def plural(role):
if role == "wolf": return "wolves" if role == "wolf": return "wolven"
elif role == "person": return "people" elif role == "persoon": return "personen"
else: return role + "s" else: return role + "s"
def list_players(): def list_players():
@ -125,15 +125,15 @@ def game_mode(name):
return decor return decor
CHANGEABLE_ROLES = { "seers" : INDEX_OF_ROLE["seer"], CHANGEABLE_ROLES = { "zieners" : INDEX_OF_ROLE["ziener"],
"wolves" : INDEX_OF_ROLE["wolf"], "wolven" : INDEX_OF_ROLE["wolf"],
"cursed" : INDEX_OF_ROLE["cursed villager"], "vervloekten" : INDEX_OF_ROLE["vervloekte burger"],
"drunks" : INDEX_OF_ROLE["village drunk"], "dronkaarts" : INDEX_OF_ROLE["dronken burger"],
"harlots" : INDEX_OF_ROLE["harlot"], "prostituéen" : INDEX_OF_ROLE["prostituée"],
"traitors" : INDEX_OF_ROLE["traitor"], "verraders" : INDEX_OF_ROLE["verrader"],
"gunners" : INDEX_OF_ROLE["gunner"], "kanonniers" : INDEX_OF_ROLE["kanonnier"],
"werecrows" : INDEX_OF_ROLE["werecrow"], "weerkraaien" : INDEX_OF_ROLE["weerkraai"],
"angels" : INDEX_OF_ROLE["guardian angel"], "engelen" : INDEX_OF_ROLE["bescherm engel"],
"detectives" : INDEX_OF_ROLE["detective"]} "detectives" : INDEX_OF_ROLE["detective"]}
@ -161,8 +161,8 @@ class ChangedRolesMode(object):
try: try:
lx[CHANGEABLE_ROLES[role.lower()]] = num lx[CHANGEABLE_ROLES[role.lower()]] = num
except KeyError: except KeyError:
raise InvalidModeException(("The role \u0002{0}\u0002 "+ raise InvalidModeException(("De rol \u0002{0}\u0002 "+
"is not valid.").format(role)) "is niet geldig.").format(role))
except ValueError: except ValueError:
raise InvalidModeException("A bad value was used in mode roles.") raise InvalidModeException("A bad value was used in mode roles.")
for k in ROLES_GUIDE.keys(): for k in ROLES_GUIDE.keys():
@ -196,7 +196,7 @@ with conn:
c.execute('DROP TABLE IF EXISTS roles') c.execute('DROP TABLE IF EXISTS roles')
c.execute('CREATE TABLE roles (id INTEGER PRIMARY KEY AUTOINCREMENT, role TEXT)') c.execute('CREATE TABLE roles (id INTEGER PRIMARY KEY AUTOINCREMENT, role TEXT)')
for x in ["villager"]+list(ROLE_INDICES.values()): for x in ["burger"]+list(ROLE_INDICES.values()):
c.execute("INSERT OR REPLACE INTO roles (role) VALUES (?)", (x,)) c.execute("INSERT OR REPLACE INTO roles (role) VALUES (?)", (x,))

Loading…
Cancel
Save