Redstone additions
LadyCailin opened this issue ยท 3 comments
CMDHELPER-2618 - Reported by jb_aero on 2013-04-04 19:21:59 UTC
get_block_power - int
is_block_powered - boolean
is_indirectly_powered - boolean
Originally from:
http://redmine.sk89q.com/issues/1896
http://redmine.sk89q.com/issues/2052
Comment by PseudoKnight on 2015-04-20 13:48:13 UTC
Direct and indirectly powered (and quasi connectivity) are the terms used in redstone.
I believe is_block_powered() was changed some months ago from only reporting direct power to reporting direct and indirect power.
Comment by PseudoKnight on 2015-07-10 19:48:42 UTC
This should be covered in build 2908 now.
Comment by Pieter12345 on 2015-04-20 13:23:59 UTC
For the int get_block_power(LocationArray array), I'd say you could use "replace(get_block_at(sk_pos1()), '55:', '')" on a redstone dust.
The boolean is_block_powered(LocationArray array) actually exists already, but it returns true if a piston would extend when placed there (other than for pistons, this makes no sense). Therefor I'd like to see an is_block_hard_powered() and is_block_soft_powered() or so. The hard powered would return true if the block itself will emit power when something is placed next to it, the soft_powered would return true if it would be able to feed a torch, repeater, comparator etc, but not redstone dust. Pistons could be handled using the existing is_block_powered().