Skip to content

Conversation

@TrainWrack
Copy link
Collaborator

@TrainWrack TrainWrack commented Nov 22, 2025

Revised Keypad nodes.

Setup is simpler and now only requires one node.

Uses Display Item Class and to be merged after it.

Adds two new nodes. One to input, other to check the input.
image

TombEngine/TombEngine#1789

@TrainWrack TrainWrack marked this pull request as ready for review November 23, 2025 15:12
@TrainWrack TrainWrack marked this pull request as draft January 13, 2026 00:00
["Click"] = 644, -- TR2_Click
}

local function keypadCreate(object, code)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use PascalCase for function names, regardless of local/global scope.

LevelFuncs.Engine.Node.KeypadCreate = function(object, code, volume)
LevelVars.Engine.Keypad.ActivatedKeypad = nil

local inventoryDelay = 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep all these variables and a soundmap outside functions? Node script format was nice in a way it contained necessary code only within node functions. By exposing variables/tables in this way, we are breaking this format. Not saying it is wrong, just something I never planned to be done, because node functions were meant to be a wrapper for lua functions that can be directly used in scripts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move them in. I moved them out cause they would be created every frame but that’s ok.

@TrainWrack TrainWrack changed the title Keypad nodes Keypad nodes-display item Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants