Skip to content

Commit d872e61

Browse files
authored
Merge pull request #67 from jramstedt/main
Retinal id scanner and move tile formatter fix
2 parents 7175f5c + 5357096 commit d872e61

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

editor/levels/Formatters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func objectHeightFormatterFor(levelHeight level.HeightShift) func(int) string {
3131
func moveTileHeightFormatterFor(levelHeight level.HeightShift) func(int) string {
3232
normalFormatter := tileHeightFormatterFor(levelHeight)
3333
return func(value int) string {
34-
if (value >= 0) && (value < int(level.TileHeightUnitMax)) {
34+
if (value >= 0) && (value <= int(level.TileHeightUnitMax)) {
3535
return normalFormatter(value)
3636
}
3737
return "Don't change - raw: %d"

ss1/content/archive/level/lvlobj/Fixtures.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ var antennaRelayPanel = recepticlePanel.
3030
With("DestroyObjectID", 14, 2).As(interpreters.ObjectID())
3131

3232
var retinalIDScanner = recepticlePanel.
33-
Refining("Action", 0, 22, actions.Unconditional(), interpreters.Always)
33+
Refining("Action", 0, 22, actions.Unconditional(), interpreters.Always).
34+
With("Head", 2, 3).As(interpreters.FormattedRangedValue(0, 21,
35+
func(value int) (result string) {
36+
if value < 11 {
37+
return fmt.Sprintf("(8/2/13 frame: %d)", value)
38+
} else {
39+
return fmt.Sprintf("(8/2/14 frame: %d)", value-11)
40+
}
41+
}))
3442

3543
var cyberspaceTerminal = gameVariablePanel.
3644
With("State", 0, 1).As(interpreters.EnumValue(map[uint32]string{0: "Off", 1: "Active", 2: "Locked"})).

0 commit comments

Comments
 (0)