Skip to content

Commit 4212f07

Browse files
authored
Merge pull request #97 from neph1/update-v0.36.2
Update v0.36.2
2 parents 9350be3 + 9fdfcb8 commit 4212f07

27 files changed

+487
-438
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@
110110
{
111111
"name": "Beer",
112112
"weight": 0.5,
113-
"short_descr": "A glass of beer",
113+
"short_descr": "A bottle of beer",
114114
"effect": 5,
115115
"type": "Drink",
116116
"value": 2
117117
},
118118
{
119119
"name": "Wine",
120120
"weight": 0.5,
121-
"short_descr": "A glass of wine",
121+
"short_descr": "A bottle of wine",
122122
"effect": 5,
123123
"type": "Drink",
124124
"value": 3

items/wearables_fantasy.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"wearables" : [
3+
{
4+
"name": "robe",
5+
"location": "FULL_BODY",
6+
"weight": 1,
7+
"value": 10,
8+
"ac": 0
9+
},
10+
{
11+
"name": "cloak",
12+
"location": "BACK",
13+
"weight": 1,
14+
"value": 10,
15+
"ac": 0
16+
},
17+
{
18+
"name": "tunic",
19+
"location": "TORSO",
20+
"weight": 1,
21+
"value": 10,
22+
"ac": 0
23+
},
24+
{
25+
"name": "shirt",
26+
"location": "TORSO",
27+
"weight": 1,
28+
"value": 10,
29+
"ac": 0
30+
},
31+
{
32+
"name": "pants",
33+
"location": "LEGS",
34+
"weight": 1,
35+
"value": 10,
36+
"ac": 0
37+
},
38+
{
39+
"name": "shoes",
40+
"location": "FEET",
41+
"weight": 1,
42+
"value": 10,
43+
"ac": 0
44+
},
45+
{
46+
"name": "belt",
47+
"location": "WAIST",
48+
"weight": 1,
49+
"value": 10,
50+
"ac": 0
51+
},
52+
{
53+
"name": "hat",
54+
"location": "HEAD",
55+
"weight": 1,
56+
"value": 10,
57+
"ac": 0
58+
},
59+
{
60+
"name": "steel_helmet",
61+
"location": "HEAD",
62+
"weight": 3,
63+
"value": 10,
64+
"ac": 3
65+
},
66+
{
67+
"name": "mail_coif",
68+
"location": "HEAD",
69+
"weight": 3,
70+
"value": 10,
71+
"ac": 2
72+
},
73+
{
74+
"name": "breeches",
75+
"location": "LEGS",
76+
"weight": 1,
77+
"value": 10,
78+
"ac": 0
79+
},
80+
{
81+
"name": "chainmail",
82+
"location": "TORSO",
83+
"weight": 3,
84+
"value": 10,
85+
"ac": 3
86+
}
87+
]
88+
}

items/wearables_modern.json

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{
2+
"wearables" : [
3+
{
4+
"name": "t-shirt",
5+
"location": "TORSO",
6+
"weight": 1,
7+
"value": 10,
8+
"ac": 0
9+
},
10+
{
11+
"name": "shirt",
12+
"location": "TORSO",
13+
"weight": 1,
14+
"value": 10,
15+
"ac": 0
16+
},
17+
{
18+
"name": "jeans",
19+
"location": "LEGS",
20+
"weight": 1,
21+
"value": 10,
22+
"ac": 0
23+
},
24+
{
25+
"name": "sneakers",
26+
"location": "FEET",
27+
"weight": 1,
28+
"value": 10,
29+
"ac": 0
30+
},
31+
{
32+
"name": "belt",
33+
"location": "WAIST",
34+
"weight": 1,
35+
"value": 10,
36+
"ac": 0
37+
},
38+
{
39+
"name": "dress_shoes",
40+
"location": "FEET",
41+
"weight": 1,
42+
"value": 10,
43+
"ac": 0
44+
},
45+
{
46+
"name": "hat",
47+
"location": "HEAD",
48+
"weight": 1,
49+
"value": 10,
50+
"ac": 0
51+
},
52+
{
53+
"name": "dress",
54+
"location": "FULL_BODY",
55+
"weight": 1,
56+
"value": 10,
57+
"ac": 0
58+
},
59+
{
60+
"name": "suit",
61+
"location": "FULL_BODY",
62+
"weight": 1,
63+
"value": 10,
64+
"ac": 0
65+
},
66+
{
67+
"name": "jacket",
68+
"location": "TORSO",
69+
"weight": 1,
70+
"value": 10,
71+
"ac": 0
72+
},
73+
{
74+
"name": "coat",
75+
"location": "TORSO",
76+
"weight": 1,
77+
"value": 10,
78+
"ac": 0
79+
},
80+
{
81+
"name": "cap",
82+
"location": "HEAD",
83+
"weight": 1,
84+
"value": 10,
85+
"ac": 0
86+
},
87+
{
88+
"name": "pants",
89+
"location": "LEGS",
90+
"weight": 1,
91+
"value": 10,
92+
"ac": 0
93+
},
94+
{
95+
"name": "shorts",
96+
"location": "LEGS",
97+
"weight": 1,
98+
"value": 10,
99+
"ac": 0
100+
},
101+
{
102+
"name": "boxers",
103+
"location": "UNDER_GARMENTS",
104+
"weight": 1,
105+
"value": 10,
106+
"ac": 0
107+
},
108+
{
109+
"name": "briefs",
110+
"location": "UNDER_GARMENTS",
111+
"weight": 1,
112+
"value": 10,
113+
"ac": 0
114+
},
115+
{
116+
"name": "bra",
117+
"location": "UNDER_GARMENTS",
118+
"weight": 1,
119+
"value": 10,
120+
"ac": 0
121+
},
122+
{
123+
"name": "socks",
124+
"location": "UNDER_GARMENTS",
125+
"weight": 1,
126+
"value": 10,
127+
"ac": 0
128+
},
129+
{
130+
"name": "panties",
131+
"location": "UNDER_GARMENTS",
132+
"weight": 1,
133+
"value": 10,
134+
"ac": 0
135+
},
136+
{
137+
"name": "thong",
138+
"location": "UNDER_GARMENTS",
139+
"weight": 1,
140+
"value": 10,
141+
"ac": 0
142+
},
143+
{
144+
"name": "stockings",
145+
"location": "UNDER_GARMENTS",
146+
"weight": 1,
147+
"value": 10,
148+
"ac": 0
149+
},
150+
{
151+
"name": "skirt",
152+
"location": "LEGS",
153+
"weight": 1,
154+
"value": 10,
155+
"ac": 0
156+
},
157+
{
158+
"name": "dress_shirt",
159+
"location": "TORSO",
160+
"weight": 1,
161+
"value": 10,
162+
"ac": 0
163+
},
164+
{
165+
"name": "blouse",
166+
"location": "TORSO",
167+
"weight": 1,
168+
"value": 10,
169+
"ac": 0
170+
},
171+
{
172+
"name": "sweater",
173+
"location": "TORSO",
174+
"weight": 1,
175+
"value": 10,
176+
"ac": 0
177+
},
178+
{
179+
"name": "coveralls",
180+
"location": "FULL_BODY",
181+
"weight": 1,
182+
"value": 10,
183+
"ac": 0
184+
},
185+
{
186+
"name": "top",
187+
"location": "TORSO",
188+
"weight": 1,
189+
"value": 10,
190+
"ac": 0
191+
}
192+
]
193+
}

stories/dungeon/story.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__(self, path = '', layout_generator = LayoutGenerator(), mob_populato
3434

3535

3636
def init(self, driver: Driver) -> None:
37+
self.llm_util = driver.llm_util
3738
super(Story, self).init(driver)
3839

3940
def init_player(self, player: Player) -> None:
@@ -91,8 +92,6 @@ def welcome_savegame(self, player: Player) -> str:
9192
"""welcome text when player enters the game after loading a saved game"""
9293
player.tell("<bright>Hello %s, welcome back to %s.</>" % (player.title, self.config.name), end=True)
9394
player.tell("\n")
94-
player.tell(self.driver.resources["messages/welcome.txt"].text)
95-
player.tell("\n")
9695
return ""
9796

9897
def goodbye(self, player: Player) -> None:
@@ -124,7 +123,7 @@ def add_zone(self, zone: Zone) -> bool:
124123
self.world.add_item_spawner(item_spawner)
125124

126125
if zone.center.z == self.max_depth:
127-
self.driver.llm_util.generate_character
126+
self.llm_util.generate_character
128127

129128
if not first_zone:
130129
self.layout_generator.spawn_gold(zone=zone)
@@ -137,7 +136,7 @@ def _describe_rooms(self, zone: Zone, layout: Layout, rooms: list):
137136
for num in range(0, len(rooms), 10):
138137
sliced_rooms.extend(rooms[num:num+10])
139138
for i in range(3):
140-
described_rooms_slice = self.driver.llm_util.generate_dungeon_locations(zone_info=zone.get_info(), locations=sliced_rooms, depth = self.depth, max_depth=self.max_depth) # type LocationDescriptionResponse
139+
described_rooms_slice = self.llm_util.generate_dungeon_locations(zone_info=zone.get_info(), locations=sliced_rooms, depth = self.depth, max_depth=self.max_depth) # type LocationDescriptionResponse
141140
if described_rooms_slice.valid:
142141
described_rooms.extend(described_rooms_slice.location_descriptions)
143142
sliced_rooms = []
@@ -189,7 +188,7 @@ def _connect_locations(self, layout: Layout) -> None:
189188
Exit.connect(cell_location, parent_location.name, '', None, parent_location, cell_location.name, '', None)
190189

191190
def _generate_boss(self, zone: Zone) -> bool:
192-
character = self.driver.llm_util.generate_character(keywords=['final boss']) # Characterv2
191+
character = self.llm_util.generate_character(keywords=['final boss']) # Characterv2
193192
if character:
194193
boss = RoamingMob(character.name,
195194
gender=character.gender,

tale/cmds/normal.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,20 +1368,7 @@ def do_flee(player: Player, parsed: base.ParseResult, ctx: util.Context) -> None
13681368
pass
13691369
raise ActionRefused("You can't flee anywhere!")
13701370

1371-
1372-
@cmd("save")
1373-
@disable_notify_action
1374-
@disabled_in_gamemode(GameMode.MUD)
1375-
def do_save(player: Player, parsed: base.ParseResult, ctx: util.Context) -> Generator:
1376-
"""Save your game."""
1377-
if not ctx.driver.do_check_savefile_free(player):
1378-
if not (yield "input", ("Are you sure you want to overwrite the previous save game?", lang.yesno)):
1379-
player.tell("Ok, not saved.")
1380-
return
1381-
ctx.driver.do_save(player)
1382-
1383-
1384-
@cmd("load", "reload", "restore", "restart")
1371+
@cmd("load", "reload", "restore")
13851372
@disable_notify_action
13861373
@disabled_in_gamemode(GameMode.MUD)
13871374
def do_load(player: Player, parsed: base.ParseResult, ctx: util.Context) -> None:

tale/cmds/wizard.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,3 +904,9 @@ def do_create_item(player: Player, parsed: base.ParseResult, ctx: util.Context)
904904
player.tell(item.name + ' added.', evoke=False)
905905
else:
906906
raise ParseError("Item could not be added")
907+
908+
@wizcmd("restart_story")
909+
def do_restart(player: Player, parsed: base.ParseResult, ctx: util.Context) -> None:
910+
"""Restart the game."""
911+
player.tell("Restarting the game... Please reconnect")
912+
os.execv(sys.executable, ['python3'] + sys.argv)

0 commit comments

Comments
 (0)