Add tree sign to cut pine/aspen trees
14
README.md
|
@ -82,6 +82,7 @@ For all Inventory commands applies: If the inventory stack specified by <slot> i
|
|||
dig_right <slot> <lvl> - remove block on the right
|
||||
dig_below <slot> - dig block under the robot
|
||||
dig_above <slot> - dig block above the robot
|
||||
rotate_item <lvl> <steps> - rotate a block in front of the robot
|
||||
place_sign <slot> - set sign
|
||||
place_sign_behind <slot> - put a sign behind the bot
|
||||
dig_sign <slot> - remove the sign
|
||||
|
@ -96,7 +97,14 @@ For all Inventory commands applies: If the inventory stack specified by <slot> i
|
|||
pattern - save the blocks behind the shield (up to 5x3x3) as template
|
||||
copy <size> - make a copy of "pattern". Size is e.g. 3x3 (see ingame help)
|
||||
punch_cart - Punch a rail cart to start it
|
||||
add_compost <slot> - Put 2 leaves into the compost barrel
|
||||
take_compost <slot> - Take a compost item from the barrel
|
||||
print <text> - Output chat message for debug purposes
|
||||
take_water <slot> - Take water with empty bucket
|
||||
fill_cauldron <slot> - Fill the xdecor cauldron for a soup
|
||||
take_soup <slot> - Take boiling soup into empty bowl from cauldron
|
||||
flame_on - Make fire
|
||||
flame_off - Put out the fire
|
||||
|
||||
#### Flow control commands
|
||||
|
||||
|
@ -141,13 +149,14 @@ Or alternatively with the function at the end:
|
|||
return -- end of 'foo'. Jump back
|
||||
|
||||
### License
|
||||
Copyright (C) 2019-2021 Joachim Stolberg
|
||||
Copyright (C) 2019-2021 Joachim Stolberg
|
||||
Copyright (C) 2021 Michal 'Micu' Cieslakiewicz (soup commands)
|
||||
Code: Licensed under the GNU GPL version 3 or later. See LICENSE.txt
|
||||
|
||||
|
||||
### Dependencies
|
||||
default, farming, basic_materials, tubelib2
|
||||
optional: farming redo, node_io, doc, techage, minecart
|
||||
optional: farming redo, node_io, doc, techage, minecart, xdecor, compost
|
||||
|
||||
|
||||
### History
|
||||
|
@ -173,4 +182,5 @@ optional: farming redo, node_io, doc, techage, minecart
|
|||
- 2021-03-14 v1.06 * Switch translation from intllib to minetest.translator
|
||||
- 2021-04-24 v1.07 * Adapted to minecart v2.0
|
||||
- 2021-05-04 v1.08 * Add print command, improve error msg
|
||||
- 2021-08-22 v1.09 * Add soup commands and signs, add aspen sign
|
||||
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
--[[
|
||||
|
||||
Signs Bot
|
||||
=========
|
||||
|
||||
Copyright (C) 2019-2021 Joachim Stolberg
|
||||
|
||||
GPL v3
|
||||
See LICENSE.txt for more information
|
||||
|
||||
Bot tree cutting signs
|
||||
]]--
|
||||
|
||||
-- Load support for I18n.
|
||||
local S = signs_bot.S
|
||||
|
||||
local CMNDS = [[-- Harvest pine/aspen trunks v1.0
|
||||
|
||||
-- Take dirt and saplings from chest
|
||||
dig_sign 1
|
||||
move 1
|
||||
turn_right
|
||||
take_item 99 0
|
||||
take_item 99 0
|
||||
|
||||
-- Goto trunk
|
||||
turn_left
|
||||
dig_front 0 0
|
||||
move 1
|
||||
|
||||
-- Climb up
|
||||
repeat 10
|
||||
dig_above 0
|
||||
move_up
|
||||
place_below 1
|
||||
end
|
||||
|
||||
-- Climb down
|
||||
repeat 10
|
||||
dig_below 1
|
||||
move_down
|
||||
end
|
||||
|
||||
-- Pickup saplings
|
||||
repeat 4
|
||||
pickup_items 2
|
||||
turn_left
|
||||
end
|
||||
|
||||
-- Return dirt and saplings to chest
|
||||
backward
|
||||
plant_sapling 2
|
||||
turn_right
|
||||
add_item 99 1
|
||||
add_item 99 2
|
||||
|
||||
-- Finish
|
||||
turn_left
|
||||
backward
|
||||
place_sign 1
|
||||
turn_around]]
|
||||
|
||||
local HELP = table.concat({
|
||||
S("Used to harvest an aspen or pine tree trunk"),
|
||||
S("- Place the sign in front of the tree."),
|
||||
S("- Place a chest to the right of the sign."),
|
||||
S("- Put a dirt stack (10 items min.) into the chest."),
|
||||
}, "\n")
|
||||
|
||||
|
||||
signs_bot.register_signXL({
|
||||
name = "aspen",
|
||||
description = S('Sign "aspen"'),
|
||||
help_text = HELP,
|
||||
commands = CMNDS,
|
||||
image = "signs_bot_sign_aspen.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "signs_bot:aspen 2",
|
||||
recipe = {
|
||||
{"group:wood", "default:stick", "group:wood"},
|
||||
{"dye:black", "default:stick", "dye:yellow"},
|
||||
{"dye:grey", "default:aspen_sapling", ""}
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.get_modpath("doc") then
|
||||
doc.add_entry("signs_bot", "aspen", {
|
||||
name = S("Sign 'aspen'"),
|
||||
data = {
|
||||
item = "signs_bot:aspen",
|
||||
text = HELP .. "\n",
|
||||
},
|
||||
})
|
||||
end
|
3
init.lua
|
@ -15,7 +15,7 @@
|
|||
signs_bot = {}
|
||||
|
||||
-- Version for compatibility checks, see readme.md/history
|
||||
signs_bot.version = 1.08
|
||||
signs_bot.version = 1.09
|
||||
|
||||
-- Test for MT 5.4 new string mode
|
||||
signs_bot.CLIP = minetest.features.use_texture_alpha_string_modes and "clip" or true
|
||||
|
@ -53,6 +53,7 @@ dofile(MP.."/cmd_pattern.lua")
|
|||
dofile(MP.."/cmd_farming.lua")
|
||||
dofile(MP.."/cmd_flowers.lua")
|
||||
dofile(MP.."/cmd_soup.lua")
|
||||
dofile(MP.."/cmd_trees.lua")
|
||||
|
||||
dofile(MP.."/signal.lua")
|
||||
dofile(MP.."/extender.lua")
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
### basis.lua ###
|
||||
|
||||
running=läuft
|
||||
charging=aufladen
|
||||
stopped=gestoppt
|
||||
Off=Aus
|
||||
On=An
|
||||
|
@ -15,7 +14,6 @@ Config=Konfig.
|
|||
Preassign slots items=Vorbelegungen
|
||||
Back=Zurück
|
||||
Robot Box=Roboterbox
|
||||
no power=kein Strom
|
||||
Signs Bot Box=Roboter Box
|
||||
The Box is the housing of the bot.=Die Box ist das Gehäuse des Roboters.
|
||||
Place the box and start the bot by means of the 'On' button.=Platziere die Box und starte den Roboter über den "An" Button.
|
||||
|
@ -27,6 +25,11 @@ The box inventory simulates the inventory of the bot.=Das Inventar der Box simul
|
|||
You will not be able to access the inventory, if the bot is running.=Du hast keinen Zugriff auf das Inventar, sofern der Roboter unterwegs ist.
|
||||
The bot can carry up to 8 stacks and 6 signs with it.=Der Roboter kann 8 Stapel von Blöcken und 6 Zeichen transportieren.
|
||||
|
||||
### basis.lua ###
|
||||
### techage.lua ###
|
||||
|
||||
charging=aufladen
|
||||
|
||||
### bot_flap.lua ###
|
||||
|
||||
Exit=Beenden
|
||||
|
@ -43,6 +46,11 @@ Bot Sensor: Not connected=Bot Sensor: Nicht verbunden
|
|||
The Bot Sensor detects any bot and sends a signal, if a bot is nearby.=Der Roboter Sensor entdeckt jeden Roboter und sendet ein Signal, sofern ein Roboter in der Nähe ist.
|
||||
The sensor direction does not care.=Die Ausrichtung des Sensor spielt keine Rolle.
|
||||
|
||||
### bot_sensor.lua ###
|
||||
### cart_sensor.lua ###
|
||||
|
||||
the sensor range is one node/meter.=Der Sensorbereich ist einen Block/Meter groß.
|
||||
|
||||
### cart_sensor.lua ###
|
||||
|
||||
Cart Sensor: Connected with=Wagen Sensor: Verbunden mit
|
||||
|
@ -51,11 +59,6 @@ Cart Sensor: Not connected=Wagen Sensor: Nicht verbunden
|
|||
The Cart Sensor detects and sends a signal, if a cart (Minecart) is nearby.=Der Wagen Sensor sendet ein Signal, sofern ein Wagen in der Nähe ist.
|
||||
The sensor has an active side (red) that must point to the rail/cart.=Der Sensor hat eine aktive Seite (rot), welche zu den Schienen zeigen muss.
|
||||
|
||||
### cart_sensor.lua ###
|
||||
### bot_sensor.lua ###
|
||||
|
||||
the sensor range is one node/meter.=Der Sensorbereich ist einen Block/Meter groß.
|
||||
|
||||
### changer.lua ###
|
||||
|
||||
Signs:=Zeichen:
|
||||
|
@ -87,12 +90,6 @@ Sign 'farming'=Zeichen 'Farming'
|
|||
Used to harvest and seed a 3x3 field.=Benötigt um ein 3x3 Feld zu ernten und wieder zu sähen.
|
||||
The seed to be placed has to be in the first inventory slot of the bot.=Das Saatgut, dass gesät werden soll, muss sich an der 1. Position im Inventar befinden.
|
||||
|
||||
### cmd_farming.lua ###
|
||||
### cmd_flowers.lua ###
|
||||
|
||||
Place the sign in front of the field.=Platziere das Zeichen vor das Feld.
|
||||
When finished, the bot turns.=Der Roboter dreht um, wenn er fertig ist.
|
||||
|
||||
### cmd_flowers.lua ###
|
||||
|
||||
Cutting flowers, leaves and tree blocks@nin front of the robot@non a 3x3 field.=Schneide Blumen, Blätter und Baumblöcke@nin einem 3x3 großem Feld@nvor dem Roboter.
|
||||
|
@ -100,6 +97,12 @@ Sign "flowers"=Zeichen "Blumen"
|
|||
Sign 'flowers'=Zeichen 'Blumen'
|
||||
Used to cut flowers on a 3x3 field.=Benötigt um ein 3x3 Blumenfeld zu ernten.
|
||||
|
||||
### cmd_flowers.lua ###
|
||||
### cmd_farming.lua ###
|
||||
|
||||
Place the sign in front of the field.=Platziere das Zeichen vor das Feld.
|
||||
When finished, the bot turns.=Der Roboter dreht um, wenn er fertig ist.
|
||||
|
||||
### cmd_item.lua ###
|
||||
|
||||
Take <num> items from a chest like node@nand put it into the item inventory.@n<slot> is the inventory slot (1..8) or 0 for any one=Nehme <num> Gegenstände aus der@nKiste oder dem Kisten-ähnlichen Block@nund tue diese in das eigene Inventar@nan der Position <slot>. Slot = (1..8)@noder 0 für irgend eine Position
|
||||
|
@ -139,7 +142,6 @@ Use the pattern sign to mark the pattern.=Benutze das Vorlage-Zeichen und die Vo
|
|||
|
||||
### cmd_place.lua ###
|
||||
|
||||
Error: Position protected=Fehler: Position geschützt
|
||||
Place a block in front of the robot@n<slot> is the inventory slot (1..8)@n<lvl> is one of: -1 0 +1=Setze einen Block vor den Roboter.@n<slot> ist die Position im@neigenen Inventar (1--8).@nFür <lvl> ist zulässig: -1 0 +1
|
||||
Place a block on the left side@n<slot> is the inventory slot (1..8)@n<lvl> is one of: -1 0 +1=Setze einen Block links vorne.@n<slot> ist die Position im@neigenen Inventar (1--8).@nFür <lvl> ist zulässig: -1 0 +1
|
||||
Place a block on the right side@n<slot> is the inventory slot (1..8)@n<lvl> is one of: -1 0 +1=Setze einen Block rechts vorne.@n<slot> ist die Position im@neigenen Inventar (1--8).@nFür <lvl> ist zulässig: -1 0 +1
|
||||
|
@ -179,6 +181,62 @@ The 'command' sign can be programmed by the player.=Das 'Kommando' Zeichen kann
|
|||
Place the sign in front of you and use the node menu to program your sequence of bot commands.=Platziere das Zeichen vor dir und nutze das Zeichen-Menü, um die Kommando-Sequenz zu programmieren.
|
||||
The menu has an edit field for your commands and a help page with all available commands.=Das Menü hat ein Eingabefeld für deine Kommandos und eine Hilfeseite zu allen Kommandos.
|
||||
|
||||
### cmd_soup.lua ###
|
||||
|
||||
Take water into empty bucket when standing on a shore@n(use specified slot number or 0 for auto selection)=
|
||||
Error: No still water around=Kein stilles Wasser in der Nähe
|
||||
Error: No empty bucket in inventory=Kein leerer Eimer im Inventar
|
||||
Error: No empty bucket in inventory slot = Kein leerer Eimer in der Inventar Position
|
||||
Error: No inventory space for full bucket=Kein freier Inventarplatz für den vollen Eimer
|
||||
Pour water from bucket to empty cauldron in front of a robot@n(use specified slot number or 0 for auto selection)=
|
||||
Error: No empty cauldron in front of a robot=
|
||||
Error: No full bucket in inventory=
|
||||
Error: No full bucket in inventory slot =
|
||||
Error: No inventory space for empty bucket=
|
||||
Set fire under cauldron (requires flammable material)@n(command is ignored when fire is already burning)=
|
||||
Error: No cauldron in front of a robot=
|
||||
Error: No space for fire under cauldron=
|
||||
Error: No flammable material under cauldron=
|
||||
Put out (extinguish) fire under cauldron@n(command is ignored when there is no fire)=
|
||||
Take boiling soup into empty bowl from cauldron@nin front of a robot@n(use specified slot number or 0 for auto selection)=
|
||||
Error: No cauldron with a soup in front of a robot=
|
||||
Error: No empty bowl in inventory=
|
||||
Error: No empty bowl in inventory slot =
|
||||
Error: No inventory space for full bowl=
|
||||
Sign "take water"=
|
||||
Sign "cook soup"=
|
||||
Sign 'take water'=
|
||||
Used to take water into bucket.=
|
||||
Place the sign on a shore, in front of the still water pool.=
|
||||
Items in slots:=
|
||||
1 - empty bucket=
|
||||
The result is one bucket with water in selected inventory slot.=
|
||||
When finished, the bot turns around.=
|
||||
Sign 'cook soup'=
|
||||
Used to cook a vegetable soup in cauldron.=
|
||||
Cauldon should be empty and located above flammable material.=
|
||||
Place the sign in front of the cauldron with one field space,=
|
||||
to prevent wooden sign from catching fire.=
|
||||
1 - water bucket=
|
||||
2 - vegetable #1 (i.e. tomato)=
|
||||
3 - vegetable #2 (i.e. carrot)=
|
||||
4 - empty bowl (from farming or xdecor mods)=
|
||||
The result is one bowl with vegetable soup in selected inventory slot.=
|
||||
|
||||
### cmd_soup.lua ###
|
||||
### cmd_place.lua ###
|
||||
|
||||
Error: Position protected=Fehler: Position geschützt
|
||||
|
||||
### cmd_trees.lua ###
|
||||
|
||||
Used to harvest an aspen or pine tree trunk=Wird verwendet, um einen Espen- oder Kiefernstamm zu ernten
|
||||
- Place the sign in front of the tree.=- Setze das Zeichen vor den Baum.
|
||||
- Place a chest to the right of the sign.=- Setze eine Kiste rechts neben das Zeichen.
|
||||
- Put a dirt stack (10 items min.) into the chest.=- Lege einen Stapel (>10) Erde (dirt) in die Kiste.
|
||||
Sign "aspen"=Zeichen "Espe"
|
||||
Sign 'aspen'=Zeichen 'Espe'
|
||||
|
||||
### commands.lua ###
|
||||
|
||||
commands:=Kommandos:
|
||||
|
@ -363,6 +421,8 @@ The sensor has an active side (red) that must point to the observed area.=Der Se
|
|||
|
||||
### signs.lua ###
|
||||
|
||||
Instructions:=Anweisungen:
|
||||
Code=Code
|
||||
Sign "turn right"=Zeichen "rechts drehen"
|
||||
Sign "turn left"=Zeichen "links drehen"
|
||||
Sign "take item"=Zeichen "Nehme Gegenstand"
|
||||
|
@ -382,6 +442,7 @@ The Bot takes items out of a minecart in front of it, pushes the cart and then t
|
|||
|
||||
### techage.lua ###
|
||||
|
||||
no power=kein Strom
|
||||
Ignite the techage charcoal lighter=Zünde den Holzkohle-Anzünder an
|
||||
Turns the bot off if the@nbattery power is below the@ngiven value in percent (1..99)=Schalte den Bot aus,@nwenn die Batterieladung kleiner@nist als der angegebene Wert@nin Prozent (1.99)
|
||||
fully charged=voll geladen
|
||||
|
@ -408,6 +469,3 @@ Connected with=Verbunden mit
|
|||
### tool.lua ###
|
||||
|
||||
Sensor Connection Tool=Sensor Verbindungswerkzeug
|
||||
|
||||
|
||||
##### not used anymore #####
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
### basis.lua ###
|
||||
|
||||
running=
|
||||
charging=
|
||||
stopped=
|
||||
Off=
|
||||
On=
|
||||
|
@ -15,7 +14,6 @@ Config=
|
|||
Preassign slots items=
|
||||
Back=
|
||||
Robot Box=
|
||||
no power=
|
||||
Signs Bot Box=
|
||||
The Box is the housing of the bot.=
|
||||
Place the box and start the bot by means of the 'On' button.=
|
||||
|
@ -27,6 +25,11 @@ The box inventory simulates the inventory of the bot.=
|
|||
You will not be able to access the inventory, if the bot is running.=
|
||||
The bot can carry up to 8 stacks and 6 signs with it.=
|
||||
|
||||
### basis.lua ###
|
||||
### techage.lua ###
|
||||
|
||||
charging=
|
||||
|
||||
### bot_flap.lua ###
|
||||
|
||||
Exit=
|
||||
|
@ -43,6 +46,11 @@ Bot Sensor: Not connected=
|
|||
The Bot Sensor detects any bot and sends a signal, if a bot is nearby.=
|
||||
The sensor direction does not care.=
|
||||
|
||||
### bot_sensor.lua ###
|
||||
### cart_sensor.lua ###
|
||||
|
||||
the sensor range is one node/meter.=
|
||||
|
||||
### cart_sensor.lua ###
|
||||
|
||||
Cart Sensor: Connected with=
|
||||
|
@ -51,11 +59,6 @@ Cart Sensor: Not connected=
|
|||
The Cart Sensor detects and sends a signal, if a cart (Minecart) is nearby.=
|
||||
The sensor has an active side (red) that must point to the rail/cart.=
|
||||
|
||||
### cart_sensor.lua ###
|
||||
### bot_sensor.lua ###
|
||||
|
||||
the sensor range is one node/meter.=
|
||||
|
||||
### changer.lua ###
|
||||
|
||||
Signs:=
|
||||
|
@ -87,12 +90,6 @@ Sign 'farming'=
|
|||
Used to harvest and seed a 3x3 field.=
|
||||
The seed to be placed has to be in the first inventory slot of the bot.=
|
||||
|
||||
### cmd_farming.lua ###
|
||||
### cmd_flowers.lua ###
|
||||
|
||||
Place the sign in front of the field.=
|
||||
When finished, the bot turns.=
|
||||
|
||||
### cmd_flowers.lua ###
|
||||
|
||||
Cutting flowers, leaves and tree blocks@nin front of the robot@non a 3x3 field.=
|
||||
|
@ -100,6 +97,12 @@ Sign "flowers"=
|
|||
Sign 'flowers'=
|
||||
Used to cut flowers on a 3x3 field.=
|
||||
|
||||
### cmd_flowers.lua ###
|
||||
### cmd_farming.lua ###
|
||||
|
||||
Place the sign in front of the field.=
|
||||
When finished, the bot turns.=
|
||||
|
||||
### cmd_item.lua ###
|
||||
|
||||
Take <num> items from a chest like node@nand put it into the item inventory.@n<slot> is the inventory slot (1..8) or 0 for any one=
|
||||
|
@ -139,7 +142,6 @@ Use the pattern sign to mark the pattern.=
|
|||
|
||||
### cmd_place.lua ###
|
||||
|
||||
Error: Position protected=
|
||||
Place a block in front of the robot@n<slot> is the inventory slot (1..8)@n<lvl> is one of: -1 0 +1=
|
||||
Place a block on the left side@n<slot> is the inventory slot (1..8)@n<lvl> is one of: -1 0 +1=
|
||||
Place a block on the right side@n<slot> is the inventory slot (1..8)@n<lvl> is one of: -1 0 +1=
|
||||
|
@ -179,6 +181,62 @@ The 'command' sign can be programmed by the player.=
|
|||
Place the sign in front of you and use the node menu to program your sequence of bot commands.=
|
||||
The menu has an edit field for your commands and a help page with all available commands.=
|
||||
|
||||
### cmd_soup.lua ###
|
||||
|
||||
Take water into empty bucket when standing on a shore@n(use specified slot number or 0 for auto selection)=
|
||||
Error: No still water around=
|
||||
Error: No empty bucket in inventory=
|
||||
Error: No empty bucket in inventory slot =
|
||||
Error: No inventory space for full bucket=
|
||||
Pour water from bucket to empty cauldron in front of a robot@n(use specified slot number or 0 for auto selection)=
|
||||
Error: No empty cauldron in front of a robot=
|
||||
Error: No full bucket in inventory=
|
||||
Error: No full bucket in inventory slot =
|
||||
Error: No inventory space for empty bucket=
|
||||
Set fire under cauldron (requires flammable material)@n(command is ignored when fire is already burning)=
|
||||
Error: No cauldron in front of a robot=
|
||||
Error: No space for fire under cauldron=
|
||||
Error: No flammable material under cauldron=
|
||||
Put out (extinguish) fire under cauldron@n(command is ignored when there is no fire)=
|
||||
Take boiling soup into empty bowl from cauldron@nin front of a robot@n(use specified slot number or 0 for auto selection)=
|
||||
Error: No cauldron with a soup in front of a robot=
|
||||
Error: No empty bowl in inventory=
|
||||
Error: No empty bowl in inventory slot =
|
||||
Error: No inventory space for full bowl=
|
||||
Sign "take water"=
|
||||
Sign "cook soup"=
|
||||
Sign 'take water'=
|
||||
Used to take water into bucket.=
|
||||
Place the sign on a shore, in front of the still water pool.=
|
||||
Items in slots:=
|
||||
1 - empty bucket=
|
||||
The result is one bucket with water in selected inventory slot.=
|
||||
When finished, the bot turns around.=
|
||||
Sign 'cook soup'=
|
||||
Used to cook a vegetable soup in cauldron.=
|
||||
Cauldon should be empty and located above flammable material.=
|
||||
Place the sign in front of the cauldron with one field space,=
|
||||
to prevent wooden sign from catching fire.=
|
||||
1 - water bucket=
|
||||
2 - vegetable #1 (i.e. tomato)=
|
||||
3 - vegetable #2 (i.e. carrot)=
|
||||
4 - empty bowl (from farming or xdecor mods)=
|
||||
The result is one bowl with vegetable soup in selected inventory slot.=
|
||||
|
||||
### cmd_soup.lua ###
|
||||
### cmd_place.lua ###
|
||||
|
||||
Error: Position protected=
|
||||
|
||||
### cmd_trees.lua ###
|
||||
|
||||
Used to harvest an aspen or pine tree trunk=
|
||||
- Place the sign in front of the tree.=
|
||||
- Place a chest to the right of the sign.=
|
||||
- Put a dirt stack (10 items min.) into the chest.=
|
||||
Sign "aspen"=
|
||||
Sign 'aspen'=
|
||||
|
||||
### commands.lua ###
|
||||
|
||||
commands:=
|
||||
|
@ -363,6 +421,8 @@ The sensor has an active side (red) that must point to the observed area.=
|
|||
|
||||
### signs.lua ###
|
||||
|
||||
Instructions:=
|
||||
Code=
|
||||
Sign "turn right"=
|
||||
Sign "turn left"=
|
||||
Sign "take item"=
|
||||
|
@ -382,6 +442,7 @@ The Bot takes items out of a minecart in front of it, pushes the cart and then t
|
|||
|
||||
### techage.lua ###
|
||||
|
||||
no power=
|
||||
Ignite the techage charcoal lighter=
|
||||
Turns the bot off if the@nbattery power is below the@ngiven value in percent (1..99)=
|
||||
fully charged=
|
||||
|
|
50
signs.lua
|
@ -24,6 +24,18 @@ local function formspec(cmnd)
|
|||
"label[0.2,0;"..cmnd.."]"
|
||||
end
|
||||
|
||||
local function formspecXL(help_text, bot_cmnds)
|
||||
help_text = help_text or "no help"
|
||||
bot_cmnds = minetest.formspec_escape(bot_cmnds)
|
||||
return "size[9,8]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
"label[0,0;" .. S("Instructions:") .. "]" ..
|
||||
"label[0.2,0.6;" .. help_text .. "]" ..
|
||||
"textarea[0.3,4.0;9,4.9;code;" .. S("Code") .. ":;" .. bot_cmnds .. "]"
|
||||
end
|
||||
|
||||
local function register_sign(def)
|
||||
minetest.register_node("signs_bot:"..def.name, {
|
||||
description = def.description,
|
||||
|
@ -61,7 +73,45 @@ local function register_sign(def)
|
|||
})
|
||||
end
|
||||
|
||||
local function register_signXL(def)
|
||||
minetest.register_node("signs_bot:"..def.name, {
|
||||
description = def.description,
|
||||
inventory_image = def.image,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -1/16, -8/16, -1/16, 1/16, 4/16, 1/16},
|
||||
{ -6/16, -5/16, -2/16, 6/16, 3/16, -1/16},
|
||||
},
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
tiles = {
|
||||
"default_wood.png",
|
||||
"default_wood.png",
|
||||
"default_wood.png",
|
||||
"default_wood.png",
|
||||
"default_wood.png",
|
||||
"default_wood.png^"..def.image,
|
||||
},
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("signs_bot_cmnd", def.commands)
|
||||
meta:set_string("formspec", formspecXL(def.help_text, def.commands))
|
||||
meta:set_string("infotext", def.description)
|
||||
end,
|
||||
on_rotate = screwdriver.disallow,
|
||||
paramtype = "light",
|
||||
use_texture_alpha = signs_bot.CLIP,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, sign_bot_sign = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
signs_bot.register_sign = register_sign
|
||||
signs_bot.register_signXL = register_signXL
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
import os, fnmatch
|
||||
|
||||
|
||||
print ">>> Convert"
|
||||
for filename in os.listdir("./"):
|
||||
if fnmatch.fnmatch(filename, "*.png"):
|
||||
print(filename)
|
||||
os.system("pngquant --skip-if-larger --quality=8-32 --output ./%s.new ./%s" % (filename, filename))
|
||||
|
||||
print "\n>>> Copy"
|
||||
for filename in os.listdir("./"):
|
||||
if fnmatch.fnmatch(filename, "*.new"):
|
||||
print(filename)
|
||||
os.remove("./" + filename[:-4])
|
||||
os.rename("./" + filename, "./" + filename[:-4])
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
pngquant --skip-if-larger --quality=80 --strip *.png --ext .png --force
|
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 602 B After Width: | Height: | Size: 465 B |
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 179 B |