From 55c1f788a7e06ce10c717594bc9ac41f8cd99b32 Mon Sep 17 00:00:00 2001 From: Gesche Gierse Date: Sun, 27 Jan 2019 13:39:49 +0100 Subject: [PATCH] remove vocation choice (all chars start as none on tutorial island) --- accounts/forms.py | 4 ++-- accounts/views.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/accounts/forms.py b/accounts/forms.py index e17b4de..a8c014b 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -21,6 +21,6 @@ class LoginForm(forms.Form): class CreateCharacterForm(forms.Form): name = forms.CharField() - vocation = forms.ChoiceField( - choices=VocationHelper.get_base_vocation_choices()) + #vocation = forms.ChoiceField( + # choices=VocationHelper.get_base_vocation_choices()) sex = forms.ChoiceField(choices=((0, 'female'), (1, 'male'))) \ No newline at end of file diff --git a/accounts/views.py b/accounts/views.py index 4082ed7..5fc1830 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -66,7 +66,7 @@ class CreateCharView(LoginRequiredMixin, FormView): success_url = reverse_lazy('accounts:characters') def form_valid(self, form): - rookgaard = Towns.objects.get(name='Rookgaard') + rookgaard = Towns.objects.get(name='Rookgaard Tutorial Island') start_health = 150 start_mana = 55 start_cap = 400 @@ -75,7 +75,8 @@ class CreateCharView(LoginRequiredMixin, FormView): player = Players.objects.create( name=form.cleaned_data['name'], level=1, - vocation=int(form.cleaned_data['vocation']), + #vocation=int(form.cleaned_data['vocation']), + vocation=0, sex=int(form.cleaned_data['sex']), posx=rookgaard.posx, posy=rookgaard.posy,