aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/operation_panel.lua
blob: d0dd567805b21cd336544efa6db9d4496884d316 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

local function on_punch(pos, player)
	atlatc.interrupt.add(0, pos, {type="punch", punch=true})
end


minetest.register_node("advtrains_luaautomation:oppanel", {
	drawtype = "normal",
	tiles={"atlatc_oppanel.png"},
	description = "LuaAutomation operation panel",
	groups = {
		cracky = 1,
		save_in_nodedb=1,
	},
	after_place_node = atlatc.active.after_place_node,
	after_dig_node = atlatc.active.after_dig_node,
	on_receive_fields = atlatc.active.on_receive_fields,
	on_punch = on_punch,
	luaautomation = {
		fire_event=atlatc.active.run_in_env
	},
	digiline = {
		receptor = {},
		effector = {
			action = atlatc.active.on_digiline_receive
		},
	},
})
s="hl opt">, GENERIC_CMD_ATTACH_TO, GENERIC_CMD_SET_PHYSICS_OVERRIDE, GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES }; #include "object_properties.h" std::string gob_cmd_set_properties(const ObjectProperties &prop); ObjectProperties gob_read_set_properties(std::istream &is); std::string gob_cmd_update_position( v3f position, v3f velocity, v3f acceleration, f32 yaw, bool do_interpolate, bool is_movement_end, f32 update_interval ); std::string gob_cmd_set_texture_mod(const std::string &mod); std::string gob_cmd_set_sprite( v2s16 p, u16 num_frames, f32 framelength, bool select_horiz_by_yawpitch ); std::string gob_cmd_punched(s16 damage, s16 result_hp); #include "itemgroup.h" std::string gob_cmd_update_armor_groups(const ItemGroupList &armor_groups); std::string gob_cmd_update_physics_override(float physics_override_speed, float physics_override_jump, float physics_override_gravity, bool sneak, bool sneak_glitch); std::string gob_cmd_update_animation(v2f frames, float frame_speed, float frame_blend, bool frame_loop); std::string gob_cmd_update_bone_position(std::string bone, v3f position, v3f rotation); std::string gob_cmd_update_attachment(int parent_id, std::string bone, v3f position, v3f rotation); std::string gob_cmd_update_nametag_attributes(video::SColor color); #endif