major changes, not sure about all...

This commit is contained in:
b3yond 2016-12-21 14:23:21 +01:00
parent cb3175c229
commit 46a1357525
12 changed files with 110 additions and 3413 deletions

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

Binary file not shown.

View file

@ -43,9 +43,14 @@ class RoomEditor(object):
and can give certain fields other values, which go into Room.fielddata and can give certain fields other values, which go into Room.fielddata
or it does when its ready >.< or it does when its ready >.<
weird bug: Save&Quit doesnt close the window, but still returns a room object. weird bug: Save&Quit doesnt close the window, but still returns a room object.
:todo übergebe room, nicht fields
""" """
def __init__(self): def __init__(self, fields=0):
"""
:param fields: lists of lists 30x52
"""
self.chosen = "W" self.chosen = "W"
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event) self.window.connect("delete_event", self.delete_event)
@ -55,12 +60,14 @@ class RoomEditor(object):
self.box2 = gtk.HBox(False, 0) self.box2 = gtk.HBox(False, 0)
self.menubox = gtk.VBox(False, 0) self.menubox = gtk.VBox(False, 0)
# initialise list of lists: fields, later argument to Room() if fields != 0:
self.fields = [] self.fields = fields
for i in range(30): # if no fields given, initialise list of lists: fields, later argument to Room()
self.fields.append([]) else:
for j in range(52): for i in range(30):
self.fields[i].append("O") self.fields.append([])
for j in range(52):
self.fields[i].append("O")
# initialize dictionary: fielddata, later argument to Room() # initialize dictionary: fielddata, later argument to Room()
self.fielddata = {} self.fielddata = {}
self.show_fields() self.show_fields()

Binary file not shown.

Binary file not shown.

View file

@ -1233,6 +1233,7 @@ def run_room(m, player, mission):
while running: while running:
widgetlist = display_fields(m, player, mission) widgetlist = display_fields(m, player, mission)
# print "running" # debug # print "running" # debug
# print mission.current_room.fielddata # debug
events = sdl2.ext.get_events() events = sdl2.ext.get_events()
for event in events: for event in events:
m.uiprocessor.dispatch(m.world, event) m.uiprocessor.dispatch(m.world, event)

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,7 @@
# # # # # # # # # #
# TO-DO # # TO-DO #
# # # # # # # # # #
create new mission for testing
realise game in pySDL2 realise game in pySDL2
enemy list system: import data from pickle file. enemy list system: import data from pickle file.
document how enemy, mission, item, player data is packed. document how enemy, mission, item, player data is packed.
@ -8,7 +9,7 @@ change player.bitcoins back to 50
# Misc # Misc
why the fuck is fielddata in Missions test, Sewers empty? old editor version?
# Function flow # Function flow

View file

@ -29,151 +29,155 @@ I5
sS'augmentations' sS'augmentations'
p12 p12
(lp13 (lp13
sS'hp' S'wallhack'
p14 p14
aS'cosmetic surgery'
p15
asS'hp'
p16
I98 I98
sS'gun' sS'gun'
p15 p17
g0 g0
(citems (citems
Gun Gun
p16 p18
g2 g2
Ntp17 Ntp19
Rp18 Rp20
(dp19 (dp21
g7 g7
S'No gun' S'No gun'
p20
sS'price'
p21
I0
sS'damage'
p22 p22
I0 sS'price'
sS'grange'
p23 p23
I0 I0
sS'ap' sS'damage'
p24 p24
I0 I0
sS'type' sS'grange'
p25 p25
S'gun' I0
sS'ap'
p26 p26
sS'image' I0
sS'type'
p27 p27
S'' S'gun'
p28 p28
sbsS'experience' sS'image'
p29 p29
I100 S''
sS'race'
p30 p30
S'Vampire' sbsS'experience'
p31 p31
sS'inventory' I300
sS'race'
p32 p32
(lp33 S'Vampire'
p33
sS'inventory'
p34
(lp35
g0 g0
(g16 (g18
g2 g2
Ntp34 Ntp36
Rp35 Rp37
(dp36 (dp38
g7 g7
S'Kalaschnikow' S'Kalaschnikow'
p37
sg21
I80
sg22
I30
sg23
I10
sg24
I100
sg25
S'gun'
p38
sg27
S'guns/kalaschnikow.gif'
p39 p39
sg23
I80
sg24
I30
sg25
I10
sg26
I100
sg27
S'gun'
p40
sg29
S'guns/kalaschnikow.gif'
p41
sbag0 sbag0
(citems (citems
Sword Sword
p40 p42
g2 g2
Ntp41 Ntp43
Rp42 Rp44
(dp43 (dp45
g7 g7
S'Mace' S'Mace'
p44
sS'silverdamage'
p45
I00
sg25
S'sword'
p46 p46
sg21 sS'silverdamage'
I70 p47
sg22 I00
sg27
S'sword'
p48
sg23
I70 I70
sg24 sg24
I70
sg26
I100 I100
sS'critical' sS'critical'
p47 p49
F0.1 F0.1
sS'stun' sS'stun'
p48
F0.5
sg27
S'swords/mace.gif'
p49
sbasS'sword'
p50 p50
F0.5
sg29
S'swords/mace.gif'
p51
sbasS'sword'
p52
g0 g0
(g40 (g42
g2 g2
Ntp51 Ntp53
Rp52 Rp54
(dp53 (dp55
g7 g7
S'Fist' S'Fist'
p54 p56
sg45 sg47
I00 I00
sg25 sg27
S'sword' S'sword'
p55 p57
sg21 sg23
I0
sg22
I0 I0
sg24 sg24
I0
sg26
I50 I50
sg47 sg49
F0.0 F0.0
sg48 sg50
F0.3 F0.3
sg27 sg29
g28 g30
sbsS'max_hp' sbsS'max_hp'
p56 p58
I98 I98
sS'mob' sS'mob'
p57 p59
I5 I5
sS'ic' sS'ic'
p58 p60
I0 I0
sS'con' sS'con'
p59 p61
I6 I6
sS'id' sS'id'
p60 p62
I1 I1
sS'bitcoins' sS'bitcoins'
p61 p63
I100 I100
sb. sb.