Skip to content

Commit

Permalink
Update safe-room.lic
Browse files Browse the repository at this point in the history
  • Loading branch information
Tirost authored Oct 30, 2024
1 parent 8312857 commit 6c62ccd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions safe-room.lic
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,11 @@ class SafeRoom
DRC.release_invisibility

# Match room objects against the full regex to find and capture the noun
if DRRoom.room_objs.grep(@plant_regex).to_s =~ @plant_regex
plant_type = Regexp.last_match(1) # Captures the noun (e.g., "plant", "bush")
fput("touch #{plant_type}") # Sends command to touch the specific noun
if /#{@adjectives_regex} (\w+)/ =~ DRRoom.room_objs.grep(@plant_regex).to_s
plant_type = Regexp.last_match(1)

# Send touch command for the captured noun
fput("touch #{plant_type}") if @plant_nouns.include?(plant_type)
end

# check for safe-room idle thing to do
Expand Down

0 comments on commit 6c62ccd

Please sign in to comment.