From f1b3117909eba19053da3ab6f282682c90a1ffa9 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Fri, 26 Apr 2024 14:56:50 +0100 Subject: [PATCH] New Room Object + Bug Fixes * Added safe object (Proof of concept) * Fixed tokens references --- game/scripts/interface/inventory.rpy | 4 ++-- game/scripts/rooms/main_room/init.rpy | 1 + game/scripts/shops/item/menu.rpy | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/game/scripts/interface/inventory.rpy b/game/scripts/interface/inventory.rpy index 8b2a6d3f..25714c9c 100644 --- a/game/scripts/interface/inventory.rpy +++ b/game/scripts/interface/inventory.rpy @@ -270,7 +270,7 @@ screen inventory_menu(xx, yy): null height 16 text "{color=#daa520}Gold{/color} {outlinecolor=#ffffff00}[states.env.gold]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0 add gui.format("interface/achievements/{}/spacer_left.webp") - text "{color=#2055da}Tokens{/color} {outlinecolor=#ffffff00}[tokens]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0 + text "{color=#2055da}Tokens{/color} {outlinecolor=#ffffff00}[states.env.tokens]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0 add gui.format("interface/achievements/{}/spacer_left.webp") vbox: @@ -428,4 +428,4 @@ style inventory_button: style inventory_button_text: outlines [] align (0.5, 0.5) - size 16 \ No newline at end of file + size 16 diff --git a/game/scripts/rooms/main_room/init.rpy b/game/scripts/rooms/main_room/init.rpy index 14c6c275..7746cdb8 100644 --- a/game/scripts/rooms/main_room/init.rpy +++ b/game/scripts/rooms/main_room/init.rpy @@ -80,6 +80,7 @@ default parcel_OBJ = RoomObject(main_room, "parcel", pos=(402, 290), idle="parce default rug_OBJ = RoomObject(main_room, "rug", pos=(482, 392), idle=Null(), action=None, zorder=0) default chandelier_OBJ = RoomObject(main_room, "chandelier", pos=(536, 24), idle=Null(), action=None, zorder=5) default window_OBJ = RoomObject(main_room, "window", pos=(459, 192), idle=Null(), action=None, zorder=0) +default safe_OBJ = RoomObject(main_room, "safe", pos=(73, 324), idle=Text("Safe\n[states.env.gold!i]", color="#fff"), action=Jump("inventory"), zorder=0) screen main_room(): tag room diff --git a/game/scripts/shops/item/menu.rpy b/game/scripts/shops/item/menu.rpy index e5b5f4cb..5d5f9831 100644 --- a/game/scripts/shops/item/menu.rpy +++ b/game/scripts/shops/item/menu.rpy @@ -166,7 +166,7 @@ screen shop_item_menuitem(xx, yy): if current_item is None or current_item.currency == "gold": text "{color=#daa520}G{/color} {outlinecolor=#ffffff00}[states.env.gold]{/outlinecolor}" size 16 pos (24, 70) outlines [ (2, "#000", 0, 0) ] else: - text "{color=#2055da}T{/color} {outlinecolor=#ffffff00}[tokens]{/outlinecolor}" size 16 pos (24, 70) outlines [ (2, "#000", 0, 0) ] + text "{color=#2055da}T{/color} {outlinecolor=#ffffff00}[states.env.tokens]{/outlinecolor}" size 16 pos (24, 70) outlines [ (2, "#000", 0, 0) ] # Page counter if menu_items_length > items_shown: