Skip to content

[0.2.5] Oversight/Bug in GameRoom.gd room and grid color set functions #343

Description

@Mindstormsman

Properties roomColor and gridColor in GameRoom.gd use setget functions (onRoomChangeColor() and onGridChangeColor())
that are not called in setRoomColor() and setRoomGridColor() respectively.

These setget functions are only automatically called when another script accesses the property directly
such as myRoom.roomColor = someColor

The result is setRoomColor() and setRoomGridColor() update their respective properties
but do not update their nodes self_modulate properties.
In the case of setRoomColor(), the room's color will be updated when setHighlighted(false) is called
such as when the player walks onto and then off of a room.
The gridColor property set by setRoomGridColor() does not have a path that sets self_modulate to it.

Reproductions:
setRoomColor()

  1. Call the setRoomColor() function on a room to set it to a different color
  2. Observe the room did not change color
  3. Walk into the room to highlight it (it should turn purple)
  4. Walk out of the room to un-highlight it
    --> The room only now updates to the requested color

setRoomGridColor()

  1. Call the setRoomGridColor() function on a room to set the room's grid to a different color
    --> The room's grid color does not change, and will never change to the requested color

The current behavior of setRoomColor() could be desirable in some circumstances
such as a visual indicator of where the player has been in some form of exploration based region
I request this be preserved in a separate function perhaps named setRoomColorLate()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions