1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2024-11-14 06:10:20 +01:00
Commit Graph

121 Commits

Author SHA1 Message Date
Vanessa Dannenberg
4dc4b0e08a fix broken re-painting of nodes using the split palettes
(broken in multiple places....oy.)

also, fix wrong light green shade in colorwallmounted palette

also, fixed many wrong/missing aliases and translations between old and current colors
(i.e. aqua<->spring, skyblue<->azure, redviolet<->rose)
2018-08-27 01:10:44 -04:00
Vanessa Dannenberg
3898337fc3 don't try to match last_color to registered_items table, that breaks aliases 2018-08-27 00:05:34 -04:00
Vanessa Dannenberg
088b5ee120 tweak switching-to msg 2018-08-26 22:35:40 -04:00
Vanessa Dannenberg
2e4c2e2667 add "***" to all other warning/info msgs 2018-08-26 22:31:56 -04:00
Vanessa Dannenberg
6ecb115465 warn the user to open the color selector
instead of crashing if they have no color set :-)
2018-08-26 22:27:43 -04:00
Vanessa Dannenberg
4dde37c191 remove "already that color" chat msg (some found it annoying) 2018-08-26 22:16:28 -04:00
Vanessa Dannenberg
c9d7733d87 use right-click (on any random node) to open the color selector
experimental code to read the param2 of a node and make a dye out of it
used by airbrush, shift-right-click to change to that color
2018-08-26 22:15:37 -04:00
Vanessa Dannenberg
0a589e7529 use shift-right-click for color select form
(instead of punch or shift-punch)

Must be pointing at a node, doesn't matter what it is, but with a range
of 12, it's hard not to.
2018-08-26 19:34:01 -04:00
Vanessa Dannenberg
409ee441c4 respect protection 2018-08-26 08:59:28 -04:00
Vanessa Dannenberg
ca1ab44e78 add recipe for airbrush 2018-08-26 08:41:04 -04:00
Vanessa Dannenberg
e13d514ff7 allow shift-punch for airbrush form 2018-08-26 08:28:56 -04:00
Vanessa Dannenberg
fa71e3166c allow replacement nodes during airbrushing 2018-08-26 07:23:40 -04:00
Vanessa Dannenberg
414d72d2a6 new punch-to-colorize scheme
using a tool, the airbrush, for the job

point at air/nothing and punch while wielding the airbrush
to open the color selection form.
2018-08-26 07:10:00 -04:00
Vanessa Dannenberg
568168fe1f better handling of the register_on_placenode rotation fix 2018-08-26 07:09:20 -04:00
Vanessa Dannenberg
c005dc358a minor changes to colorwallmounted palette
got rid of the separate brown swatch in the colorwallmounted palette, as
it was being bypassed by the brown-> medium orange translation --
replaced it with light green.

fixed missing colorwallmounted light blue/azure check-and-return in
get_paletteidx()
2018-08-25 02:40:17 -04:00
Vanessa Dannenberg
c7fc48c8d0 fix some broken aliases,
add some corresponding ones (unifieddyes:* vs. dye:*)
2018-08-25 00:38:24 -04:00
Vanessa Dannenberg
0d00a7eae6 workaround for placing nodes with no color info in itemstack 2018-08-24 11:13:42 -04:00
Vanessa Dannenberg
adf1bc2c50 remove the old obsolete on_use stuff
(was applied to dye items, obsolete now)
2018-08-24 05:41:27 -04:00
Vanessa Dannenberg
d3274ab66f remove debug prints 2018-08-22 20:07:15 -04:00
Vanessa Dannenberg
d2512952d9 forgot to add pink to craft helper 2018-08-22 20:06:29 -04:00
Vanessa Dannenberg
5557178cb4 proper handling of 89-color "split" palette in craft helper 2018-08-22 20:01:03 -04:00
Vanessa Dannenberg
4847b926d5 preserve color bits in rotation fixup calls 2018-08-22 04:25:43 -04:00
Vanessa Dannenberg
e3648f77e2 remove debug prints 2018-08-22 03:27:17 -04:00
Vanessa Dannenberg
b49ed1724b fix hue table type for wallmounted in craft helper 2018-08-22 03:14:20 -04:00
Vanessa Dannenberg
a55f6faa14 further refine how colored itemstacks work 2018-08-21 23:28:17 -04:00
Vanessa Ezekowitz
a8caed8195 separate the make-colored-itemstack code into its own function 2017-06-20 17:01:54 -04:00
Vanessa Ezekowitz
731c7d133e disable old after_dig_node() callbacks
(don't split a digged node into neutral+dye)
2017-06-20 17:01:54 -04:00
Vanessa Ezekowitz
ad8ab99bd8 disable auto-coloring code entirely 2017-06-20 17:01:54 -04:00
Vanessa Ezekowitz
07101b99fe add helper function for crafting param2-colorized items
One call registers the full set of 32, 89, or 256 colors.

Pass it a recipe of the following general form

```lua
unifieddyes.register_color_craft({
        output = "mymod:colorized_node",
        type = <nil or "shapeless">
        palette = <see below>,
        neutral_node = "some_mod:neutral_node",
        recipe = {
                <see below>
        }
})
```

palette may be either "wallmounted" (32 colors), false or omitted
entirely (89 colors), or "extended" (256 colors).

The recipe section is either a shapeless list, or a standard three-line
shaped recipe, same as the regular register_craft() function.  The key
difference is two placeholder keys that are now supported:

  * if an item in the recipe is "MAIN_DYE", then Unified Dyes will, with
    each pass of its registration loop, substitute the actual "dye:foo"
    craft item in its place which corresponds with the current loop's color.
  * if an item in the recipe list is "NEUTRAL_NODE", then the value of the
    "neutral_node" field will be substituted in its place.

The expectation here is that the modder probably has some base recipe in
mind that, given no dyes, would result in a neutral, uncolored node.  This
call creates all the recipes that would be needed to craft colored versions
of that neutral node either using that base recipe with dye added, or by
crafting the neutral node with some dye after the fact.
2017-06-20 17:01:54 -04:00
Vanessa Ezekowitz
495479c6a2 remove a few redundant aliases 2017-06-20 16:11:15 -04:00
Vanessa Ezekowitz
0822757382 add alternate recipe for dark orange 2017-06-20 16:04:00 -04:00
Vanessa Ezekowitz
ffd03b9c3c clean-up of dark/medium orange and light/red
(fixes #13)
2017-06-20 15:44:28 -04:00
Vanessa Ezekowitz
8b20a069d3 rotation fixes for compat with minetest 0.4.16 2017-06-04 16:17:37 -04:00
Vanessa Ezekowitz
9dd533f4a0 Merge pull request #9 from AntumDeluge/settings
Replace deprecated 'setting_getbool' with 'settings:get_bool'
2017-05-18 05:44:39 -04:00
AntumDeluge
73e05d9c76 Replace deprecated 'setting_getbool' with 'settings:get_bool' 2017-05-13 16:55:37 -07:00
AntumDeluge
df3f1b18ab Replace deprecated call to 'get_look_yaw' with 'get_look_horizontal' 2017-05-03 23:05:40 -07:00
Vanessa Ezekowitz
df177c26a7 allow shift-punching on a colorable node, to cancel auto-coloring
also add a message in the chat when auto-color is activated, and with what.
2017-03-18 15:56:28 -04:00
Vanessa Ezekowitz
cf186f5f9c make sure the pointed thing is a node before checking protection 2017-03-18 14:37:09 -04:00
Vanessa Ezekowitz
726bb75e1d add recolor-on-place helper
if you add `after_place_node = unifieddyes.recolor_on_place,`
to your node def, UD will automatically colorize the node when
placed, using the last dye you colored that kind of node with.

If you switch to some other colorable node, or you run out of whatever
color dye you were using at the time, a warning message will be printed
and the autocolor will be reset back to neutral.

If a player signs off, autocolor for him/her is reset to neutral
(this also helps prevent a minor memory leak)

also get rid of one or two debug prints.
2017-03-18 03:26:05 -04:00
Vanessa Ezekowitz
8fc5468212 remove outdated comment 2017-03-17 22:26:51 -04:00
Vanessa Ezekowitz
63153f1093 protection check on_use 2017-03-17 03:18:06 -04:00
Vanessa Ezekowitz
15b6016f0f on_construct for nodes that were 89-color or static,
but now use an LBM to convert to the 256-color palette
2017-03-14 02:05:52 -04:00
Vanessa Ezekowitz
978e88bda5 don't crash if the dye target is an unknown node :P 2017-03-11 21:20:10 -05:00
Vanessa Ezekowitz
70b1f9fbc9 made base_color_crafts, shade_crafts,
and greymixes tables globally accessible
2017-02-26 22:32:56 -05:00
Vanessa Ezekowitz
2804327825 get rid of some redundant variables
(just directly reference the table elements instead)
2017-02-26 18:56:12 -05:00
Vanessa Ezekowitz
315dfb8283 add another recipe 2017-02-26 18:39:41 -05:00
Vanessa Ezekowitz
f852fb6861 add more hue recipes
also fix a variable that got capitalized for some reason
2017-02-26 18:37:34 -05:00
Vanessa Ezekowitz
2b9831a869 add more "direct" recipes
for the more esoteric colors
2017-02-26 17:57:44 -05:00
Vanessa Ezekowitz
0cd0758c08 only use the node def's palette entry to check palette type
(don't assume it has to be paramtype2="color", otherwise that screws up
uncolored nodes that need this check for on_use)
2017-02-26 10:55:49 -05:00
Vanessa Ezekowitz
46a55946ef define on_use for default dyes
(forgot to include the overrides)
2017-02-25 16:45:57 -05:00