Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Armor should check node groups and armor groups instead of a hard-coded table #169

Open
Poikilos opened this issue Aug 10, 2019 · 0 comments

Comments

@Poikilos
Copy link

Poikilos commented Aug 10, 2019

  • row[2] is the "damage" field of the armor_fire table: if hp > 0 and armor.def[name].fire < row[2] then (see https://github.com/stujones11/minetest-3d_armor/blob/master/3d_armor/init.lua#L458)
  • I don't understand why you would have an armor_fire table. Why don't you just use the actual node's hot number to determine damage, and "fire" aspect of armor to reduce damage?
  • Related variable naming: Calling them nodes obfuscates the code. ARMOR_FIRE_NODES and armor_fire are tables (in spreadsheet terms not just Lua terms)--a row in the table is not a node, it is a mapping aka row (which is clear in the code), but "for row in table" would be named clearly enough.
@Poikilos Poikilos changed the title Code compares second value of fire_nodes to armor_fire for unknown reason Armor should check node groups and armor groups instead of a hard-coded table Aug 13, 2019
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

No branches or pull requests

1 participant