mirror of
https://gitea.your-land.de/Sokomine/yl_speak_up.git
synced 2025-06-19 05:38:02 +02:00
31 lines
1.1 KiB
Lua
31 lines
1.1 KiB
Lua
|
|
-- just some handling of variables
|
|
|
|
yl_speak_up.player_vars = {}
|
|
|
|
-- set the value of a variable used by a player in an NPC
|
|
yl_speak_up.set_quest_variable_value = function(owner_name, current_player_name, variable_name, new_value)
|
|
-- TODO: actually implement
|
|
minetest.chat_send_player(current_player_name, "[Info] Trying to set variable "..
|
|
tostring(variable_name).." to "..tostring(new_value)..".")
|
|
return false
|
|
end
|
|
|
|
-- get the value of a variable used by a player in an NPC
|
|
yl_speak_up.get_quest_variable_value = function(owner_name, current_player_name, variable_name)
|
|
-- TODO: actually implement
|
|
return tostring(owner_name).." "..tostring(current_player_name).." "..tostring(variable_name)
|
|
end
|
|
|
|
-- which variables can player pname read and use in preconditions?
|
|
yl_speak_up.get_quest_variables_with_read_access = function(pname)
|
|
-- TODO: actually implement
|
|
return {"var_1","var_2","var_3", "var_4"}
|
|
end
|
|
|
|
-- which variables can player pname write and use in effects/results?
|
|
yl_speak_up.get_quest_variables_with_write_access = function(pname)
|
|
-- TODO: actually implement
|
|
return {"var_1","var_2","var_3"}
|
|
end
|