TeamREPENTOGON / TeamREPENTOGON/REPENTOGON

LevelGenerator bug?

Open
#461 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
345
Forks
51
Avg merge
11h 2m
Merged PRs (30d)
4

Description

static LinkDirection ComputeAdjustedLinkDirection(LevelGenerator_Room const& source, int index) in LuaLevelGenerator.cpp is not working as far as I know. I've tried placing several larger room shapes with the LevelGenerator:PlaceRoom lua function and they always fail with an invalid adjusted link direction. This of course does not occur with simple 1x1 room shapes.

The code has two if statements on lines 265 and 271 that do the exact same check (perhaps this a starting point as to where the error is coming from):

https://github.com/TeamREPENTOGON/REPENTOGON/blob/60b9e44f6637ba49b253634230a26b82517b1ec5/repentogon/LuaInterfaces/LuaLevelGenerator.cpp#L263-L280

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in repentogon/LuaInterfaces/LuaLevelGenerator.cpp at ComputeAdjustedLinkDirection, especially the checks around lines 265 and 271. Reproduce the issue by placing larger room shapes through LevelGenerator:PlaceRoom, then trace how the adjusted link direction is computed. Done means larger room shapes no longer fail with an invalid adjusted link direction, while simple 1x1 rooms continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.