Commit Graph

27 Commits (ebf30c2410009c0d87a2ce6a715e665d2f220008)

Author SHA1 Message Date
Vanessa Dannenberg ebf30c2410 refactor the whole check-and-place function
also fix a derp where I left some test nodes
in place in the brass street light :-)
2021-06-28 18:53:10 -04:00
Vanessa Dannenberg 7ef6bd4b9a fixup survival-mode item quantity checks 2021-06-28 00:19:15 -04:00
Vanessa Dannenberg fac56f263c Allow speciying custom top and overhang nodes
Can be true, false, or a table with two entries (topnode, overhang).

If false, the main pole extends all the way up to the specified height,
and the light is simply placed next to it.

if true, the main pole extends all the way up, and then steps right by
1m, with the light hanging from it.  This is the default.

if a table, the main pole stops 1m short of the top, and the two
specified nodes are placed above it, with the overhang to the right, and
the light hanging under it.

also fixed the custom base node not getting _digilines extension when
called-for
2021-06-27 20:25:58 -04:00
Vanessa Dannenberg 92eb5b9e8d allow specifying a custom "base" node for the pole
(like if the bottom part should be bigger than the rest of the pole,
or has some details such as bolts securing it to the ground)
2021-06-27 19:22:59 -04:00
Vanessa Dannenberg 42f775f716 allow specifying the height of the lamppost
and whether it has a top section over the bulb
(the top is included in the height, defaults to 5m, with top)
2021-06-27 19:04:59 -04:00
Vanessa Dannenberg 6c4bfd6205 pass streetlight "model" parameters via table 2021-06-27 19:04:59 -04:00
Vanessa Dannenberg 5815180b0e move the check_and_place and pointed_thing functions to their own file
(makes the check function global, but still in the streetlights namespace)
2021-06-27 19:04:59 -04:00
Vanessa Dannenberg c007f4c21c Don't allow engine to add the implicit "Proceed" button
(this change makes it possible to theme the formspec)
2021-02-25 02:14:58 -05:00
Vanessa Dannenberg fd2704217c use table.copy instead of own clone-node function
also make sure coloredwood loads first, opt depend
2019-06-18 14:33:16 -04:00
Vanessa Dannenberg 41625bdf6f defer to the target node's on_rightclick, if defined 2019-05-31 23:21:30 -04:00
Vanessa Dannenberg 38eb8b8f59 scan around the distribution node, if any, for connection targets 2019-05-31 23:07:01 -04:00
Vanessa Dannenberg d31c5590fe if there's no digiline distributor, fall back to vertical digilines from "digistuff" mod
(if neither mod exists, there will no option to set the distribution node)
2019-05-31 23:04:03 -04:00
Vanessa Dannenberg d991bf02bc override the settings coloredwood (if present) adds
to default fence, in the digilines copy thereof
2019-05-31 14:57:25 -04:00
Vanessa Dannenberg acfaf86aa8 add recipes to allow upgrading a plain spawner to be digilines-capable,
or to upgrade a plain or digiline one to digiline with a distributor
2019-05-31 02:18:51 -04:00
Vanessa Dannenberg cdfb4c0dba instead of using Aux1/"E" to place a digiline distributor with the
streetlight, just craft spawners that will always do that.

(does not affect Sneak/"shift" for placing a concrete block)
2019-05-31 02:13:21 -04:00
Vanessa Dannenberg 0bdc475ee5 add recipes for Digilines-conducting poles, just in case someone wants
to build the lights by hand :P
2019-05-30 06:37:50 -04:00
Vanessa Dannenberg 469c18ad91 fix digiline-vs-not pole deduction 2019-05-30 06:32:48 -04:00
Vanessa Dannenberg 4d94ad9c16 fix wrong survival-mode digiline-wires-needed count
fix drops on digilines conducting fences
2019-05-30 06:23:46 -04:00
Vanessa Dannenberg 333a65785a Allow using aux1 (usually "E") to auto-place a digiline distributor 2 meters
below the pole (the usual location for such a thing, but only if you're using a
digilines-enabled spawner). Sneak (usually "shift") still places concrete right
below the pole, so sneak + aux1 will place both.

As usual, if you're in survival mode, you must have distributors in your
inventory in order to place them, as with concrete and the pole and light
items; the mod will warn you if you have none.
2019-05-30 03:08:29 -04:00
Vanessa Dannenberg 4da69dd206 If digilines is enabled, create digiline conducting copies of all
registered pole nodes, with simple texture overlays to make it evident.

Also, create suitable spawners for these, but only if the light source
to be spawned is also digilines compatible.

When using a digiline-compat spawner, you can set the channel for the
light source (and thus all future lights you place) by shift-punching
while wielding the spawner.  This setting persists until the next
restart, or until you change it with another shift-punch.
2019-05-30 02:02:58 -04:00
Vanessa Dannenberg 85c7ed8425 rework creative and materials-in-survival checks on simple street lights
check if the user has concrete when they try to shift-place in survival
fix wrong pole check/deduct count
add informational messages for when the player is short on materials
2019-05-27 14:31:42 -04:00
Vanessa Dannenberg 616f2d7777 if basic_materials is installed
allow holding shift/sneak while "placing" a spawner
to automatically "set" the streetlight in concrete.
2019-05-03 01:53:42 -04:00
Vanessa Dannenberg 47201c422a add crafting recipes 2019-05-02 23:33:45 -04:00
Vanessa Dannenberg bc496e221e add junglewood poles and homedecor glowlight cube lights 2019-05-02 23:29:06 -04:00
Vanessa Dannenberg 6807cc8ddc rewrite mod to use "procedural" code
uses tables to generate spawners based on available mods
instead having them hard-coded.

side-effect: this allows default mese lamps on all four
existing pole materials instead of only wood.
2019-05-02 23:17:25 -04:00
Vanessa Dannenberg 1c6b382592 Fix broken depends due to The Big Home Decor Split 2019-05-02 22:06:12 -04:00
cheapie 53eb541543 add MineDOT-style streetlights 2018-11-02 18:17:15 -04:00