Skip to content

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EEP-Benny committed Oct 1, 2020
1 parent 791e4bb commit 54d3afa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BetterContacts_BH2.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local betterContacts = {
_VERSION = { 1, 0, 0 },
_VERSION = { 1, 1, 0 },
_DESCRIPTION = 'Funktionsaufrufe mit Parametern (und mehr) in Kontaktpunkten',
_URL = 'https://github.com/EEP-Benny/BetterContacts',
_LICENSE = "MIT",
Expand Down
Binary file modified installer/BetterContacts_BH2.zip
Binary file not shown.
14 changes: 12 additions & 2 deletions installer/BetterContacts_BH2/Install_00/BetterContacts_BH2.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local betterContacts = {
_VERSION = { 1, 0, 0 },
_VERSION = { 1, 1, 0 },
_DESCRIPTION = 'Funktionsaufrufe mit Parametern (und mehr) in Kontaktpunkten',
_URL = 'https://github.com/EEP-Benny/BetterContacts',
_LICENSE = "MIT",
Expand All @@ -16,16 +16,22 @@ local function replaceDots(key)
end

local options = {
printVersionInfo = false,
printErrors = false,
replaceDots = false,
varname = "Zugname",
varnameTrackID = "",
chunkname = "KP-Eintrag",
preventReturn0 = true,
deprecatedUseGlobal = false,
}
betterContacts.getOptions = function() return options end
betterContacts.setOptions = function(newOptions)
if type(newOptions) == "table" then
-- if printVersionInfo changes from false to true, print the version info
if newOptions.printVersionInfo and not options.printVersionInfo then
print("BetterContacts_BH2 v".. table.concat(betterContacts._VERSION, ".").. " wurde eingebunden.")
end
-- transfer new options to local option table
for key, newValue in pairs(newOptions) do
local oldType = type(options[key])
Expand All @@ -48,7 +54,11 @@ betterContacts.setOptions = function(newOptions)
-- local function p is neccessary to prevent shadowing of variables z and s
templateString = "local p=function() %s end;return function(z) local s=Zugname;Zugname=z;p();Zugname=s end;"
else
templateString = "return function(" .. options.varname .. ") %s end"
local params = options.varname
if options.varnameTrackID ~= "" then
params = params .. "," .. options.varnameTrackID
end
templateString = "return function(" .. params .. ") %s end"
end
end
betterContacts.setOptions() -- initialize local variables from default options
Expand Down
8 changes: 4 additions & 4 deletions installer/BetterContacts_BH2/Installation.eep
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[Install_00]
Name_GER = "BetterContacts_BH2 v1.0"
Name_ENG = "BetterContacts_BH2 v1.0"
Name_FRA = "BetterContacts_BH2 v1.0"
Name_POL = "BetterContacts_BH2 v1.0"
Name_GER = "BetterContacts_BH2 v1.1"
Name_ENG = "BetterContacts_BH2 v1.1"
Name_FRA = "BetterContacts_BH2 v1.1"
Name_POL = "BetterContacts_BH2 v1.1"
Desc_GER = "BetterContacts macht Kontaktpunkte besser:[e]In das Eingabefeld f�r Lua-Aufrufe k�nnen nun auch Funktionsparameter eingegeben werden.[e][e]Mehr Infos unter https://emaps-eep.de/lua/bettercontacts"
Desc_ENG = "BetterContacts makes contact points better:[e]It is now possible to specify function parameters for Lua calls.[e][e]More information (in German) at https://emaps-eep.de/lua/bettercontacts"
Desc_FRA = "BetterContacts am�liore les points de contact:[e]Les param�tres de fonction peuvent maintenant �tre saisis dans le champ de saisie pour les appels Lua.[e][e]Plus d'informations (en allemand) sur https://emaps-eep.de/lua/bettercontacts"
Expand Down

0 comments on commit 54d3afa

Please sign in to comment.