ac-minetest / basic_machines

Simple automation mod for minetest
17 stars 22 forks source link

Two bugs with "Light" - > unlimited lights and delay bug #36

Open minertestdude opened 5 years ago

minertestdude commented 5 years ago

I. unlimited lights: needs: light, keypad reproduce:

  1. place light
  2. place keypad near it
  3. push keypad, push on light (set coordinates on light)

(this is workaround of bug II below, if fixed - uneeded)

  1. set keypad "signal 1 ON"

  2. push keypad (makes light ON state)

  3. set delay on light to 2 (seconds)

  4. set keypad "signal 2 OFF"

  5. push keypad (makes light go OFF state and updates it with new delay)

now bug:

  1. set keypad "signal 1 ON"
  2. push keypad (light goes into ON state)
  3. quickly remove light while its still in ON state

result - light will be removed and stored into your inventory, but new light will re-appear in 3 seconds. You cant set delay or interact with this light, and if you remove it - it will not add into inventory, but will still work as usual light.

II. delay bug if light is in OFF state, then rightclick shows delay settings, but does not save entered value. In ON state all works.

ac-minetest commented 5 years ago

right, because minetest.after is used which spawns new light after some delay. Should add check if light is really present at that position..