Room variation types (#517)

* Global.gd now has an extra variable for current room type

* ResourceSetterNew.gd now has variation category for room types

The state variable also had to include the room type, since it wouldn't update properly when entering a bonus room from a level that's already underground

* LevelClass.gd sets room type on update_theme

A new function, get_room_type() allows for the level's room type to be detected, which can easily be overwritten by other level classes. Bonus Rooms are detected by comparing the level's scene path to a pre-defined list of bonus rooms.

* Added get_room_type() to CoinHeaven.gd

* Added get_room_type() to PipeCutscene.gd

Also updates the room type in _enter_tree() since update_theme() isn't called here.

* Added get_room_type() to TitleScreen.gd
This commit is contained in:
Tsank35
2025-10-06 14:05:43 -07:00
committed by GitHub
parent 6a48a5b32f
commit 27ae3d5612
6 changed files with 41 additions and 3 deletions

View File

@@ -89,6 +89,12 @@ var world_num := 1
var level_num := 1
var disco_mode := false
enum Room{MAIN_ROOM, BONUS_ROOM, COIN_HEAVEN, PIPE_CUTSCENE, TITLE_SCREEN}
const room_strings := ["MainRoom", "BonusRoom", "CoinHeaven", "PipeCutscene", "TitleScreen"]
var current_room: Room = Room.MAIN_ROOM
signal transition_finished
var transitioning_scene := false
var awaiting_transition := false