[API] Register poles and lamps (modpack) [streetlights]

[API] Register poles and lamps (modpack) [streetlights]

Postby Linuxdirk » Sun May 20, 2018 6:12 am

Register streetlight poles and lamps via an API


The API provides two functions that allow registering conductive poles as well as lamps. The API registers them with all the necessary functionality for conducting the Mesecons signal. The two other mods in the modpack are examples on how to use the API.

Image
Most basic setup: Mesecons signal into the receiver, from there into a pole, from the pole to the lamp.

For using the API all you need to do is depend on it and register anything you want. Or simply get the modpack as a whole since it contains two more mods that utilize the API to register a basic set of lamps and poles.

Image Image
Left: All lamps are toggleable; Right: Some poles are disguised as other nodes

For connecting the Mesecons signal to the poles a receiver is used as shown in the first screenshot. To craft the receiver you just need some stone and other material.

Image
Enough for seven lamps.

The receiver is provided by the API and does not need to be registered manually.

Obtaining the modpack


Info: Only streetlights_api is needed for registering own lamps and poles!
Depends (API): default, mesecons, mesecons_extrawires
Depends (poles): streetlights_api, walls (optional)
Depends (lamps): streetlights_api
License (all): GPLv3 or later,
Download: Latest version (always compatible with latest non-dev Minetest version)
… or better use Git: https://gitlab.com/4w/streetlights.git
Have a look at the Minetest Content Database
Linuxdirk
Member
 
Posts: 1907
Joined: Wed Sep 17, 2014 11:21 am
In-game: Linuxdirk

Re: [API] Register poles and lamps (modpack) [streetlights]

Postby LegoLogger » Sun May 20, 2018 12:58 pm

This is Awesome! Thank you for this API!
~~BakerPrime
LegoLogger
Member
 
Posts: 38
Joined: Thu Sep 01, 2016 4:08 pm
GitHub: BakerPrime
In-game: BakerPrime

Re: [API] Register poles and lamps (modpack) [streetlights]

Postby Phoenixflo44 » Sun May 20, 2018 1:13 pm

Good job. +10000000000000000000000000000000000000000000000
Phoenixflo44
Member
 
Posts: 627
Joined: Fri Jul 28, 2017 3:01 pm
In-game: Phoenixflo44

Re: [API] Register poles and lamps (modpack) [streetlights]

Postby Linuxdirk » Fri Mar 22, 2019 8:00 pm

All mods are updated to use the Minetest 5.0.0 modding API.

Mod includes German translation where applicable.

Update your client/server or check out commit becda544 when using Git to have the last 0.4.x compatible version.
Linuxdirk
Member
 
Posts: 1907
Joined: Wed Sep 17, 2014 11:21 am
In-game: Linuxdirk



Return to Mod Releases



Who is online

Users browsing this forum: Yandex Bot [Bot] and 0 guests