Patched a bugged comment
This commit is contained in:
parent
f8dbed9698
commit
d7c25fc454
@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
from typing import List, TYPE_CHECKING
|
||||
|
||||
import colors
|
||||
from floor_map import FloorMap
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@ -130,6 +131,7 @@ class PickupAction(BaseAction):
|
||||
elif len(item_stack) == 1:
|
||||
floor_map.entities.remove(item_stack[0])
|
||||
self.entity.inventory.insert(item_stack[0])
|
||||
floor_map.engine.message_log.add_message(f"you picked up a(n) {item_stack[0].name}", color=colors.terminal_light)
|
||||
else:
|
||||
options: List[str] = []
|
||||
for item in item_stack:#not pythonic, IDC
|
||||
@ -140,7 +142,11 @@ class PickupAction(BaseAction):
|
||||
floor_map.engine,
|
||||
floor_map.engine.event_handler,
|
||||
options,
|
||||
lambda x: (floor_map.entities.remove(item_stack[x]), self.entity.inventory.insert(item_stack[x])),
|
||||
lambda x: (
|
||||
floor_map.entities.remove(item_stack[x]),
|
||||
self.entity.inventory.insert(item_stack[x]),
|
||||
floor_map.engine.message_log.add_message(f"you picked up a(n) {item_stack[x].name}", color=colors.terminal_light)
|
||||
),
|
||||
)
|
||||
|
||||
return True
|
||||
|
@ -133,8 +133,8 @@ class GameplayHandler(EventHandler):
|
||||
if key == tcod.event.KeySym.BACKQUOTE: #lowercase tilde
|
||||
self.engine.event_handler = LogHistoryViewer(self.engine, self)
|
||||
|
||||
if key == tcod.event.KeySym.TAB:
|
||||
# self.engine.event_handler = InventoryViewer(self.engine, self) #TODO: deal with this
|
||||
# if key == tcod.event.KeySym.TAB:
|
||||
# self.engine.event_handler = InventoryViewer(self.engine, self) #TODO: deal with this
|
||||
|
||||
def ev_mousemotion(self, event: tcod.event.MouseMotion) -> None:
|
||||
if self.engine.floor_map.in_bounds(event.tile.x, event.tile.y):
|
||||
|
@ -34,8 +34,8 @@ def main() -> None:
|
||||
ui_height = ui_height,
|
||||
|
||||
initial_log= [
|
||||
Message(" Move/Attack: Numpad", colors.terminal_dark),
|
||||
Message(" See Log: Backtick", colors.terminal_dark),
|
||||
Message(" Move/Attack/Scroll: Numpad Pickup: Comma", colors.terminal_dark),
|
||||
Message(" Open Log: Backtick", colors.terminal_dark),
|
||||
Message(" Quit: Esc", colors.terminal_dark),
|
||||
Message(" ~ ~ ~", colors.terminal_dark),
|
||||
Message("Welcome to the Cave of Gobbos!", colors.cyan),
|
||||
|
Loading…
x
Reference in New Issue
Block a user