Commit Graph

39 Commits

Author SHA1 Message Date
Vanessa Dannenberg
e84a184946 only try to process a light message if it's a string 2019-09-19 19:24:42 -04:00
Vanessa Dannenberg
9dcc6c2b4d use Unified Dyes on_dig where needed - requires Unified Dyes commit 9ff40a7f or later 2019-07-18 02:16:46 -04:00
Vanessa Dannenberg
80352d69e1 prevent crash if receiving a null message string or channel 2019-07-16 06:45:04 -04:00
Vanessa Dannenberg
b28f1314da add aliases for rope lights (on/14, off/0)
make right-click handler work properly for plain "on"/"off" items
2019-06-15 06:52:58 -04:00
Vanessa Dannenberg
17ea2040e2 fix groups on "floor" rope lights
if mesecons, put "off" rope lights in creative inv, and drop them as "off" as
well.  else, put "on" in creative inv and drop "on"

allow right-click on rope lights only if no mesecons

also cache minetest.get_modpath("mesecons")
2019-06-15 06:45:41 -04:00
Vanessa Dannenberg
13862c1a48 missing chandelier alias 2019-06-07 00:50:06 -04:00
Vanessa Dannenberg
80ab12710b add "light" to a couple of descriptions, for easier searching 2019-06-06 04:38:13 -04:00
Vanessa Dannenberg
1b94c940d7 fix wrong light value on standing lamps 2019-06-06 04:37:26 -04:00
Vanessa Dannenberg
df44dd3dad remove some bogus aliases, fix plasma ball 2019-06-06 01:48:44 -04:00
Vanessa Dannenberg
b407f06dc4 fix wall lantern aliases, for real this time :P 2019-06-06 01:03:57 -04:00
Vanessa Dannenberg
ea160a6519 simplify mesecons/digilines rules
replaced all "xz" and "toponly" with "alldir"
made on-floor rope lights use "alldir"
2019-06-04 01:37:02 -04:00
Vanessa Dannenberg
631813bb2d make all dimmable lights fully dimmable to any level 0-14
for backward compat, they'll resond to the usual strings, too:

"off" -> 0
"min" -> 3
"med" -> 7
"hi"  -> 11
"max"/"on" -> 14

all dimmable nodes have been renamed to bear the light value in their
names, and aliased.

the non-dimmable lights still respond as before
("off" or n < 4; "on" or n > 3)
2019-06-04 00:56:00 -04:00
Vanessa Dannenberg
f33636d473 move wall lamp and torch models to the correct dir 2019-06-03 07:17:12 -04:00
Vanessa Dannenberg
c98ec41ba7 move some images to the right places :P 2019-06-02 08:24:13 -04:00
Vanessa Dannenberg
84c3933fd4 fix wrong textures on a couple of lamps 2019-06-02 03:16:00 -04:00
Vanessa Dannenberg
968cdfd549 rope lights are not dimmable 2019-06-02 03:13:46 -04:00
Vanessa Dannenberg
c457874d03 fix bad not-in-creative-inventory flags on wall lamp and plasma ball 2019-06-02 02:51:41 -04:00
Vanessa Dannenberg
67acbd6d59 fix not being able to right-click table and standing lamps 2019-06-02 02:47:46 -04:00
Vanessa Dannenberg
fdb37bdaf5 fix wrong colorization table usage in table, standing, and desk lamps 2019-06-02 02:45:01 -04:00
Vanessa Dannenberg
ab8bf5586f move "medieval" wall lamp and torch to homedecor_lighting
make them mesecon/digiline controllable (on/off only, alldir rules)

also fix a couple of old texture references
2019-06-02 02:37:02 -04:00
Vanessa Dannenberg
2f3c12eb2a rename and move generic light source textures 2019-06-02 02:23:10 -04:00
Vanessa Dannenberg
4174737a1a make most presently non-dimmable lights dimmable
merge table and standing lamps into the new code

of all the relevant lights, the plasma ball is the only one that remains
on/off-only, since dimmable doesn't make sense there.

That one, and any future lights that get the on/off-only treatment, will
use the previous on/off behavior, i.e. turn off with the messages "off"
or "low" or a number < 4, and turn on with "med", "hi", "max", "on" or
a number > 3

This alters the behavior of table/standing lamps - they will no longer
cycle brightnesses by right-click.  Like all other controllable lights,
they'll just toggle on/off.  If there's enough demand for it, I'll add
that feature back in at a later date.
2019-06-02 02:11:15 -04:00
Vanessa Dannenberg
11771e12cb allow numeric messages for dimmable lamps
allow non-dimmables to respond to "off", "low", "med", "hi", "max", "on"

number messages for dimmables:
0 turns the light off
1-3 sets it to "low"
4-7 sets it to "med"
8-11 sets it to "hi"
12+ sets it to "max" (i.e. full-on)

non-dimmables:
a number > 3 or the strings "med", "hi", "max", or "on" turn the light on
a number < 4 or the strings "off" and "low" turn the light off
2019-06-01 23:13:02 -04:00
Vanessa Dannenberg
301ae2ee1d Rearrange mesecons, diglines, dimmable functions and related, tweak
digiline stuff to be more generic, and add various digilines connections
rules to complement mesecons rules.

Mesecons must be present to get the "wallmounted" rules for digilines nodes.
Without mesecons, nodes that want wall rules will get alldir rules instead.

Add mesecons support to table and standing lamps (off -> max -> off).

Add digilines support to all other lights that now support mesecons,
except rope lights, since they're a mesecon conductor.

(will approach that last one later)
2019-05-29 22:01:27 -04:00
Vanessa Dannenberg
e767b08011 add missing alias 2019-05-26 20:11:50 -04:00
Vanessa Dannenberg
603eeba810 make table- and standing lamps respond to diglines messages
"off", "low", "med", "hi", "max".  Any other message is ignored

shift-punch to set the digiline channel

only connects from X/Z directions

right-click still cycles brightness as before

also adds protection check for right-click brightness changing
2019-05-26 19:05:11 -04:00
Vanessa Dannenberg
960f4c4200 fix bad player ref (sneder -> clicker) 2019-05-26 17:13:32 -04:00
Vanessa Dannenberg
cacf04e2d1 Add mesecons support for the rest of the other relevant lights
Each light connects only according to what sides make sense.

For example:

* a plasma lamp cube or large lattice lamp will connect from all 6 sides
* a ground lantern will only connect from its NSEW sides, not its top or
  bottom
* a glowlight slab, glowlight cube, or lattice cube uses the same rules as
  mesecons lamps, so its four edges and it back/bottom, whatever its
  orientation, but not its top/front.
* a (kitchen) ceiling lamp, and a (hanging, exterior) ceiling lantern will
  only connect from the top.

Rope lights are defined as a conductor, just like a mesecons wire,
so if mesecons is present, they will default to off unless powered by
a mesecons wire/switch/etc.

You can still right-click-toggle individual segments on/off.

Ceiling rope light connection rules are a little funky, but they work
(I wanted them to only connect from the top, but I couldn't get it
just right).  Floor-orientation connections are straightforward.
2019-05-26 00:44:37 -04:00
Vanessa Dannenberg
07141bff47 fill-out mesecons support for first few lights,
also removed debug prints

Lights are forced-on when placed, and remain so
until they receive a mesecons "off" signal.

Lights can be toggled on/off independent of the
mesecon signal state by right click, which will
persist until the next signal transition,
which will change the light to follow.
2019-05-25 22:51:49 -04:00
Vanessa Dannenberg
542f688c09 fix global warnings 2019-05-25 21:46:08 -04:00
Vanessa Dannenberg
fee09943e3 mesecons support, wip 2019-05-25 21:35:38 -04:00
Vanessa Dannenberg
bed4d1e6f8 make table- and standing-lamps return "hi"
brightness version, instead of "off".  do
the same for their crafts.
2019-05-25 20:59:19 -04:00
Vanessa Dannenberg
798ff29b0a add drops 2019-05-25 20:50:30 -04:00
Vanessa Dannenberg
7491fd4aa8 Allow most light sources to be toggled on/off
with right-click.

Rework glowlight slab and cube textures, simplify,
use overlays and compositing, so that the bulk
of the light can switch between a dark, matte surface,
and a bright surface with central glare gradient, and
so that the surface and eging respond to param2 color.

Tweak all other relevant nodes so that their light
source changes to a darkened (or even translucent
texture) when off.

On/off switching doesn't affect things like oil lamps,
candles, chandeliers, etc.  Just basically the stuff
that would be electric-powered in real life.

If in a protected area, only that area's owner can
turn the light on/off.
2019-05-25 19:35:14 -04:00
Vanessa Dannenberg
7ab149275b Add "rope" lighting 2019-05-25 02:34:50 -04:00
Vanessa Dannenberg
712ca909ca Multiple related changes:
remove duplicate dishwasher recipe
more kitchen depends fixes
fix wrong brass taps recipe (ref technic brass, need basic_materials brass)
re-add missing bathroom items recipes
re-add missing stading- and table-lamp recipes
add alternate dishwasher recipe
add recipes for "half-doors"
change light bath tiles recipe (don't need white dye for base node, now)
move japanese wall parts to homedecor_misc, make _doors opt depend on that
2019-05-24 20:40:44 -04:00
Vanessa Dannenberg
2ee1cd6887 Make sure all "lanterns" and "lamps" have "light" in their descriptions also
(for easier searching in sfinv and unified inv)
2019-05-02 18:36:36 -04:00
TenPlus1
0cd8bd7780 remove homedecor_i18n and merged into homedecor_common, fixed meseon global error 2019-04-21 16:25:21 +01:00
Vanessa Dannenberg
b08c0905c0 Split the big "homedecor" mod into multiple sub-mods
Any of these new submods can be run without any other
components that were once part of the big "homedecor"
mod, other than homedecor_common and homedecor_i18n

Reduced dependencies where possible, but each submod still
has its various dependencies more or less the same as before,
i.e. some need basic_materials, others need unifieddyes,
some need building_blocks, and so on.

All of the stuff that used to be under homedecor/handlers
got moved to homedecor_common, as did any models and/or textures
that are used by more than one other homedecor component.

All the miscellaneous items that didn't warrant their own
mod ended up in homedecor_misc, which can also be thought
of as the remains of the original "homedecor" mod, renamed.
2019-04-20 17:02:42 -04:00